Paul Eggert [Thu, 7 Jul 2005 08:08:39 +0000 (08:08 +0000)]
* modules/regex (Files): Add lib/regex_internal.c,
lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
(Depends-on): Add extensions.
(Makefile.am): Remove lib_SOURCES; now done by m4 code.
* config/srclist.txt: Add regcomp.c, regex.c, regex.h, regex_internal.c,
regexec.c.
Add regex_internal.h too, but as a comment, since the libc version
is currently broken in gnulib mode.
* lib/regex.c, lib/regex.h: Sync from libc.
* lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h, lib/regexec.c:
New files, synced from libc, except that regex_internal.h
currently has a small porting fix.
* m4/regex.m4: Adjust to new libc regex implementation.
(gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
all the .c and .h parts of (the new) regex.
Quote the m4 stuff better.
Check for RE_ICASE bug of old gnulib.
Check for REG_STARTEND of recent libc.
Rename local variables from jm_* to gl_*.
Quote operand of "test -f".
Say "recent enough" version of libc, not "version 2".
(gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
prerequisite module. Remove AC_HEADER_STDC; no longer needed.
Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
Remove check for btowc, isascii.
Require AM_LANGINFO_CODESET.
Paul Eggert [Tue, 5 Jul 2005 07:14:00 +0000 (07:14 +0000)]
* gnulib-tool (func_import): Add support for 'public domain' license.
* modules/alloca, modules/atexit, modules/memmove:
Now public domain, not GPL.
* modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
* modules/realloc, modules/strerror, modules/strtod:
Now LGPL, not GPL.
Paul Eggert [Mon, 4 Jul 2005 04:40:46 +0000 (04:40 +0000)]
Remove the dependency of the strftime module on the tzset module.
* modules/strftime (Depends-on): Remove dependency on tzset.
* lib/strftime.c (my_strftime) [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
Copy the input structure, to work around some of the bug with
Solaris 2.5.1 and Solaris 2.6. If you still care about these old
Solaris releases, you should also use the tzset module, but we won't
require it as a dependency any more since we don't want LGPLed code
to depend on GPLed code.
* m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require gl_FUNC_TZSET_CLOBBER.
Jim Meyering [Tue, 28 Jun 2005 11:55:41 +0000 (11:55 +0000)]
(find_included_lib_files): Hard-code another
pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
but the fts-lgpl (correctly) does not list those files.
Simon Josefsson [Mon, 27 Jun 2005 22:05:57 +0000 (22:05 +0000)]
2005-06-28 Simon Josefsson <jas@extundo.com>
* base64.c (base64_encode): Indent. Rename 'b64' to avoid
collision with global variable. Better indentation. Don't
increment buffer pointer beyond buffer end. Based on comments
from Paul Eggert <eggert@cs.ucla.edu>.
Paul Eggert [Fri, 24 Jun 2005 17:30:33 +0000 (17:30 +0000)]
* canon-host.c (canon-host): Append trailing "," to 0 in
initializer of struct addrinfo, as an indication that we don't
care how many members the structure has.
Paul Eggert [Thu, 23 Jun 2005 07:14:09 +0000 (07:14 +0000)]
* mktime.c: Include <string.h> even if !DEBUG. (From glibc.)
(ranged_convert): Don't save conversion in a temporary struct.
This causes a warning with GCC 4.0.0, and anyway in the typical
case it's not worth the extra 100 bytes or so of code.
(ranged_convert, __mktime_internal): When calling a function via a
pointer P, use P () rather than (*P) (), as we now assume C89 or
better.
Paul Eggert [Fri, 10 Jun 2005 19:52:19 +0000 (19:52 +0000)]
* fnmatch.c (fnmatch): If there is an encoding error in a
multibyte string or pattern, fall back on unibyte matching.
Problem reported by James Youngman.
Paul Eggert [Thu, 2 Jun 2005 20:41:04 +0000 (20:41 +0000)]
Sync from coreutils.
Use "file name" when talking about file names, instead of "filename"
or "path", as per the GNU coding standards.
* MODULES.html.sh: mkdir-p renamed from makepath.
filenamecat renamed from path-concat.
* modules/filenamecat: Renamed from modules/path-concat.
(Files): filenamecat.h and filenamecat.c renamed from
path-concat.h and path-concat.c.
(configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
(Include): filenamecat.h, not path-concat.h.
* modules/mkdir-p: Renamed from modules/makepath.
(Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and makepath.c.
(configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
(Include): mkdir-p.h, not makepath.h.
* lib/mkdir-p.c: Renamed from makepath.c.
(make_dir_parents): Renamed from make_path. All callers changed.
* lib/mkdir-p.h: Likewise. All includers changed.
* lib/filenamecat.c: Renamed from path-concat.c.
(file_name_concat): Renamed from path_concat. All callers changed.
[TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
* lib/filenamecat.h: Likewise. All includers changed.
* lib/acl.c: Don't use "path" or "filename" to mean "file name"
in comments or local variable names.
* lib/basename.c: Likewise.
* lib/canonicalize.c, canonicalize.h: Likewise.
* lib/dirname.c, dirname.h: Likewise.
* lib/euidaccess.c: Likewise.
* lib/exclude.c: Likewise
* lib/fnmatch_.h, fnmatch_loop.c: Likewise.
* lib/fsusage.c, fsuage.h: Likewise.
* lib/fts.c, fts_.h: Likewise.
* lib/getcwd.c: Likewise.
* lib/getloadavg.c: Likewise.
* lib/mkstemp.c: Likewise.
* lib/mountlist.c, mountlist.h: Likewise.
* lib/openat.c, openat.h: Likewise.
* lib/readlink-stub.c: Likewise.
* lib/readutmp.c, readutmp.h: Likewise.
* lib/rename.c: Likewise.
* lib/rmdir.c: Likewise.
* lib/same.c: Likewise.
* lib/savedir.c: Likewise.
* lib/stripslash.c: Likewise.
* lib/tempname.c: Likewise.
* lib/xreadlink.c: Likewise.
* lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
All uses changed.
* lib/exclude.h: Likewise.
* m4/mkdir-p.m4: Renamed from makepath.m4.
(gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH. All uses changed.
Rename files from makepath.c to mkdir-p.c, and from
makepath.h to mkdir-p.h.
* m4/filenamecat.m4: Renamed from path-concat.m4.
(gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT. All uses changed.
Rename files from path-concat.c to filenamecat.c,
and from path-concat.h to filenamecat.h.
* m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
"file name" in local variables or comments.
* rename.m4: Likewise.
* lib/euidaccess.c (getuid, getgid, getuid, getegid)
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
* lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
* lib/pathmax.h: Include <limits.h> unconditionally, since other
files have been getting away with it for years (MORE/BSD 4.3
is extinct now).
* lib/userspec.c (getpwnam, getgrnam, getgrgid)
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
* lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
Define to 256, not 255, as per modern POSIX.
Derek R. Price [Sun, 29 May 2005 16:56:02 +0000 (16:56 +0000)]
* MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
* modules/glob: New file.
* modules/getlogin_r: Add link to POSIX spec in description.
* config/srclist.txt (glob_.h, glob.c): Add these files.
* lib/glob_.h, lib/glob.c: New files.
* gm4/lob.m4: New file.
Paul Eggert [Fri, 27 May 2005 23:59:20 +0000 (23:59 +0000)]
* modules/fts (Files): Remove m4/inttypes-pri.m4.
* modules/fts-lgpl (Depends-on): Remove gettext.
* lib/fts.c: Don't worry about debugging on pre-C99-comopatible hosts;
the configuration hassle isn't worth it.
Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
(LONGEST_MODIFIER, PRIuMAX): Remove.
* m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
and don't require gt_INTTYPES_PRI.
Paul Eggert [Fri, 20 May 2005 23:07:53 +0000 (23:07 +0000)]
New fts module.
* MODULES.html.sh (File system functions): Add fts, fts-lgpl.
* lib/fts.c: Don't include "cycle-check.h" or "hash.h".
(setup_dir, free_dir): New functions.
(enter_dir, leave_dir): Define trivial
alternatives of _LGPL_PACKAGE. Move to fts-cycle.c if !_LGPL_PACKAGE.
(HT_INITIAL_SIZE, ENTER_DIR): Remove. All uses removed.
(LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
(struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
Move to fts-cycle.c.
(fts_open): Use setup_dir.
(fts_close): Use free_dir.
(fts_read): Have just one copy of the ENTER_DIR code rather than three.
This adds a label and some gotos, but the alternatives were messier.
Check for memory allocation failure when entering a dir.
(fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
* lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
(FTS): New member fts_cycle, that is a union that contains the
old active_dir_ht and cycle_state. All uses changed to mention
fts_cycle.ht and fts_cycle.state.
* lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
fts.c, with the following changes:
(setup_dir, free_dir): New functions.
(enter_dir): Now returns bool. Return true if successful, false
if memory exhausted. All callers changed.
Do not bother partly cleaning up on
memory allocation failure; that is free_dir's job.
However, free ad if hash_insert fails, to avoid memory leak.
(enter_dir, leave_dir): Accommodate change to FTS by inspecting
fts->fts_options to see which union member to use.
* m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
(gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
* lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
Now a macro, to pacify GCC.