diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-08-21 06:11:26 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-08-21 06:11:26 +0000 |
commit | 82ff49b55425e14156a89f4d2ab4267409665f54 (patch) | |
tree | f923dd5daa3bd2dbaaf1d1ae986fbab058793ecf /m4 | |
parent | cd0b441f76ad419444410ffc74ba50d899e25c77 (diff) | |
download | gnulib-82ff49b55425e14156a89f4d2ab4267409665f54.tar.gz |
Add and change modules to make it easier for coreutils to use
gnulib-tool.
* lib/cycle-check.h: Include <stdint.h> unconditionally, since we
now assume the stdint module. Do not include inttypes.h.
* lib/fsusage.h: Likewise.
* lib/getndelim2.c: Likewise.
* lib/human.h: Likewise.
* lib/inttostr.h: Likewise.
* lib/obstack.c: Likewise.
* lib/regex_internal.h: Likewise.
* lib/tempname.c: Likewise.
* lib/utimecmp.c: Likewise.
* lib/xstrtol.h: Likewise.
* lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
* lib/strtoimax.c: Adjust to macro name changes in Autoconf,
e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
* lib/xtime.h: Likewise.
Remove files that are no longer needed by their respective modules.
* m4/obstack.m4: Remove.
* m4/strerror_r.m4: Remove.
* m4/uint32_t.m4: Remove.
* m4/uintptr_t.m4: Remove.
* m4/ullong_max.m4: Remove.
* m4/xstrtoimax.m4: Remove.
* m4/xstrtoumax.m4: Remove.
* cycle-check.m4 (gl_CYCLE_CHECK): Do not require gl_AC_TYPE_UINTMAX_T,
gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib dependencies now
capture this.
* cycle-check.m4 (gl_CYCLE_CHECK):
Do not use AC_LIBSOURCES, since gnulib modules now do this.
* fsusage.m4 (gl_FSUSAGE): Likewise.
* human.m4 (gl_HUMAN): Likewise.
* inttostr.m4 (gl_INTTOSTR): Likewise.
* xstrtol.m4 (gl_XSTRTOL): Likewise.
* filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
* filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
stdint.
* human.m4 (gl_HUMAN): Likewise.
* inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
* mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
* strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
* strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
* xstrtol (gl_XSTRTOL): Likewise.
* gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
AC_TYPE_LONG_LONG_INT.
* strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
* strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
* strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
* strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
* human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
on stdbool.
* xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
(gl_PREREQ_XSTRTOUL): Remove.
* ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
* posixver.m4: Fix comment since head -1 now works even in POSIX mode.
* modules/backupfile (Files): Remove m4/d-ino.m4.
(Depends-on): Add d-ino.
* modules/cycle-check (Depends-on): Add stdint.
(lib_SOURCES): Add cycle-check.h.
* modules/d-ino: New module.
* modules/d-type: New module.
* modules/error (Files): Remove m4/strerror_r.m4.
* modules/filemode (Files): Add m4/st_dm_mode.m4.
* modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
m4/inttypes_h.m4, m4/uintmax_t.m4.
(Depends-on): Add stdint.
(lib_SOURCES): Add fsusage.h.
* modules/getcwd (Files): Remove d-ino.m4.
(Depends-on): Add d-ino.
* modules/getndelim2 (Depends-on): Add stdint.
* modules/glob (Files): Remove m4/d-type.m4.
(Depends-on): Add d-type.
* modules/host-os: New module.
* modules/human (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
m4/inttypes_h.m4, m4/uintmax_t.m4.
* Depends-on: Add stdint.
(lib_SOURCES): Add human.h.
* modules/inttostr (Files): Remove m4/intmax_t.m4,
m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
m4/uintmax_t.m4, m4/ulonglong.m4.
(Depends-on): Add stdint.
(EXTRA_DIST): Add inttostr.h.
* modules/lchmod: New module.
* modules/link-follow: New module.
* modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
(Depends-on): Add lchmod.
* modules/mkstemp (Files): Remove m4/ulonglong.m4,
m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
(Depends-on): Add stdint.
* modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
(Depends-on): Add stdint.
(configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
* modules/perl: New module.
* modules/regex (Depends-on): Add stdint.
* modules/rmdir-errno: New module.
* modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
m4/intmax_t.m4.
(Depends-on): Add stdint.
* modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
m4/uintmax_t.m4.
(Depends-on): Add stdint.
* modules/unlink-busy: New module.
* modules/utimecmp (Depends-on): Add stdint.
* modules/uptime: New module.
* modules/winsz-ioctl: New module.
* modules/winsz-termios: New module.
* modules/xnanosleep (Depends-on): Add nanosleep.
* modules/ullong_max: Remove.
* modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
(configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
* modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
(Depends-on): Add inttypes.
(lib_SOURCES): Add xstrtol.h.
* modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
(configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
* MODULES.html.sh: Move 'assert' into the assert section.
Move 'dummy' into the linking section.
Remove ullong_max.
Add section for compatibility checks for POSIX:2001 functions,
and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
winsz-ioctl, and winsz-termios into it.
Add lchmod.
Add top-level Misc section and put host-os, perl, and uptime
into it.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ChangeLog | 59 | ||||
-rw-r--r-- | m4/cycle-check.m4 | 8 | ||||
-rw-r--r-- | m4/filemode.m4 | 1 | ||||
-rw-r--r-- | m4/fsusage.m4 | 3 | ||||
-rw-r--r-- | m4/gethrxtime.m4 | 4 | ||||
-rw-r--r-- | m4/human.m4 | 9 | ||||
-rw-r--r-- | m4/inttostr.m4 | 13 | ||||
-rw-r--r-- | m4/ls-mntd-fs.m4 | 3 | ||||
-rw-r--r-- | m4/mkstemp.m4 | 1 | ||||
-rw-r--r-- | m4/obstack.m4 | 23 | ||||
-rw-r--r-- | m4/posixver.m4 | 6 | ||||
-rw-r--r-- | m4/strerror_r.m4 | 50 | ||||
-rw-r--r-- | m4/strtoimax.m4 | 7 | ||||
-rw-r--r-- | m4/strtoll.m4 | 10 | ||||
-rw-r--r-- | m4/strtoull.m4 | 10 | ||||
-rw-r--r-- | m4/strtoumax.m4 | 7 | ||||
-rw-r--r-- | m4/uint32_t.m4 | 53 | ||||
-rw-r--r-- | m4/uintptr_t.m4 | 54 | ||||
-rw-r--r-- | m4/ullong_max.m4 | 27 | ||||
-rw-r--r-- | m4/xstrtoimax.m4 | 14 | ||||
-rw-r--r-- | m4/xstrtol.m4 | 27 | ||||
-rw-r--r-- | m4/xstrtoumax.m4 | 14 |
22 files changed, 85 insertions, 318 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog index 5bc09c8fae..8f525b6a34 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,54 @@ +2006-08-20 Paul Eggert <eggert@cs.ucla.edu> + + Remove files that are no longer needed by their respective modules. + * obstack.m4: Remove. + * strerror_r.m4: Remove. + * uint32_t.m4: Remove. + * uintptr_t.m4: Remove. + * ullong_max.m4: Remove. + * xstrtoimax.m4: Remove. + * xstrtoumax.m4: Remove. + + * cycle-check.m4 (gl_CYCLE_CHECK): Do not require gl_AC_TYPE_UINTMAX_T, + gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib dependencies now + capture this. + + * cycle-check.m4 (gl_CYCLE_CHECK): + Do not use AC_LIBSOURCES, since gnulib modules now do this. + * fsusage.m4 (gl_FSUSAGE): Likewise. + * human.m4 (gl_HUMAN): Likewise. + * inttostr.m4 (gl_INTTOSTR): Likewise. + * xstrtol.m4 (gl_XSTRTOL): Likewise. + + * filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE. + + * filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require + gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require + stdint. + * human.m4 (gl_HUMAN): Likewise. + * inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise. + * mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise. + * strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise. + * strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise. + * xstrtol (gl_XSTRTOL): Likewise. + + * gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG -> + AC_TYPE_LONG_LONG_INT. + * strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise. + * strtoll.m4 (gl_FUNC_STRTOLL): Likewise. + * strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long. + * strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise. + + * human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend + on stdbool. + + * xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove. + (gl_PREREQ_XSTRTOUL): Remove. + + * ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt. + + * posixver.m4: Fix comment since head -1 now works even in POSIX mode. + 2006-08-18 Paul Eggert <eggert@cs.ucla.edu> Bruno Haible <bruno@clisp.org> @@ -1016,8 +1067,8 @@ 2005-10-19 Simon Josefsson <jas@extundo.com> - * m4/gc-hmac-md5.m4, m4/gc-hmac-sha1.m4, m4/gc-md4.m4, - m4/gc-md5.m4, m4/gc-sha1.m4: Fix typo, suggested by Stepan Kasal + * gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4, + gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal <kasal@ucw.cz>. 2005-10-19 Simon Josefsson <jas@extundo.com> @@ -1240,7 +1291,7 @@ 2005-09-12 Derek Price <derek@ximbiot.com> Paul Eggert <eggert@cs.ucla.edu> - * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c, + * glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c, glob_.h, glob-libc.h. (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed. @@ -2046,7 +2097,7 @@ 2004-11-01 Paul Eggert <eggert@cs.ucla.edu> - * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of + * getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of fflush_unlocked, flockfile, funlockfile, funlockfile, fputs_unlocked, putc_unlocked. diff --git a/m4/cycle-check.m4 b/m4/cycle-check.m4 index 613b0a9310..090f89de76 100644 --- a/m4/cycle-check.m4 +++ b/m4/cycle-check.m4 @@ -1,4 +1,4 @@ -#serial 3 +#serial 4 dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,11 +6,5 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_CYCLE_CHECK], [ - AC_LIBSOURCES([cycle-check.c, cycle-check.h]) AC_LIBOBJ([cycle-check]) - - dnl Prerequisites. - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - AC_REQUIRE([gl_STRUCT_DEV_INO]) - AC_REQUIRE([gl_SAME_INODE]) ]) diff --git a/m4/filemode.m4 b/m4/filemode.m4 index 2b9334f853..fa571b3f2e 100644 --- a/m4/filemode.m4 +++ b/m4/filemode.m4 @@ -6,6 +6,7 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FILEMODE], [ + AC_REQUIRE([AC_STRUCT_ST_DM_MODE]) AC_LIBSOURCES([filemode.c, filemode.h]) AC_LIBOBJ([filemode]) AC_CHECK_DECLS_ONCE([strmode]) diff --git a/m4/fsusage.m4 b/m4/fsusage.m4 index 451bd7d1e8..78266f1106 100644 --- a/m4/fsusage.m4 +++ b/m4/fsusage.m4 @@ -12,8 +12,6 @@ AC_DEFUN([gl_FSUSAGE], [ - AC_LIBSOURCES([fsusage.c, fsusage.h]) - AC_CHECK_HEADERS_ONCE(sys/param.h) AC_CHECK_HEADERS_ONCE(sys/vfs.h sys/fs_types.h) AC_CHECK_HEADERS(sys/mount.h, [], [], @@ -259,7 +257,6 @@ choke -- this is a workaround for a Sun-specific problem # Prerequisites of lib/fsusage.c not done by gl_FILE_SYSTEM_USAGE. AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA], [ - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h sys/statvfs.h) gl_STATFS_TRUNCATES ]) diff --git a/m4/gethrxtime.m4 b/m4/gethrxtime.m4 index 663bd70a19..a816891c37 100644 --- a/m4/gethrxtime.m4 +++ b/m4/gethrxtime.m4 @@ -1,4 +1,4 @@ -# gethrxtime.m4 serial 4 +# gethrxtime.m4 serial 5 dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -43,7 +43,7 @@ AC_DEFUN([gl_ARITHMETIC_HRTIME_T], AC_DEFUN([gl_XTIME], [ AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) : ]) diff --git a/m4/human.m4 b/m4/human.m4 index 1787c48f99..72f2176f8e 100644 --- a/m4/human.m4 +++ b/m4/human.m4 @@ -1,18 +1,13 @@ -#serial 9 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +#serial 10 +dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_HUMAN], [ - AC_LIBSOURCES([human.c, human.h, intprops.h]) AC_LIBOBJ([human]) - dnl Prerequisites of lib/human.h. - AC_REQUIRE([AM_STDBOOL_H]) - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - dnl Prerequisites of lib/human.c. : ]) diff --git a/m4/inttostr.m4 b/m4/inttostr.m4 index 600c82ca9d..4de28f1297 100644 --- a/m4/inttostr.m4 +++ b/m4/inttostr.m4 @@ -1,18 +1,11 @@ -#serial 5 -dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc. +#serial 6 +dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_INTTOSTR], [ - AC_LIBSOURCES([inttostr.c, inttostr.h, intprops.h]) - - dnl We don't technically need to list the following .c files, since their - dnl functions are named in the AC_LIBOBJ calls, but this is an unusual - dnl module and it seems a little clearer to do so. - AC_LIBSOURCES([imaxtostr.c, offtostr.c, umaxtostr.c]) - AC_LIBOBJ([imaxtostr]) AC_LIBOBJ([offtostr]) AC_LIBOBJ([umaxtostr]) @@ -25,8 +18,6 @@ AC_DEFUN([gl_INTTOSTR], # Prerequisites of lib/inttostr.h. AC_DEFUN([gl_PREREQ_INTTOSTR], [ - AC_REQUIRE([gl_AC_TYPE_INTMAX_T]) - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) AC_REQUIRE([AC_TYPE_OFF_T]) : ]) diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4 index c29933162d..8de592e433 100644 --- a/m4/ls-mntd-fs.m4 +++ b/m4/ls-mntd-fs.m4 @@ -1,4 +1,4 @@ -#serial 22 +#serial 23 # How to list mounted file systems. # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software @@ -167,6 +167,7 @@ if test $ac_cv_func_getmntent = yes; then AC_DEFINE(MOUNTED_GETMNTENT2, 1, [Define if there is a function named getmntent for reading the list of mounted file systems, and that function takes two arguments. (SVR4)]) + AC_CHECK_FUNCS(hasmntopt) fi fi diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4 index 57fa8a4854..0ce51dd198 100644 --- a/m4/mkstemp.m4 +++ b/m4/mkstemp.m4 @@ -67,5 +67,4 @@ AC_DEFUN([gl_PREREQ_TEMPNAME], [ AC_CHECK_HEADERS_ONCE(sys/time.h) AC_CHECK_FUNCS(__secure_getenv gettimeofday) - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) ]) diff --git a/m4/obstack.m4 b/m4/obstack.m4 deleted file mode 100644 index ea60f7fc8d..0000000000 --- a/m4/obstack.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# obstack.m4 serial 4 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_OBSTACK], -[ - AC_FUNC_OBSTACK - dnl Note: AC_FUNC_OBSTACK does AC_LIBSOURCES([obstack.h, obstack.c]). - if test $ac_cv_func_obstack = no; then - gl_PREREQ_OBSTACK - fi -]) - -# Prerequisites of lib/obstack.c. -AC_DEFUN([gl_PREREQ_OBSTACK], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - : -]) diff --git a/m4/posixver.m4 b/m4/posixver.m4 index 838441a49f..5432702b3d 100644 --- a/m4/posixver.m4 +++ b/m4/posixver.m4 @@ -1,5 +1,5 @@ -# posixver.m4 serial 7 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# posixver.m4 serial 8 +dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,7 +15,7 @@ AC_DEFUN([gl_POSIXVER], # Set the default level of POSIX conformance at configure-time. # Build with `./configure DEFAULT_POSIX2_VERSION=199209 ...' to # support the older version, thus preserving portability with -# scripts that use sort +1, tail +32, head -1, etc. +# scripts that use sort +1, tail +32, etc. # Note however, that this breaks tools that might run commands # like `sort +some-file' that conform with the newer standard. AC_DEFUN([gl_DEFAULT_POSIX2_VERSION], diff --git a/m4/strerror_r.m4 b/m4/strerror_r.m4 deleted file mode 100644 index e3b5d0cfda..0000000000 --- a/m4/strerror_r.m4 +++ /dev/null @@ -1,50 +0,0 @@ -#serial 1004 -# This file is not needed if you can assume Autoconf 2.54 or later. -# Experimental replacement for the function in the latest CVS autoconf. -# Use with the error.c file in ../lib. - -# Copyright (C) 2001 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -undefine([AC_FUNC_STRERROR_R]) - -# AC_FUNC_STRERROR_R -# ------------------ -AC_DEFUN([AC_FUNC_STRERROR_R], -[AC_CHECK_DECLS([strerror_r]) -AC_CHECK_FUNCS([strerror_r]) -AC_CACHE_CHECK([whether strerror_r returns char *], - ac_cv_func_strerror_r_char_p, - [ - ac_cv_func_strerror_r_char_p=no - if test $ac_cv_have_decl_strerror_r = yes; then - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], - [[ - char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - char *p = strerror_r (0, buf, sizeof buf); - return !p || x; - ]])], - ac_cv_func_strerror_r_char_p=yes) - else - # strerror_r is not declared. Choose between - # systems that have relatively inaccessible declarations for the - # function. BeOS and DEC UNIX 4.0 fall in this category, but the - # former has a strerror_r that returns char*, while the latter - # has a strerror_r that returns `int'. - # This test should segfault on the DEC system. - AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT - extern char *strerror_r ();], - [[char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - exit (!isalpha (x));]])], - ac_cv_func_strerror_r_char_p=yes, , :) - fi - ]) -if test $ac_cv_func_strerror_r_char_p = yes; then - AC_DEFINE([STRERROR_R_CHAR_P], 1, - [Define to 1 if strerror_r returns char *.]) -fi -])# AC_FUNC_STRERROR_R diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4 index 914e180bc3..9957637a65 100644 --- a/m4/strtoimax.m4 +++ b/m4/strtoimax.m4 @@ -1,5 +1,5 @@ -# strtoimax.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# strtoimax.m4 serial 6 +dnl Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -29,7 +29,6 @@ AC_DEFUN([gl_FUNC_STRTOIMAX], # Prerequisites of lib/strtoimax.c. AC_DEFUN([gl_PREREQ_STRTOIMAX], [ - gl_AC_TYPE_INTMAX_T AC_CHECK_DECLS(strtoll) - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) ]) diff --git a/m4/strtoll.m4 b/m4/strtoll.m4 index 76f8065490..53cbed2133 100644 --- a/m4/strtoll.m4 +++ b/m4/strtoll.m4 @@ -1,5 +1,5 @@ -# strtoll.m4 serial 3 -dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc. +# strtoll.m4 serial 4 +dnl Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -7,9 +7,9 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRTOLL], [ dnl We don't need (and can't compile) the replacement strtoll - dnl unless the type 'long long' exists. - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) - if test "$ac_cv_type_long_long" = yes; then + dnl unless the type 'long long int' exists. + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + if test "$ac_cv_type_long_long_int" = yes; then AC_REPLACE_FUNCS(strtoll) if test $ac_cv_func_strtoll = no; then gl_PREREQ_STRTOLL diff --git a/m4/strtoull.m4 b/m4/strtoull.m4 index 398a86d187..fcec3de2ac 100644 --- a/m4/strtoull.m4 +++ b/m4/strtoull.m4 @@ -1,5 +1,5 @@ -# strtoull.m4 serial 3 -dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc. +# strtoull.m4 serial 4 +dnl Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -7,9 +7,9 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRTOULL], [ dnl We don't need (and can't compile) the replacement strtoull - dnl unless the type 'unsigned long long' exists. - AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) - if test "$ac_cv_type_unsigned_long_long" = yes; then + dnl unless the type 'unsigned long long int' exists. + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + if test "$ac_cv_type_unsigned_long_long_int" = yes; then AC_REPLACE_FUNCS(strtoull) if test $ac_cv_func_strtoull = no; then gl_PREREQ_STRTOULL diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4 index 197858712f..1935250ed6 100644 --- a/m4/strtoumax.m4 +++ b/m4/strtoumax.m4 @@ -1,5 +1,5 @@ -# strtoumax.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# strtoumax.m4 serial 6 +dnl Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -29,7 +29,6 @@ AC_DEFUN([gl_FUNC_STRTOUMAX], # Prerequisites of lib/strtoumax.c. AC_DEFUN([gl_PREREQ_STRTOUMAX], [ - gl_AC_TYPE_UINTMAX_T AC_CHECK_DECLS(strtoull) - AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) ]) diff --git a/m4/uint32_t.m4 b/m4/uint32_t.m4 deleted file mode 100644 index 1fb5e668fc..0000000000 --- a/m4/uint32_t.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# uint32_t.m4 serial 4 - -# Copyright (C) 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([gl_AC_TYPE_UINT32_T], -[ - AC_CACHE_CHECK([for uint32_t], gl_cv_c_uint32_t, - [gl_cv_c_uint32_t=no - for ac_type in "uint32_t" "unsigned int" \ - "unsigned long int" "unsigned short int"; do - AC_COMPILE_IFELSE( - [AC_LANG_BOOL_COMPILE_TRY( - [AC_INCLUDES_DEFAULT], - [[($ac_type) -1 == 4294967295U]])], - [gl_cv_c_uint32_t=$ac_type]) - test "$gl_cv_c_uint32_t" != no && break - done]) - case "$gl_cv_c_uint32_t" in - no|uint32_t) ;; - *) - AC_DEFINE(_UINT32_T, 1, - [Define for Solaris 2.5.1 so uint32_t typedef from <sys/synch.h>, - <pthread.h>, or <semaphore.h> is not used. If the typedef was - allowed, the #define below would cause a syntax error.]) - AC_DEFINE_UNQUOTED(uint32_t, $gl_cv_c_uint32_t, - [Define to the type of a unsigned integer type of width exactly 32 bits - if such a type exists and the standard includes do not define it.]) - ;; - esac - - AC_CACHE_CHECK([for UINT32_MAX], gl_cv_c_uint32_max, - [AC_COMPILE_IFELSE( - [AC_LANG_BOOL_COMPILE_TRY( - [AC_INCLUDES_DEFAULT], - [[UINT32_MAX == 4294967295U]])], - [gl_cv_c_uint32_max=yes], - [gl_cv_c_uint32_max=no])]) - case $gl_cv_c_uint32_max,$gl_cv_c_uint32_t in - yes,*) ;; - *,no) ;; - *) - AC_DEFINE(UINT32_MAX, 4294967295U, - [Define to its maximum value if an unsigned integer type of width - exactly 32 bits exists and the standard includes do not define - UINT32_MAX.]) - ;; - esac -]) diff --git a/m4/uintptr_t.m4 b/m4/uintptr_t.m4 deleted file mode 100644 index 65264a58a4..0000000000 --- a/m4/uintptr_t.m4 +++ /dev/null @@ -1,54 +0,0 @@ -# uintptr_t.m4 serial 3 - -# Copyright (C) 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([gl_AC_TYPE_UINTPTR_T], -[ - AC_CACHE_CHECK([for uintptr_t], gl_cv_c_uintptr_t, - [gl_cv_c_uintptr_t=no - for ac_type in "uintptr_t" "unsigned int" \ - "unsigned long int" "unsigned long long int"; do - AC_COMPILE_IFELSE( - [AC_LANG_BOOL_COMPILE_TRY( - [AC_INCLUDES_DEFAULT], - [[sizeof (void *) <= sizeof (uintptr_t)]])], - [gl_cv_c_uintptr_t=$ac_type]) - test $gl_cv_c_uintptr_t != no && break - done]) - case $gl_cv_c_uintptr_t in - no|uintptr_t) ;; - *) - AC_DEFINE_UNQUOTED(uintptr_t, $gl_cv_c_uintptr_t, - [Define to the type of a unsigned integer type wide enough to - hold a pointer, if such a type exists.]) - ;; - esac - - dnl Check whether UINTPTR_MAX is defined, not whether it has the - dnl right value. Alas, Solaris 8 defines it to empty! - dnl Applications should use (uintptr_t) -1 rather than UINTPTR_MAX. - AC_CACHE_CHECK([for UINTPTR_MAX], gl_cv_c_uintptr_max, - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT], - [[#ifndef UINTPTR_MAX - error: UINTPTR_MAX is not defined. - #endif]])], - [gl_cv_c_uintptr_max=yes], - [gl_cv_c_uintptr_max=no])]) - case $gl_cv_c_uintptr_max,$gl_cv_c_uintptr_t in - yes,*) ;; - *,no) ;; - *) - AC_DEFINE(UINTPTR_MAX, ((uintptr_t) -1), - [Define to its maximum value if an unsigned integer type wide enough - to hold a pointer exists and the standard includes do not define - UINTPTR_MAX.]) - ;; - esac -]) diff --git a/m4/ullong_max.m4 b/m4/ullong_max.m4 deleted file mode 100644 index 61fdce25e2..0000000000 --- a/m4/ullong_max.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# ullong_max.m4 - define ULLONG_MAX if necessary - -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([gl_ULLONG_MAX], -[ - dnl Avoid _AC_COMPUTE_INT-related macros, as they may not work with - dnl types wider than long int, due to problems with expr. - AC_CACHE_CHECK([whether ULONG_MAX < ULLONG_MAX], - [gl_cv_ulong_max_lt_ullong_max], - [AC_COMPILE_IFELSE( - [AC_LANG_BOOL_COMPILE_TRY( - [AC_INCLUDES_DEFAULT], - [[(unsigned long int) -1 < (unsigned long long int) -1]])], - [gl_cv_ulong_max_lt_ullong_max=yes], - [gl_cv_ulong_max_lt_ullong_max=no])]) - if test $gl_cv_ulong_max_lt_ullong_max = yes; then - AC_DEFINE([ULONG_MAX_LT_ULLONG_MAX], 1, - [Define if ULONG_MAX < ULLONG_MAX, even if your compiler does not - support ULLONG_MAX.]) - fi -]) diff --git a/m4/xstrtoimax.m4 b/m4/xstrtoimax.m4 deleted file mode 100644 index ca1d2d57c7..0000000000 --- a/m4/xstrtoimax.m4 +++ /dev/null @@ -1,14 +0,0 @@ -#serial 5 -dnl Cloned from xstrtoumax.m4. Keep these files in sync. - -dnl Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XSTRTOIMAX], -[ - dnl Prerequisites of lib/xstrtoimax.c. - AC_REQUIRE([gl_AC_TYPE_INTMAX_T]) - AC_REQUIRE([gl_PREREQ_XSTRTOL]) -]) diff --git a/m4/xstrtol.m4 b/m4/xstrtol.m4 index fa6e5c4071..cd5a549dd3 100644 --- a/m4/xstrtol.m4 +++ b/m4/xstrtol.m4 @@ -1,4 +1,4 @@ -#serial 8 +#serial 9 dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,31 +6,6 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XSTRTOL], [ - AC_LIBSOURCES([xstrtol.c, xstrtol.h, xstrtoul.c, intprops.h]) AC_LIBOBJ([xstrtol]) AC_LIBOBJ([xstrtoul]) - - AC_REQUIRE([gl_PREREQ_XSTRTOL]) - AC_REQUIRE([gl_PREREQ_XSTRTOUL]) -]) - -# Prerequisites of lib/xstrtol.h. -AC_DEFUN([gl_PREREQ_XSTRTOL_H], -[ - AC_REQUIRE([gl_AC_TYPE_INTMAX_T]) - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) -]) - -# Prerequisites of lib/xstrtol.c. -AC_DEFUN([gl_PREREQ_XSTRTOL], -[ - AC_REQUIRE([gl_PREREQ_XSTRTOL_H]) - AC_CHECK_DECLS_ONCE([strtoimax]) - AC_CHECK_DECLS_ONCE([strtoumax]) -]) - -# Prerequisites of lib/xstrtoul.c. -AC_DEFUN([gl_PREREQ_XSTRTOUL], -[ - AC_REQUIRE([gl_PREREQ_XSTRTOL]) ]) diff --git a/m4/xstrtoumax.m4 b/m4/xstrtoumax.m4 deleted file mode 100644 index afac77b382..0000000000 --- a/m4/xstrtoumax.m4 +++ /dev/null @@ -1,14 +0,0 @@ -#serial 7 -dnl Cloned from xstrtoimax.m4. Keep these files in sync. - -dnl Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XSTRTOUMAX], -[ - dnl Prerequisites of lib/xstrtoumax.c. - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - AC_REQUIRE([gl_PREREQ_XSTRTOL]) -]) |