gnulib.git
18 years agoautoupdate
Karl Berry [Tue, 31 Jan 2006 14:50:30 +0000 (14:50 +0000)]
autoupdate

18 years agoupdate from texinfo
Karl Berry [Fri, 27 Jan 2006 22:50:12 +0000 (22:50 +0000)]
update from texinfo

18 years ago* fnmatch.c (L_): Renamed from L, to work around a bug in
Paul Eggert [Fri, 27 Jan 2006 18:40:27 +0000 (18:40 +0000)]
* fnmatch.c (L_): Renamed from L, to work around a bug in
Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
<http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
All uses changed.

18 years agoMingw32 fixes for getaddrinfo.
Simon Josefsson [Fri, 27 Jan 2006 12:50:41 +0000 (12:50 +0000)]
Mingw32 fixes for getaddrinfo.

18 years ago* fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too. Don't
Paul Eggert [Thu, 26 Jan 2006 22:12:26 +0000 (22:12 +0000)]
* fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
attempt to open for write; this always fails, at least on POSIX
hosts.

18 years agooops, vasnprintf, not vasprintf
Karl Berry [Thu, 26 Jan 2006 14:11:40 +0000 (14:11 +0000)]
oops, vasnprintf, not vasprintf

18 years agoFixes from Paul Eggert.
Bruno Haible [Thu, 26 Jan 2006 13:32:38 +0000 (13:32 +0000)]
Fixes from Paul Eggert.

18 years agoTreat all non-gcc compilers the same.
Bruno Haible [Thu, 26 Jan 2006 13:31:49 +0000 (13:31 +0000)]
Treat all non-gcc compilers the same.

18 years ago'trap' portability trapped me...
Bruno Haible [Thu, 26 Jan 2006 12:51:48 +0000 (12:51 +0000)]
'trap' portability trapped me...

18 years agoRemove stray conflict marker.
Jim Meyering [Wed, 25 Jan 2006 17:31:46 +0000 (17:31 +0000)]
Remove stray conflict marker.

18 years ago*** empty log message ***
Jim Meyering [Wed, 25 Jan 2006 16:45:59 +0000 (16:45 +0000)]
*** empty log message ***

18 years agoSync from the stable (b5) branch of coreutils:
Jim Meyering [Wed, 25 Jan 2006 16:45:04 +0000 (16:45 +0000)]
Sync from the stable (b5) branch of coreutils:

(fts_children): Don't let close() clobber errno from
failed fchdir().

(fts_stat): When following a symlink-to-directory,
don't necessarily interpret stat-fails+lstat-succeeds as indicating
a dangling symlink.  That can also happen at least for ELOOP.
The fix: return FTS_SLNONE only when the stat errno is ENOENT.
FYI, this bug predates the inclusion of fts.c in coreutils.

(fts_open): Put new maxarglen declaration and uses
in their own block, so pre-c99 compilers don't object.

