[prev in list] [next in list] [prev in thread] [next in thread] 

List:       monetdb-checkins
Subject:    MonetDB: default - Clean up configure.
From:       Sjoerd Mullender <sjoerd () acm ! org>
Date:       2010-11-26 8:23:26
Message-ID: hg.88062c62ef90.1290759806.6315528441665844383 () localhost ! localdomain
[Download RAW message or body]

Changeset: 88062c62ef90 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=88062c62ef90
Modified Files:
	MonetDB4/configure.ag
	MonetDB4/src/monet/monet.mx
	MonetDB5/src/modules/mal/mal_io.mx
	buildtools/Mx/configure.ac
	buildtools/Mx/winconfig.h
	buildtools/conf/winconfig.h
Branch: default
Log Message:

Clean up configure.
Get rid of checks for vsnprintf (result of check never used) and
snprintf (we may assume it exists everywhere nowadays).
Get rid of obsolescent autoconf macro AC_FUNC_VPRINTF (the result of
which was never checked either).


diffs (181 lines):

diff -r db0f45fabda6 -r 88062c62ef90 MonetDB4/configure.ag
--- a/MonetDB4/configure.ag	Thu Nov 25 15:57:47 2010 +0100
+++ b/MonetDB4/configure.ag	Fri Nov 26 09:22:30 2010 +0100
@@ -310,10 +310,9 @@
 if test x$cross_compiling != xyes; then
 	AC_FUNC_SETPGRP()
 fi
-AC_FUNC_VPRINTF()
 AC_FUNC_MEMCMP()
 AC_CHECK_FUNCS(strsignal)
-AC_CHECK_FUNCS(mkdir rmdir getcwd getopt getrlimit vsnprintf snprintf kill pipe setsid)
+AC_CHECK_FUNCS(mkdir rmdir getcwd getopt getrlimit kill pipe setsid)
 AC_CHECK_FUNCS(strcspn strdup strstr strtod strtol strerror strcasecmp strncasecmp)
 AC_CHECK_FUNCS(strtoll strtoull)
 AC_CHECK_FUNCS(gethostname setenv putenv select)
diff -r db0f45fabda6 -r 88062c62ef90 MonetDB4/src/monet/monet.mx
--- a/MonetDB4/src/monet/monet.mx	Thu Nov 25 15:57:47 2010 +0100
+++ b/MonetDB4/src/monet/monet.mx	Fri Nov 26 09:22:30 2010 +0100
@@ -697,9 +697,6 @@
 		adds = width+10;
 		add = (str) alloca((int)adds);
 	}
-#ifndef HAVE_SNPRINTF
-	sprintf(add, meta, @1);
-#else
 	n = snprintf( add, adds, meta, @1 );
 	while (n < 0 || (size_t) n >= adds) {
 		if (n >= 0)	/* glibc 2.1 */
@@ -709,7 +706,6 @@
 		add = (str) alloca ((int)adds);
 		n = snprintf( add, adds, meta, @1 );
 	}
-#endif /* HAVE_SNPRINTF */
 @c
 static char toofew_error[80] = "monet_sprintf(): at least %d parameters expected.\n";
 static char format_error[80] = "monet_sprintf(): error in format before param %d.\n";
@@ -723,9 +719,7 @@
 int
 monet_sprintf(str *res, str format, va_list ap)
 {
-#ifdef HAVE_SNPRINTF
 	int n;
-#endif /* HAVE_SNPRINTF */
 
 	int prec = 0, dotseen = 0, escaped = 0, type, size, argc = 1;
 	size_t adds = 100, width = 0;
@@ -856,10 +850,6 @@
 					return_error(type_error);
 				}
 				width += (1 + prec);
-#ifndef HAVE_SNPRINTF
-				/* Brute force; this size always fits a double */
-				width += 300;
-#endif /* HAVE_SNPRINTF */
 				@:sprintf(dval)@
 			} else if (*cur == 's') {
 				int length;
diff -r db0f45fabda6 -r 88062c62ef90 MonetDB5/src/modules/mal/mal_io.mx
--- a/MonetDB5/src/modules/mal/mal_io.mx	Thu Nov 25 15:57:47 2010 +0100
+++ b/MonetDB5/src/modules/mal/mal_io.mx	Fri Nov 26 09:22:30 2010 +0100
@@ -339,9 +339,6 @@
 		adds = width+10;
 		add = (str) alloca((int)adds);
 	}
