[OpenAFS-devel] [PATCH] flexelint: add missing extern "C"

Joe Buehler jbuehler@hekimian.com
Fri, 21 Nov 2003 14:34:48 -0500


This is a multi-part message in MIME format.
--------------060809080603070006050307
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

This patch adds extern "C" to a number of function definitions
where flexelint complains it is missing.
-- 
Joe Buehler


--------------060809080603070006050307
Content-Type: text/plain;
 name="temp.patch.missing-extern-C"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="temp.patch.missing-extern-C"

--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -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.
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -51,7 +51,7 @@
       //    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();
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -67,7 +67,7 @@
       // 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();
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -88,7 +88,7 @@
       // ...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);
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -121,7 +121,7 @@
       //    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);
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -147,7 +147,7 @@
       //    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);
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -173,7 +173,7 @@
       //    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);
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -201,7 +201,7 @@
       // 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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -224,7 +224,7 @@
       // 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);
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -241,7 +241,7 @@
       // 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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -261,7 +261,7 @@
       //    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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -282,7 +282,7 @@
       // 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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -311,7 +311,7 @@
       // 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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -344,7 +344,7 @@
       //    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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -445,7 +464,7 @@
 }
 
 
-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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -549,7 +577,7 @@
       // ...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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -595,7 +623,7 @@
 }
 
 
-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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -634,7 +662,7 @@
       // ...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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -654,7 +682,7 @@
 }
 
 
-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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -681,7 +709,7 @@
       //    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();
 }
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp	2003-11-20 16:13:46.000000000 -0500
@@ -691,7 +719,7 @@
       // 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);
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrCell.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrCell.cpp	2003-11-19 09:25:22.000000000 -0500
@@ -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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrCell.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrCell.cpp	2003-11-19 09:25:22.000000000 -0500
@@ -60,7 +60,7 @@
       // 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);
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrClient.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrClient.cpp	2003-11-20 15:15:18.000000000 -0500
@@ -32,12 +32,12 @@
  *
  */
 
-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);
 }
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrClient.cpp.~1~	2000-11-04 05:01:13.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrClient.cpp	2003-11-20 15:15:18.000000000 -0500
@@ -883,7 +884,7 @@
       //    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);
 }
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp.~1~	2000-11-04 05:01:16.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp	2003-11-19 09:25:40.000000000 -0500
@@ -24,7 +24,7 @@
       // 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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp.~1~	2000-11-04 05:01:16.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp	2003-11-19 09:25:40.000000000 -0500
@@ -101,7 +101,7 @@
       // 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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp.~1~	2000-11-04 05:01:16.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp	2003-11-19 09:25:40.000000000 -0500
@@ -164,7 +164,7 @@
       // 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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp.~1~	2000-11-04 05:01:16.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp	2003-11-19 09:25:40.000000000 -0500
@@ -229,7 +229,7 @@
       // 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);
 
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp.~1~	2000-11-04 05:01:16.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp	2003-11-19 09:25:40.000000000 -0500
@@ -294,7 +294,7 @@
       // 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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp.~1~	2000-11-04 05:01:16.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp	2003-11-19 09:25:40.000000000 -0500
@@ -324,7 +324,7 @@
       // 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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp.~1~	2000-11-04 05:01:16.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp	2003-11-19 09:25:40.000000000 -0500
@@ -354,7 +354,7 @@
       // 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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp.~1~	2000-11-04 05:01:16.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp	2003-11-19 09:25:40.000000000 -0500
@@ -384,7 +384,7 @@
       // 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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp.~1~	2000-11-04 05:01:16.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp	2003-11-19 09:25:40.000000000 -0500
@@ -429,7 +429,7 @@
       // 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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp.~1~	2000-11-04 05:01:16.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp	2003-11-20 14:39:55.000000000 -0500
@@ -194,13 +184,13 @@
 }
 
 
-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);
 }
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp.~1~	2000-11-04 05:01:17.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp	2003-11-19 09:25:58.000000000 -0500
@@ -24,7 +24,7 @@
       // 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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp.~1~	2000-11-04 05:01:17.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp	2003-11-19 09:25:58.000000000 -0500
@@ -113,7 +113,7 @@
       //    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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp.~1~	2000-11-04 05:01:17.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp	2003-11-19 09:25:58.000000000 -0500
@@ -153,7 +153,7 @@
       // 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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp.~1~	2000-11-04 05:01:17.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp	2003-11-19 09:25:58.000000000 -0500
@@ -182,7 +182,7 @@
       // 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;
--- ./src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp.~1~	2000-11-04 05:01:17.000000000 -0500
+++ ./src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp	2003-11-19 09:25:58.000000000 -0500
@@ -222,7 +222,7 @@
       // 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;
--- ./src/WINNT/afssvrcfg/afscfg.cpp.~1~	2001-09-19 19:18:54.000000000 -0400
+++ ./src/WINNT/afssvrcfg/afscfg.cpp	2003-11-20 14:11:56.000000000 -0500
@@ -121,7 +121,7 @@
  * 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;
 
--- ./src/WINNT/afssvrmgr/svrmgr.cpp.~1~	2000-11-04 05:02:15.000000000 -0500
+++ ./src/WINNT/afssvrmgr/svrmgr.cpp	2003-11-19 16:50:33.000000000 -0500
@@ -59,7 +59,7 @@
  *
  */
 
-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);
 
--- ./src/WINNT/afsusrmgr/main.cpp.~1~	2000-11-04 05:02:27.000000000 -0500
+++ ./src/WINNT/afsusrmgr/main.cpp	2003-11-19 09:27:35.000000000 -0500
@@ -56,7 +56,7 @@
  *
  */
 
-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);
 
--- ./src/WINNT/client_config/main.cpp.~1~	2000-11-04 05:02:38.000000000 -0500
+++ ./src/WINNT/client_config/main.cpp	2003-11-20 14:40:23.000000000 -0500
@@ -34,21 +34,12 @@
 
 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);
 
--- ./src/WINNT/client_creds/main.cpp.~1~	2002-01-08 15:44:41.000000000 -0500
+++ ./src/WINNT/client_creds/main.cpp	2003-11-20 14:40:27.000000000 -0500
@@ -53,7 +52,7 @@
  *
  */
 
-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);
--- ./src/WINNT/client_exp/gui2fs.cpp.~1~	2003-08-25 14:24:25.000000000 -0400
+++ ./src/WINNT/client_exp/gui2fs.cpp	2003-11-20 13:46:23.000000000 -0500
@@ -368,7 +368,7 @@
     }
 }
 
-void ZapList(struct AclEntry *alist)
+extern "C" void ZapList(struct AclEntry *alist)
 {
     register struct AclEntry *tp, *np;
 
--- ./src/WINNT/client_exp/gui2fs.cpp.~1~	2003-08-25 14:24:25.000000000 -0400
+++ ./src/WINNT/client_exp/gui2fs.cpp	2003-11-20 13:46:23.000000000 -0500
@@ -378,14 +378,14 @@
     }
 }
 
-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;
--- ./src/WINNT/client_exp/gui2fs.cpp.~1~	2003-08-25 14:24:25.000000000 -0400
+++ ./src/WINNT/client_exp/gui2fs.cpp	2003-11-20 13:46:23.000000000 -0500
@@ -554,7 +554,7 @@
 
 /* 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;

--------------060809080603070006050307--