svn commit: samba r14999 - in branches/SAMBA_4_0/source: . build/m4 include lib/appweb/mpr lib/replace lib/talloc lib/util

jelmer at samba.org jelmer at samba.org
Sat Apr 8 16:05:21 GMT 2006


Author: jelmer
Date: 2006-04-08 16:05:21 +0000 (Sat, 08 Apr 2006)
New Revision: 14999

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14999

Log:
Remove more unused autoconf code
Simplify va_copy() replacement code a bit

Modified:
   branches/SAMBA_4_0/source/build/m4/rewrite.m4
   branches/SAMBA_4_0/source/configure.in
   branches/SAMBA_4_0/source/include/includes.h
   branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.c
   branches/SAMBA_4_0/source/lib/replace/replace.h
   branches/SAMBA_4_0/source/lib/talloc/talloc.c
   branches/SAMBA_4_0/source/lib/util/dprintf.c
   branches/SAMBA_4_0/source/lib/util/select.c
   branches/SAMBA_4_0/source/lib/util/util_file.c
   branches/SAMBA_4_0/source/lib/util/xfile.c


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/rewrite.m4	2006-04-08 15:26:59 UTC (rev 14998)
+++ branches/SAMBA_4_0/source/build/m4/rewrite.m4	2006-04-08 16:05:21 UTC (rev 14999)
@@ -8,7 +8,6 @@
 AC_SUBST(SONAMEFLAG)
 AC_SUBST(PICFLAG)
 
-AC_DEFINE([_GNU_SOURCE],[],[Pull in GNU extensions])
 AC_SYS_LARGEFILE
 
 #
@@ -53,7 +52,7 @@
 AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(sys/select.h fcntl.h sys/fcntl.h sys/time.h stdarg.h)