-#ifndef HAVE_SNPRINTF
-	sprintf(add, meta, @1);
-#else
 	n = snprintf( add, adds, meta, @1 );
 	while (n < 0 || (size_t) n >= adds) {
 		if (n >= 0)	/* glibc 2.1 */
@@ -351,7 +348,6 @@
 		add = (str) alloca ((int)adds);
 		n = snprintf( add, adds, meta, @1 );
 	}
-#endif /* HAVE_SNPRINTF */
 @c
 static char toofew_error[80] = OPERATION_FAILED " At least %d parameter(s) expected.\n";
 static char format_error[80] = OPERATION_FAILED " Error in format before param %d.\n";
@@ -366,9 +362,7 @@
 IOprintf_(str *res, str format, ...)
 {
 	va_list ap;
-#ifdef HAVE_SNPRINTF
 	int n;
-#endif /* HAVE_SNPRINTF */
 
 	int prec = 0, dotseen = 0, escaped = 0, type, size, argc = 1;
 	size_t adds = 100, width = 0;
@@ -515,10 +509,6 @@
 					return_error(type_error);
 				}
 				width += (1 + prec);
-#ifndef HAVE_SNPRINTF
-				/* Brute force; this size always fits a double */
-				width += 300;
-#endif /* HAVE_SNPRINTF */
 				@:sprintf(dval)@
 			} else if (*cur == 's') {
 				int length;
diff -r db0f45fabda6 -r 88062c62ef90 buildtools/Mx/configure.ac
--- a/buildtools/Mx/configure.ac	Thu Nov 25 15:57:47 2010 +0100
+++ b/buildtools/Mx/configure.ac	Fri Nov 26 09:22:30 2010 +0100
@@ -45,7 +45,6 @@
 AC_FUNC_MALLOC
 AC_FUNC_REALLOC
 AC_FUNC_STAT
-AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([getopt memset mkdir strchr strcspn strrchr strstr utime])
 AC_CHECK_DECLS(getopt)
 
diff -r db0f45fabda6 -r 88062c62ef90 buildtools/Mx/winconfig.h
--- a/buildtools/Mx/winconfig.h	Thu Nov 25 15:57:47 2010 +0100
+++ b/buildtools/Mx/winconfig.h	Fri Nov 26 09:22:30 2010 +0100
@@ -30,9 +30,6 @@
 /* Directory separator */
 #define DIR_SEP '\\'
 
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-/* #undef HAVE_DOPRNT */
-
 /* Define to 1 if you have the `getopt' function. */
 /* #undef HAVE_GETOPT */
 
@@ -114,9 +111,6 @@
 /* Define to 1 if you have the <utime.h> header file. */
 /* #undef HAVE_UTIME_H */
 
-/* Define to 1 if you have the `vprintf' function. */
-#define HAVE_VPRINTF 1
-
 /* Define to 1 if `lstat' dereferences a symlink specified with a trailing
    slash. */
 /* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */
diff -r db0f45fabda6 -r 88062c62ef90 buildtools/conf/winconfig.h
--- a/buildtools/conf/winconfig.h	Thu Nov 25 15:57:47 2010 +0100
+++ b/buildtools/conf/winconfig.h	Fri Nov 26 09:22:30 2010 +0100
@@ -392,12 +392,6 @@
 /* Define if your mallinfo struct has signed elements */
 /* #undef HAVE_SIGNED_MALLINFO) */
 
-/* Define to 1 if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-#ifndef snprintf
-#define snprintf _snprintf
-#endif
-
 /* Define to 1 if the system has the type `socklen_t'. */
 #define HAVE_SOCKLEN_T 1
 typedef int socklen_t;
@@ -526,14 +520,6 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 /* #undef HAVE_UNISTD_H */
 
-/* Define to 1 if you have the `vsnprintf' function. */
-#define HAVE_VSNPRINTF 1
-#if _MSC_VER < 1500
-#ifndef vsnprintf
-#define vsnprintf _vsnprintf
-#endif
-#endif
-
 /* Define to 1 if you have the <winsock.h> header file. */
 #define HAVE_WINSOCK_H 1
 
@@ -754,6 +740,16 @@
 /* Define to `unsigned' if <sys/types.h> does not define. */
 /* #undef size_t */
 
+#ifndef snprintf
+#define snprintf _snprintf
+#endif
+
+#if _MSC_VER < 1500
+#ifndef vsnprintf
+#define vsnprintf _vsnprintf
+#endif
+#endif
+
 #define __SIZE_TYPE__ size_t
 
 #endif /* WINCONFIG_H */
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic