svn commit: samba r2246 - branches/SAMBA_3_0/source/include trunk/source trunk/source/include

tpot at samba.org tpot at samba.org
Tue Sep 7 23:30:27 GMT 2004


Author: tpot
Date: 2004-09-07 23:30:27 +0000 (Tue, 07 Sep 2004)
New Revision: 2246

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=2246&nolog=1

Log:
Some good fixes for HPUX from JBravo on #samba-technical:

  - Fix linker options so that stuff actually builds (oops - part of this
    commit was accidentally made in -r2245)

  - Add some preprocessor magic to avoid warnings being printed for every
    single C file being compiled.  This was due to a bug in the HPUX system
    header files.

This should make the HPUX build farm machine build again.

Modified:
   branches/SAMBA_3_0/source/include/includes.h
   trunk/source/configure.in
   trunk/source/include/includes.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/includes.h
===================================================================
--- branches/SAMBA_3_0/source/include/includes.h	2004-09-07 23:22:09 UTC (rev 2245)
+++ branches/SAMBA_3_0/source/include/includes.h	2004-09-07 23:30:27 UTC (rev 2246)
@@ -309,6 +309,19 @@
 #endif
 
 #ifdef HAVE_SHADOW_H
+/*
+ * HP-UX 11.X has TCP_NODELAY and TCP_MAXSEG defined in <netinet/tcp.h> which
+ * was included above.  However <rpc/rpc.h> includes <sys/xti.h> which defines
+ * them again without checking if they already exsist.  This generates
+ * two "Redefinition of macro" warnings for every single .c file that is
+ * compiled.
+ */
+#if defined(HPUX) && defined(TCP_NODELAY)
+#undef TCP_NODELAY
+#endif
+#if defined(HPUX) && defined(TCP_MAXSEG)
+#undef TCP_MAXSEG
+#endif
 #include <shadow.h>
 #endif
 
@@ -361,6 +374,19 @@
 #if defined(HAVE_SYS_SECURITY_H) && defined(HAVE_RPC_AUTH_ERROR_CONFLICT)
 #undef AUTH_ERROR
 #endif
+/*
+ * HP-UX 11.X has TCP_NODELAY and TCP_MAXSEG defined in <netinet/tcp.h> which
+ * was included above.  However <rpc/rpc.h> includes <sys/xti.h> which defines
+ * them again without checking if they already exsist.  This generates
+ * two "Redefinition of macro" warnings for every single .c file that is
+ * compiled.
+ */
+#if defined(HPUX) && defined(TCP_NODELAY)
+#undef TCP_NODELAY
+#endif
+#if defined(HPUX) && defined(TCP_MAXSEG)
+#undef TCP_MAXSEG
+#endif
 #include <rpc/rpc.h>
 #endif
 
@@ -373,6 +399,19 @@
 #include <rpcsvc/ypclnt.h>
 #endif
 #if defined(HAVE_RPCSVC_YP_PROT_H)
+/*
+ * HP-UX 11.X has TCP_NODELAY and TCP_MAXSEG defined in <netinet/tcp.h> which
+ * was included above.  However <rpc/rpc.h> includes <sys/xti.h> which defines
+ * them again without checking if they already exsist.  This generates
+ * two "Redefinition of macro" warnings for every single .c file that is
+ * compiled.
+ */
+#if defined(HPUX) && defined(TCP_NODELAY)
+#undef TCP_NODELAY
+#endif
+#if defined(HPUX) && defined(TCP_MAXSEG)
+#undef TCP_MAXSEG
+#endif
 #include <rpcsvc/yp_prot.h>
 #endif
 #endif /* HAVE_NETGROUP */

Modified: trunk/source/configure.in
===================================================================
--- trunk/source/configure.in	2004-09-07 23:22:09 UTC (rev 2245)
+++ trunk/source/configure.in	2004-09-07 23:30:27 UTC (rev 2246)
@@ -1217,7 +1217,7 @@
 			if test $ac_cv_prog_cc_Ae = yes; then
 				BLDSHARED="true"
 				SHLD="/usr/bin/ld"
-				LDSHFLAGS="-B symbolic -b -z"
+				LDSHFLAGS="-b -Wl,-B,symbolic,-b,-z"
 				SONAMEFLAG="+h "
 				PICFLAGS="+z"
 			elif test "${GCC}" = "yes"; then

Modified: trunk/source/include/includes.h
===================================================================
--- trunk/source/include/includes.h	2004-09-07 23:22:09 UTC (rev 2245)
+++ trunk/source/include/includes.h	2004-09-07 23:30:27 UTC (rev 2246)
@@ -309,6 +309,19 @@
 #endif
 
 #ifdef HAVE_SHADOW_H
+/*
+ * HP-UX 11.X has TCP_NODELAY and TCP_MAXSEG defined in <netinet/tcp.h> which
+ * was included above.  However <rpc/rpc.h> includes <sys/xti.h> which defines
+ * them again without checking if they already exsist.  This generates
+ * two "Redefinition of macro" warnings for every single .c file that is
+ * compiled.
+ */
+#if defined(HPUX) && defined(TCP_NODELAY)
+#undef TCP_NODELAY
+#endif
+#if defined(HPUX) && defined(TCP_MAXSEG)
+#undef TCP_MAXSEG
+#endif
 #include <shadow.h>
 #endif
 
@@ -361,6 +374,19 @@
 #if defined(HAVE_SYS_SECURITY_H) && defined(HAVE_RPC_AUTH_ERROR_CONFLICT)
 #undef AUTH_ERROR
 #endif
+/*
+ * HP-UX 11.X has TCP_NODELAY and TCP_MAXSEG defined in <netinet/tcp.h> which
+ * was included above.  However <rpc/rpc.h> includes <sys/xti.h> which defines
+ * them again without checking if they already exsist.  This generates
+ * two "Redefinition of macro" warnings for every single .c file that is
+ * compiled.
+ */
+#if defined(HPUX) && defined(TCP_NODELAY)
+#undef TCP_NODELAY
+#endif
+#if defined(HPUX) && defined(TCP_MAXSEG)
+#undef TCP_MAXSEG
+#endif
 #include <rpc/rpc.h>
 #endif
 
@@ -373,6 +399,19 @@
 #include <rpcsvc/ypclnt.h>
 #endif
 #if defined(HAVE_RPCSVC_YP_PROT_H)
+/*
+ * HP-UX 11.X has TCP_NODELAY and TCP_MAXSEG defined in <netinet/tcp.h> which
+ * was included above.  However <rpc/rpc.h> includes <sys/xti.h> which defines
+ * them again without checking if they already exsist.  This generates
+ * two "Redefinition of macro" warnings for every single .c file that is
+ * compiled.
+ */
+#if defined(HPUX) && defined(TCP_NODELAY)
+#undef TCP_NODELAY
+#endif
+#if defined(HPUX) && defined(TCP_MAXSEG)
+#undef TCP_MAXSEG
+#endif
 #include <rpcsvc/yp_prot.h>
 #endif
 #endif /* HAVE_NETGROUP */



More information about the samba-cvs mailing list