From 589387d19f6e4179d6675b7585ffa5455d079582 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 26 Nov 2009 18:36:14 +0100 Subject: add gnulib modules * bootstrap.conf: Add gnulib modules and build libgreputils.a. * configure.ac: Remove macros subsumed by gnulib. * lib/Makefile.am: Remove files subsumed by gnulib. * lib/alloca.c: Remove. * lib/atexit.c: Remove. * lib/error.c: Remove. * lib/error.h: Remove. * lib/fnmatch.c: Remove. * lib/fnmatch.h: Remove. * lib/getopt.c: Remove. * lib/getopt.h: Remove. * lib/getopt1.c: Remove. * lib/gettext.h: Remove. * lib/malloc.c: Remove. * lib/memchr.c: Remove. * lib/obstack.c: Remove. * lib/obstack.h: Remove. * lib/quotearg.c: Remove. * lib/quotearg.h: Remove. * lib/realloc.c: Remove. * lib/stpcpy.c: Remove. * lib/strtol.c: Remove. * lib/strtoul.c: Remove. * lib/strtoull.c: Remove. * lib/xalloc.h: Remove. * lib/xmalloc.c: Remove. * lib/xstrtol.c: Remove. * lib/xstrtol.h: Remove. * lib/xstrtoumax.c: Remove. * m4/error.m4: Remove. * m4/inttypes_h.m4: Remove. * m4/malloc.m4: Remove. * m4/realloc.m4: Remove. * m4/uintmax_t.m4: Remove. * m4/ulonglong.m4: Remove. * m4/xstrtoumax.m4: Remove. * src/system.h: Remove strerror, sys_nerr, sys_errlist. --- m4/.gitignore | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ m4/error.m4 | 11 ----------- m4/inttypes_h.m4 | 22 ---------------------- m4/malloc.m4 | 34 ---------------------------------- m4/realloc.m4 | 34 ---------------------------------- m4/uintmax_t.m4 | 21 --------------------- m4/ulonglong.m4 | 17 ----------------- m4/xstrtoumax.m4 | 34 ---------------------------------- 8 files changed, 49 insertions(+), 173 deletions(-) delete mode 100644 m4/error.m4 delete mode 100644 m4/inttypes_h.m4 delete mode 100644 m4/malloc.m4 delete mode 100644 m4/realloc.m4 delete mode 100644 m4/uintmax_t.m4 delete mode 100644 m4/ulonglong.m4 delete mode 100644 m4/xstrtoumax.m4 (limited to 'm4') diff --git a/m4/.gitignore b/m4/.gitignore index 62c3b1e6..b0d63087 100644 --- a/m4/.gitignore +++ b/m4/.gitignore @@ -1,5 +1,15 @@ 00gnulib.m4 +alloca.m4 +atexit.m4 +btowc.m4 codeset.m4 +errno_h.m4 +error.m4 +exitfail.m4 +extensions.m4 +fcntl_h.m4 +fnmatch.m4 +getopt.m4 gettext.m4 glibc2.m4 glibc21.m4 @@ -8,26 +18,65 @@ gnulib-common.m4 gnulib-comp.m4 gnulib-tool.m4 iconv.m4 +include_next.m4 +inline.m4 intdiv0.m4 intl.m4 intldir.m4 intlmacosx.m4 intmax.m4 inttypes-pri.m4 +inttypes.m4 +inttypes_h.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 +localcharset.m4 +locale-fr.m4 +locale-ja.m4 +locale-zh.m4 lock.m4 longlong.m4 +malloc.m4 +mbrtowc.m4 +mbsinit.m4 +mbsrtowcs.m4 +memchr.m4 +mmap-anon.m4 +multiarch.m4 nls.m4 onceonly.m4 po.m4 printf-posix.m4 progtest.m4 +quotearg.m4 +realloc.m4 +regex.m4 size_max.m4 +ssize_t.m4 +stdbool.m4 +stddef_h.m4 +stdint.m4 stdint_h.m4 +stdlib_h.m4 +stpcpy.m4 +strerror.m4 +string_h.m4 +strtoimax.m4 +strtol.m4 +strtoll.m4 +strtoul.m4 +strtoull.m4 +strtoumax.m4 +threadlib.m4 +unistd_h.m4 visibility.m4 +wchar.m4 wchar_t.m4 +wcrtomb.m4 +wctype.m4 wint_t.m4 +xalloc.m4 xsize.m4 +xstrtol.m4 diff --git a/m4/error.m4 b/m4/error.m4 deleted file mode 100644 index cbf00426..00000000 --- a/m4/error.m4 +++ /dev/null @@ -1,11 +0,0 @@ -#serial 1 - -dnl FIXME: put these prerequisite-only *.m4 files in a separate -dnl directory -- otherwise, they'll conflict with existing files. - -dnl These are the prerequisite macros for GNU's error.c file. -AC_DEFUN([jm_PREREQ_ERROR], -[ - AC_CHECK_FUNCS(strerror strerror_r vprintf doprnt) - AC_HEADER_STDC -]) diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4 deleted file mode 100644 index 6b046bb1..00000000 --- a/m4/inttypes_h.m4 +++ /dev/null @@ -1,22 +0,0 @@ -#serial 3 - -dnl From Paul Eggert. - -# Define HAVE_INTTYPES_H if exists, -# doesn't clash with , and declares uintmax_t. - -AC_DEFUN([jm_AC_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, - [AC_TRY_COMPILE( - [#include -#include ], - [uintmax_t i = (uintmax_t) -1;], - jm_ac_cv_header_inttypes_h=yes, - jm_ac_cv_header_inttypes_h=no)]) - if test $jm_ac_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, -[Define if exists, doesn't clash with , - and declares uintmax_t. ]) - fi -]) diff --git a/m4/malloc.m4 b/m4/malloc.m4 deleted file mode 100644 index bc43b607..00000000 --- a/m4/malloc.m4 +++ /dev/null @@ -1,34 +0,0 @@ -#serial 3 - -dnl From Jim Meyering. -dnl Determine whether malloc accepts 0 as its argument. -dnl If it doesn't, arrange to use the replacement function. -dnl - -AC_DEFUN([jm_FUNC_MALLOC], -[ - dnl xmalloc.c requires that this symbol be defined so it doesn't - dnl mistakenly use a broken malloc -- as it might if this test were omitted. - AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1, - [Define if the malloc check has been performed. ]) - - AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc, - [AC_TRY_RUN([ - char *malloc (); - int - main () - { - exit (malloc (0) ? 0 : 1); - } - ], - jm_cv_func_working_malloc=yes, - jm_cv_func_working_malloc=no, - dnl When crosscompiling, assume malloc is broken. - jm_cv_func_working_malloc=no) - ]) - if test $jm_cv_func_working_malloc = no; then - AC_LIBOBJ(malloc) - AC_DEFINE_UNQUOTED(malloc, rpl_malloc, - [Define to rpl_malloc if the replacement function should be used.]) - fi -]) diff --git a/m4/realloc.m4 b/m4/realloc.m4 deleted file mode 100644 index d40a048b..00000000 --- a/m4/realloc.m4 +++ /dev/null @@ -1,34 +0,0 @@ -#serial 3 - -dnl From Jim Meyering. -dnl Determine whether realloc works when both arguments are 0. -dnl If it doesn't, arrange to use the replacement function. -dnl - -AC_DEFUN([jm_FUNC_REALLOC], -[ - dnl xmalloc.c requires that this symbol be defined so it doesn't - dnl mistakenly use a broken realloc -- as it might if this test were omitted. - AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1, - [Define if the realloc check has been performed. ]) - - AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc, - [AC_TRY_RUN([ - char *realloc (); - int - main () - { - exit (realloc (0, 0) ? 0 : 1); - } - ], - jm_cv_func_working_realloc=yes, - jm_cv_func_working_realloc=no, - dnl When crosscompiling, assume realloc is broken. - jm_cv_func_working_realloc=no) - ]) - if test $jm_cv_func_working_realloc = no; then - AC_LIBOBJ(realloc) - AC_DEFINE_UNQUOTED(realloc, rpl_realloc, - [Define to rpl_realloc if the replacement function should be used.]) - fi -]) diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4 deleted file mode 100644 index c3e8ecf6..00000000 --- a/m4/uintmax_t.m4 +++ /dev/null @@ -1,21 +0,0 @@ -#serial 5 - -dnl From Paul Eggert. - - -# Define uintmax_t to `unsigned long' or `unsigned long long' -# if does not exist. - -AC_DEFUN([jm_AC_TYPE_UINTMAX_T], -[AC_PREREQ(2.13)dnl - AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])dnl - if test $jm_ac_cv_header_inttypes_h = no; then - AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) - test $ac_cv_type_unsigned_long_long = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' - AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, -[ Define to unsigned long or unsigned long long - if doesn't define.]) - fi -]) diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4 deleted file mode 100644 index 51fc4181..00000000 --- a/m4/ulonglong.m4 +++ /dev/null @@ -1,17 +0,0 @@ -#serial 2 - -dnl From Paul Eggert. - -AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], -[ - AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, - [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], - [unsigned long long ullmax = (unsigned long long) -1; - return ull << i | ull >> i | ullmax / ull | ullmax % ull;], - ac_cv_type_unsigned_long_long=yes, - ac_cv_type_unsigned_long_long=no)]) - if test $ac_cv_type_unsigned_long_long = yes; then - AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, - [Define if you have the unsigned long long type.]) - fi -]) diff --git a/m4/xstrtoumax.m4 b/m4/xstrtoumax.m4 deleted file mode 100644 index 9bbcec7e..00000000 --- a/m4/xstrtoumax.m4 +++ /dev/null @@ -1,34 +0,0 @@ -#serial 2 - -# autoconf tests required for use of xstrtoumax.c - -AC_DEFUN([jm_AC_PREREQ_XSTRTOUMAX], -[ - AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) - AC_CHECK_HEADERS(stdlib.h) - - AC_CACHE_CHECK([whether defines strtoumax as a macro], - jm_cv_func_strtoumax_macro, - AC_EGREP_CPP([inttypes_h_defines_strtoumax], [#include -#ifdef strtoumax - inttypes_h_defines_strtoumax -#endif], - jm_cv_func_strtoumax_macro=yes, - jm_cv_func_strtoumax_macro=no)) - - if test "$jm_cv_func_strtoumax_macro" != yes; then - AC_REPLACE_FUNCS(strtoumax) - fi - - dnl We don't need (and can't compile) the replacement strtoull - dnl unless the type `unsigned long long' exists. - dnl Also, only the replacement strtoumax invokes strtoull, - dnl so we need the replacement strtoull only if strtoumax does not exist. - case "$ac_cv_type_unsigned_long_long,$jm_cv_func_strtoumax_macro,$ac_cv_func_strtoumax" in - yes,no,no) - AC_REPLACE_FUNCS(strtoull) - ;; - esac - -]) -- cgit v1.2.1