Simon Josefsson [Wed, 27 Jan 2010 16:11:58 +0000 (17:11 +0100)]
build-aux/ncftpput-ftp: Fix copyright statement.
Simon Josefsson [Wed, 27 Jan 2010 15:56:30 +0000 (16:56 +0100)]
Fix last commit.
Simon Josefsson [Wed, 27 Jan 2010 15:13:04 +0000 (16:13 +0100)]
Fix copyright statement.
Eric Blake [Mon, 25 Jan 2010 22:42:55 +0000 (15:42 -0700)]
ignore-value: update recommended header name
* modules/ignore-value (Include): Only use <> for headers that
exist in glibc.
Signed-off-by: Eric Blake <ebb9@byu.net>
Jim Meyering [Tue, 26 Jan 2010 08:51:26 +0000 (09:51 +0100)]
test-userspec.c: avoid compiler warnings
* tests/test-userspec.c (main): Avoid shadowing ("uid"),
and "initialization discards qualifiers..." warnings.
Put the first "uid" in its own scope, and make char* members "const".
Bruno Haible [Mon, 25 Jan 2010 21:37:52 +0000 (22:37 +0100)]
gnulib-tool: Make warning diagnostics consistent.
Bruno Haible [Mon, 25 Jan 2010 21:12:37 +0000 (22:12 +0100)]
Fix test dependencies.
Karl Berry [Mon, 25 Jan 2010 15:27:04 +0000 (07:27 -0800)]
autoupdate
Pádraig Brady [Mon, 25 Jan 2010 10:55:34 +0000 (10:55 +0000)]
syntax-check: detect incorrect boolean macro values in config.h
* modules/maintainer-makefile (configure.ac): Parameterize the location
of config.h which will be available to makefiles as $(CONFIG_INCLUDE).
The logic is from Eric Blake and the location indicated by Jim Meyering.
Note the more natural CONFIG_HEADER name is prohibited by automake
for backwards compatibility reasons.
* top/maint.mk (sc_Wundef_boolean): New rule.
Jim Meyering [Mon, 25 Jan 2010 11:54:12 +0000 (12:54 +0100)]
bootstrap: detect MacOS 10.6's shasum, too
* build-aux/bootstrap: Also recognize MacOS 10.6's shasum.
Suggested by Thomas Treichl <Thomas.Treichl@gmx.net>.
Jim Meyering [Sat, 23 Jan 2010 10:52:44 +0000 (11:52 +0100)]
xstrtoll: new module
* modules/xstrtoll: New file.
* MODULES.html.sh (Numeric conversion functions): Add xstrtoll.
* lib/xstrtol.h [HAVE_LONG_LONG_INT]: Declare xstrtoll and xstrtoull.
* lib/xstrtoll.c, lib/xstrtoull.c: New files.
./configure fails if you use this module and lack "long long".
* modules/xstrtoll-tests: New module.
* tests/test-xstrtoll.c, tests/test-xstrtoull.c: New files.
* tests/test-xstrtoll.sh: Like test-xstrtol.c, but use the
new init.sh-based test framework.
Bruno Haible [Mon, 25 Jan 2010 01:23:02 +0000 (02:23 +0100)]
Tests for module 'yn'.
Bruno Haible [Mon, 25 Jan 2010 01:22:36 +0000 (02:22 +0100)]
Tests for module 'y1'.
Bruno Haible [Mon, 25 Jan 2010 01:22:15 +0000 (02:22 +0100)]
Tests for module 'y0'.
Bruno Haible [Mon, 25 Jan 2010 01:21:44 +0000 (02:21 +0100)]
Tests for module 'tanh'.
Bruno Haible [Mon, 25 Jan 2010 01:21:20 +0000 (02:21 +0100)]
Tests for module 'tan'.
Bruno Haible [Mon, 25 Jan 2010 01:20:52 +0000 (02:20 +0100)]
Tests for module 'sqrt'.
Bruno Haible [Mon, 25 Jan 2010 01:20:23 +0000 (02:20 +0100)]
Tests for module 'sinh'.
Bruno Haible [Mon, 25 Jan 2010 01:19:58 +0000 (02:19 +0100)]
Tests for module 'sin'.
Bruno Haible [Mon, 25 Jan 2010 01:19:20 +0000 (02:19 +0100)]
Tests for module 'rint'.
Bruno Haible [Mon, 25 Jan 2010 01:18:51 +0000 (02:18 +0100)]
Tests for module 'remainder'.
Bruno Haible [Mon, 25 Jan 2010 01:18:19 +0000 (02:18 +0100)]
Tests for module 'pow'.
Bruno Haible [Mon, 25 Jan 2010 01:13:03 +0000 (02:13 +0100)]
Tests for module 'nextafter'.
Bruno Haible [Mon, 25 Jan 2010 01:14:54 +0000 (02:14 +0100)]
Tests for module 'modf'.
Bruno Haible [Mon, 25 Jan 2010 01:11:59 +0000 (02:11 +0100)]
Tests for module 'logb'.
Bruno Haible [Mon, 25 Jan 2010 01:11:30 +0000 (02:11 +0100)]
Tests for module 'log1p'.
Bruno Haible [Mon, 25 Jan 2010 01:11:05 +0000 (02:11 +0100)]
Tests for module 'log10'.
Bruno Haible [Mon, 25 Jan 2010 01:10:37 +0000 (02:10 +0100)]
Tests for module 'log'.
Bruno Haible [Mon, 25 Jan 2010 01:10:07 +0000 (02:10 +0100)]
Tests for module 'lgamma'.
Bruno Haible [Mon, 25 Jan 2010 01:09:33 +0000 (02:09 +0100)]
Tests for module 'ldexp'.
Bruno Haible [Mon, 25 Jan 2010 01:09:02 +0000 (02:09 +0100)]
Tests for module 'jn'.
Bruno Haible [Mon, 25 Jan 2010 01:08:40 +0000 (02:08 +0100)]
Tests for module 'j1'.
Bruno Haible [Mon, 25 Jan 2010 01:06:54 +0000 (02:06 +0100)]
Tests for module 'j0'.
Bruno Haible [Mon, 25 Jan 2010 01:06:16 +0000 (02:06 +0100)]
Tests for module 'hypot'.
Bruno Haible [Mon, 25 Jan 2010 01:05:37 +0000 (02:05 +0100)]
Tests for module 'fmod'.
Bruno Haible [Mon, 25 Jan 2010 01:05:08 +0000 (02:05 +0100)]
Tests for module 'fabs'.
Bruno Haible [Mon, 25 Jan 2010 01:04:39 +0000 (02:04 +0100)]
Tests for module 'exp'.
Bruno Haible [Mon, 25 Jan 2010 01:04:08 +0000 (02:04 +0100)]
Tests for module 'erfc'.
Bruno Haible [Mon, 25 Jan 2010 01:03:44 +0000 (02:03 +0100)]
Tests for module 'erf'.
Bruno Haible [Mon, 25 Jan 2010 01:03:14 +0000 (02:03 +0100)]
Tests for module 'cosh'.
Bruno Haible [Mon, 25 Jan 2010 01:02:48 +0000 (02:02 +0100)]
Tests for module 'cos'.
Bruno Haible [Mon, 25 Jan 2010 01:02:13 +0000 (02:02 +0100)]
Tests for module 'copysign'.
Bruno Haible [Mon, 25 Jan 2010 01:01:40 +0000 (02:01 +0100)]
Tests for module 'cbrt'.
Bruno Haible [Mon, 25 Jan 2010 01:01:07 +0000 (02:01 +0100)]
Tests for module 'atan2'.
Bruno Haible [Mon, 25 Jan 2010 01:00:44 +0000 (02:00 +0100)]
Tests for module 'atan'.
Bruno Haible [Mon, 25 Jan 2010 01:00:14 +0000 (02:00 +0100)]
Tests for module 'asin'.
Bruno Haible [Mon, 25 Jan 2010 00:59:30 +0000 (01:59 +0100)]
Tests for module 'acos'.
Bruno Haible [Mon, 25 Jan 2010 00:57:08 +0000 (01:57 +0100)]
Fix tests for common <math.h> functions.
Bruno Haible [Sun, 24 Jan 2010 20:22:00 +0000 (21:22 +0100)]
Tests: Defeat inlining of math functions by GCC >= 4.3.0.
Bruno Haible [Sun, 24 Jan 2010 16:42:21 +0000 (17:42 +0100)]
Provide EXEEXT and srcdir in TESTS_ENVIRONMENT by default.
Bruno Haible [Sun, 24 Jan 2010 15:33:46 +0000 (16:33 +0100)]
More documentation.
Jim Meyering [Sun, 24 Jan 2010 13:24:00 +0000 (14:24 +0100)]
maint.mk: do not prepend "./" after filtering
* top/maint.mk (_prepend_srcdir_prefix): New variable
(VC_LIST_EXCEPT): Use it to avoid prepending (post-filter)
"./" when $(srcdir) is ".".
Jim Meyering [Sun, 24 Jan 2010 10:31:42 +0000 (11:31 +0100)]
define STREQ(a,b) consistently, removing useless parentheses
#define STREQ(a, b) (strcmp ((a), (b)) == 0) is over-parenthesized,
since the only risk is that "a" or "b" contains an unparenthesized
comma, but if either did that, STREQ would have 3 or more arguments.
Hence, #define STREQ(a, b) (strcmp (a, b) == 0) is better.
* lib/fts.c (STREQ): Remove unnecessary parentheses.
* lib/hash-triple.c (STREQ): Likewise.
* tests/test-argv-iter.c (STREQ): Use a and b, not s1 and s2.
* lib/getugroups.c (STREQ): Likewise.
Jim Meyering [Sat, 23 Jan 2010 21:08:55 +0000 (22:08 +0100)]
maint.mk: fix syntax-check in a non-srcdir build directory
* top/maint.mk (_dot_escaped_srcdir): Remove erroneous backslash,
introduced in my 2010-01-21 commit,
a6da6c45. Reported by Eric Blake.
Karl Berry [Sat, 23 Jan 2010 14:06:31 +0000 (06:06 -0800)]
autoupdate
Jim Meyering [Sat, 28 Nov 2009 10:51:08 +0000 (11:51 +0100)]
userspec-tests: test the userspec module
* tests/test-userspec.c: New file.
* modules/userspec-tests: Likewise.
Jim Meyering [Thu, 21 Jan 2010 15:47:34 +0000 (16:47 +0100)]
maint.mk: make VC_LIST_EXCEPT robustly handle a srcdir containing "."
* top/maint.mk (_dot_escaped_srcdir): Define.
(VC_LIST_EXCEPT): Use it in LHS of preprocessing sed substitution.
Jiri Denemark [Thu, 21 Jan 2010 13:23:17 +0000 (14:23 +0100)]
maint.mk: fix VC_LIST_EXCEPT for srcdir != builddir
* top/maint.mk (VC_LIST_EXCEPT): Preprocess the output of
$(VC_LIST) to remove a prefix of '$(srcdir)/', so that it works
from a non-srcdir build.
Eric Blake [Wed, 16 Dec 2009 23:20:28 +0000 (16:20 -0700)]
warn-on-use: use instead of link-warning
Each *.in.h file serves two purposes - provide enough self-contained
content to serve as a replacement for the system header regardless of
the user's compiler, and offer the developer the ability to detect any
gnulib modules that might have been inadvertantly excluded. The
former requires independence from config.h, and routes everything
through a Makefile.am snippet that uses @@ substitution specific to
the modules that were in use, with details learned at configure time.
The latter works by poisoning anything that gnulib did not replace,
but which the developer had natively available, explaining why their
tests passed during development. Poisoning relies on gcc features,
and requires manual triggering by adding -DGNULIB_POSIXCHECK to
CFLAGS; it assumes that <config.h> is properly included. In fact, we
do not want to use @@ substitution for HAVE_DECL_* during poisoning,
because the warning is only relevant for the gnulib modules which were
not included, and thus where the m4 macros to set proper @@ values
have not been run. Furthermore, we only need to poison interfaces
that already have a declaration; if something is not declared, then
the developer wouldn't have been able to link, so their code won't be
using the problematic interface in the first place.
* modules/stdio (Depends-on, Makefile.am): Drop link-warning.
* modules/unistd (Depends-on, Makefile.am): Likewise.
* modules/arpa_inet (Depends-on): Replace link-warning with
warn-on-use.
(Makefile.am): Update rules accordingly.
* modules/ctype (Depends-on, Makefile.am): Likewise.
* modules/dirent (Depends-on, Makefile.am): Likewise.
* modules/fcntl-h (Depends-on, Makefile.am): Likewise.
* modules/inttypes (Depends-on, Makefile.am): Likewise.
* modules/langinfo (Depends-on, Makefile.am): Likewise.
* modules/locale (Depends-on, Makefile.am): Likewise.
* modules/math (Depends-on, Makefile.am): Likewise.
* modules/search (Depends-on, Makefile.am): Likewise.
* modules/signal (Depends-on, Makefile.am): Likewise.
* modules/spawn (Depends-on, Makefile.am): Likewise.
* modules/stdlib (Depends-on, Makefile.am): Likewise.
* modules/string (Depends-on, Makefile.am): Likewise.
* modules/strings (Depends-on, Makefile.am): Likewise.
* modules/sys_file (Depends-on, Makefile.am): Likewise.
* modules/sys_ioctl (Depends-on, Makefile.am): Likewise.
* modules/sys_select (Depends-on, Makefile.am): Likewise.
* modules/sys_socket (Depends-on, Makefile.am): Likewise.
* modules/sys_stat (Depends-on, Makefile.am): Likewise.
* modules/sys_times (Depends-on, Makefile.am): Likewise.
* modules/sys_utsname (Depends-on, Makefile.am): Likewise.
* modules/wchar (Depends-on, Makefile.am): Likewise.
* m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Check which functions
should be poisoned.
* m4/ctype.m4 (gl_CTYPE_H): Likewise.
* m4/dirent_h.m4 (gl_DIRENT_H): Likewise.
* m4/fcntl_h.m4 (gl_FCNTL_H): Likewise.
* m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
* m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise.
* m4/locale_h.m4 (gl_LOCALE_H): Likewise.
* m4/math_h.m4 (gl_MATH_H): Likewise.
* m4/search_h.m4 (gl_SEARCH_H): Likewise.
* m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
* m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
* m4/stdio_h.m4 (gl_STDIO_H): Likewise.
* m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
* m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
* m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Likewise.
* m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H_DEFAULTS): Likewise.
* m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
* m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
* m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
* m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
* m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
* m4/wchar.m4 (gl_WCHAR_H): Likewise.
* lib/arpa_inet.in.h: Use _GL_WARN_ON_USE instead of
GL_LINK_WARNING.
* lib/ctype.in.h: Likewise.
* lib/dirent.in.h: Likewise.
* lib/fcntl.in.h: Likewise.
* lib/inttypes.in.h: Likewise.
* lib/langinfo.in.h: Likewise.
* lib/locale.in.h: Likewise.
* lib/math.in.h: Likewise.
* lib/search.in.h: Likewise.
* lib/signal.in.h: Likewise.
* lib/spawn.in.h: Likewise.
* lib/stdio.in.h: Likewise.
* lib/stdlib.in.h: Likewise.
* lib/string.in.h: Likewise.
* lib/strings.in.h: Likewise.
* lib/sys_file.in.h: Likewise.
* lib/sys_ioctl.in.h: Likewise.
* lib/sys_select.in.h: Likewise.
* lib/sys_socket.in.h: Likewise.
* lib/sys_stat.in.h: Likewise.
* lib/sys_times.in.h: Likewise.
* lib/sys_utsname.in.h: Likewise.
* lib/unistd.in.h: Likewise.
* lib/wchar.in.h: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible [Wed, 20 Jan 2010 10:55:20 +0000 (11:55 +0100)]
Avoid duplicate -lm.
Bruno Haible [Tue, 19 Jan 2010 23:57:54 +0000 (00:57 +0100)]
langinfo, nl_langinfo: Relicense under LGPLv2+.
Bruno Haible [Tue, 19 Jan 2010 10:17:18 +0000 (11:17 +0100)]
Avoid compilation error with cc on OSF/1 5.1.
Bruno Haible [Tue, 19 Jan 2010 02:15:05 +0000 (03:15 +0100)]
Avoid a link error due to the __printf__ symbol.
Bruno Haible [Tue, 19 Jan 2010 02:06:23 +0000 (03:06 +0100)]
Tests for module 'tanl'.
Bruno Haible [Tue, 19 Jan 2010 02:05:50 +0000 (03:05 +0100)]
Tests for module 'sqrtl'.
Bruno Haible [Tue, 19 Jan 2010 02:05:13 +0000 (03:05 +0100)]
Tests for module 'sinl'.
Bruno Haible [Tue, 19 Jan 2010 02:04:45 +0000 (03:04 +0100)]
Tests for module 'logl'.
Bruno Haible [Tue, 19 Jan 2010 02:03:59 +0000 (03:03 +0100)]
Tests for module 'expl'.
Bruno Haible [Tue, 19 Jan 2010 02:03:31 +0000 (03:03 +0100)]
Tests for module 'cosl'.
Bruno Haible [Tue, 19 Jan 2010 02:02:56 +0000 (03:02 +0100)]
Tests for module 'atanl'.
Bruno Haible [Tue, 19 Jan 2010 02:02:25 +0000 (03:02 +0100)]
Tests for module 'asinl'.
Bruno Haible [Tue, 19 Jan 2010 02:01:51 +0000 (03:01 +0100)]
Tests for module 'acosl'.
Bruno Haible [Mon, 18 Jan 2010 00:27:33 +0000 (01:27 +0100)]
New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
Bruno Haible [Tue, 19 Jan 2010 00:50:01 +0000 (01:50 +0100)]
sqrt: Make gl_FUNC_SQRT requirable.
Bruno Haible [Tue, 19 Jan 2010 00:40:52 +0000 (01:40 +0100)]
New modules for common <math.h> functions.
Jim Meyering [Mon, 18 Jan 2010 10:49:16 +0000 (11:49 +0100)]
ignore-value: relax license to LGPLv2+
* modules/ignore-value (License): Relax to LGPLv2+.
Jim Meyering [Mon, 18 Jan 2010 07:23:24 +0000 (08:23 +0100)]
getdate: don't leak when TZ contains two or more '"'s
* lib/getdate.y (get_date): Don't leak a copy of TZ for each
double quote in TZ after the first one.
Jim Meyering [Mon, 18 Jan 2010 07:10:07 +0000 (08:10 +0100)]
readtokens: do not leak internal token_lengths buffer
* lib/readtokens.c (readtokens): Free the local, lengths,
when the supplied "token_lengths" parameter is NULL.
Ralf Wildenhues [Sun, 17 Jan 2010 07:29:09 +0000 (08:29 +0100)]
Fix a couple of missing LIBTHREAD link failures on AIX.
* modules/git-merge-changelog (git_merge_changelog_LDADD): Add
$(LIBTHREAD).
* modules/strsignal-tests (test_strsignal_LDADD): Likewise.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Ralf Wildenhues [Sun, 17 Jan 2010 11:34:01 +0000 (12:34 +0100)]
Link test-poll against INET_PTON_LIB.
* modules/poll-tests (test_poll_LDADD): Add $(INET_PTON_LIB),
for inet_pton on Solaris 10.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Bruno Haible [Sun, 17 Jan 2010 11:45:36 +0000 (12:45 +0100)]
unistdio/*-sprintf: Fix typo in module description.
Ralf Wildenhues [Sun, 17 Jan 2010 00:07:00 +0000 (01:07 +0100)]
gnulib-tool: fix filelist for AIX, HP-UX ksh.
* gnulib-tool (func_filter_filelist): Do not quote possibly-empty
variables in shell case patterns, for AIX and HP-UX ksh.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Ralf Wildenhues [Sat, 16 Jan 2010 19:30:58 +0000 (20:30 +0100)]
Split large sed scripts, for HP-UX sed.
* modules/stdio: Split sed scripts around 50 sed commands,
to avoid HP-UX limit of 99 commands, in the near future.
* modules/string: Likewise.
* modules/unistd: Likewise.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Ralf Wildenhues [Sat, 16 Jan 2010 17:15:09 +0000 (18:15 +0100)]
gnulib-tool: avoid writing in the current directory.
* gnulib-tool (func_emit_lib_Makefile_am)
(func_emit_tests_Makefile_am): Put temporary files in $tmp,
not in the current directory, so concurrent gnulib-tool
instances do not interfere.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Jim Meyering [Sat, 16 Jan 2010 08:35:04 +0000 (09:35 +0100)]
doc: update users.txt
* users.txt: Add grep.
(diffutils, gzip): Update URLs.
Bruno Haible [Tue, 12 Jan 2010 22:26:57 +0000 (23:26 +0100)]
posix_spawn: Avoid test failure on Cygwin.
Bruno Haible [Tue, 12 Jan 2010 22:12:00 +0000 (23:12 +0100)]
cond: When skipping the test, show the reason.
Simon Josefsson [Tue, 12 Jan 2010 21:01:53 +0000 (22:01 +0100)]
lib/striconv.c (str_cd_iconv): Avoid if before free.
Simon Josefsson [Tue, 12 Jan 2010 19:17:19 +0000 (20:17 +0100)]
top/maint.mk (VC_LIST_EXCEPT): Filter list through VC_LIST_ALWAYS_EXCLUDE_REGEX.
Simon Josefsson [Tue, 12 Jan 2010 18:44:11 +0000 (19:44 +0100)]
build: guarantee AS_VAR_IF
The recent addition of warn-on-use.m4 was broken with older autoconf.
Simon Josefsson [Tue, 12 Jan 2010 18:15:10 +0000 (19:15 +0100)]
lib/stdio.in.h: Fix typo.
Simon Josefsson [Tue, 12 Jan 2010 18:08:04 +0000 (19:08 +0100)]
m4/gc.m4: Check if linking to libgcrypt also needs linking to libgpg-error.
Simon Josefsson [Tue, 12 Jan 2010 14:31:07 +0000 (15:31 +0100)]
tests/test-xalloc-die.sh: Use $EXEEXT.
Bruno Haible [Tue, 12 Jan 2010 08:51:24 +0000 (09:51 +0100)]
getlogin, getlogin_r: Avoid test failure.
Eric Blake [Mon, 11 Jan 2010 17:35:52 +0000 (10:35 -0700)]
tests: avoid more large file warnings
* tests/test-fflush.c: Avoid warning about ftell use.
* tests/test-fseek.c: Avoid warning about fseek use.
Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible [Mon, 11 Jan 2010 01:16:04 +0000 (02:16 +0100)]
nproc: Work better on Linux when /proc and /sys are not mounted.
Bruno Haible [Mon, 11 Jan 2010 01:14:00 +0000 (02:14 +0100)]
nproc: Refactor.
Jim Meyering [Mon, 11 Jan 2010 15:50:02 +0000 (16:50 +0100)]
utimecmp: avoid new warning from upcoming gcc-4.5.0
* lib/utimecmp.c (BILLION): Define using #define rather than an
anonymous enum, to placate upcoming gcc-4.5.0's -Wenum-compare.
Eric Blake [Thu, 31 Dec 2009 20:48:15 +0000 (13:48 -0700)]
math: add portability warnings for classification macros
For interfaces which are defined to exist only as macros, implement
the proper magic needed to warn if the corresponding gnulib module was
not in use. This solution avoids promoting arguments unnecessarily,
to allow reuse in case gnulib ever implements fpclassify, since
fpclassify(1e-40f) is different than fpclassify(1e-40).
* modules/math (Depends-on): Add warn-on-use.
(Makefile.am): Provide new substitutions.
* m4/math_h.m4 (gl_MATH_H): Require inline.
* lib/math.in.h (_GL_WARN_REAL_FLOATING_DECL)
(_GL_WARN_REAL_FLOATING_IMPL): New helper macros.
(isfinite, isinf, isnan, signbit) [GNULIB_POSIXCHECK]: Use them to
implement warnings.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Thu, 31 Dec 2009 20:28:59 +0000 (13:28 -0700)]
unistd: warn on use of environ without module
_GL_WARN_ON_USE only works for functions; so we wrap access to
environ through a function when CFLAGS has -DGNULIB_POSIXCHECK=1.
* modules/unistd (Depends-on): Add warn-on-use.
(Makefile.am): Provide new substitutions.
* m4/unistd_h.m4 (gl_UNISTD_H): Check for inline and environ.
* lib/unistd.in.h (environ): Wrap with a warning helper function.
Signed-off-by: Eric Blake <ebb9@byu.net>