Permit enhanced audit logs to work on Windows
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 26 Jul 2009 15:01:43 +0000 (11:01 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Sun, 26 Jul 2009 15:05:21 +0000 (08:05 -0700)
Gerrit 82 / Git 7b0b6a0ce9b320a3145f9d600596946230d815f0
broke the Windows build.

Add audit-file.obj to file list in NTMakefile.
Remove unnecessary includes from audit.c.
Properly conditionalize includes in audit-file.c.

Reviewed-on: http://gerrit.openafs.org/219
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/audit/NTMakefile
src/audit/audit-file.c
src/audit/audit.c

index 9855cfc..68cfa76 100644 (file)
@@ -20,7 +20,8 @@ INCFILES =\
 LIBFILE = $(DESTDIR)\lib\afs\afsaudit.lib
 
 LIBOBJS =\
-       $(OUT)\audit.obj
+       $(OUT)\audit.obj \
+        $(OUT)\audit-file.obj
 
 $(LIBFILE): $(LIBOBJS) 
        $(LIBARCH)  
index c6a7150..b786c8d 100644 (file)
 #include <string.h>
 #include <stdio.h>
 #include <stdarg.h>
-#include <sys/param.h>
+#include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#ifndef AFS_NT40_ENV
+#include <sys/param.h>
 #include <unistd.h>
-#include <fcntl.h>
-
+#else
+#include <io.h>
+#endif
 #include "audit-api.h"
 
 static FILE *auditout;
index f4502dc..9719b17 100644 (file)
@@ -18,8 +18,6 @@
 #include <sys/stat.h>
 #ifndef AFS_NT40_ENV
 #include <unistd.h>
-#else
-#include <io.h>
 #endif
 #ifdef AFS_AIX32_ENV
 #include <sys/audit.h>
@@ -261,7 +259,7 @@ printbuf(int rec, char *audEvent, char *afsName, afs_int32 hostId,
            vaFids = va_arg(vaList, struct AFSCBFids *);
 
            if (vaFids) {
-                int i;
+                unsigned int i;
                 
                 vaFid = vaFids->AFSCBFids_val;