]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
bos: Fix Windows import of afsconf_SawCell
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 9 Jul 2013 00:29:24 +0000 (20:29 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 9 Jul 2013 04:35:30 +0000 (21:35 -0700)
IBM created a global variable 'afsconf_SawCell' in the kauth package
and manipulated its value from within bos.c as part of the calling
of ka_Init().  Patchset d52398940d58ccdba4114a9975762f48cc24ad15
exported afsconf_SawCell from afsauthent.dll since bos.exe is built
pthreaded.  It was previously mixing pthread and not-pthread libraries
to access the variable.

Unfortunately, the export was declared as a function pointer instead
of DATA.  Importing a DATA element from a library also requires that
the variable be __declspec(dllimport).   The use of afsconf_SawCell
needs to be replaced but in the meantime fix the import so that bos.exe
can start without crashing.

Change-Id: Ic780971b55d64e41e1ba9627cdeadd6c27c451fb
Reviewed-on: http://gerrit.openafs.org/10054
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/bozo/bos.c
src/libafsauthent/afsauthent.def

index 7d03826191f73eb6440c536e79cc388a0a5241ff..1d35973d0fc16f7888493a19a607d7ee593cf9d0 100644 (file)
@@ -1907,6 +1907,9 @@ main(int argc, char **argv)
 {
     afs_int32 code;
     struct cmd_syndesc *ts;
+#ifdef AFS_NT40_ENV
+    __declspec(dllimport)
+#endif
     extern int afsconf_SawCell;
 
 #ifdef AFS_AIX32_ENV
index 72e6cd48c8dd993019c79fd24766fbdcc3850c8b..eb1f4399fd08ab322cc3964b08fd439af4d4add4 100644 (file)
@@ -157,6 +157,6 @@ EXPORTS
        afsconf_ParseNetFiles                           @156
        afsconf_SetExtendedCellInfo                     @157
        afsconf_PickClientSecObj                        @158
-       afsconf_SawCell                                 @159
+       afsconf_SawCell                                 @159    DATA
        ka_PrintBytes                                   @160
        ka_KeyIsZero                                    @161