]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix the build on windows 184/head
authorBen Kaduk <kaduk@mit.edu>
Tue, 5 Aug 2014 15:11:45 +0000 (11:11 -0400)
committerBen Kaduk <kaduk@mit.edu>
Wed, 6 Aug 2014 16:18:15 +0000 (12:18 -0400)
Windows does not provide the glob() functionality used to implement
the /etc/gss/mechs.d/ feature, so we must avoid compiling the
relevant code for windows.  (It would never have been called, anyway.)

Adjust the ccache/Makefile.in rules to not use '-' or '@' in
make variable names that are processed by nmake.

Also in ccache/Makefile.in, remove some latent leading whitespace that
had been previously hidden by the previous rule; this exposed some
flawed dependencies that are now removed.

Windows does not provide sys/socket.h or sys/un.h, so don't try
to include them in cc_kcm.c.

The commit which moved the KKDCP TLS support to a plugin left some
dangling references to checkhost.c byproducts in os/Makefile.in,
which can be safely removed.

Use k5-platform.h in support/json.c instead of a set of system includes;
this lets windows build the static inline helper functions therein.

src/lib/gssapi/mechglue/g_initialize.c
src/lib/krb5/ccache/Makefile.in
src/lib/krb5/ccache/cc_kcm.c
src/lib/krb5/os/Makefile.in
src/util/support/json.c

index 04ba87958c3c5172d03504564053e9380caf4ead..85810a9c1215fe73065b5ea18e0f3cf12673cbba 100644 (file)
@@ -41,7 +41,9 @@
 #include <string.h>
 #include <ctype.h>
 #include <errno.h>
+#ifndef _WIN32
 #include <glob.h>
+#endif
 
 #define        M_DEFAULT       "default"
 
@@ -418,6 +420,7 @@ load_if_changed(const char *pathname, time_t last, time_t *highest)
                loadConfigFile(pathname);
 }
 
+#ifndef _WIN32
 /* Try to load any config files which have changed since the last call.  Config
  * files are MECH_CONF and any files matching MECH_CONF_PATTERN. */
 static void
@@ -442,6 +445,7 @@ loadConfigFiles()
 
        g_confFileModTime = highest;
 }
+#endif
 
 /*
  * determines if the mechList needs to be updated from file
index 898dfe79cc40f04e06d796a8b7f1dea4e0d8013f..7e1fd74e9b135adae7a2e3ddb3315f3da1c5f496 100644 (file)
@@ -15,11 +15,17 @@ LOCALINCLUDES = -I$(srcdir)$(S)ccapi -I$(srcdir) -I. $(WIN_INCLUDES)
 ##WIN32##MSLSA_OBJ = $(OUTPRE)cc_mslsa.$(OBJEXT)
 ##WIN32##MSLSA_SRC = $(srcdir)/cc_mslsa.c
 
+##WIN32##!if 0
 KCMRPC_DEPS-osx = kcmrpc.h kcmrpc_types.h
 KCMRPC_OBJ-osx = kcmrpc.o
 KCMRPC_DEPS-no = # empty
 KCMRPC_OBJ-no = # empty
 
+KCMRPC_DEPS = $(KCMRPC_DEPS-@OSX@)
+KCMRPC_OBJS = $(KCMRPC_OBJS-@OSX@)
+##WIN32##!endif
+
+
 STLIBOBJS= \
        ccbase.o \
        cccopy.o \
@@ -37,7 +43,7 @@ STLIBOBJS= \
        cc_memory.o \
        cc_keyring.o \
        ccfns.o \
-       ser_cc.o $(KCMRPC_OBJ-@OSX@)
+       ser_cc.o $(KCMRPC_OBJ)
 
 OBJS=  $(OUTPRE)ccbase.$(OBJEXT) \
        $(OUTPRE)cccopy.$(OBJEXT) \
@@ -144,11 +150,11 @@ clean-unix::
        $(RM) t_cc t_cc.o t_cccursor t_cccursor.o t_cccol t_cccol.o
        $(RM) t_marshal t_marshal.o testcache
 
-depend:: $(KCMRPC_DEPS-@OSX@)
+depend:: $(KCMRPC_DEPS)
 
-##WIN32## $(OUTPRE)cc_mslsa.$(OBJEXT): cc_mslsa.c $(top_srcdir)/include/k5-int.h $(BUILDTOP)/include/krb5/osconf.h $(BUILDTOP)/include/krb5/autoconf.h $(BUILDTOP)/include/krb5.h $(COM_ERR_DEPS)
+##WIN32##$(OUTPRE)cc_mslsa.$(OBJEXT): cc_mslsa.c $(top_srcdir)/include/k5-int.h $(BUILDTOP)/include/krb5.h $(COM_ERR_DEPS)
 
-cc_kcm.so cc_kcm.o: $(KCMRPC_DEPS-@OSX@)
+cc_kcm.so cc_kcm.o: $(KCMRPC_DEPS)
 kcmrpc.so kcmrpc.o: kcmrpc.h kcmrpc_types.h
 
 @libobj_frag@
index 891ce3ac0b4f0e6337744b98b865606f8e741927..b763ea4a6d3c911e69e1975229d01333dc4dbeeb 100644 (file)
@@ -37,6 +37,7 @@
  * sockets are used instead.
  */
 
+#ifndef _WIN32
 #include "k5-int.h"
 #include "k5-input.h"
 #include "cc-int.h"
@@ -49,8 +50,6 @@
 #include "kcmrpc.h"
 #endif
 
-#ifndef _WIN32
-
 #define MAX_REPLY_SIZE (10 * 1024 * 1024)
 
 const krb5_cc_ops krb5_kcm_ops;
index ea689901246b0ebcc103b5da004b26342bff13ce..e8155beb19d6c3c2ea143630b7dfd54536c6c169 100644 (file)
@@ -59,7 +59,6 @@ OBJS= \
        $(OUTPRE)c_ustime.$(OBJEXT)     \
        $(OUTPRE)ccdefname.$(OBJEXT)    \
        $(OUTPRE)changepw.$(OBJEXT)     \
-       $(OUTPRE)checkhost.$(OBJEXT)    \
        $(OUTPRE)dnsglue.$(OBJEXT)      \
        $(OUTPRE)dnssrv.$(OBJEXT)       \
        $(OUTPRE)expand_path.$(OBJEXT)  \
@@ -106,7 +105,6 @@ SRCS= \
        $(srcdir)/c_ustime.c    \
        $(srcdir)/ccdefname.c   \
        $(srcdir)/changepw.c    \
-       $(srcdir)/checkhost.c   \
        $(srcdir)/dnsglue.c     \
        $(srcdir)/dnssrv.c      \
        $(srcdir)/expand_path.c \
index 98f6568b24a5527678228c08d50aa4b8fcca62fa..ae2feae974d33d02f36a393dd53502a2c325e869 100644 (file)
  * Heimdal.
  */
 
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
+#include <k5-platform.h>
 #include <k5-base64.h>
 #include <k5-json.h>
 #include <k5-buf.h>