* configure.in: added header checks for sys/param.h and sys/file.h.
authorJohn Gilmore <gnu@toad.com>
Wed, 15 Feb 1995 02:02:17 +0000 (02:02 +0000)
committerJohn Gilmore <gnu@toad.com>
Wed, 15 Feb 1995 02:02:17 +0000 (02:02 +0000)
* encryption.h: added typedef prototype for sum_func function
    with the windows api to make microsoft compiler happy.
* sysincl.h: conditionally include sys/file.h and sys/param.h since
    windows doesn't have them.
* Makefile.in:
   - changed macros with ${...} to $(...) since nmake barfs on {}.
   - added windows only make preamble
   - split the all target into unix and windows branches

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

src/include/krb5/ChangeLog
src/include/krb5/Makefile.in
src/include/krb5/configure.in
src/include/krb5/encryption.h
src/include/krb5/sysincl.h

index 0b6e15fb812f3701befa964881cfa804264fb7c5..3665bda5cdbb92ffa2a1f7a613e967799ea35285 100644 (file)
@@ -1,3 +1,15 @@
+Mon Feb 6 19:42:7 1995 Keith Vetter (keithv@fusion.com)
+
+        * configure.in: added header checks for sys/param.h and sys/file.h.
+        * encryption.h: added typedef prototype for sum_func function 
+            with the windows api to make microsoft compiler happy.
+        * sysincl.h: conditionally include sys/file.h and sys/param.h since
+            windows doesn't have them.
+        * Makefile.in: 
+           - changed macros with ${...} to $(...) since nmake barfs on {}.
+           - added windows only make preamble 
+           - split the all target into unix and windows branches
+
 Fri Feb 10 14:54:26 1995  Theodore Y. Ts'o  <tytso@dcl>
 
        * asn1.h: Removed ISODE cruft -- moved included .h files into
index cefd2189c6f945ba65d0f647f4346ce2553c4666..53b95d1cdd66ffc6f416ad684076ce72e649c551 100644 (file)
@@ -1,6 +1,9 @@
 KDB5DIR = $(KRB5ROOT)
 KRB5SRVTABDIR = /etc
 
+##DOSBUILDTOP = ..\..
+##DOS!include $(BUILDTOP)\config\windows.in
+
 KRB5_HEADERS = asn1.h base-defs.h ccache.h crc-32.h encryption.h \
                error_def.h errors.h ext-proto.h fieldbits.h \
                free.h func-proto.h hostaddr.h kdb.h kdb_dbm.h \
@@ -11,8 +14,17 @@ KRB5_HEADERS = asn1.h base-defs.h ccache.h crc-32.h encryption.h \
 ET_HEADERS = adm_err.h asn1_err.h kdb5_err.h krb5_err.h
 BUILT_HEADERS = autoconf.h config.h osconf.h
 
-all:: $(BUILT_HEADERS)
+all:: all-$(WHAT)
+
+all-unix:: $(BUILT_HEADERS)
 
+all-windows:
+       copy stock\config.win config.h
+       echo /* not used in windows */ > osconf.h
+       echo /* not used in windows */ > autoconf.h
+       copy $(BUILDTOP)\lib\krb5\asn.1\krb5_decode.h .\asn.1\krb5_decode.h
+       copy $(BUILDTOP)\lib\krb5\asn.1\krb5_encode.h .\asn.1\krb5_encode.h
 includes:: autoconf.h
 
 # Run a header through a preprocessor to generate an architecture/environment
@@ -41,7 +53,7 @@ install::
 
 PROCESS_REPLACE = -e "s+@KRB5ROOT+$(KRB5ROOT)+" \
                  -e "s+@KDB5DIR+$(KDB5DIR)+" \
-                 -e "s+@KRB5SRVTABDIR+${KRB5SRVTABDIR}+" 
+                 -e "s+@KRB5SRVTABDIR+$(KRB5SRVTABDIR)+" 
 
 OSCONFSRC = $(srcdir)/stock/osconf.h
 
@@ -59,5 +71,10 @@ config.h: $(CONFSRC)
        @if cmp -s config.new config.h ; then :; \
        else (set -x; $(RM) config.h ; $(CP) config.new config.h) fi
 
-clean::
-       $(RM) config.new osconf.new $(ET_HEADERS) $(BUILT_HEADERS)
+clean:: clean-$(WHAT)
+       $(RM) config.new osconf.new $(BUILT_HEADERS)
+
+clean-unix::
+       $(RM) $(ET_HEADERS)
+
+clean-windows::
index 18ba0057060bd4bdaed81c987bba1e7e46c9ec4f..2ae961c7116ee1b19ff36b12a3f5c21df5f2d4c9 100644 (file)
@@ -42,6 +42,8 @@ dnl
 dnl
 AC_HEADER_CHECK(string.h,AC_DEFINE(USE_STRING_H))
 AC_HEADER_CHECK(stdlib.h,AC_DEFINE(HAS_STDLIB_H),AC_DEFINE(NO_STDLIB_H))
+AC_HEADER_CHECK(sys/file.h,AC_DEFINE(HAS_SYS_FILE_H))
+AC_HEADER_CHECK(sys/param.h,AC_DEFINE(HAS_SYS_PARAM_H))
 CHECK_STDARG
 
 AC_FUNC_CHECK([setvbuf],AC_DEFINE(HAS_SETVBUF))
index fc8b1906ac6010c729f9ea9eec8043ac137c96ff..9fa7e5ccd5426d645b161d526e8624eccb6a0699 100644 (file)
@@ -103,13 +103,15 @@ typedef struct _krb5_cs_table_entry {
 } krb5_cs_table_entry;
 
 /* could be used in a table to find a sumtype */
+typedef krb5_error_code  (API *SUM_FUNC) NPROTOTYPE ((krb5_pointer /* in */,
+                  size_t /* in_length */,
+                       krb5_pointer /* key/seed */,
+                       size_t /* key/seed size */,
+                       krb5_checksum FAR * /* out_cksum */));
+
 typedef struct _krb5_checksum_entry {
     krb5_magic magic;
-    krb5_error_code  (*sum_func) NPROTOTYPE (( krb5_pointer /* in */,
-                                            size_t /* in_length */,
-                                            krb5_pointer /* key/seed */,
-                                            size_t /* key/seed size */,
-                                            krb5_checksum * /* out_cksum */));
+    SUM_FUNC sum_func;
     int checksum_length;               /* length of stuff returned by
                                           sum_func */
     unsigned int is_collision_proof:1;
index b307ff3ac8b472499fa4db00fa1bcf7127e14e5c..c34c79a56e5a1ff68101789662954cc8d4fa1764 100644 (file)
 #include <time.h>
 #endif
 #include <sys/stat.h>                  /* struct stat, stat() */
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>                 /* MAXPATHLEN */
+#endif
 
+#ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>                  /* prototypes for file-related
                                           syscalls; flags for open &
                                           friends */
+#endif
+
 #ifndef FD_SET
 #define FD_SETSIZE          (sizeof (fd_set) * 8)