Avoid the double-free (first in fts_read, second in fts_close) that
would occur when an `active' directory is made inaccessible (e.g.,
via chmod a-x) during a traversal.

(fts_read): After a failed fchdir, update sp->fts_cur
before returning.  Reproduce this failure by
mkdir -p a/b; cd a; chmod a-x . b
Reported by Stavros Passas.

18 years agoUpdate
Sergey Poznyakoff [Wed, 25 Jan 2006 16:22:22 +0000 (16:22 +0000)]
Update

18 years agoBugfix (stray #)
Sergey Poznyakoff [Wed, 25 Jan 2006 16:17:36 +0000 (16:17 +0000)]
Bugfix (stray #)

18 years agovasnprintf.c sync lost
Karl Berry [Wed, 25 Jan 2006 14:51:38 +0000 (14:51 +0000)]
vasnprintf.c sync lost

18 years agoPortability problem with Solaris sh.
Bruno Haible [Wed, 25 Jan 2006 14:20:06 +0000 (14:20 +0000)]
Portability problem with Solaris sh.

18 years agoOops, wrong changelog entry.
Bruno Haible [Wed, 25 Jan 2006 13:56:34 +0000 (13:56 +0000)]
Oops, wrong changelog entry.

18 years agoAvoid excessive warnings with IRIX cc.
Bruno Haible [Wed, 25 Jan 2006 13:55:43 +0000 (13:55 +0000)]
Avoid excessive warnings with IRIX cc.

18 years ago.
Karl Berry [Wed, 25 Jan 2006 08:44:38 +0000 (08:44 +0000)]
.

18 years ago*** empty log message ***
Jim Meyering [Wed, 25 Jan 2006 08:03:18 +0000 (08:03 +0000)]
*** empty log message ***

18 years agoRemove more useless parentheses.
Jim Meyering [Wed, 25 Jan 2006 08:03:13 +0000 (08:03 +0000)]
Remove more useless parentheses.

18 years ago*** empty log message ***
Jim Meyering [Wed, 25 Jan 2006 07:34:41 +0000 (07:34 +0000)]
*** empty log message ***

18 years agoRemove more useless parentheses.
Jim Meyering [Wed, 25 Jan 2006 07:34:10 +0000 (07:34 +0000)]
Remove more useless parentheses.

18 years ago/tmp/cvsY9fTYA
Paul Eggert [Wed, 25 Jan 2006 00:16:39 +0000 (00:16 +0000)]
/tmp/cvsY9fTYA

18 years agoCheck against AIX and HP-UX C compiler bugs.
Bruno Haible [Tue, 24 Jan 2006 22:05:28 +0000 (22:05 +0000)]
Check against AIX and HP-UX C compiler bugs.

18 years agoFix a bug occurring with HP-UX aCC compiler.
Bruno Haible [Tue, 24 Jan 2006 22:00:13 +0000 (22:00 +0000)]
Fix a bug occurring with HP-UX aCC compiler.

18 years agoWork around HP-UX and AIX C compiler bugs with built-in _Bool.
Bruno Haible [Tue, 24 Jan 2006 21:44:37 +0000 (21:44 +0000)]
Work around HP-UX and AIX C compiler bugs with built-in _Bool.

18 years agoFix portability problem to Solaris 9 sh.
Bruno Haible [Tue, 24 Jan 2006 19:18:45 +0000 (19:18 +0000)]
Fix portability problem to Solaris 9 sh.

18 years ago(Files): Add lib/intprops.h.
Jim Meyering [Tue, 24 Jan 2006 19:17:13 +0000 (19:17 +0000)]
(Files): Add lib/intprops.h.
From Mark D. Baushke.

18 years ago*** empty log message ***
Jim Meyering [Tue, 24 Jan 2006 19:16:13 +0000 (19:16 +0000)]
*** empty log message ***

18 years ago(gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
Jim Meyering [Tue, 24 Jan 2006 19:15:21 +0000 (19:15 +0000)]
(gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
Reported by Mark D. Baushke.

18 years agoargp-namefrob.h sync lost
Karl Berry [Tue, 24 Jan 2006 14:06:47 +0000 (14:06 +0000)]
argp-namefrob.h sync lost

18 years ago*** empty log message ***
Jim Meyering [Tue, 24 Jan 2006 12:53:45 +0000 (12:53 +0000)]
*** empty log message ***

18 years agoRemove useless parentheses in uses of cpp `defined'.
Jim Meyering [Tue, 24 Jan 2006 12:53:13 +0000 (12:53 +0000)]
Remove useless parentheses in uses of cpp `defined'.

18 years ago* socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by Bruno.
Simon Josefsson [Tue, 24 Jan 2006 11:57:26 +0000 (11:57 +0000)]
* socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by Bruno.

18 years agoWork around porting bugs reported by Dieter in
Paul Eggert [Tue, 24 Jan 2006 07:40:58 +0000 (07:40 +0000)]
Work around porting bugs reported by Dieter in
<http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
* lib/getopt.c (_NOPROTO): Remove; no longer needed.
Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
Include "getopt.h" first, to check interface.
(getenv): Declare only if defined HAVE_DECL_GETENV &&
!HAVE_DECL_GETENV.
* lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
(__strndup): Revert to K&R-style function dfns, the glibc style.
* lib/strnlen.c: Don't claim it's taken from glibc; it's not.
(strnlen, __strnlen): Remove #defines and #undefs; not needed.
Include strnlen.h first, to get prototype properly.
(strnlen): Renamed from __strnlen.
Remove weak alias.
* m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.

18 years ago* srclist.txt: Adjust to reflect glibc reorganization.
Paul Eggert [Tue, 24 Jan 2006 07:25:40 +0000 (07:25 +0000)]
* srclist.txt: Adjust to reflect glibc reorganization.

18 years agoAdjust to reflect glibc reorganization.
Paul Eggert [Tue, 24 Jan 2006 07:13:46 +0000 (07:13 +0000)]
Adjust to reflect glibc reorganization.
This affects only comments.

18 years agoSimplify.
Bruno Haible [Mon, 23 Jan 2006 20:38:51 +0000 (20:38 +0000)]
Simplify.

18 years agoFix an incorrect estimation of the sprintf result size.
Bruno Haible [Mon, 23 Jan 2006 15:01:57 +0000 (15:01 +0000)]
Fix an incorrect estimation of the sprintf result size.

18 years ago* quotearg.c (quotearg_buffer_restyled): Add "default: break;"
Paul Eggert [Sun, 22 Jan 2006 08:46:02 +0000 (08:46 +0000)]
* quotearg.c (quotearg_buffer_restyled): Add "default: break;"
to pacify gcc -Wswitch-default.

18 years ago* gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
Paul Eggert [Sun, 22 Jan 2006 08:31:53 +0000 (08:31 +0000)]
* gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.

18 years agoUpdate
Sergey Poznyakoff [Sat, 21 Jan 2006 19:13:07 +0000 (19:13 +0000)]
Update

18 years agoTest suite for argp module
Sergey Poznyakoff [Sat, 21 Jan 2006 19:09:06 +0000 (19:09 +0000)]
Test suite for argp module

18 years ago(__argp_basename): Removed definition. Was a typo.
Sergey Poznyakoff [Sat, 21 Jan 2006 19:07:06 +0000 (19:07 +0000)]
(__argp_basename): Removed definition. Was a typo.
(__argp_base_name): Provide macro definition or extern declaration
depending on the configuration

18 years ago(usage_long_opt): Do not print DOC options.
Sergey Poznyakoff [Sat, 21 Jan 2006 19:06:40 +0000 (19:06 +0000)]
(usage_long_opt): Do not print DOC options.
(__argp_base_name): Removed

18 years ago.
Karl Berry [Sat, 21 Jan 2006 08:44:58 +0000 (08:44 +0000)]
.

18 years ago* lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
Paul Eggert [Sat, 21 Jan 2006 08:01:53 +0000 (08:01 +0000)]
* lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
rather than -Xlinker -z -Xlinker ignore, as it's more portable.

18 years agono sync for localcharset.c, argp-fmtstream.h
Karl Berry [Fri, 20 Jan 2006 21:18:53 +0000 (21:18 +0000)]
no sync for localcharset.c, argp-fmtstream.h

18 years agoFix inet_ntop on mingw32.
Simon Josefsson [Fri, 20 Jan 2006 12:59:10 +0000 (12:59 +0000)]
Fix inet_ntop on mingw32.

18 years ago* socklen.m4: Look in ws2tcpip.h too, for mingw32.
Simon Josefsson [Thu, 19 Jan 2006 14:13:52 +0000 (14:13 +0000)]
* socklen.m4: Look in ws2tcpip.h too, for mingw32.

18 years ago* socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
Simon Josefsson [Thu, 19 Jan 2006 13:45:37 +0000 (13:45 +0000)]
* socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.

18 years agoSimplify my *-tests modules.
Simon Josefsson [Thu, 19 Jan 2006 09:05:56 +0000 (09:05 +0000)]
Simplify my *-tests modules.

18 years ago.
Karl Berry [Thu, 19 Jan 2006 08:44:35 +0000 (08:44 +0000)]
.

18 years agofilesystem -> file system (the POSIX spelling)
Paul Eggert [Thu, 19 Jan 2006 04:40:47 +0000 (04:40 +0000)]
filesystem -> file system (the POSIX spelling)

18 years agoAdd to TESTS variable, for mingw32.
Simon Josefsson [Wed, 18 Jan 2006 13:02:28 +0000 (13:02 +0000)]
Add  to TESTS variable, for mingw32.

18 years ago.
Karl Berry [Wed, 18 Jan 2006 11:55:17 +0000 (11:55 +0000)]
.

18 years ago* modules/socklen (Depends-on): Depend on sys_socket.
Simon Josefsson [Wed, 18 Jan 2006 08:52:56 +0000 (08:52 +0000)]
* modules/socklen (Depends-on): Depend on sys_socket.

18 years agoNeed to include <sys/types.h> in order to get ssize_t on most systems.
Bruno Haible [Tue, 17 Jan 2006 19:07:56 +0000 (19:07 +0000)]
Need to include <sys/types.h> in order to get ssize_t on most systems.

18 years ago* modules/socklen (Include): Need sys/socket.h.
Simon Josefsson [Tue, 17 Jan 2006 17:22:37 +0000 (17:22 +0000)]
* modules/socklen (Include): Need sys/socket.h.

18 years ago* lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
Paul Eggert [Tue, 17 Jan 2006 07:23:20 +0000 (07:23 +0000)]
* lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
it's not portable and it doesn't work with cross-compiles.  Fix missing-$
typo in 'test "gl_cv_ignore_unused_libraries" ...' that prevented -zignore
from being used with Sun's C compiler.

18 years agoautoupdate
Karl Berry [Fri, 13 Jan 2006 14:09:32 +0000 (14:09 +0000)]
autoupdate

18 years ago.
Karl Berry [Fri, 13 Jan 2006 08:44:20 +0000 (08:44 +0000)]
.

18 years agoSimplify LC_ALL handling.
Bruno Haible [Thu, 12 Jan 2006 18:07:12 +0000 (18:07 +0000)]
Simplify LC_ALL handling.

18 years agoCompatibility with libtool.
Bruno Haible [Thu, 12 Jan 2006 18:04:16 +0000 (18:04 +0000)]
Compatibility with libtool.

18 years agoUse changequote.
Bruno Haible [Thu, 12 Jan 2006 15:43:29 +0000 (15:43 +0000)]
Use changequote.

18 years agoFix sed_replace_auxdir.
Bruno Haible [Thu, 12 Jan 2006 15:39:50 +0000 (15:39 +0000)]
Fix sed_replace_auxdir.

18 years agoNew module 'ldd'.
Bruno Haible [Thu, 12 Jan 2006 13:04:57 +0000 (13:04 +0000)]
New module 'ldd'.

18 years agoFix warning, reported by Bruno Haible <bruno@clisp.org> and patch by
Simon Josefsson [Thu, 12 Jan 2006 08:59:35 +0000 (08:59 +0000)]
Fix warning, reported by Bruno Haible <bruno@clisp.org> and patch by
Paul Eggert <eggert@CS.UCLA.EDU>.

18 years agoSync from coreutils.
Paul Eggert [Thu, 12 Jan 2006 05:40:19 +0000 (05:40 +0000)]
Sync from coreutils.
* md5.c: Fix commentary typos.
(OP): Fix spacing.
(alignof, UNALIGNED_P): No need for a GCC-specific version.
* md5.h (__attribute__): Remove; unused.
* sha1.c: Fix commentary to match md5 better.
* sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
so that we don't need to worry about alignment.  All uses changed.
This merges the 2005-10-28 md5 change into sha1.

18 years ago(SIZE_MAX): Add missing (.
Simon Josefsson [Wed, 11 Jan 2006 17:12:47 +0000 (17:12 +0000)]
(SIZE_MAX): Add missing (.

18 years agoMake the AUTOCONF etc. commands overridable by the user.
Bruno Haible [Wed, 11 Jan 2006 16:37:10 +0000 (16:37 +0000)]
Make the AUTOCONF etc. commands overridable by the user.

18 years agoAvoid error due to empty archive on MacOS X.
Bruno Haible [Wed, 11 Jan 2006 13:03:25 +0000 (13:03 +0000)]
Avoid error due to empty archive on MacOS X.

18 years agoEnsure automatic ordering between gl_LOCK and gl_ARGP.
Bruno Haible [Wed, 11 Jan 2006 13:01:13 +0000 (13:01 +0000)]
Ensure automatic ordering between gl_LOCK and gl_ARGP.

18 years agoInitialize also noinst_HEADERS to empty.
Bruno Haible [Wed, 11 Jan 2006 12:59:02 +0000 (12:59 +0000)]
Initialize also noinst_HEADERS to empty.

18 years agoDon't waste time in a recursive autoreconf.
Bruno Haible [Wed, 11 Jan 2006 12:56:40 +0000 (12:56 +0000)]
Don't waste time in a recursive autoreconf.

18 years agoReplace build-aux when it occurs in the autoconf snippet.
Bruno Haible [Wed, 11 Jan 2006 12:24:28 +0000 (12:24 +0000)]
Replace build-aux when it occurs in the autoconf snippet.

18 years ago.
Karl Berry [Wed, 11 Jan 2006 12:06:44 +0000 (12:06 +0000)]
.

18 years agoUndo previous change.
Paul Eggert [Wed, 11 Jan 2006 07:34:33 +0000 (07:34 +0000)]
Undo previous change.

18 years ago* modules/readutmp (Maintainer): Add Paul Eggert.
Paul Eggert [Tue, 10 Jan 2006 22:02:14 +0000 (22:02 +0000)]
* modules/readutmp (Maintainer): Add Paul Eggert.
* modules/strtok_r: Depend on module restrict.
* m4/readutmp.m4 (gl_READUTMP): Don't require gl_FUNC_FREE. Use a
module dependency instead.

18 years ago* argp.h (__const): Remove macro. Use const instead.
Paul Eggert [Tue, 10 Jan 2006 21:49:07 +0000 (21:49 +0000)]
* argp.h (__const): Remove macro. Use const instead.
* argp-fmtstream.h (__const): Likewise.
* glob_.h (__const): Remove macro.
* glob-libc.h: Use const instead of __const.

18 years agoUpdate copyright year.
Paul Eggert [Tue, 10 Jan 2006 21:34:38 +0000 (21:34 +0000)]
Update copyright year.

18 years agoSync from coreutils.
Paul Eggert [Tue, 10 Jan 2006 21:31:01 +0000 (21:31 +0000)]
Sync from coreutils.

Avoid the double-free (first in fts_read, second in fts_close) that
would occur when an `active' directory is made inaccessible (e.g.,
via chmod a-x) during a traversal.
* lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
before returning.  Reproduce this failure by
mkdir -p a/b; cd a; chmod a-x . b

