]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: Move grmutex, etc. to afspthread.dll
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 28 Feb 2013 03:16:33 +0000 (22:16 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 28 Feb 2013 10:54:09 +0000 (02:54 -0800)
afsauthent.dll exported:

  pthread_recursive_mutex_lock
  pthread_recursive_mutex_unlock
  grmutex (DATA)

even though a dedicated afspthread.dll existed and all pthreaded
modules must link to afspthread.dll and not all link to
afsauthent.dll.  Move these functions and the global mutex variable
to afspthread.dll to ensure that only one instance of the variable
is present in any binary.

Also remove from src/libafsauthent/NTMakefile the local building
of src/util object files and link to mtafsutil.lib.

Change-Id: I9f8e76165f9c1b1be7ed1a90cdaac03b629d9591
Reviewed-on: http://gerrit.openafs.org/9303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/pthread/NTMakefile
src/WINNT/pthread/pthread.def
src/libafsauthent/NTMakefile
src/libafsauthent/afsauthent.def

index 0ed18a3e7351783d2f16a68bc62a17dfbf020f56..8030ab57917c7a75b021cc4e35990ddf5ef3492d 100644 (file)
@@ -20,6 +20,8 @@ LIBINCLUDES = \
 
 PTHR_DLLFILE = $(DESTDIR)\lib\afspthread.dll
 
+UTIL = ..\..\util
+
 $(OUT)\pthread.res: pthread.rc AFS_component_version_number.h
        $(RC) /fo$*.res $(*F).rc
 
@@ -27,7 +29,13 @@ PTHR_DLLOBJS = \
        $(OUT)\pthread.obj \
        $(OUT)\pthread.res
 
-$(PTHR_DLLFILE): $(PTHR_DLLOBJS)
+UTILOBJS = \
+       $(OUT)\pthread_glock.obj
+
+$(UTILOBJS): $(UTIL)\$$(@B).c
+       $(C2OBJ) -I$(UTIL) -DAFS_PTHREAD_ENV $**
+
+$(PTHR_DLLFILE): $(PTHR_DLLOBJS) $(UTILOBJS)
        $(DLLCONLINK) /DEF:pthread.def
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
index 387c1bf0bd2a2add7a2cd0fe73f492106f1cee9e..1bb9a5dfac2cf46b5a7b5443e749168337313188 100644 (file)
@@ -33,3 +33,6 @@ EXPORTS
         pthread_rwlock_tryrdlock                        @31
         pthread_rwlock_trywrlock                        @32
         pthread_rwlock_unlock                           @33
+       pthread_recursive_mutex_lock                    @34
+       pthread_recursive_mutex_unlock                  @35
+       grmutex                                         @36 DATA
index 1a04fb3f5755e1c4b99a2843f2499b64ac679a9e..2296d8c859c9e210cf2f57b226421782218e70b2 100644 (file)
@@ -19,7 +19,6 @@ AUDIT = ..\audit
 AUTH = ..\auth
 KAUTH = ..\kauth
 UBIK = ..\ubik
-UTIL = ..\util
 RXKAD = ..\rxkad
 PTSERVER = ..\ptserver
 SYS = ..\sys
@@ -68,12 +67,6 @@ UBIKOBJS = \
        $(OUT)\ubik_int.cs.obj \
        $(OUT)\ubik_int.xdr.obj
 
-UTILOBJS = \
-       $(OUT)\pthread_glock.obj \
-       $(OUT)\fileutil.obj \
-       $(OUT)\dirpath.obj \
-       $(OUT)\readdir_nt.obj
-
 RXKADOBJS = \
        $(OUT)\rxkad_errs.obj
 
@@ -95,7 +88,6 @@ DLLOBJS =\
        $(AUTHOBJS) \
        $(KAUTHOBJS) \
        $(UBIKOBJS) \
-       $(UTILOBJS) \
        $(RXKADOBJS) \
        $(PTSERVEROBJS) \
        $(SYSOBJS) \
@@ -115,9 +107,6 @@ $(KAUTHOBJS): $(KAUTH)\$$(@B).c
 $(UBIKOBJS): $(UBIK)\$$(@B).c
        $(C2OBJ) -I$(UBIK) $**
 
-$(UTILOBJS): $(UTIL)\$$(@B).c
-       $(C2OBJ) -I$(UTIL) $**
-
 $(RXKADOBJS): $(RXKAD)\$$(@B).c
        $(C2OBJ) -I$(RXKAD) $**
 
@@ -134,13 +123,9 @@ $(SYSOBJS): $(SYS)\$$(@B).c
        $(C2OBJ) -I$(SYS) $**
 
 DLLLIBS =\
-!IF (("$(SYS_NAME)"=="i386_win95" ) || ("$(SYS_NAME)"=="I386_WIN95" ))
-       $(DESTDIR)\lib\win95\afspthread.lib \
-!ELSE
        $(DESTDIR)\lib\afspthread.lib \
-!ENDIF
        $(DESTDIR)\lib\afsrpc.lib \
-       $(DESTDIR)\lib\afs\afsutil.lib \
+       $(DESTDIR)\lib\afs\mtafsutil.lib \
        $(DESTDIR)\lib\afs\afsreg.lib \
        $(DESTDIR)\lib\afs\afseventlog.lib \
         $(DESTDIR)\lib\afs\afsprocmgmt.lib \
index e62cd8d5a1429984c80128fee7caf80d3b03d44d..72e6cd48c8dd993019c79fd24766fbdcc3850c8b 100644 (file)
@@ -49,9 +49,9 @@ EXPORTS
        ubik_ParseClientList                            @49
        getDirPath                                      @50
        ka_AuthSpecificServersConn                      @51
-       pthread_recursive_mutex_lock                    @52
-       pthread_recursive_mutex_unlock                  @53
-       grmutex                                         @54 DATA
+;      pthread_recursive_mutex_lock                    @52
+;      pthread_recursive_mutex_unlock                  @53
+;      grmutex                                         @54 DATA
        initAFSDirPath                                  @55
 ;      renamefile                                      @56
        opendir                                         @57