Windows: Remove RXAFS* from afsrpc.dll
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 27 Feb 2013 20:07:57 +0000 (15:07 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 28 Feb 2013 10:54:24 +0000 (02:54 -0800)
afsrpc.dll is supposed to be the multi-threaded dynamic loadable
version of the RX package.  It has also included the RXAFS and
RXAFSCB client functions from src/fsint.  Including the RXAFS* is
nice in theory but in practice the afsd_service.exe must link to
afsint.lib anyway in order to obtain access to RXAFSCB_ExecuteRequest()
which is part of the server portion.  Linking to both results in
multiple instances of the same symbols in which case afsint.lib
must be linked to first and the dynamic version of the functions
are ignored.

The only other module that used RXAFS* functions from afsrpc.dll
is the adminutil library from the libadmin package.  adminutil
doesn't implement the server functions but it can just as easily
link against afsint.lib.

Removing RXAFS* from afsrpc.dll results in a library that only
contains RX, RXSTATS, core xdr and rxkad.

This patchset also fixes some minor bugs:

 1. $(UTILOBJS) were not being linked to the library due to
    a typo.

 2. Always use multi-thread safe versions of afsutil.lib

Change-Id: I5cc6d485a763d5a17735abd35d193fb7b0d280e5
Reviewed-on: http://gerrit.openafs.org/9300
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsd/NTMakefile
src/libadmin/adminutil/NTMakefile
src/libafsrpc/NTMakefile
src/libafsrpc/afsrpc.def

index a234022..4aff925 100644 (file)
@@ -425,13 +425,13 @@ EXELIBS = \
 
 EXELIBS2 = \
         $(DESTDIR)\lib\afsrpc.lib \
+        $(DESTDIR)\lib\afsauthent.lib \
+       $(DESTDIR)\lib\afs\mtafsint.lib \
        $(DESTDIR)\lib\afs\afsprot.lib \
        $(DESTDIR)\lib\afs\afspioctl.lib \
        $(DESTDIR)\lib\afs\afscom_err.lib \
        $(DESTDIR)\lib\afs\afscmd.lib \
-       $(DESTDIR)\lib\afs\afsutil.lib \
-       $(DESTDIR)\lib\afsubik.lib \
-       $(DESTDIR)\lib\afsrxkad.lib \
+       $(DESTDIR)\lib\afs\mtafsutil.lib \
        $(DESTDIR)\lib\afslwp.lib \
        $(DESTDIR)\lib\libosi.lib \
        $(DESTDIR)\lib\libafsconf.lib \
@@ -484,12 +484,11 @@ AFSD_EXEFILE = $(EXEDIR)\afsd.exe
 
 AFSD_EXELIBS =\
        $(DESTDIR)\lib\libosi.lib \
+       $(DESTDIR)\lib\afsrpc.lib \
+       $(DESTDIR)\lib\afsauthent.lib \
        $(DESTDIR)\lib\afs\mtafsvldb.lib \
        $(DESTDIR)\lib\afs\mtafsint.lib \
-       $(DESTDIR)\lib\afsrpc.lib \
-        $(DESTDIR)\lib\afsrxkad.lib \
        $(DESTDIR)\lib\afs\mtafsutil.lib \
-       $(DESTDIR)\lib\afsauthent.lib \
        $(DESTDIR)\lib\libafsconf.lib \
        $(DESTDIR)\lib\afs\afsreg.lib \
        $(DESTDIR)\lib\afspthread.lib \
index 92b7c95..3e37919 100644 (file)
@@ -137,9 +137,10 @@ ILIBDIR = $(DESTDIR)\lib\afs
 
 DLLLIBS =\
        $(DESTDIR)\lib\afspthread.lib \
+       $(DESTDIR)\lib\afs\mtafsint.lib \
        $(DESTDIR)\lib\afsrpc.lib \
-        $(DESTDIR)\lib\afs\afsutil.lib \
        $(DESTDIR)\lib\afsauthent.lib \
+        $(DESTDIR)\lib\afs\mtafsutil.lib \
         $(DESTDIR)\lib\afs\afsreg.lib \
        $(DESTDIR)\lib\opr.lib \
         $(DESTDIR)\lib\afsroken.lib
index 1767036..732cd18 100644 (file)
@@ -47,18 +47,22 @@ LIBRXKAD_OBJS = $(OUT)\rxkad_client.obj $(OUT)\rxkad_server.obj $(OUT)\rxkad_com
 
 LIBRXKAD_REGOBJS = $(OUT)\bg-fcrypt.obj
 
-UTILOBJS = $(OUT)\winsock_nt.obj
+UTILOBJS = $(OUT)\winsock_nt.obj \
+           $(OUT)\pthread_glock.obj
 
 COMERRBJS = $(OUT)\error_msg.obj $(OUT)\et_name.obj $(OUT)\com_err.obj
 
 LWPOBJS = $(OUT)\lock.obj $(OUT)\fasttime.obj $(OUT)\threadname.obj
 
-FSINTBJS = $(OUT)\afsint.cs.obj $(OUT)\afsint.xdr.obj $(OUT)\afscbint.cs.obj $(OUT)\afscbint.xdr.obj \
-       $(OUT)\afsaux.obj
+FSINTBJS = $(OUT)\afsint.cs.obj \
+           $(OUT)\afsint.xdr.obj \
+           $(OUT)\afscbint.cs.obj \
+           $(OUT)\afscbint.xdr.obj \
+          $(OUT)\afsaux.obj
 
 DLLOBJS = $(MULTIOBJS) $(RXOBJS) $(XDROBJS) $(RXSTATBJS) $(LIBRXKAD_OBJS) \
-       $(LIBRXKAD_REGOBJS) $(UTILBJS) $(COMERRBJS) \
-       $(FSINTBJS) $(LWPOBJS) $(OUT)\afsrpc.res
+       $(LIBRXKAD_REGOBJS) $(UTILOBJS) $(COMERRBJS) \
+        $(LWPOBJS) $(OUT)\afsrpc.res
 
 $(MULTIOBJS) $(RXOBJS) $(XDROBJS):$(RX)\$$(@B).c
        $(C2OBJ) $** -I$(RX) 
@@ -85,12 +89,8 @@ NTMAKE = nmake /nologo /f ntmakefile
 
 
 DLLLIBS =\
-!IF (("$(SYS_NAME)"=="i386_win95" ) || ("$(SYS_NAME)"=="I386_WIN95" ))
-       $(DESTDIR)\lib\win95\afspthread.lib \
-!ELSE
        $(DESTDIR)\lib\afspthread.lib \
-!ENDIF
-       $(DESTDIR)\lib\afs\afsutil.lib \
+       $(DESTDIR)\lib\afs\mtafsutil.lib \
        $(DESTDIR)\lib\afs\afsreg.lib \
        $(DESTDIR)\lib\opr.lib \
        $(DESTDIR)\lib\afshcrypto.lib \
index 5d5a4b3..b217cc4 100755 (executable)
@@ -128,64 +128,64 @@ EXPORTS
        rxi_callAbortThreshhold                 @140 DATA
        rxi_callAbortDelay                      @141 DATA
        RXSTATS_function_names                  @142 DATA
-       RXAFSCB_function_names                  @143 DATA
-       RXAFSCB_CallBack                        @144
-       StartRXAFSCB_CallBack                   @145
-       EndRXAFSCB_CallBack                     @146
-       RXAFSCB_InitCallBackState               @147
-       RXAFSCB_Probe                           @148
-       StartRXAFSCB_Probe                      @149
-       EndRXAFSCB_Probe                        @150
-       RXAFSCB_GetLock                         @151
-       RXAFSCB_GetCE                           @152
-       RXAFSCB_XStatsVersion                   @153
-       RXAFSCB_GetXStats                       @154
-       RXAFSCB_InitCallBackState2              @155
-       RXAFSCB_WhoAreYou                       @156
-       RXAFSCB_InitCallBackState3              @157
-       RXAFSCB_ProbeUuid                       @158
-       StartRXAFSCB_ProbeUuid                  @159
-       EndRXAFSCB_ProbeUuid                    @160
-       RXAFSCB_GetServerPrefs                  @161
-       RXAFSCB_GetCellServDB                   @162
-       RXAFSCB_GetLocalCell                    @163
-       RXAFSCB_GetCacheConfig                  @164
-       StartRXAFS_FetchData                    @165
-       EndRXAFS_FetchData                      @166
-       RXAFS_FetchACL                          @167
-       RXAFS_FetchStatus                       @168
-       StartRXAFS_StoreData                    @169
-       EndRXAFS_StoreData                      @170
-       RXAFS_StoreACL                          @171
-       RXAFS_StoreStatus                       @172
-       RXAFS_RemoveFile                        @173
-       RXAFS_CreateFile                        @174
-       RXAFS_Rename                            @175
-       RXAFS_Symlink                           @176
-       RXAFS_Link                              @177
-       RXAFS_MakeDir                           @178
-       RXAFS_RemoveDir                         @179
-       RXAFS_OldSetLock                        @180
-       RXAFS_OldExtendLock                     @181
-       RXAFS_OldReleaseLock                    @182
-       RXAFS_GetStatistics                     @183
-       RXAFS_GiveUpCallBacks                   @184
-       RXAFS_GetVolumeInfo                     @185
-       RXAFS_GetVolumeStatus                   @186
-       RXAFS_SetVolumeStatus                   @187
-       RXAFS_GetRootVolume                     @188
-       RXAFS_CheckToken                        @189
-       RXAFS_GetTime                           @190
-       RXAFS_NGetVolumeInfo                    @191
-       RXAFS_BulkStatus                        @192
-       RXAFS_SetLock                           @193
-       RXAFS_ExtendLock                        @194
-       RXAFS_ReleaseLock                       @195
-       RXAFS_XStatsVersion                     @196
-       RXAFS_GetXStats                         @197
-       RXAFS_Lookup                            @198
-       RXAFS_FlushCPS                          @199
-       RXAFS_DFSSymlink                        @200
+;      RXAFSCB_function_names                  @143 DATA
+;      RXAFSCB_CallBack                        @144
+;      StartRXAFSCB_CallBack                   @145
+;      EndRXAFSCB_CallBack                     @146
+;      RXAFSCB_InitCallBackState               @147
+;      RXAFSCB_Probe                           @148
+;      StartRXAFSCB_Probe                      @149
+;      EndRXAFSCB_Probe                        @150
+;      RXAFSCB_GetLock                         @151
+;      RXAFSCB_GetCE                           @152
+;      RXAFSCB_XStatsVersion                   @153
+;      RXAFSCB_GetXStats                       @154
+;      RXAFSCB_InitCallBackState2              @155
+;      RXAFSCB_WhoAreYou                       @156
+;      RXAFSCB_InitCallBackState3              @157
+;      RXAFSCB_ProbeUuid                       @158
+;      StartRXAFSCB_ProbeUuid                  @159
+;      EndRXAFSCB_ProbeUuid                    @160
+;      RXAFSCB_GetServerPrefs                  @161
+;      RXAFSCB_GetCellServDB                   @162
+;      RXAFSCB_GetLocalCell                    @163
+;      RXAFSCB_GetCacheConfig                  @164
+;      StartRXAFS_FetchData                    @165
+;      EndRXAFS_FetchData                      @166
+;      RXAFS_FetchACL                          @167
+;      RXAFS_FetchStatus                       @168
+;      StartRXAFS_StoreData                    @169
+;      EndRXAFS_StoreData                      @170
+;      RXAFS_StoreACL                          @171
+;      RXAFS_StoreStatus                       @172
+;      RXAFS_RemoveFile                        @173
+;      RXAFS_CreateFile                        @174
+;      RXAFS_Rename                            @175
+;      RXAFS_Symlink                           @176
+;      RXAFS_Link                              @177
+;      RXAFS_MakeDir                           @178
+;      RXAFS_RemoveDir                         @179
+;      RXAFS_OldSetLock                        @180
+;      RXAFS_OldExtendLock                     @181
+;      RXAFS_OldReleaseLock                    @182
+;      RXAFS_GetStatistics                     @183
+;      RXAFS_GiveUpCallBacks                   @184
+;      RXAFS_GetVolumeInfo                     @185
+;      RXAFS_GetVolumeStatus                   @186
+;      RXAFS_SetVolumeStatus                   @187
+;      RXAFS_GetRootVolume                     @188
+;      RXAFS_CheckToken                        @189
+;      RXAFS_GetTime                           @190
+;      RXAFS_NGetVolumeInfo                    @191
+;      RXAFS_BulkStatus                        @192
+;      RXAFS_SetLock                           @193
+;      RXAFS_ExtendLock                        @194
+;      RXAFS_ReleaseLock                       @195
+;      RXAFS_XStatsVersion                     @196
+;      RXAFS_GetXStats                         @197
+;      RXAFS_Lookup                            @198
+;      RXAFS_FlushCPS                          @199
+;      RXAFS_DFSSymlink                        @200
        rx_SetRxStatUserOk                      @201
        rx_RxStatUserOk                         @202
        rx_enable_hot_thread                    @203 DATA
@@ -193,18 +193,18 @@ EXPORTS
        xdr_uint64                              @205
        rx_SetMaxMTU                            @206
        rx_GetConnection                        @207
-        RXAFSCB_GetCE64                         @208
-        RXAFSCB_GetCellByNum                    @209
-        RXAFSCB_TellMeAboutYourself             @210
-        EndRXAFS_FetchData64                    @211
-        EndRXAFS_StoreData64                    @212
-        RXAFS_CallBackRxConnAddr                @213
-        RXAFS_GetCapabilities                   @214
-        RXAFS_GiveUpAllCallBacks                @215
-        RXAFS_InlineBulkStatus                  @216
-        RXAFS_ResidencyCmd                      @217
-        StartRXAFS_FetchData64                  @218
-        StartRXAFS_StoreData64                  @219
+;       RXAFSCB_GetCE64                         @208
+;       RXAFSCB_GetCellByNum                    @209
+;       RXAFSCB_TellMeAboutYourself             @210
+;       EndRXAFS_FetchData64                    @211
+;       EndRXAFS_StoreData64                    @212
+;       RXAFS_CallBackRxConnAddr                @213
+;       RXAFS_GetCapabilities                   @214
+;       RXAFS_GiveUpAllCallBacks                @215
+;       RXAFS_InlineBulkStatus                  @216
+;       RXAFS_ResidencyCmd                      @217
+;       StartRXAFS_FetchData64                  @218
+;       StartRXAFS_StoreData64                  @219
         rx_StartClientThread                    @220
        rxkad_global_stats_lock                 @221 DATA
        rxkad_stats_key                         @222 DATA
@@ -214,11 +214,11 @@ EXPORTS
         osi_AssertFailU                                @226
        DllMain                                 @227
         rx_SetSecurityConfiguration             @228
-;        RXAFSCB_ExecuteRequest                  @229
-        EndRXAFS_GetTime                        @230
-        StartRXAFS_GetTime                      @231
-        EndRXAFS_GetCapabilities                @232
-        StartRXAFS_GetCapabilities              @233
+;       RXAFSCB_ExecuteRequest                  @229
+;       EndRXAFS_GetTime                        @230
+;       StartRXAFS_GetTime                      @231
+;       EndRXAFS_GetCapabilities                @232
+;       StartRXAFS_GetCapabilities              @233
         xdr_afs_uint32                          @234
         xdr_afs_int32                           @235
         xdr_afs_uint64                          @236
@@ -238,7 +238,7 @@ EXPORTS
         rx_ReadProc32                           @250
         rx_WriteProc32                          @251
         xdr_free                                @252
-        RXAFS_FsCmd                             @253
+;       RXAFS_FsCmd                             @253
         rxi_CallError                           @254
         rx_GetLocalPeers                       @255
         xdr_alloc                               @256
@@ -248,8 +248,8 @@ EXPORTS
        rx_SetMaxSendWindow                     @260
        rx_GetMinPeerTimeout                    @261
        rx_SetMinPeerTimeout                    @262
-        xdr_serverList                          @263
-        xdr_Capabilities                        @264
+;       xdr_serverList                          @263
+;       xdr_Capabilities                        @264
         xdrlen_create                           @265
         rx_SetConnSecondsUntilNatPing           @266
         rx_GetServiceSpecific                   @267
@@ -336,7 +336,7 @@ EXPORTS
         rx_CopyProcessRPCStats                  @341
         rx_CopyPeerRPCStats                     @342
        rx_ReleaseRPCStats                      @343
-        RXAFS_OpCodeIndex                       @344
+;       RXAFS_OpCodeIndex                       @344
        initialize_RXK_error_table              @345
        rx_GetNetworkError                      @346