Commit 82ff49b5 authored by Paul Eggert's avatar Paul Eggert

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.
parent cd0b441f
2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
Add and change modules to make it easier for coreutils to use
gnulib-tool.
* 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.
2006-08-19 Paul Eggert <eggert@cs.ucla.edu>
* modules/openat (Files): Add lib/fchmodat.c.
......
This diff is collapsed.
......@@ -1397,8 +1397,6 @@ func_all_modules ()
func_echo "$element"
func_begin_table
func_module assert
func_module dummy
func_module exit
func_module atexit
func_module strtod
......@@ -1430,6 +1428,7 @@ func_all_modules ()
func_echo "$element"
func_begin_table
func_module assert
func_module verify
func_end_table
......@@ -1673,7 +1672,6 @@ func_all_modules ()
func_echo "$element"
func_begin_table
func_module ullong_max
func_module size_max
func_end_table
......@@ -1827,6 +1825,20 @@ func_all_modules ()
func_module wcwidth
func_end_table
element="Compatibility checks for POSIX:2001 functions"
func_section_wrap posix_compat
func_wrap H2
func_echo "$element"
func_module d-ino
func_module d-type
func_module link-follow
func_module rmdir-errno
func_module unlink-busy
func_module winsz-ioctl
func_module winsz-termios
func_end_table
element="Enhancements for POSIX:2001 functions"
func_section_wrap posix_enh
func_wrap H2
......@@ -1881,6 +1893,7 @@ func_all_modules ()
func_module fts
func_module fts-lgpl
func_module isdir
func_module lchmod
func_module lchown
func_module mkancesdirs
func_module mkdir-p
......@@ -2085,6 +2098,7 @@ func_all_modules ()
func_echo "$element"
func_begin_table
func_module dummy
func_module ldd
func_module lib-ignore
func_end_table
......@@ -2098,6 +2112,17 @@ func_all_modules ()
func_module fdl
func_module gendocs
func_end_table
element="Misc"
func_section_wrap misc
func_wrap H2
func_echo "$element"
func_begin_table
func_module host-os
func_module perl
func_module uptime
func_end_table
}
......
2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
* cycle-check.h: Include <stdint.h> unconditionally, since we
now assume the stdint module. Do not include inttypes.h.
* fsusage.h: Likewise.
* getndelim2.c: Likewise.
* human.h: Likewise.
* inttostr.h: Likewise.
* obstack.c: Likewise.
* regex_internal.h: Likewise.
* tempname.c: Likewise.
* utimecmp.c: Likewise.
* xstrtol.h: Likewise.
* stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
* strtoimax.c: Adjust to macro name changes in Autoconf,
e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
* xtime.h: Likewise.
2006-08-19 Paul Eggert <eggert@cs.ucla.edu>
* fchmodat.c: New file, from coreutils. This was inadvertently
......
......@@ -22,12 +22,7 @@
#ifndef CYCLE_CHECK_H
# define CYCLE_CHECK_H 1
# if HAVE_INTTYPES_H
# include <inttypes.h>
# endif
# if HAVE_STDINT_H
# include <stdint.h>
# endif
# include <stdint.h>
# include <stdbool.h>
# include "dev-ino.h"
# include "same-inode.h"
......
......@@ -22,12 +22,7 @@
#if !defined FSUSAGE_H_
# define FSUSAGE_H_
# if HAVE_INTTYPES_H
# include <inttypes.h>
# endif
# if HAVE_STDINT_H
# include <stdint.h>
# endif
# include <stdint.h>
# include <stdbool.h>
struct fs_usage
......
/* getndelim2 - Read a line from a stream, stopping at one of 2 delimiters,
with bounded memory allocation.
Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003, 2004 Free Software
Foundation, Inc.
Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003, 2004, 2006 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -34,21 +34,7 @@
#endif
#include <limits.h>
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#if HAVE_STDINT_H
# include <stdint.h>
#endif
#ifndef PTRDIFF_MAX
# define PTRDIFF_MAX ((ptrdiff_t) (SIZE_MAX / 2))
#endif
#ifndef SIZE_MAX
# define SIZE_MAX ((size_t) -1)
#endif
#ifndef SSIZE_MAX
# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
#endif
#include <stdint.h>
/* The maximum value that getndelim2 can return without suffering from
overflow problems, either internally (because of pointer
......
/* human.h -- print human readable file size
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -24,10 +24,7 @@
# include <limits.h>
# include <stdbool.h>
# if HAVE_STDINT_H
# include <stdint.h>
# endif
# include <stdint.h>
# include <unistd.h>
/* A conservative bound on the maximum length of a human-readable string.
......
/* inttostr.h -- convert integers to printable strings
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -18,13 +19,7 @@
/* Written by Paul Eggert */
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#if HAVE_STDINT_H
# include <stdint.h>
#endif
#include <stdint.h>
#include <sys/types.h>
#include "intprops.h"
......
/* obstack.c - subroutines used implicitly by object stack macros
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation,
Inc.
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -55,13 +55,7 @@
#ifndef ELIDE_CODE
# if HAVE_INTTYPES_H
# include <inttypes.h>
# endif
# if HAVE_STDINT_H || defined _LIBC
# include <stdint.h>
# endif
# include <stdint.h>
/* Determine default alignment. */
union fooround
......
......@@ -43,9 +43,7 @@
#if defined HAVE_WCTYPE_H || defined _LIBC
# include <wctype.h>
#endif /* HAVE_WCTYPE_H || _LIBC */
#if defined HAVE_STDINT_H || defined _LIBC
# include <stdint.h>
#endif /* HAVE_STDINT_H || _LIBC */
#include <stdint.h>
#if defined _LIBC
# include <bits/libc-lock.h>
#else
......
......@@ -26,7 +26,7 @@
/* mingw does not support symlinks, therefore it does not have lstat. But
without links, stat does just fine. */
#if ! HAVE_FUNC_LSTAT
#if ! HAVE_LSTAT
# define lstat stat
#endif
......
/* Convert string representation of a number into an intmax_t value.
Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software
Copyright (C) 1999, 2001, 2002, 2003, 2004, 2006 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
......@@ -34,7 +34,7 @@
# ifndef HAVE_DECL_STRTOULL
"this configure-time declaration test was not run"
# endif
# if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG
# if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG_INT
unsigned long long strtoull (char const *, char **, int);
# endif
......@@ -43,14 +43,14 @@ unsigned long long strtoull (char const *, char **, int);
# ifndef HAVE_DECL_STRTOLL
"this configure-time declaration test was not run"
# endif
# if !HAVE_DECL_STRTOLL && HAVE_UNSIGNED_LONG_LONG
# if !HAVE_DECL_STRTOLL && HAVE_UNSIGNED_LONG_LONG_INT
long long strtoll (char const *, char **, int);
# endif
#endif
#ifdef UNSIGNED
# undef HAVE_LONG_LONG
# define HAVE_LONG_LONG HAVE_UNSIGNED_LONG_LONG
# undef HAVE_LONG_LONG_INT
# define HAVE_LONG_LONG_INT HAVE_UNSIGNED_LONG_LONG_INT
# define INT uintmax_t
# define strtoimax strtoumax
# define strtol strtoul
......@@ -62,7 +62,7 @@ long long strtoll (char const *, char **, int);
INT
strtoimax (char const *ptr, char **endptr, int base)
{
#if HAVE_LONG_LONG
#if HAVE_LONG_LONG_INT
verify (sizeof (INT) == sizeof (long int)
|| sizeof (INT) == sizeof (long long int));
......
......@@ -53,13 +53,7 @@
# include <sys/time.h>
#endif
#if HAVE_STDINT_H || _LIBC
# include <stdint.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#include <stdint.h>
#include <unistd.h>
#include <sys/stat.h>
......
/* utimecmp.c -- compare file time stamps
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -24,15 +24,9 @@
#include "utimecmp.h"
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#if HAVE_STDINT_H
# include <stdint.h>
#endif
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "hash.h"
#include "intprops.h"
......
/* A more useful interface to strtol.
Copyright (C) 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004 Free
Software Foundation, Inc.
Copyright (C) 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -22,12 +22,7 @@
# include "exitfail.h"
# if HAVE_INTTYPES_H
# include <inttypes.h>
# endif
# if HAVE_STDINT_H
# include <stdint.h>
# endif
# include <inttypes.h>
# ifndef _STRTOL_ERROR
enum strtol_error
......
......@@ -25,7 +25,7 @@
type that is a count of nanoseconds -- except for obsolescent hosts
without sufficiently-wide integers, where it is a count of
seconds. */
# if HAVE_LONG_LONG
# if HAVE_LONG_LONG_INT
typedef long long int xtime_t;
# define XTIME_PRECISION 1000000000
# else
......
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.
......
#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])
])
......@@ -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])
......
......@@ -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
])
# 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])
:
])
......
#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.
:
])
#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])
:
])
......
#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
......
......@@ -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])
])
# 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])
:
])
# 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],
......
#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
# 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],