[Samba] patch to configure.in for Solaris/gcc (-KPIC vs. -fPIC)

Gerald Carter jerry at samba.org
Thu May 9 07:18:02 GMT 2002


To Solaris admins....

Here's a patch for 2.2.4 for building on Solaris 
using GCC.  You'll need to rerun autoconf after 
applying....

The second patch removes compiler warnings about 
redefinitions of ZERO_STRUCT.

Now winbind should compile on solaris quietly.







cheers, jerry
 ---------------------------------------------------------------------
 Hewlett-Packard                                     http://www.hp.com
 SAMBA Team                                       http://www.samba.org
 --                                            http://www.plainjoe.org
 "Sam's Teach Yourself Samba in 24 Hours" 2ed.      ISBN 0-672-32269-2
 --"I never saved anything for the swim back." Ethan Hawk in Gattaca--
-------------- next part --------------
Index: nsswitch/winbind_nss_config.h
===================================================================
RCS file: /data/cvs/samba/source/nsswitch/winbind_nss_config.h,v
retrieving revision 1.3.4.9
diff -u -r1.3.4.9 winbind_nss_config.h
--- nsswitch/winbind_nss_config.h	2002/03/22 00:03:49	1.3.4.9
+++ nsswitch/winbind_nss_config.h	2002/05/09 14:15:53
@@ -129,11 +129,15 @@
 #endif
 
 /* zero a structure */
+#ifndef ZERO_STRUCT
 #define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
+#endif
 
 /* zero a structure given a pointer to the structure */
+#ifndef ZERO_STRUCTP
 #define ZERO_STRUCTP(x) { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); }
-    
+#endif
+
 /* Some systems (SCO) treat UNIX domain sockets as FIFOs */
 
 #ifndef S_IFSOCK
-------------- next part --------------
Index: configure.in
===================================================================
RCS file: /data/cvs/samba/source/configure.in,v
retrieving revision 1.130.4.136
diff -u -r1.130.4.136 configure.in
--- configure.in	2002/05/09 13:26:54	1.130.4.136
+++ configure.in	2002/05/09 13:44:40
@@ -853,7 +853,7 @@
 			BLDSHARED="true"
 			LDSHFLAGS="-G"
 			SONAMEFLAG="-h "
-			if test "${ac_cv_prog_CC}" = "gcc"; then
+			if test "${GCC}" = "yes"; then
 				PICFLAG="-fPIC"
 			else
 				PICFLAG="-KPIC"
@@ -884,7 +884,7 @@
 			LDSHFLAGS="-set_version sgi1.0 -shared"
 			SONAMEFLAG="-soname "
 			SHLD="\${LD}" 
-			if test "${ac_cv_prog_CC}" = "gcc"; then
+			if test "${GCC}" = "yes"; then
 				PICFLAG="-fPIC"
 			else 
 				PICFLAG="-KPIC"


More information about the samba mailing list