From 85f6cefe70b502b706ff57f5e79d3c555641e969 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 8 Dec 2003 02:54:14 +0000 Subject: [PATCH] jbuehler-add-missing-extern-c-patch-20031207 Add extern C modifiers to non-C++ functions in Windows files --- src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp | 42 ++++++++++++++-------------- src/WINNT/afsadmsvr/TaAfsAdmSvrCell.cpp | 4 +- src/WINNT/afsadmsvr/TaAfsAdmSvrClient.cpp | 6 ++-- src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp | 18 ++++++------ src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp | 4 +- src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp | 10 +++--- src/WINNT/afssvrcfg/afscfg.cpp | 2 +- src/WINNT/afssvrmgr/svrmgr.cpp | 2 +- src/WINNT/afsusrmgr/main.cpp | 2 +- src/WINNT/client_config/main.cpp | 11 +------- src/WINNT/client_creds/main.cpp | 2 +- src/WINNT/client_exp/gui2fs.cpp | 8 +++--- 12 files changed, 51 insertions(+), 60 deletions(-) diff --git a/src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp b/src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp index fb5222f..d1ac9a5 100644 --- a/src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp +++ b/src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp @@ -22,7 +22,7 @@ // ...obtains a cookie to represent the calling process. The cookie should // be freed with AfsAdmSvr_Disconnect when the process disconnects. // -int AfsAdmSvr_Connect (STRING szClientAddress, DWORD *pidClient, ULONG *pStatus) +extern "C" int AfsAdmSvr_Connect (STRING szClientAddress, DWORD *pidClient, ULONG *pStatus) { // Make sure AfsClass initialized properly. If it's already init'd, // this won't hurt at all. @@ -51,7 +51,7 @@ int AfsAdmSvr_Connect (STRING szClientAddress, DWORD *pidClient, ULONG *pStatus) // seconds, lest the admin server think you've disconnected. (The // client library TaAfsAdmSvrClient.lib automatically handles this.) // -int AfsAdmSvr_Ping (DWORD idClient, ULONG *pStatus) +extern "C" int AfsAdmSvr_Ping (DWORD idClient, ULONG *pStatus) { AfsAdmSvr_Enter(); @@ -67,7 +67,7 @@ int AfsAdmSvr_Ping (DWORD idClient, ULONG *pStatus) // AfsAdmSvr_Disconnect // ...releases and invalidates the cookie representing the calling process. // -int AfsAdmSvr_Disconnect (DWORD idClient, ULONG *pStatus) +extern "C" int AfsAdmSvr_Disconnect (DWORD idClient, ULONG *pStatus) { AfsAdmSvr_Enter(); @@ -88,7 +88,7 @@ int AfsAdmSvr_Disconnect (DWORD idClient, ULONG *pStatus) // ...queries the specified AFS credentials token for its cell, user // and expiration date. // -int AfsAdmSvr_CrackCredentials (DWORD idClient, DWORD hCreds, STRING pszCell, STRING pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus) +extern "C" int AfsAdmSvr_CrackCredentials (DWORD idClient, DWORD hCreds, STRING pszCell, STRING pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus) { ULONG status; size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -121,7 +121,7 @@ int AfsAdmSvr_CrackCredentials (DWORD idClient, DWORD hCreds, STRING pszCell, ST // if the user already has credentials in the cell, returns a nonzero // token {hCreds}, suitable for use in AfsAdmSvr_OpenCell(). // -DWORD AfsAdmSvr_GetCredentials (DWORD idClient, STRING pszCell, ULONG *pStatus) +extern "C" DWORD AfsAdmSvr_GetCredentials (DWORD idClient, STRING pszCell, ULONG *pStatus) { ULONG status; size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -147,7 +147,7 @@ DWORD AfsAdmSvr_GetCredentials (DWORD idClient, STRING pszCell, ULONG *pStatus) // on behalf of the specified user. if successful, returns a nonzero // token {hCreds}, suitable for use in AfsAdmSvr_OpenCell(). // -DWORD AfsAdmSvr_SetCredentials (DWORD idClient, STRING pszCell, STRING pszUser, STRING pszPassword, ULONG *pStatus) +extern "C" DWORD AfsAdmSvr_SetCredentials (DWORD idClient, STRING pszCell, STRING pszUser, STRING pszPassword, ULONG *pStatus) { ULONG status; size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -173,7 +173,7 @@ DWORD AfsAdmSvr_SetCredentials (DWORD idClient, STRING pszCell, STRING pszUser, // when manipulating the specified cell. You should follow this // call with a Refresh request if necessary. // -int AfsAdmSvr_PushCredentials (DWORD idClient, DWORD hCreds, ASID idCell, ULONG *pStatus) +extern "C" int AfsAdmSvr_PushCredentials (DWORD idClient, DWORD hCreds, ASID idCell, ULONG *pStatus) { ULONG status; size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -201,7 +201,7 @@ int AfsAdmSvr_PushCredentials (DWORD idClient, DWORD hCreds, ASID idCell, ULONG // AfsAdmSvr_GetLocalCell // ...obtains the name of the primary cell used by the admin server // -int AfsAdmSvr_GetLocalCell (DWORD idClient, STRING pszCellName, ULONG *pStatus) +extern "C" int AfsAdmSvr_GetLocalCell (DWORD idClient, STRING pszCellName, ULONG *pStatus) { size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -224,7 +224,7 @@ int AfsAdmSvr_GetLocalCell (DWORD idClient, STRING pszCellName, ULONG *pStatus) // AfsAdmSvr_ErrorCodeTranslate // ...translates an error code into an English string // -int AfsAdmSvr_ErrorCodeTranslate (DWORD idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus) +extern "C" int AfsAdmSvr_ErrorCodeTranslate (DWORD idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus) { if (!AfsAppLib_TranslateError (pszErrorText, code, idLanguage)) return FALSE_(ERROR_INVALID_PARAMETER,pStatus); @@ -241,7 +241,7 @@ int AfsAdmSvr_ErrorCodeTranslate (DWORD idClient, ULONG code, LANGID idLanguage, // AfsAdmSvr_GetAction // ...returns information about a particular operation in progress. // -int AfsAdmSvr_GetAction (DWORD idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus) +extern "C" int AfsAdmSvr_GetAction (DWORD idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus) { Print (dlDETAIL, TEXT("Client 0x%08lX: GetAction (idAction=0x%08lX)"), idClient, idAction); @@ -261,7 +261,7 @@ int AfsAdmSvr_GetAction (DWORD idClient, DWORD idAction, LPASACTION pAction, ULO // be constrained to only including those operations initiated by // a particular client and/or performed in a particular cell. // -int AfsAdmSvr_GetActions (DWORD idClient, DWORD idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus) +extern "C" int AfsAdmSvr_GetActions (DWORD idClient, DWORD idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus) { Print (dlDETAIL, TEXT("Client 0x%08lX: GetActions (idClientSearch=0x%08lX, idCellSearch=0x%08lX)"), idClient, idClientSearch, idCellSearch); @@ -282,7 +282,7 @@ int AfsAdmSvr_GetActions (DWORD idClient, DWORD idClientSearch, ASID idCellSearc // AfsAdmSvr_OpenCell // ...opens a cell for administration. // -int AfsAdmSvr_OpenCell (DWORD idClient, DWORD hCreds, STRING pszCellName, DWORD dwScopeFlags, ASID *pidCell, ULONG *pStatus) +extern "C" int AfsAdmSvr_OpenCell (DWORD idClient, DWORD hCreds, STRING pszCellName, DWORD dwScopeFlags, ASID *pidCell, ULONG *pStatus) { size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -311,7 +311,7 @@ int AfsAdmSvr_OpenCell (DWORD idClient, DWORD hCreds, STRING pszCellName, DWORD // AfsAdmSvr_CloseCell // ...used by client to open a cell for administration. // -int AfsAdmSvr_CloseCell (DWORD idClient, ASID idCell, ULONG *pStatus) +extern "C" int AfsAdmSvr_CloseCell (DWORD idClient, ASID idCell, ULONG *pStatus) { size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -344,7 +344,7 @@ int AfsAdmSvr_CloseCell (DWORD idClient, ASID idCell, ULONG *pStatus) // which match the specified criteria--all volumes on a partition, // or all users named "b*" within a cell. // -int AfsAdmSvr_FindObject (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, AFSADMSVR_SEARCH_REFRESH SearchRefresh, STRING szName, ASID *pidObject, ULONG *pStatus) +extern "C" int AfsAdmSvr_FindObject (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, AFSADMSVR_SEARCH_REFRESH SearchRefresh, STRING szName, ASID *pidObject, ULONG *pStatus) { BOOL rc = TRUE; ULONG status = 0; @@ -445,7 +445,7 @@ int AfsAdmSvr_FindObject (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectTy } -int AfsAdmSvr_FindObjects (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, AFSADMSVR_SEARCH_REFRESH SearchRefresh, STRING szPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus) +extern "C" int AfsAdmSvr_FindObjects (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, AFSADMSVR_SEARCH_REFRESH SearchRefresh, STRING szPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus) { BOOL rc = TRUE; ULONG status = 0; @@ -549,7 +549,7 @@ int AfsAdmSvr_FindObjects (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectT // ...returns server-cached information about the specified object (or // objects). // -int AfsAdmSvr_GetObject (DWORD idClient, AFSADMSVR_GET_TYPE GetType, AFSADMSVR_GET_LEVEL GetLevel, ASID idObject, DWORD verProperties, LPASOBJPROP pProperties, ULONG *pStatus) +extern "C" int AfsAdmSvr_GetObject (DWORD idClient, AFSADMSVR_GET_TYPE GetType, AFSADMSVR_GET_LEVEL GetLevel, ASID idObject, DWORD verProperties, LPASOBJPROP pProperties, ULONG *pStatus) { size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -595,7 +595,7 @@ int AfsAdmSvr_GetObject (DWORD idClient, AFSADMSVR_GET_TYPE GetType, AFSADMSVR_G } -int AfsAdmSvr_GetObjects (DWORD idClient, AFSADMSVR_GET_TYPE GetType, AFSADMSVR_GET_LEVEL GetLevel, LPASIDLIST pListObjects, LPASOBJPROPLIST *ppListObjectProperties, ULONG *pStatus) +extern "C" int AfsAdmSvr_GetObjects (DWORD idClient, AFSADMSVR_GET_TYPE GetType, AFSADMSVR_GET_LEVEL GetLevel, LPASIDLIST pListObjects, LPASOBJPROPLIST *ppListObjectProperties, ULONG *pStatus) { size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -634,7 +634,7 @@ int AfsAdmSvr_GetObjects (DWORD idClient, AFSADMSVR_GET_TYPE GetType, AFSADMSVR_ // ...invalidates the server's cache of information about the specified // object or objects. // -int AfsAdmSvr_RefreshObject (DWORD idClient, ASID idObject, ULONG *pStatus) +extern "C" int AfsAdmSvr_RefreshObject (DWORD idClient, ASID idObject, ULONG *pStatus) { size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -654,7 +654,7 @@ int AfsAdmSvr_RefreshObject (DWORD idClient, ASID idObject, ULONG *pStatus) } -int AfsAdmSvr_RefreshObjects (DWORD idClient, LPASIDLIST pListObjects, ULONG *pStatus) +extern "C" int AfsAdmSvr_RefreshObjects (DWORD idClient, LPASIDLIST pListObjects, ULONG *pStatus) { size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -681,7 +681,7 @@ int AfsAdmSvr_RefreshObjects (DWORD idClient, LPASIDLIST pListObjects, ULONG *pS // be called on a dedicated thread by the client. (TaAfsAdmSvrClient.lib // automatically handles this.) // -void AfsAdmSvr_CallbackHost (void) +extern "C" void AfsAdmSvr_CallbackHost (void) { AfsAdmSvr_CallbackManager(); } @@ -691,7 +691,7 @@ void AfsAdmSvr_CallbackHost (void) // AfsAdmSvr_GetRandomKey // ...returns a randomly-generated 8-byte encryption key // -int AfsAdmSvr_GetRandomKey (DWORD idClient, ASID idCell, BYTE keyData[ ENCRYPTIONKEYLENGTH ], ULONG *pStatus) +extern "C" int AfsAdmSvr_GetRandomKey (DWORD idClient, ASID idCell, BYTE keyData[ ENCRYPTIONKEYLENGTH ], ULONG *pStatus) { if (!AfsAdmSvr_fIsValidClient (idClient)) return FALSE_(ERROR_INVALID_PARAMETER,pStatus); diff --git a/src/WINNT/afsadmsvr/TaAfsAdmSvrCell.cpp b/src/WINNT/afsadmsvr/TaAfsAdmSvrCell.cpp index 18d4d2b..a511b88 100644 --- a/src/WINNT/afsadmsvr/TaAfsAdmSvrCell.cpp +++ b/src/WINNT/afsadmsvr/TaAfsAdmSvrCell.cpp @@ -22,7 +22,7 @@ // AfsAdmSvr_ChangeCell // ...changes a cell's properties. // -int AfsAdmSvr_ChangeCell (DWORD idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus) +extern "C" int AfsAdmSvr_ChangeCell (DWORD idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus) { ASACTION Action; Action.Action = ACTION_CELL_CHANGE; @@ -60,7 +60,7 @@ int AfsAdmSvr_ChangeCell (DWORD idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PA // AfsAdmSvr_SetRefreshRate // ...changes the refresh rate for a specific cell // -int AfsAdmSvr_SetRefreshRate (DWORD idClient, ASID idCell, ULONG cminRefreshRate, ULONG *pStatus) +extern "C" int AfsAdmSvr_SetRefreshRate (DWORD idClient, ASID idCell, ULONG cminRefreshRate, ULONG *pStatus) { if (!AfsAdmSvr_fIsValidClient (idClient)) return FALSE_(ERROR_INVALID_PARAMETER,pStatus); diff --git a/src/WINNT/afsadmsvr/TaAfsAdmSvrClient.cpp b/src/WINNT/afsadmsvr/TaAfsAdmSvrClient.cpp index 9c2d760..b38028a 100644 --- a/src/WINNT/afsadmsvr/TaAfsAdmSvrClient.cpp +++ b/src/WINNT/afsadmsvr/TaAfsAdmSvrClient.cpp @@ -32,12 +32,12 @@ static struct * */ -void __RPC_FAR * __RPC_USER MIDL_user_allocate (size_t cbAllocate) +extern "C" void __RPC_FAR * __RPC_USER MIDL_user_allocate (size_t cbAllocate) { return (void __RPC_FAR *)Allocate (cbAllocate); } -void __RPC_USER MIDL_user_free (void __RPC_FAR *pData) +extern "C" void __RPC_USER MIDL_user_free (void __RPC_FAR *pData) { Free (pData); } @@ -883,7 +883,7 @@ BOOL ADMINAPI asc_ActionListenClear (DWORD idClient, HWND hNotify, ULONG *pStatu // this routine is used to notify the client whenever an action is // initiated or completed. // -void AfsAdmSvrCallback_Action (LPASACTION pAction, BOOL fFinished) +extern "C" void AfsAdmSvrCallback_Action (LPASACTION pAction, BOOL fFinished) { NotifyActionListeners (pAction, fFinished); } diff --git a/src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp b/src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp index 66fa8a2..4ad14b8 100644 --- a/src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp +++ b/src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp @@ -24,7 +24,7 @@ extern "C" { // AfsAdmSvr_ChangeGroup // ...changes a group account's properties. // -int AfsAdmSvr_ChangeGroup (DWORD idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus) +extern "C" int AfsAdmSvr_ChangeGroup (DWORD idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus) { ASACTION Action; Action.Action = ACTION_GROUP_CHANGE; @@ -101,7 +101,7 @@ int AfsAdmSvr_ChangeGroup (DWORD idClient, ASID idCell, ASID idGroup, LPAFSADMSV // AfsAdmSvr_GetGroupMembers // ...retrieves the list of users which belong to a group // -int AfsAdmSvr_GetGroupMembers (DWORD idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus) +extern "C" int AfsAdmSvr_GetGroupMembers (DWORD idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus) { size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -164,7 +164,7 @@ int AfsAdmSvr_GetGroupMembers (DWORD idClient, ASID idCell, ASID idGroup, LPASID // AfsAdmSvr_GetGroupMembership // ...retrieves the list of groups to which a user or group belongs // -int AfsAdmSvr_GetGroupMembership (DWORD idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus) +extern "C" int AfsAdmSvr_GetGroupMembership (DWORD idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus) { size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -229,7 +229,7 @@ int AfsAdmSvr_GetGroupMembership (DWORD idClient, ASID idCell, ASID idMember, LP // AfsAdmSvr_GetGroupOwnership // ...retrieves the list of groups which a user owns // -int AfsAdmSvr_GetGroupOwnership (DWORD idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus) +extern "C" int AfsAdmSvr_GetGroupOwnership (DWORD idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus) { size_t iOp = AfsAdmSvr_BeginOperation (idClient); @@ -294,7 +294,7 @@ int AfsAdmSvr_GetGroupOwnership (DWORD idClient, ASID idCell, ASID idOwner, LPAS // AfsAdmSvr_AddGroupMember // ...adds a member to the specified group // -int AfsAdmSvr_AddGroupMember (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus) +extern "C" int AfsAdmSvr_AddGroupMember (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus) { ASACTION Action; Action.Action = ACTION_GROUP_MEMBER_ADD; @@ -324,7 +324,7 @@ int AfsAdmSvr_AddGroupMember (DWORD idClient, ASID idCell, ASID idGroup, ASID id // AfsAdmSvr_RemoveGroupMember // ...removes a member from the specified group // -int AfsAdmSvr_RemoveGroupMember (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus) +extern "C" int AfsAdmSvr_RemoveGroupMember (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus) { ASACTION Action; Action.Action = ACTION_GROUP_MEMBER_REMOVE; @@ -354,7 +354,7 @@ int AfsAdmSvr_RemoveGroupMember (DWORD idClient, ASID idCell, ASID idGroup, ASID // AfsAdmSvr_RenameGroup // ...changes a group's name // -int AfsAdmSvr_RenameGroup (DWORD idClient, ASID idCell, ASID idGroup, STRING szNewGroupName, ULONG *pStatus) +extern "C" int AfsAdmSvr_RenameGroup (DWORD idClient, ASID idCell, ASID idGroup, STRING szNewGroupName, ULONG *pStatus) { ASACTION Action; Action.Action = ACTION_GROUP_RENAME; @@ -384,7 +384,7 @@ int AfsAdmSvr_RenameGroup (DWORD idClient, ASID idCell, ASID idGroup, STRING szN // AfsAdmSvr_CreateGroup // ...creates a new PTS group // -int AfsAdmSvr_CreateGroup (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus) +extern "C" int AfsAdmSvr_CreateGroup (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus) { ASACTION Action; Action.Action = ACTION_GROUP_CREATE; @@ -429,7 +429,7 @@ int AfsAdmSvr_CreateGroup (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_ // AfsAdmSvr_DeleteGroup // ...deletes a PTS group // -int AfsAdmSvr_DeleteGroup (DWORD idClient, ASID idCell, ASID idGroup, ULONG *pStatus) +extern "C" int AfsAdmSvr_DeleteGroup (DWORD idClient, ASID idCell, ASID idGroup, ULONG *pStatus) { ASACTION Action; Action.Action = ACTION_GROUP_DELETE; diff --git a/src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp b/src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp index b28782e..e9d67c3 100644 --- a/src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp +++ b/src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp @@ -184,13 +184,13 @@ int cdecl main (int argc, char **argv) } -void __RPC_FAR * __RPC_USER MIDL_user_allocate (size_t cbAllocate) +extern "C" void __RPC_FAR * __RPC_USER MIDL_user_allocate (size_t cbAllocate) { return (void __RPC_FAR *)Allocate (cbAllocate); } -void __RPC_USER MIDL_user_free (void __RPC_FAR *pData) +extern "C" void __RPC_USER MIDL_user_free (void __RPC_FAR *pData) { Free (pData); } diff --git a/src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp b/src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp index ee1f535..7e5e333 100644 --- a/src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp +++ b/src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp @@ -24,7 +24,7 @@ extern "C" { // AfsAdmSvr_ChangeUser // ...changes a user account's properties. // -int AfsAdmSvr_ChangeUser (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus) +extern "C" int AfsAdmSvr_ChangeUser (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus) { ASACTION Action; Action.Action = ACTION_USER_CHANGE; @@ -113,7 +113,7 @@ int AfsAdmSvr_ChangeUser (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_ // string in {keyString} to encrypt the specified string; otherwise, // pass a valid encryption key in {keyData}. // -int AfsAdmSvr_SetUserPassword (DWORD idClient, ASID idCell, ASID idUser, int keyVersion, STRING keyString, BYTE keyData[ ENCRYPTIONKEYLENGTH ], ULONG *pStatus) +extern "C" int AfsAdmSvr_SetUserPassword (DWORD idClient, ASID idCell, ASID idUser, int keyVersion, STRING keyString, BYTE keyData[ ENCRYPTIONKEYLENGTH ], ULONG *pStatus) { BOOL rc = TRUE; ULONG status = 0; @@ -153,7 +153,7 @@ int AfsAdmSvr_SetUserPassword (DWORD idClient, ASID idCell, ASID idUser, int key // AfsAdmSvr_UnlockUser // ...unlocks a user's account // -int AfsAdmSvr_UnlockUser (DWORD idClient, ASID idCell, ASID idUser, ULONG *pStatus) +extern "C" int AfsAdmSvr_UnlockUser (DWORD idClient, ASID idCell, ASID idUser, ULONG *pStatus) { ASACTION Action; Action.Action = ACTION_USER_UNLOCK; @@ -182,7 +182,7 @@ int AfsAdmSvr_UnlockUser (DWORD idClient, ASID idCell, ASID idUser, ULONG *pStat // AfsAdmSvr_CreateUser // ...creates a new user account // -int AfsAdmSvr_CreateUser (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus) +extern "C" int AfsAdmSvr_CreateUser (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus) { ASACTION Action; Action.Action = ACTION_USER_CREATE; @@ -222,7 +222,7 @@ int AfsAdmSvr_CreateUser (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PA // AfsAdmSvr_DeleteUser // ...deletes a user's account // -int AfsAdmSvr_DeleteUser (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus) +extern "C" int AfsAdmSvr_DeleteUser (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus) { ASACTION Action; Action.Action = ACTION_USER_DELETE; diff --git a/src/WINNT/afssvrcfg/afscfg.cpp b/src/WINNT/afssvrcfg/afscfg.cpp index 2f41449..f374256 100644 --- a/src/WINNT/afssvrcfg/afscfg.cpp +++ b/src/WINNT/afssvrcfg/afscfg.cpp @@ -121,7 +121,7 @@ LOGFILE g_LogFile; * EXPORTED FUNCTIONS _________________________________________________________________ * */ -int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pszCmdLineA, int nCmdShow) +extern "C" int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pszCmdLineA, int nCmdShow) { afs_status_t nStatus; diff --git a/src/WINNT/afssvrmgr/svrmgr.cpp b/src/WINNT/afssvrmgr/svrmgr.cpp index d253362..eb1aec2 100644 --- a/src/WINNT/afssvrmgr/svrmgr.cpp +++ b/src/WINNT/afssvrmgr/svrmgr.cpp @@ -59,7 +59,7 @@ void ExitApplication (void); * */ -int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR pszCmdLineA, int nCmdShow) +extern "C" int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR pszCmdLineA, int nCmdShow) { LPTSTR pszCmdLine = AnsiToString (pszCmdLineA); diff --git a/src/WINNT/afsusrmgr/main.cpp b/src/WINNT/afsusrmgr/main.cpp index 79e4b30..5095230 100644 --- a/src/WINNT/afsusrmgr/main.cpp +++ b/src/WINNT/afsusrmgr/main.cpp @@ -56,7 +56,7 @@ void ExitApplication (void); * */ -int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR pszCmdLineA, int nCmdShow) +extern "C" int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR pszCmdLineA, int nCmdShow) { LPTSTR pszCmdLine = AnsiToString (pszCmdLineA); diff --git a/src/WINNT/client_config/main.cpp b/src/WINNT/client_config/main.cpp index 5b10bed..ad4255f 100644 --- a/src/WINNT/client_config/main.cpp +++ b/src/WINNT/client_config/main.cpp @@ -34,21 +34,12 @@ extern "C" { GLOBALS g; - -/* - * PROTOTYPES _________________________________________________________________ - * - */ - -void Quit (void); - - /* * ROUTINES ___________________________________________________________________ * */ -int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pCmdLine, int nCmdShow) +extern "C" int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pCmdLine, int nCmdShow) { TaLocale_LoadCorrespondingModule (hInst); diff --git a/src/WINNT/client_creds/main.cpp b/src/WINNT/client_creds/main.cpp index 9de534f..f2b9618 100644 --- a/src/WINNT/client_creds/main.cpp +++ b/src/WINNT/client_creds/main.cpp @@ -53,7 +53,7 @@ BOOL IsServerInstalled (void); * */ -int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pCmdLine, int nCmdShow) +extern "C" int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pCmdLine, int nCmdShow) { Shortcut_Init(); TaLocale_LoadCorrespondingModule (hInst); diff --git a/src/WINNT/client_exp/gui2fs.cpp b/src/WINNT/client_exp/gui2fs.cpp index 0359abf..3769ca1 100644 --- a/src/WINNT/client_exp/gui2fs.cpp +++ b/src/WINNT/client_exp/gui2fs.cpp @@ -368,7 +368,7 @@ int foldcmp (register char *a, register char *b) } } -void ZapList(struct AclEntry *alist) +extern "C" void ZapList(struct AclEntry *alist) { register struct AclEntry *tp, *np; @@ -378,14 +378,14 @@ void ZapList(struct AclEntry *alist) } } -void ZapAcl (struct Acl *acl) +extern "C" void ZapAcl (struct Acl *acl) { ZapList(acl->pluslist); ZapList(acl->minuslist); free(acl); } -int PruneList (struct AclEntry **ae, int dfs) +extern "C" int PruneList (struct AclEntry **ae, int dfs) { struct AclEntry **lp = ae; struct AclEntry *te, *ne; @@ -554,7 +554,7 @@ struct Acl *ParseAcl(char *astr) /* clean up an access control list of its bad entries; return 1 if we made any changes to the list, and 0 otherwise */ -int CleanAcl(struct Acl *aa) +extern "C" int CleanAcl(struct Acl *aa) { register struct AclEntry *te, **le, *ne; int changes; -- 1.7.1