Makefile.in (lib-windows): Add production rule for sapkrb5.dll. Don't
authorTheodore Tso <tytso@mit.edu>
Wed, 12 Jun 1996 04:07:23 +0000 (04:07 +0000)
committerTheodore Tso <tytso@mit.edu>
Wed, 12 Jun 1996 04:07:23 +0000 (04:07 +0000)
include config/windows.in, since that's included by wconfig.

win_glue.c: Add a quick hack for krb5-SAP so that we call the version
server --- this is conditionalized on SAP_VERSERV, which is only
defined when we build sapkrb5.dll.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8298 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/ChangeLog
src/lib/Makefile.in
src/lib/win_glue.c

index b9437dbf1e7eeed71ca60c7e47700826114a78bf..e5b12a245c0fad3f042b524cfcd50d71990bd34f 100644 (file)
@@ -1,3 +1,14 @@
+Mon Jun 10 23:40:48 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * Makefile.in (lib-windows): Add production rule for sapkrb5.dll.
+               Don't include config/windows.in, since that's included
+               by wconfig.
+
+       * win_glue.c: Add a quick hack for krb5-SAP so that we call
+               the version server --- this is conditionalized on
+               SAP_VERSERV, which is only defined when we build
+               sapkrb5.dll.
+
 Sat Jun  8 09:58:41 1996  Ezra Peisach  <epeisach@kangaroo.mit.edu>
 
        * configure.in: Remove kdb4 library building
index aff7b05f5b0296c749403496e1c812fcb6490309..80597273ff522c0ac727912a9ecb998e4715bd80 100644 (file)
@@ -1,7 +1,7 @@
 CFLAGS = $(CCOPTS) $(DEFS)
 
 ##DOSBUILDTOP = ..
-##DOS!include $(BUILDTOP)\config\windows.in
+##DOSVERS_DIR = \vers
 
 MAC_SUBDIRS = crypto krb5 gssapi kadm
 
@@ -39,7 +39,7 @@ lib-windows: winsock.lib libkrb5.lib gssapi.lib
 gssapi.lib:: gssapi.dll
        implib /nologo gssapi.lib gssapi.dll
 
-gssapi.dll:: $(GLIB) $(LIBS) gssapi.def
+gssapi.dll:: $(GLIB) $(LIBS) gssapi.def win_glue.obj
        link /co /seg:400 /noe /nod /nol win_glue, gssapi.dll, gssapi.map, \
           $(LIBS) ldllcew libw oldnames, gssapi.def
        rc /nologo /p /k gssapi.dll
@@ -52,6 +52,15 @@ libkrb5.dll:: $(LIBS) libkrb5.def win_glue.obj
           $(LIBS) ldllcew libw oldnames, libkrb5.def
        rc /nologo /p /k libkrb5.dll
 
+sap_glue.obj: win_glue.c
+        $(CC) $(CFLAGS) -DSAP_VERSERV -I$(VERS_DIR) /c \
+               /Fosap_glue.obj win_glue.c
+
+sapkrb5.dll:: $(GLIB) $(LIBS) gssapi.def sap_glue.obj
+       link /co /seg:400 /noe /nod /nol sap_glue, sapkrb5.dll, sapkrb5.map, \
+          $(LIBS) $(VERS_DIR)/vswin.lib ldllcew libw oldnames, sapkrb5.def
+       rc /nologo /p /k sapkrb5.dll
+
 winsock.lib:  winsock.def
        implib /nologo winsock.lib winsock.def
 
index c581467643611e46914251338171723d7eedeba0..5bb3683be08bd59fbb3fb6d10adac795b08003a6 100644 (file)
 #define NEED_SOCKETS
 #include "k5-int.h"
 
+#ifdef SAP_VERSERV
+#define VERSERV
+#define APP_TITLE "KRB5-SAP"
+#define APP_VER "3.0c"
+#define APP_INI "krb5sap.ini"
+#endif
+
+#ifdef VERSERV
+#define WINDOWS
+#include <vs.h>
+#include <v.h>
+
+/*
+ * Use the version server to give us some control on distribution and usage
+ * We're going to test track as well
+ */
+static int CallVersionServer(app_title, app_version, app_ini, code_cover)
+       char FAR *app_title;
+       char FAR *app_version;
+       char FAR *app_ini;
+       char FAR *code_cover
+{
+       VS_Request vrequest;
+       VS_Status  vstatus;
+
+       SetCursor(LoadCursor(NULL, IDC_WAIT));
+
+       vrequest = VSFormRequest(app_title, app_ver, app_ini,
+                                code_cover, NULL, V_CHECK_AND_LOG);
+
+       SetCursor(LoadCursor(NULL, IDC_ARROW));
+       /*
+        * If the user presses cancel when registering the test
+        * tracker, we'll let them continue.
+        */
+       if (ReqStatus(vrequest) == V_E_CANCEL) {
+               VSDestroyRequest(vrequest);
+               return 0;
+       }
+       vstatus = VSProcessRequest(vrequest);
+       /*
+        * Only complain periodically, if the test tracker isn't
+        * working... 
+        */
+       if (v_complain(vstatus, app_ini)) {
+               WinVSReportRequest(vrequest, NULL, 
+                                  "Version Server Status Report");
+       }                                                         
+       if (vstatus == V_REQUIRED) {
+               SetCursor(LoadCursor(NULL, IDC_WAIT));
+               VSDestroyRequest(vrequest);
+               return( -1 );
+       }
+       VSDestroyRequest(vrequest);
+       return (0);
+}   
+
+#endif
+
 int
 win_socket_initialize()
 {
@@ -49,6 +108,11 @@ WORD wDataSeg;
 WORD cbHeap;
 LPSTR CmdLine;
 {
+#ifdef SAP_VERSERV
+   if (CallVersionServer(APP_TITLE, APP_VER, APP_INI, NULL))
+          PostQuitMessage(0);
+#endif
+       
     win_socket_initialize ();
     return 1;
 }