* lib/sha1.c: Tweak grammar in a comment.
* m4/fpending.m4: Also include <stdio.h>, for Dragonfly.

* m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
the 2002-12-31 change.

18 years ago* regex_internal.h (BITSET_WORD_BITS):
Paul Eggert [Tue, 10 Jan 2006 20:14:43 +0000 (20:14 +0000)]
* regex_internal.h (BITSET_WORD_BITS):
Work around a bug in 64-bit PGC (before version 6.1-2), where the
preprocessor mishandles large unsigned values as if they were signed.

18 years agoDepend on 'free' module.
Bruno Haible [Tue, 10 Jan 2006 18:07:16 +0000 (18:07 +0000)]
Depend on 'free' module.

18 years agoautoupdate
Karl Berry [Tue, 10 Jan 2006 16:10:31 +0000 (16:10 +0000)]
autoupdate

18 years agoAdd sys_socket module.
Simon Josefsson [Tue, 10 Jan 2006 14:28:52 +0000 (14:28 +0000)]
Add sys_socket module.

18 years agoOptimize file reading where possible.
Bruno Haible [Tue, 10 Jan 2006 13:57:21 +0000 (13:57 +0000)]
Optimize file reading where possible.

18 years agoUpdate from GNU gettext.
Bruno Haible [Tue, 10 Jan 2006 13:52:11 +0000 (13:52 +0000)]
Update from GNU gettext.

