Paul Eggert [Mon, 17 Jul 2006 06:06:48 +0000 (06:06 +0000)]
Import from coreutils.
* MODULES.html.sh: Add mkancestors.
* modules/mkancesdirs: New module.
* modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
The chdir-safer and afs files are now orphans; I'll remove them
unless someone speaks up.
Add lib/dirchownmod.c, lib/dirchownmod.h.
(Depends-on): Remove alloca, chown, save-cwd, dirname.
Add lchown, mkancesdirs.
(Maintainer): Add self.
* lib/dirchownmod.c, lib/dirchownmod.h:
* lib/mkancesdirs.c, lib/mkancesdirs.h: New files.
* lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
save-cwd.h. Instead, include dirchownmod.h and mkancesdirs.h.
(make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
MODE_BITS. Remove options VERBOSE_FMT_STRING, CWD_ERRNO. All
callers changed. Revamp internals significantly, by not
attempting to create directories that are temporarily more
permissive than the final results. Do not attempt to use
save_cwd/restore_cwd; it isn't worth it for mkdir and install.
This removes some race conditions, fixes some bugs, and simplifies
things. Use new dirchownmod function to do owner and mode changes.
* lib/mkdir-p.h: Likewise.
* lib/modechange.c (octal_to_mode): New function.
(struct mode_change): New member mentioned.
(make_node_op_equals): New arg mentioned. All callers changed.
(mode_compile): Keep track of which mode bits the user has explicitly
mentioned.
(mode_adjust): New arg DIR, so that we implement the X op correctly.
New arg PMODE_BITS, to keep track of which mode bits the user
mentioned; it treats S_ISUID and S_ISGID speciall.
All callers changed.
* lib/modechange.h: Likewise.
* mkancesdirs.m4: New file.
* mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c, dirchownmod.h.
Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER; no longer needed.
Require gl_FUNC_LCHOWN, since dirchownmod.c needs it.
Eric Blake [Tue, 11 Jul 2006 12:58:27 +0000 (12:58 +0000)]
* modules/fdl: New module, to install doc/fdl.texi.
* MODULES.html.sh: Add new section for documentation modules.
* gnulib-tool: Avoid space-tab.
(--doc-base): New option, to manage files from doc.
Paul Eggert [Tue, 11 Jul 2006 06:02:51 +0000 (06:02 +0000)]
* backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
Ignore the obsolescent !HAVE_DIRENT_H case. Consolidate NAMLEN
macros into the GNU _D_EXACT_NAMLEN.
* savedir.c: Likewise.
(savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
* backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
* savedir.m4:
Ignore the obsolescent !HAVE_DIRENT_H case. Consolidate NAMLEN
macros into the GNU _D_EXACT_NAMLEN.
Paul Eggert [Tue, 11 Jul 2006 03:30:49 +0000 (03:30 +0000)]
* stdint.m4 (gl_STDINT_H): Like yesterday's change to
absolute-header.m4. Also, set ABSOLUTE_STDINT_H to a string
"no/such/file/stdint.h" when there is no such file, so that
the resulting C code can be parsed by dodgy compilers.
Problems reported by Bob Proulx.
Paul Eggert [Mon, 10 Jul 2006 04:37:09 +0000 (04:37 +0000)]
* absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
around the absolute name, to work around a problem with the HP-UX
11.23 native C compiler, reported by Bob Proulx.
Jim Meyering [Sun, 9 Jul 2006 10:18:17 +0000 (10:18 +0000)]
* lib/argp-pv.c: Remove a doubled word in a comment.
* lib/check-version.c (check_version): Likewise.
* lib/javacomp.c (compile_java_class): Likewise.
* m4/glob.m4: Likewise.
Paul Eggert [Sun, 9 Jul 2006 03:31:53 +0000 (03:31 +0000)]
* gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
for the benefit of people using Autoconf 2.60. If you want to
support older Autoconf versions you can copy m4/onceonly_2_57.m4
(or m4/onceonly.m4, if pre-2.57) manually.
Simon Josefsson [Fri, 7 Jul 2006 07:37:16 +0000 (07:37 +0000)]
2006-07-06 Jim Hyslop <jhyslop@dreampossible.ca> (tiny change)
* lib/getaddrinfo.c: Changes to compile under MSVC6: changed
'#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
brackets. Other minor changes to suppress some compiler
warnings.
Paul Eggert [Thu, 6 Jul 2006 23:29:27 +0000 (23:29 +0000)]
* lib/getloadavg.c: Use __VMS, not VMS.
* lib/getopt.c: Likewise.
* lib/getpagesize.h: Likewise.
* lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while and
probably does not work.
* lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
Don't worry about this obsolete case any more.
(HAVE_DIR): Remove. All uses removed; we now assume you can read
directories.
* lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
worry about this obsolete case any more.
* lib/fts.c: Likewise.
* lib/getcwd.c: Likewise.
* lib/glob.h: Likewise.
* lib/savedir.c: Likewise.
* m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
of invoking obsolescent AC_HEADER_DIRENT macro.
* m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
* m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
* m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
* m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
* m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
* m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
* m4/savedir.m4 (gl_SAVEDIR): Likewise.
* m4/readdir.m4: Remove; no longer needed.
Paul Eggert [Thu, 6 Jul 2006 22:16:59 +0000 (22:16 +0000)]
* _inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
with only one argument, for Autoconf 2.60.
* fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
expand to nothing, so add a shell command to avoid syntax error.
* getpass.m4 (gl_PREREQ_GETPASS): Likewise.
Paul Eggert [Wed, 5 Jul 2006 23:35:19 +0000 (23:35 +0000)]
* lib/memcasecmp.c: Include <limits.h>.
(memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
* lib/strtod.c (strtod): Don't assume isspace works on negative chars.
Don't assume isdigit succeeds only on '0' through '9'.
* lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
All uses of is_space replaced by isspace.
* lib/fnmatch.c (ISASCII): Remove; no longer needed. All uses removed.
(ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
(ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed. All uses
replaced by isprint etc.
* lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
* lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
* lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
* lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
* lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
* lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
Paul Eggert [Tue, 4 Jul 2006 07:38:59 +0000 (07:38 +0000)]
* absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
to the absolute name, not just one, to bypass Sun C 5.8's
"warning: #include of /usr/include/... may be non-portable".
Paul Eggert [Tue, 4 Jul 2006 06:37:09 +0000 (06:37 +0000)]
* m4/absolute-header.m4: Renamed from full-header-path.m4.
This is to keep the terminology clean; POSIX talks about
"absolute pathnames", not "full pathnames", but the GNU
Coding Standards say to use "path" for something else;
so use "absolute" to keep both sides happy.
(gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
Set gl_absolute_header, not gl_full_header_path.
Set gl_cv_absolute_<header>, not gl_full_path_<header>.
Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
All uses changed.