-AC_CHECK_HEADERS(utime.h grp.h sys/id.h limits.h memory.h compat.h math.h)
+AC_CHECK_HEADERS(utime.h grp.h sys/id.h limits.h compat.h math.h)
 AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
 AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h)
 AC_CHECK_HEADERS(sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
@@ -496,21 +495,3 @@
 AC_CHECK_LIB_EXT(crypt, CRYPT_LIBS, crypt)
 SMB_EXT_LIB_ENABLE(CRYPT,YES)
 SMB_EXT_LIB(CRYPT, $CRYPT_LIBS)
-
-##
-## moved after the check for -lcrypt in order to
-## ensure that the necessary libraries are included
-## check checking for truncated salt.  Wrapped by the
-## $with_pam_for_crypt variable as above   --jerry
-##
-if test x"$with_pam_for_crypt" != x"yes"; then
-AC_CACHE_CHECK([for a crypt that needs truncated salt],samba_cv_HAVE_TRUNCATED_SALT,[
-crypt_LIBS="$LIBS"
-LIBS="$AUTHLIBS $LIBS"
-AC_TRY_RUN([#include "${srcdir-.}/build/tests/crypttest.c"],
-	samba_cv_HAVE_TRUNCATED_SALT=no,samba_cv_HAVE_TRUNCATED_SALT=yes,samba_cv_HAVE_TRUNCATED_SALT=cross)
-LIBS="$crypt_LIBS"])
-if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
-	AC_DEFINE(HAVE_TRUNCATED_SALT,1,[Whether crypt needs truncated salt])
-fi
-fi

Modified: branches/SAMBA_4_0/source/configure.in
===================================================================
--- branches/SAMBA_4_0/source/configure.in	2006-04-08 15:26:59 UTC (rev 14998)
+++ branches/SAMBA_4_0/source/configure.in	2006-04-08 16:05:21 UTC (rev 14999)
@@ -27,7 +27,6 @@
 sinclude(lib/ldb/config.m4)
 sinclude(lib/tls/config.m4)
 sinclude(lib/events/config.m4)
-sinclude(lib/cmdline/config.m4)
 
 dnl disabled until we support external heimdal again
 dnl sinclude(auth/kerberos/config.m4)

Modified: branches/SAMBA_4_0/source/include/includes.h
===================================================================
--- branches/SAMBA_4_0/source/include/includes.h	2006-04-08 15:26:59 UTC (rev 14998)
+++ branches/SAMBA_4_0/source/include/includes.h	2006-04-08 16:05:21 UTC (rev 14999)
@@ -64,6 +64,8 @@
 #endif
 #endif
 
+#define _GNU_SOURCE /* Use GNU extensions */
+
 /* mark smb_panic() as noreturn, so static analysers know that it is
    used like abort */
 _PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE;

Modified: branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.c
===================================================================
--- branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.c	2006-04-08 15:26:59 UTC (rev 14998)
+++ branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.c	2006-04-08 16:05:21 UTC (rev 14999)
@@ -330,13 +330,7 @@
 	dest = *destp;
 	sepLen = (delim) ? strlen(delim) : 0;
 
-#ifdef HAVE_VA_COPY
 	va_copy(ap, args);
-#elif HAVE___VA_COPY
-	__va_copy(ap, args);
-#else
-	ap = args;
-#endif
 	addBytes = 0;
 	str = src;
 	while (str) {
@@ -371,13 +365,7 @@
 	}
 
 	if (addBytes > 0) {
-#ifdef HAVE_VA_COPY
 		va_copy(ap, args);
-#elif HAVE___VA_COPY
-		__va_copy(ap, args);
-#else
-		ap = args;
-#endif
 		str = src;
 		while (str) {
 			strcpy(dp, str);

Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/replace.h	2006-04-08 15:26:59 UTC (rev 14998)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h	2006-04-08 16:05:21 UTC (rev 14999)
@@ -134,18 +134,16 @@
 #define slprintf snprintf
 
 
-#ifdef HAVE_VA_COPY
-#define VA_COPY(dest, src) va_copy(dest, src)
-#elif defined(HAVE___VA_COPY)
-#define VA_COPY(dest, src) __va_copy(dest, src)
+#ifndef HAVE_VA_COPY
+#ifdef HAVE___VA_COPY
+#define va_copy(dest, src) __va_copy(dest, src)
 #else
-#define VA_COPY(dest, src) (dest) = (src)
+#define va_copy(dest, src) (dest) = (src)
 #endif
+#endif
 
-#if defined(HAVE_VOLATILE)
-#define VOLATILE volatile
-#else
-#define VOLATILE
+#ifndef HAVE_VOLATILE
+#define volatile
 #endif
 
 #ifndef HAVE_COMPARISON_FN_T

Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.c
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/talloc.c	2006-04-08 15:26:59 UTC (rev 14998)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.c	2006-04-08 16:05:21 UTC (rev 14999)
@@ -999,13 +999,11 @@
 	return ret;
 }
 
-#ifndef VA_COPY
-#ifdef HAVE_VA_COPY
-#define VA_COPY(dest, src) va_copy(dest, src)
-#elif defined(HAVE___VA_COPY)
-#define VA_COPY(dest, src) __va_copy(dest, src)
+#ifndef HAVE_VA_COPY
+#ifdef HAVE___VA_COPY
+#define va_copy(dest, src) __va_copy(dest, src)
 #else
-#define VA_COPY(dest, src) (dest) = (src)
+#define va_copy(dest, src) (dest) = (src)
 #endif
 #endif
 
@@ -1016,7 +1014,7 @@
 	va_list ap2;
 	char c;
 	
-	VA_COPY(ap2, ap);
+	va_copy(ap2, ap);
 
 	/* this call looks strange, but it makes it work on older solaris boxes */
 	if ((len = vsnprintf(&c, 1, fmt, ap2)) < 0) {
@@ -1025,7 +1023,7 @@
 
 	ret = _talloc(t, len+1);
 	if (ret) {
-		VA_COPY(ap2, ap);
+		va_copy(ap2, ap);
 		vsnprintf(ret, len+1, fmt, ap2);
 		talloc_set_name_const(ret, ret);
 	}
@@ -1067,7 +1065,7 @@
 
 	tc = talloc_chunk_from_ptr(s);
 
-	VA_COPY(ap2, ap);
+	va_copy(ap2, ap);
 
 	s_len = tc->size - 1;
 	if ((len = vsnprintf(NULL, 0, fmt, ap2)) <= 0) {
@@ -1083,7 +1081,7 @@
 	s = talloc_realloc(NULL, s, char, s_len + len+1);
 	if (!s) return NULL;
 
-	VA_COPY(ap2, ap);
+	va_copy(ap2, ap);
 
 	vsnprintf(s+s_len, len+1, fmt, ap2);
 	talloc_set_name_const(s, s);

Modified: branches/SAMBA_4_0/source/lib/util/dprintf.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util/dprintf.c	2006-04-08 15:26:59 UTC (rev 14998)
+++ branches/SAMBA_4_0/source/lib/util/dprintf.c	2006-04-08 16:05:21 UTC (rev 14999)
@@ -38,7 +38,7 @@
 	va_list ap2;
 
 	/* do any message translations */
-	VA_COPY(ap2, ap);
+	va_copy(ap2, ap);
 
 	ret = vasprintf(&p, format, ap2);
 

Modified: branches/SAMBA_4_0/source/lib/util/select.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util/select.c	2006-04-08 15:26:59 UTC (rev 14998)
+++ branches/SAMBA_4_0/source/lib/util/select.c	2006-04-08 16:05:21 UTC (rev 14999)
@@ -32,7 +32,7 @@
 
 static pid_t initialised;
 static int select_pipe[2];
-static VOLATILE unsigned pipe_written, pipe_read;
+static volatile unsigned pipe_written, pipe_read;
 
 /*******************************************************************
  Call this from all Samba signal handlers if you want to avoid a 

Modified: branches/SAMBA_4_0/source/lib/util/util_file.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util/util_file.c	2006-04-08 15:26:59 UTC (rev 14998)
+++ branches/SAMBA_4_0/source/lib/util/util_file.c	2006-04-08 16:05:21 UTC (rev 14999)
@@ -371,7 +371,7 @@
 	int len, ret;
 	va_list ap2;
 
-	VA_COPY(ap2, ap);
+	va_copy(ap2, ap);
 
 	len = vasprintf(&p, format, ap2);
 	if (len <= 0) return len;

Modified: branches/SAMBA_4_0/source/lib/util/xfile.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util/xfile.c	2006-04-08 15:26:59 UTC (rev 14998)
+++ branches/SAMBA_4_0/source/lib/util/xfile.c	2006-04-08 16:05:21 UTC (rev 14999)
@@ -202,7 +202,7 @@
 	int len, ret;
 	va_list ap2;
 
-	VA_COPY(ap2, ap);
+	va_copy(ap2, ap);
 
 	len = vasprintf(&p, format, ap2);
 	if (len <= 0) return len;



More information about the samba-cvs mailing list