18 years agoAvoid an automake error regarding the 'gettext' module.
Bruno Haible [Tue, 10 Jan 2006 13:37:12 +0000 (13:37 +0000)]
Avoid an automake error regarding the 'gettext' module.

18 years agoAvoid a failure from autoreconf.
Bruno Haible [Tue, 10 Jan 2006 13:35:24 +0000 (13:35 +0000)]
Avoid a failure from autoreconf.

18 years agoRemove entry for fts.c/openat.[ch] that crept in ahead of schedule.
Jim Meyering [Tue, 10 Jan 2006 10:35:23 +0000 (10:35 +0000)]
Remove entry for fts.c/openat.[ch] that crept in ahead of schedule.

18 years agoRegenerate.
Paul Eggert [Mon, 9 Jan 2006 23:50:02 +0000 (23:50 +0000)]
Regenerate.

18 years ago* MODULES.html.sh (build_lib): New section, with new lib-ignore module.
Paul Eggert [Mon, 9 Jan 2006 23:49:54 +0000 (23:49 +0000)]
* MODULES.html.sh (build_lib): New section, with new lib-ignore module.

18 years agoFix typo in previous change; 3 lines were omitted.
Paul Eggert [Mon, 9 Jan 2006 23:42:27 +0000 (23:42 +0000)]
Fix typo in previous change; 3 lines were omitted.

