Jim Meyering [Sun, 25 Feb 2007 00:47:36 +0000 (00:47 +0000)]
Avoid conflicting types for 'unsetenv' on FreeBSD.
* lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
conflicting with FreeBSD's (5.0 and 6.1) function declaration
in stdlib.h.
Jim Meyering [Sat, 24 Feb 2007 11:54:07 +0000 (11:54 +0000)]
* m4/regex.m4: Update the description of the configure-time option,
--without-included-regex, to state accurately what the defaults are,
and perhaps to give people an idea why using this option is risky.
Paul Eggert [Sat, 24 Feb 2007 10:01:49 +0000 (10:01 +0000)]
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
loops on small arguments. This attempts to avoid the problem
Bruno Haible reported for AIX 4.3.2 in
<http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
Paul Eggert [Wed, 21 Feb 2007 20:49:59 +0000 (20:49 +0000)]
* lib/getcwd.c (__getcwd): Undo previous change; it mishandled
long unreadable paths in GNU/Linux. Problem reported by Andreas
Schwab in
<http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
I'll try to think of a better way to fix the Solaris problem.
Paul Eggert [Wed, 21 Feb 2007 08:36:35 +0000 (08:36 +0000)]
* lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
like glibc; on Solaris 10, it fails with errno == EINVAL.
POSIX says the behavior is unspecified if the first argument is NULL,
so play it safe and never pass NULL to the system getcwd.
Jim Meyering [Wed, 21 Feb 2007 07:57:33 +0000 (07:57 +0000)]
* lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
of gettimeofday. It would conflict with the one now always
provided via sys_time_.h. Reported by Matthew Woehlke, as
an IRIX 6.5 build failure.
Paul Eggert [Wed, 21 Feb 2007 07:54:16 +0000 (07:54 +0000)]
Minor fixups to port to Solaris 10 with Sun C 5.8.
* lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
* modules/getcwd (Depends-on): Add dirfd.
* lib/putenv.c (putenv): #undef it.
(rpl_putenv): New decl.
(malloc, free): Include <stdlib.h> rather than prototyping separately.
Jim Meyering [Mon, 19 Feb 2007 20:03:22 +0000 (20:03 +0000)]
Don't use FD after a successful "fdopendir (fd)".
* lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
Reset it by calling dirfd on the just-obtained DIR*.
Paul Eggert [Thu, 15 Feb 2007 00:29:06 +0000 (00:29 +0000)]
* lib/exclude.c (FNM_EXTMATCH): Define if system does not.
Verify that it doesn't overlap with our flags.
(fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
do not have the desired effect in multibyte locales; instead, use
mbscasecmp.
* modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
Add dependency on xalloc. Depend on fnmatch, not fnmatch-gnu, since
we don't require GNU fnmatch ourselves (if our users require it, they
should do so explicitly).
Paul Eggert [Thu, 15 Feb 2007 00:16:55 +0000 (00:16 +0000)]
Fix regex code so it doesn't rely on strcasecmp.
* lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
Otherwise, include gnulib's langinfo.h.
* lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
undesirable behavior in non-C locales. Instead, rely on locale_charset.
* m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
* modules/regex (FILES): Remove m4/codeset.m4.
(Depends-on): Add localcharset. Remove strcase.