From 1bea93afe54270b3ecddcf869ca6472fa5ccde3c Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Mon, 19 Sep 2011 00:58:48 +0000 Subject: [PATCH] Protect autoconf #defines (HAVE_FOO, et al) in win-mac.h with #ifdef KRB5_PRIVATE add -DKRB5_PRIVATE to CPPFLAGS in win-pre.in and to ALL_CXXFLAGS and ALL_CFLAGS in pre.in Signed-off-by: Kevin Wasserman Signed-off-by: Sam Hartman git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25199 dc483132-0cff-0310-8789-dd5450dbe970 --- src/config/pre.in | 2 ++ src/config/win-pre.in | 2 +- src/include/win-mac.h | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config/pre.in b/src/config/pre.in index e009deaf0..01f102e62 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -156,9 +156,11 @@ FAKELIBDIR=$(FAKEPREFIX)/lib # don't pull the pthreads library into shared libraries ALL_CFLAGS = $(DEFS) $(DEFINES) $(KRB_INCLUDES) $(LOCALINCLUDES) \ -DKRB5_DEPRECATED=1 \ + -DKRB5_PRIVATE \ $(CPPFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(PTHREAD_CFLAGS) ALL_CXXFLAGS = $(DEFS) $(DEFINES) $(KRB_INCLUDES) $(LOCALINCLUDES) \ -DKRB5_DEPRECATED=1 \ + -DKRB5_PRIVATE \ $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(PTHREAD_CFLAGS) CFLAGS = @CFLAGS@ diff --git a/src/config/win-pre.in b/src/config/win-pre.in index d992d9599..ff79095fd 100644 --- a/src/config/win-pre.in +++ b/src/config/win-pre.in @@ -130,7 +130,7 @@ KFWFLAGS=-DUSE_LEASH=1 CC=cl PDB_OPTS=-Fd$(OUTPRE)\ -FD -CPPFLAGS=-I$(top_srcdir)\include -I$(top_srcdir)\include\krb5 $(DNSFLAGS) -DWIN32_LEAN_AND_MEAN -DKRB5_DEPRECATED=1 -D_CRT_SECURE_NO_DEPRECATE $(KFWFLAGS) $(TIME_T_FLAGS) +CPPFLAGS=-I$(top_srcdir)\include -I$(top_srcdir)\include\krb5 $(DNSFLAGS) -DWIN32_LEAN_AND_MEAN -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -D_CRT_SECURE_NO_DEPRECATE $(KFWFLAGS) $(TIME_T_FLAGS) CCOPTS=-nologo /W3 $(PDB_OPTS) $(DLL_FILE_DEF) LOPTS=-nologo -incremental:no diff --git a/src/include/win-mac.h b/src/include/win-mac.h index 84ffe7976..473ab373e 100644 --- a/src/include/win-mac.h +++ b/src/include/win-mac.h @@ -101,6 +101,7 @@ typedef _W64 int ssize_t; #define MAXPATHLEN 256 /* Also for Windows temp files */ #endif +#ifdef KRB5_PRIVATE #define HAVE_NETINET_IN_H #define MSDOS_FILESYSTEM #define HAVE_STRING_H @@ -118,6 +119,7 @@ typedef _W64 int ssize_t; #define KRB5_USE_INET6 #define NEED_INSIXADDR_ANY #define ENABLE_THREADS +#endif #define WM_KERBEROS5_CHANGED "Kerberos5 Changed" #ifdef KRB4 @@ -158,10 +160,12 @@ typedef _W64 int ssize_t; #define INI_RECENT_LOGINS "Recent Logins" #define INI_LOGIN "Login" +#ifdef KRB5_PRIVATE #define HAS_VOID_TYPE #define HAVE_STDARG_H #define HAVE_SYS_TYPES_H #define HAVE_STDLIB_H +#endif /* This controls which encryption routines libcrypto will provide */ #define PROVIDE_DES_CBC_MD5 -- 2.26.2