18 years agoSync from coreutils.
Paul Eggert [Mon, 9 Jan 2006 23:13:56 +0000 (23:13 +0000)]
Sync from coreutils.

* doc/getdate.texi (General date syntax): Invalid dates are rejected.
(Time of day items): Mention the possibility of leap seconds.
Problem reported by Dr. David Alan Gilbert.

* lib/chdir-long.c (cdb_free): Don't bother trying to open directory
for write access: POSIX says that must fail.
* lib/fts.c (diropen): Likewise.
* lib/save-cwd.c (save_cwd): Likewise.
* lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
well, for minor improvements on hosts that lack O_DIRECTORY.

* lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
Report an error at compile-time if only a 1-second nominal clock
resolution is found.

* lib/lchmod.h: New file.
* lib/mkdir-p.c: Include lchmod.h, lchown.h.
(make_dir_parents): Use lchown rather than chown, and
lchmod rather than chmod.

* lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are dummies
too.  Problem with "none" reported by Bob Proulx.  Problem with
"proc" reported by n0dalus.

* lib/mountlist.c: Include <limits.h>.
(dev_from_mount_options)
[defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
New function.  It no longer assumes "dev=" has the System V meaning
on Linux (since it doesn't).  It also parses "dev=" more carefully.
(read_file_system_list)
[defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
dev= in that case.

* lib/posixtm.h (PDS_PRE_2000): New macro.
* lib/posixtm.c (year): Arg is now syntax_bits rather than allow_century.
All usages changed.  Reject dates outside the range 1969-1999 if
PDS_PRE_2000 is used.

* modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
chdir-safer.m4, lchmod.m4.
* modules/openat: Add mkdirat.c, openat-priv.h.
* modules/lib-ignore: New file.

* lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.

Rewrite fts.c not to change the current working directory,
by using openat, fstatat, fdopendir, etc..

* lib/fts.c [! _LIBC]: Include "openat.h", "unistd--.h", and "fcntl--.h".
[_LIBC] (fchdir): Don't undef or define; no longer used.
(FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
Now, this `function' always succeeds, and consumes its file descriptor
parameter -- so callers must not close such FDs.  Update callers.
(diropen_fd, opendirat, cwd_advance_fd): New functions.
(diropen): Add parameter, SP.  Adjust all callers.
Implement using diropen_fd, rather than open.
(fts_open): Initialize new member, fts_cwd_fd.
Remove fts_rft-setting code.
(fts_close): Close fts_cwd_fd, if necessary.
(__opendir2): Define in terms of opendir or opendirat,
depending on whether the FST_NOCHDIR flag is set.
(fts_build): Since fts_safe_changedir consumes its FD, and since
this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
and close the dup'd file descriptor upon failure.
(fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
(fts_safe_changedir): Tweak semantics to reflect that this function
now calls cwd_advance_fd and hence consumes its FD argument.
* lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
(fts_rft): Remove now-unused member.

* lib/openat.c (fchownat): New function.
* lib/openat.h (fchmodat, fchownat): Declare.
(chmodat, lchmodat): Define convenience functions.
(chownat, lchownat): Likewise.

* lib/chdir-safer.h, chdir-safer.c: New files.

* lib/modechange.c (mode_compile): Reject an invalid mode string
that starts with an octal digit.  From Andreas Gruenbacher.

* lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
and dup to open_safer and dup_safer, respectively.
(openat_permissive): Fix typo in comment.

* lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
"gettext.h"; either no longer needed or are guaranteed by openat.h.
(_): Remove; no longer needed.
(openat): Renamed from rpl_openat; no need for rpl_openat
since openat.h renames openat for us.
Replace most of the body with a call to openat_permissive,
to avoid duplicate code.
Port to (probably hypothetical) environments were mode_t is
wider than int.
(openat_permissive): Require mode arg, so that we can check
types better.  Put it just after flags.  Change cwd failure
indicator from pointer-to-bool to pointer-to-errno-value.
All callers changed.
Invoke openat_save_fail and/or openat_restore_fail if
cwd_errno is null, so that openat can call us.
(openat_permissive, fdopendir, fstatat, unlinkat):
Simplify errno handling to avoid some duplicate code,
as it's OK to set errno on success.
* lib/openat.h: Revamp code so that function macros depend on
__OPENAT_PREFIX only, not also on AT_FDCWD.
(openat_ro): Remove.  Caller changed to use openat_permissive.
(openat_permissive): Now a macro, if not a function.
(openat_restore_fail, openat_save_fail): Now always functions,
since mkdirat needs them even if __OPENAT_PREFIX is defined.

* lib/openat-priv.h: New file, defining macros used by mkdirat.c
and openat.c.
* lib/mkdirat.c: Include openat-priv.h.
Remove definitions of macros defined therein.
* lib/openat.c: Likewise.

* lib/mkdirat.c (mkdirat): New file and function.
* lib/openat.h (mkdirat): Declare.

* lib/openat.c (fdopendir): Don't change errno when returning non-NULL.

* lib/openat.h (openat_permissive): Declare.
(openat_ro): Define.

* lib/openat.c (EXPECTED_ERRNO): New macro.
(openat_permissive): New function -- used in remove.c rewrite.
(all functions): Set errno just before returning, only if there
was an actual failure.
Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.

Emulate openat-family functions using Linux's procfs, if possible.
Idea and some code based on Ulrich Drepper's glibc changes.

* lib/openat.c: (BUILD_PROC_NAME): New macro.
Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
(rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
before falling back on save_cwd and restore_cwd.
(fdopendir, fstatat, unlinkat): Likewise.

* lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
skipping the save_cwd...restore_cwd overhead, if FILE is absolute.

* lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
as second argument to va_arg.  Otherwise, some versions of gcc
warn that `if this code is reached, the program will abort'.

Add POSIX ACL support
* lib/acl.h (copy_acl, set_acl): Add declarations.
* lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
systems other than Linux.
(chmod_or_fchmod): New function: use fchmod when possible,
and chmod otherwise.
(file_has_acl): Add a POSIX ACL implementation, with a
Linux-specific subcase.
(copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
S_ISVTX from one file to another.  Fall back to fchmod/chmod when
acls are unsupported.
(set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
are unsupported.

* m4/lib-ignore.m4: New file.
* m4/lchmod.m4: New file.

* m4/chdir-safer.m4: New file.
* m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
Require openat-priv.h.

* m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.

18 years agoDefine also EX_OK.
Bruno Haible [Mon, 9 Jan 2006 21:48:50 +0000 (21:48 +0000)]
Define also EX_OK.

18 years ago2005-08-12: Look for ncurses first.
Bruno Haible [Mon, 9 Jan 2006 21:42:56 +0000 (21:42 +0000)]
2005-08-12: Look for ncurses first.

18 years agoRecommend to use strnlen.h.
Bruno Haible [Mon, 9 Jan 2006 21:40:18 +0000 (21:40 +0000)]
Recommend to use strnlen.h.

18 years agoMake inet_ntop depend on restrict.
Simon Josefsson [Mon, 9 Jan 2006 14:22:01 +0000 (14:22 +0000)]
Make inet_ntop depend on restrict.