Changeset: fa797514e587 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fa797514e587
Modified Files:
MonetDB/configure.ag
MonetDB/src/common/monet_options.mx
MonetDB/src/common/stream.mx
MonetDB/src/gdk/gdk_atoms.mx
MonetDB5/configure.ag
MonetDB5/src/mal/mal_parser.mx
buildtools/Mx/configure.ac
buildtools/Mx/mx_getopt.h
buildtools/Mx/winconfig.h
buildtools/conf/winconfig.h
buildtools/mel/winconfig.h
clients/configure.ag
clients/src/mapilib/Mapi.mx
pathfinder/configure.ag
pathfinder/src/sqlhelpers/xmlshred/include/shred_helper.h
testing/configure.ag
testing/src/difflib.c
Branch: default
Log Message:
Cleanup configure.
Don't check for declarations of library functions: if the function
exists, it must be declared by a header file. If not, it just means
that some feature macro needs to be defined to get the declaration.
diffs (278 lines):
diff -r 7de7075dd2a9 -r fa797514e587 MonetDB/configure.ag
--- a/MonetDB/configure.ag Thu Nov 25 13:26:37 2010 +0100
+++ b/MonetDB/configure.ag Thu Nov 25 14:25:57 2010 +0100
@@ -110,7 +110,6 @@
AC_CHECK_FUNCS([memset fcntl ftime getopt getrlimit getuid kill \
lockf nanosleep pipe setenv shutdown strdup strtof uname \
strtoll fsync])
-AC_CHECK_DECLS([strdup, strtof])
dnl provide different versions of the paths derived above
diff -r 7de7075dd2a9 -r fa797514e587 MonetDB/src/common/monet_options.mx
--- a/MonetDB/src/common/monet_options.mx Thu Nov 25 13:26:37 2010 +0100
+++ b/MonetDB/src/common/monet_options.mx Thu Nov 25 14:25:57 2010 +0100
@@ -120,13 +120,6 @@
# include "getopt1.c"
#endif
-#if !HAVE_DECL_STRDUP
-#ifdef HAVE_STRDUP
-extern char *strdup(const char *);
-#else
-#define strdup(s) strcpy(malloc(strlen(s)+1),(s))
-#endif
-#endif
#ifdef NATIVE_WIN32
#define strdup _strdup
#define getpid _getpid
diff -r 7de7075dd2a9 -r fa797514e587 MonetDB/src/common/stream.mx
--- a/MonetDB/src/common/stream.mx Thu Nov 25 13:26:37 2010 +0100
+++ b/MonetDB/src/common/stream.mx Thu Nov 25 14:25:57 2010 +0100
@@ -359,13 +359,6 @@
int (*fsetpos) (stream *s, lng p);
};
-#if !HAVE_DECL_STRDUP
-#ifdef HAVE_STRDUP
-extern char *strdup(const char *);
-#else
-#define strdup(s) strcpy(malloc(strlen(s)+1),(s))
-#endif
-#endif
#ifdef NATIVE_WIN32
#define strdup _strdup
#endif
diff -r 7de7075dd2a9 -r fa797514e587 MonetDB/src/gdk/gdk_atoms.mx
--- a/MonetDB/src/gdk/gdk_atoms.mx Thu Nov 25 13:26:37 2010 +0100
+++ b/MonetDB/src/gdk/gdk_atoms.mx Thu Nov 25 14:25:57 2010 +0100
@@ -1689,10 +1689,6 @@
@:atomtostr(dbl,"%.17g",double)@
@:atom_io(dbl,Lng,lng)@
-#if defined(HAVE_STRTOF) && !HAVE_DECL_STRTOF
-extern float strtof(const char *, char **);
-#endif
-
int
fltFromStr(char *src, int *len, flt **dst)
{
diff -r 7de7075dd2a9 -r fa797514e587 MonetDB5/configure.ag
--- a/MonetDB5/configure.ag Thu Nov 25 13:26:37 2010 +0100
+++ b/MonetDB5/configure.ag Thu Nov 25 14:25:57 2010 +0100
@@ -174,7 +174,6 @@
dnl Checks for library functions.
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
AC_CHECK_FUNCS([asctime_r ctime_r fpclass fpclassify ftime isinf localtime_r
putenv sbrk setenv setsid sigaction strncasecmp strcasestr strtoll sysconf
strptime strftime])
-AC_CHECK_DECLS([strtoll])
asctime_r3=yes
AC_MSG_CHECKING(asctime_r3)
diff -r 7de7075dd2a9 -r fa797514e587 MonetDB5/src/mal/mal_parser.mx
--- a/MonetDB5/src/mal/mal_parser.mx Thu Nov 25 13:26:37 2010 +0100
+++ b/MonetDB5/src/mal/mal_parser.mx Thu Nov 25 14:25:57 2010 +0100
@@ -401,10 +401,6 @@
return (long) (CURRENT(cntxt) - s);
}
-#if HAVE_STRTOLL && !HAVE_DECL_STRTOLL
-extern long long strtoll(const char *, char **, int);
-#endif
-
@-
Upon encountering an error we skip to the nearest semicolon,
or comment terminated by a new line
diff -r 7de7075dd2a9 -r fa797514e587 buildtools/Mx/configure.ac
--- a/buildtools/Mx/configure.ac Thu Nov 25 13:26:37 2010 +0100
+++ b/buildtools/Mx/configure.ac Thu Nov 25 14:25:57 2010 +0100
@@ -46,7 +46,7 @@
AC_FUNC_REALLOC
AC_FUNC_STAT
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([memset mkdir strchr strcspn strrchr strstr utime])
+AC_CHECK_FUNCS([getopt memset mkdir strchr strcspn strrchr strstr utime])
AC_CHECK_DECLS(getopt)
# Other checks
diff -r 7de7075dd2a9 -r fa797514e587 buildtools/Mx/mx_getopt.h
--- a/buildtools/Mx/mx_getopt.h Thu Nov 25 13:26:37 2010 +0100
+++ b/buildtools/Mx/mx_getopt.h Thu Nov 25 14:25:57 2010 +0100
@@ -20,7 +20,7 @@
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
-#if !HAVE_DECL_GETOPT
+#ifndef HAVE_GETOPT
extern char *optarg;
extern int optind, opterr;
diff -r 7de7075dd2a9 -r fa797514e587 buildtools/Mx/winconfig.h
--- a/buildtools/Mx/winconfig.h Thu Nov 25 13:26:37 2010 +0100
+++ b/buildtools/Mx/winconfig.h Thu Nov 25 14:25:57 2010 +0100
@@ -30,13 +30,12 @@
/* Directory separator */
#define DIR_SEP '\\'
-/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
- */
-#define HAVE_DECL_GETOPT 0
-
/* 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 */
+
/* Define to 1 if you have the <getopt.h> header file. */
/* #undef HAVE_GETOPT_H */
diff -r 7de7075dd2a9 -r fa797514e587 buildtools/conf/winconfig.h
--- a/buildtools/conf/winconfig.h Thu Nov 25 13:26:37 2010 +0100
+++ b/buildtools/conf/winconfig.h Thu Nov 25 14:25:57 2010 +0100
@@ -105,26 +105,6 @@
/* Define if you have the cURL library */
/* #undef HAVE_CURL */
-/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
- */
-#define HAVE_DECL_STRDUP 1
-
-/* Define to 1 if you have the declaration of `strndup', and to 0 if you
- don't. */
-#define HAVE_DECL_STRNDUP 0
-
-/* Define to 1 if you have the declaration of `strtof', and to 0 if you don't.
- */
-#define HAVE_DECL_STRTOF 0
-
-/* Define to 1 if you have the declaration of `strtoll', and to 0 if you
- don't. */
-#if _MSC_VER >= 1300
-#define HAVE_DECL_STRTOLL 1
-#else
-#define HAVE_DECL_STRTOLL 0
-#endif
-
/* Define to 1 if you have the <dirent.h> header file. */
/* #undef HAVE_DIRENT_H */
diff -r 7de7075dd2a9 -r fa797514e587 buildtools/mel/winconfig.h
--- a/buildtools/mel/winconfig.h Thu Nov 25 13:26:37 2010 +0100
+++ b/buildtools/mel/winconfig.h Thu Nov 25 14:25:57 2010 +0100
@@ -37,10 +37,6 @@
/* #undef HAVE_CSTDIO */
#endif
-/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
- */
-#define HAVE_DECL_STRDUP 1
-
/* Define to 1 if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
diff -r 7de7075dd2a9 -r fa797514e587 clients/configure.ag
--- a/clients/configure.ag Thu Nov 25 13:26:37 2010 +0100
+++ b/clients/configure.ag Thu Nov 25 14:25:57 2010 +0100
@@ -159,8 +159,6 @@
AM_MONETDB_FUNC_GETOPT()
-AC_CHECK_DECLS([strtof, strtoll, strtoull])
-
AM_MONETDB_MSG_CONTROL()
AM_ICONV()
diff -r 7de7075dd2a9 -r fa797514e587 clients/src/mapilib/Mapi.mx
--- a/clients/src/mapilib/Mapi.mx Thu Nov 25 13:26:37 2010 +0100
+++ b/clients/src/mapilib/Mapi.mx Thu Nov 25 14:25:57 2010 +0100
@@ -4985,15 +4985,6 @@
fetch_row returns. Automatic conversion based on common types
simplifies the work for the programmers.
@c
-#if defined(HAVE_STRTOF) && !HAVE_DECL_STRTOF
-extern float strtof(const char *, char **);
-#endif
-#if defined(HAVE_STRTOLL) && !HAVE_DECL_STRTOLL
-extern long long strtoll(const char *, char **, int);
-#endif
-#if defined(HAVE_STRTOLL) && !HAVE_DECL_STRTOLL
-extern unsigned long long strtoull(const char *, char **, int);
-#endif
static MapiMsg
store_field(struct MapiResultSet *result, int cr, int fnr, int outtype, void
*dst)
diff -r 7de7075dd2a9 -r fa797514e587 pathfinder/configure.ag
--- a/pathfinder/configure.ag Thu Nov 25 13:26:37 2010 +0100
+++ b/pathfinder/configure.ag Thu Nov 25 14:25:57 2010 +0100
@@ -609,16 +609,7 @@
dnl The xmlshredder requires strdup() & strndup(). We test here if both are
dnl available on the system. If not, we will define them ourselves
dnl in shred_helpers.h & shred_helpers.c
-AC_CHECK_FUNCS([strdup strndup],
- AC_CHECK_DECLS([strdup, strndup],,,[
- #ifdef HAVE_STRING_H
- #ifndef _GNU_SOURCE
- #define _GNU_SOURCE /* enable strndup prototype (on Linux,
only?) */
- #endif
- #include <string.h>
- #endif
- ])
-)
+AC_CHECK_FUNCS([strdup strndup])
AC_HEADER_TIME()
AC_STRUCT_TM()
diff -r 7de7075dd2a9 -r fa797514e587
pathfinder/src/sqlhelpers/xmlshred/include/shred_helper.h
--- a/pathfinder/src/sqlhelpers/xmlshred/include/shred_helper.h Thu Nov 25
13:26:37 2010 +0100
+++ b/pathfinder/src/sqlhelpers/xmlshred/include/shred_helper.h Thu Nov 25
14:25:57 2010 +0100
@@ -75,10 +75,6 @@
*/
char* strdup (const char * s);
#else
-#if !HAVE_DECL_STRDUP
-extern char* strdup(const char *);
-#endif
-
#ifdef NATIVE_WIN32
#define strdup _strdup
#endif
@@ -94,10 +90,6 @@
* @param n Copy only the first n characters.
*/
char* strndup (const char * s, size_t n);
-#else
-#if !HAVE_DECL_STRNDUP
-extern char *strndup(const char *, size_t);
-#endif
#endif
/* global state of the shredder */
diff -r 7de7075dd2a9 -r fa797514e587 testing/configure.ag
--- a/testing/configure.ag Thu Nov 25 13:26:37 2010 +0100
+++ b/testing/configure.ag Thu Nov 25 14:25:57 2010 +0100
@@ -80,7 +80,6 @@
# Checks for library functions.
AC_CHECK_FUNCS([getopt kill strdup])
-AC_CHECK_DECLS([strdup])
dnl provide different versions of the paths derived above
diff -r 7de7075dd2a9 -r fa797514e587 testing/src/difflib.c
--- a/testing/src/difflib.c Thu Nov 25 13:26:37 2010 +0100
+++ b/testing/src/difflib.c Thu Nov 25 14:25:57 2010 +0100
@@ -74,14 +74,6 @@
#define BUFLEN 16384
#define BUFLEN2 32768
-#if !HAVE_DECL_STRDUP
-#ifdef HAVE_STRDUP
-extern char *strdup(const char *);
-#else
-#define strdup(s) strcpy(malloc(strlen(s)),(s))
-#endif
-#endif
-
static char *
HTMLsave(char *s)
{
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list