* MODULES.html.sh (File system functions): New module
[pspp] / ChangeLog
1 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2
3         * MODULES.html.sh (File system functions): New module
4         canonicalize-lgpl.
5         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
6         and canonicalize_file_name.
7         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
8         * modules/canonicalize-lgpl: New files.
9
10 2006-11-05  Bruno Haible  <bruno@clisp.org>
11
12         * gnulib-tool (func_import, func_create_testdir): Create directories
13         also for files in subdirectories of lib/.
14
15 2006-11-05  Bruno Haible  <bruno@clisp.org>
16
17         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
18         ANSI C compliant.
19
20 2006-11-03  Bruno Haible  <bruno@clisp.org>
21
22         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
23         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
24         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
25         (xnboundedmalloc): New inline function.
26         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
27         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
28         xmalloc.
29         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
30         xmalloc.
31         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
32         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
33         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
34         xmalloc.
35         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
36         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
37         xmalloc.
38         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
39         gl_tree_add_after): Use XMALLOC instead of xmalloc.
40         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
41         xmalloc.
42         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
43         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
44         gl_tree_add_after): Use XMALLOC instead of xmalloc.
45         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
46         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
47         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
48         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
49
50 2006-11-03  Bruno Haible  <bruno@clisp.org>
51
52         * lib/c-ctype.h [C++]: Define functions without name mangling.
53         * lib/fwriteerror.h [C++]: Likewise.
54         * lib/gcd.h [C++]: Likewise.
55         * lib/linebreak.h [C++]: Likewise.
56
57 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
58
59         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
60         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
61         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
62         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
63         Check for functions and headers just once.
64         Check for declaration of canonicalize_file_name.
65         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
66
67 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
68
69         * gnulib-tool (func_import): Fix typo in actioncmd.
70
71 2006-11-02  Bruno Haible  <bruno@clisp.org>
72
73         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
74         newline sequence in the Makefile.am snippet as a space, like "make"
75         does.
76         Reported by Roger Persson <perrog@gmail.com>.
77
78 2006-11-01  Bruno Haible  <bruno@clisp.org>
79
80         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
81         already declared in <string.h>.
82         * lib/strcase.h (strncasecmp): Don't declare it if yes.
83
84 2006-11-01  Bruno Haible  <bruno@clisp.org>
85
86         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
87         * lib/strcase.h: Include <string.h>.
88         (strcasecmp): Define to rpl_strcasecmp here.
89
90 2006-11-01  Bruno Haible  <bruno@clisp.org>
91
92         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
93
94 2006-11-01  Eric Blake  <ebb9@byu.net>
95
96         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
97
98         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
99
100 2006-10-29  Bruno Haible  <bruno@clisp.org>
101
102         Make it compile in C++ mode.
103         * lib/full-write.c (full_rw): Add a cast.
104
105 2006-11-01  Bruno Haible  <bruno@clisp.org>
106
107         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
108         be POSIX compliant.
109         Reported by Roger Persson <perrog@gmail.com>.
110
111 2006-11-01  Eric Blake  <ebb9@byu.net>
112
113         * lib/getopt_.h: Fix comments.
114
115 2006-10-31  Eric Blake  <ebb9@byu.net>
116
117         * modules/tmpdir (Depends-on): Add sys_stat.
118         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
119         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
120         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
121         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
122         tempname.
123
124 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
125
126         Avoid some C++ diagnostics reported by Bruno Haible.
127         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
128         xmalloc.
129         (quotearg_alloc): Use xcharalloc rather than xmalloc.
130         (struct slotvec): Move to top level.
131         (quotearg_n_options): Rewrite to avoid xmalloc.
132         * lib/xalloc.h (xcharalloc): New function.
133         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
134         [defined __cplusplus]: Add function template that provides result
135         type propagation.  This part of the change is from Bruno Haible.
136
137 2006-10-29  Bruno Haible  <bruno@clisp.org>
138
139         Make it compile in C++ mode.
140         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
141         * lib/strnlen1.c (strnlen1): Cast memchr result.
142         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
143         * lib/clean-temp.c (string_equals, string_hash): Add casts.
144         (create_temp_dir): Rename local variable 'template'.
145         (compile_csharp_using_sscli): Add cast.
146         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
147         * lib/findprog.c (find_in_path): Likewise.
148         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
149         * lib/wait-process.c (register_slave_subprocess): Likewise.
150
151 2006-10-22  Bruno Haible  <bruno@clisp.org>
152
153         * modules/tsearch: New file.
154         * lib/tsearch.h: New file.
155         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
156         * m4/tsearch.m4: New file.
157         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
158
159 2006-10-29  Eric Blake  <ebb9@byu.net>
160
161         * lib/arcfour.c: Assume config.h.
162         * lib/arctwo.c: Likewise.
163         * lib/base64.c: Likewise.
164         * lib/check-version.c: Likewise.
165         * lib/crc.c: Likewise.
166         * lib/des.c: Likewise.
167         * lib/gc-gnulib.c: Likewise.
168         * lib/gc-libgcrypt.c: Likewise.
169         * lib/gc-pbkdf2-sha1.c: Likewise.
170         * lib/getaddrinfo.c: Likewise.
171         * lib/getdelim.c: Likewise.
172         * lib/getline.c: Likewise.
173         * lib/hmac-md5.c: Likewise.
174         * lib/hmac-sha1.c: Likewise.
175         * lib/iconvme.c: Likewise.
176         * lib/md2.c: Likewise.
177         * lib/md4.c: Likewise.
178         * lib/memxor.c: Likewise.
179         * lib/read-file.c: Likewise.
180         * lib/readline.c: Likewise.
181         * lib/rijndael-alg-fst.c: Likewise.
182         * lib/rijndael-api-fst.c: Likewise.
183         * lib/xgetdomainname.c: Likewise.
184
185 2006-10-28  Eric Blake  <ebb9@byu.net>
186
187         * lib/xstrndup.c: Assume config.h.
188
189 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
190
191         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
192         stat-macros.h is now for our own macros, whereas stat_h is for
193         macros in the <sys/stat.h> name space.
194         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
195         (STAT_MACROS_H): Remove.
196         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
197         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
198         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
199         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
200         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
201         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
202         Move these macros to ...
203         * lib/stat_.h: here.  Don't include stat-macros.h.
204         * lib/canonicalize.c: Don't include stat-macros.h.
205         * lib/chown.c: Likewise.
206         * lib/euidaccess.c: Likewise.
207         * lib/file-type.c: Likewise.
208         * lib/filemode.c: Likewise.
209         * lib/glob.c: Likewise.
210         * lib/isapipe.c: Likewise.
211         * lib/lchown.c: Likewise.
212         * lib/lstat.c: Likewise.
213         * lib/mkdir-p.c: Likewise.
214         * lib/rmdir.c: Likewise.
215         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
216         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
217         unless mkdir isn't declared, to speed up 'configure'.
218         Always create sys/stat.h, since it's unlikely any real sys/stat.h
219         would define all the S_* symbols.
220         * modules/canonicalize (Depends-on):
221         Depend on sys_stat, not stat-macros.
222         * modules/chown: Likewise.
223         * modules/euidaccess: Likewise.
224         * modules/filemode: Likewise.
225         * modules/file-type: Likewise.
226         * modules/glob: Likewise.
227         * modules/isapipe: Likewise.
228         * modules/lchown: Likewise.
229         * modules/lstat: Likewise.
230         * modules/mkancesdirs: Likewise.
231         * modules/rmdir: Likewise.
232         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
233         * modules/modechange: Likewise.
234         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
235         (configure.ac): Remove gl_STAT_MACROS.
236         * modules/sys_stat (Depends-on): Remove stat-macros.
237
238 2006-10-27  Bruno Haible  <bruno@clisp.org>
239
240         * m4/signed.m4: Remove file.
241         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
242         invocation.
243         * modules/vasnprintf (Files): Remove m4/signed.m4.
244
245 2006-10-27  Bruno Haible  <bruno@clisp.org>
246
247         Update to GNU gettext 0.16.
248         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
249         m4/inttypes-h.m4, m4/signed.m4.
250         * m4/gettext.m4: Update to GNU gettext 0.16.
251         * m4/intl.m4: New file, from GNU gettext.
252         * m4/intldir.m4: New file, from GNU gettext.
253         * config/srclist.txt: Update
254
255 2006-10-27  Eric Blake  <ebb9@byu.net>
256
257         * MODULES.html.sh: Document tempname.
258         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
259         dependencies.
260         (Files): Move lib/tempname.c...
261         * modules/tempname: ...to this new module.
262         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
263         (gl_PREREQ_TEMPNAME): Move...
264         * m4/tempname.m4: ...to this new file.
265         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
266         * modules/sys_stat (Depends-on): Add stat-macros.
267         * lib/stat_.h (includes): Pick up stat macros.
268         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
269         if stat macros are broken.
270         * lib/tempname.c (includes): No need to include "stat-macros.h".
271         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
272         (direxists, __path_search) [!_LIBC]: Don't compile these in
273         gnulib; the tmpdir module covers that.
274         * lib/tempname.h: New file.
275
276 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
277
278         * COPYING: Explain how gnulib-tool converts licence headers.
279         Almost all wording by Eric Blake.
280
281 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
282
283         * lib/mbchar.h (is_basic_table): Make read-only.
284         * lib/mbchar.c (is_basic_table): Likewise.
285         Reported by John Darrington.
286
287 2006-10-25  Bruno Haible  <bruno@clisp.org>
288
289         * lib/progname.h (set_program_name): Undefine before defining.
290
291 2006-10-25  Bruno Haible  <bruno@clisp.org>
292
293         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
294         false for non-gcc C++ compilers.
295         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
296
297 2006-10-24  Bruno Haible  <bruno@clisp.org>
298
299         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
300         iconv implementations like Irix iconv.
301
302 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
303
304         * modules/vararrays: New file.
305         * m4/vararrays.m4: New file, taken from diffutils.
306         * MODULES.html.sh: New module vararrays.
307
308 2006-10-24  Karl Berry  <karl@gnu.org>
309
310         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
311         Don't call GNU Unix.
312
313 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
314
315         * users.txt: Add Libtool.
316
317         Sync from Libtool:
318
319         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
320
321         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
322         to gnulib's policy of including config.h unconditionally.
323
324 2006-10-24  Bruno Haible  <bruno@clisp.org>
325
326         * modules/wcwidth (Files): Add m4/wint_t.m4.
327         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
328         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
329
330 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
331
332         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
333         to pacify GCC with some -W flags enabled.  Problem reported by
334         Bruno Haible.
335
336 2006-10-24  Jim Meyering  <jim@meyering.net>
337
338         * MODULES.html.sh: Remove uinttostr.  It's not a module.
339         Reported by Karl Berry.
340
341 2006-10-23  Bruno Haible  <bruno@clisp.org>
342
343         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
344
345 2006-10-24  Bruno Haible  <bruno@clisp.org>
346
347         * lib/gl_list.h: Use C comment style, not C++ comment style.
348
349 2006-10-23  Eric Blake  <ebb9@byu.net>
350
351         * lib/getaddrinfo.c (includes): Add missing include.
352
353 2006-10-23  Bruno Haible  <bruno@clisp.org>
354             Paul Eggert  <eggert@cs.ucla.edu>
355
356         Ability to rename obstack_free.
357         * lib/obstack.h (__obstack_free): New macro. Declare instead of
358         obstack_free.
359         (obstack_free): Invoke the __obstack_free macro.
360         * lib/obstack.c (obstack_free): Use __obstack_free macro.
361
362 2006-10-23  Bruno Haible  <bruno@clisp.org>
363             Paul Eggert  <eggert@cs.ucla.edu>
364
365         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
366         __argc, __argv from the declaration. (They are defined as macros on
367         mingw.)
368
369 2006-10-22  Bruno Haible  <bruno@clisp.org>
370
371         * doc/gnulib-intro.texi: New file.
372         * doc/gnulib.texi: Include it.
373
374 2006-10-21  Bruno Haible  <bruno@clisp.org>
375
376         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
377         "Introduction", "Miscellanous Notes", "Particular Modules".
378
379 2006-10-21  Bruno Haible  <bruno@clisp.org>
380
381         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
382         Change mostlyclean-local rule to avoid sh syntax error from bash
383         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
384
385 2006-10-23  Jim Meyering  <jim@meyering.net>
386
387         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
388         in place of snprintf.
389
390         * modules/inttostr (Files): Add lib/uinttostr.c.
391         * lib/uinttostr.c (inttostr): New file/function.
392         * lib/inttostr.h (uinttostr): Declare.
393         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
394         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
395         Add uinttostr.
396         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
397
398 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
399
400         * lib/canonicalize.c (ELOOP): Define if not already defined.
401         Problem reported by Bruno Haible in
402         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
403
404 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
405
406         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
407         Problem reported by Perry Smith and Ville Laurikari.
408
409         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
410         uses.
411
412 2006-10-19  Bruno Haible  <bruno@clisp.org>
413
414         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
415         for mingw.
416
417 2006-10-19  Bruno Haible  <bruno@clisp.org>
418
419         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
420         Needed for mingw.
421
422 2006-10-19  Bruno Haible  <bruno@clisp.org>
423
424         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
425
426 2006-10-19  Bruno Haible  <bruno@clisp.org>
427
428         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
429         it.
430
431 2006-10-19  Bruno Haible  <bruno@clisp.org>
432
433         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
434         invocation.
435
436 2006-10-19  Bruno Haible  <bruno@clisp.org>
437
438         * gnulib-tool (func_create_testdir): Don't include ftruncate and
439         mountlist by default.
440
441 2006-10-16  Bruno Haible  <bruno@clisp.org>
442
443         * lib/c-strstr.c: Include c-strstr.h.
444
445 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
446
447         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
448         in a slash.
449
450 2006-10-18  Bruno Haible  <bruno@clisp.org>
451
452         * lib/lock.h [C++]: Wrap definitions in extern "C".
453
454 2006-10-18  Bruno Haible  <bruno@clisp.org>
455
456         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
457         gl_LIBOBJS list.
458
459 2006-10-18  Bruno Haible  <bruno@clisp.org>
460
461         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
462
463 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
464
465         * lib/xstrtol.h: Include gettext.h.
466         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
467         Problem reported by Eric Blake.
468         * modules/xstrtol (Depends-on): Add gettext-h.
469
470 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
471
472         * lib/strftime.c (advance): New macro.
473         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
474         incomplete type, so you can't add 0 to it.  Problem and patch
475         reported by Eelco Dolstra for dietlibc.
476
477 2006-10-18  Jim Meyering  <jim@meyering.net>
478
479         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
480         type for a local, and rename it: s/up/user_proc/.
481
482 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
483
484         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
485         READ_UTMP_USER_PROCESS.
486         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
487
488 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
489
490         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
491         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
492
493 2006-10-17  Eric Blake  <ebb9@byu.net>
494
495         * lib/sigprocmask.c (sigprocmask): Fix typo.
496
497         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
498
499         * modules/clean-temp (Makefile.am): Don't add to make output...
500         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
501         config.h.
502
503 2006-10-17  Bruno Haible  <bruno@clisp.org>
504
505         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
506         differently if DEFAULT_TEXT_DOMAIN is set.
507
508 2006-10-16  Bruno Haible  <bruno@clisp.org>
509
510         * lib/clean-temp.c: Include fwriteerror.h.
511
512 2006-10-16  Bruno Haible  <bruno@clisp.org>
513
514         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
515
516 2006-10-16  Bruno Haible  <bruno@clisp.org>
517
518         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
519         * lib/sigprocmask.h: Include <sys/types.h>.
520         (sigset_t): Use the system's definition if present.
521
522 2006-10-17  Eric Blake  <ebb9@byu.net>
523
524         * lib/xvasprintf.c (includes): Assume config.h.
525         * lib/xasprintf.c (includes): Likewise.
526
527 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
528
529         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
530         at least as wide as intmax_t.
531
532 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
533
534         (Imported from Automake.)
535         * build-aux/gnupload: Update to version 1.1 of directive file.
536
537 2006-10-16  Eric Blake  <ebb9@byu.net>
538
539         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
540         match Automake 1.10a.
541
542 2006-10-14  Bruno Haible  <bruno@clisp.org>
543
544         * modules/sigprocmask: New file.
545         * lib/sigprocmask.h: New file.
546         * lib/sigprocmask.c: New file.
547         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
548         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
549         request sigprocmask.o.
550         (gl_PREREQ_SIGPROCMASK): New macro.
551         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
552         (Depends-on): Add sigprocmask.
553         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
554         gt_SIGNALBLOCKING. Test for 'raise' only once.
555         * lib/fatal-signal.c: Include sigprocmask.h.
556         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
557         unblock_fatal_signals): Define always.
558         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
559         sigprocmask.
560
561 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
562
563         Sync from Automake.
564         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
565         which incorrectly sets the mode of an existing destination
566         directory.  In some cases the unpatched install-sh could do the
567         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
568         system.  We hope this is rare in practice, but it's clearly worth
569         fixing.  Problem reported by Alex Unleashed in
570         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
571         Also, don't bother to check for -m bugs unless we're using -m;
572         suggested by Stepan Kasal.
573
574 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
575
576         Sync from Automake.
577         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
578         `-c' flag, so they appear at the same position as in %FASTDEP%
579         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
580         which ignores unknown options only after the first non-option.
581         Bug report against M4 by Nelson H. F. Beebe.
582
583 2006-10-13  Jim Meyering  <jim@meyering.net>
584
585         Fix a bug in yesterday's change.
586         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
587         p->fts_statp->st_dev would be used uninitialized.
588         Ensures that we always call fts_stat on the very first entry.
589         Miklos Szeredi reported that find -xdev stopped working.
590
591 2006-10-12  Bruno Haible  <bruno@clisp.org>
592
593         * gnulib-tool (func_get_automake_snippet): Append an automatically
594         computed EXTRA_DIST augmentation.
595         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
596         * modules/alloca-opt (Makefile.am): Likewise.
597         * modules/allocsa (Makefile.am): Likewise.
598         * modules/arcfour (Makefile.am): Likewise.
599         * modules/arctwo (Makefile.am): Likewise.
600         * modules/argmatch (Makefile.am): Likewise.
601         * modules/argz (Makefile.am): Likewise.
602         * modules/atexit (Makefile.am): Likewise.
603         * modules/backupfile (Makefile.am): Likewise.
604         * modules/byteswap (Makefile.am): Likewise.
605         * modules/c-strtod (Makefile.am): Likewise.
606         * modules/c-strtold (Makefile.am): Likewise.
607         * modules/calloc (Makefile.am): Likewise.
608         * modules/canon-host (Makefile.am): Likewise.
609         * modules/canonicalize (Makefile.am): Likewise.
610         * modules/chdir-long (Makefile.am): Likewise.
611         * modules/chdir-safer (Makefile.am): Likewise.
612         * modules/check-version (Makefile.am): Likewise.
613         * modules/chown (Makefile.am): Likewise.
614         * modules/cloexec (Makefile.am): Likewise.
615         * modules/close-stream (Makefile.am): Likewise.
616         * modules/closeout (Makefile.am): Likewise.
617         * modules/crc (Makefile.am): Likewise.
618         * modules/csharpexec (Makefile.am): Likewise.
619         * modules/cycle-check (Makefile.am): Likewise.
620         * modules/des (Makefile.am): Likewise.
621         * modules/dev-ino (Makefile.am): Likewise.
622         * modules/dirfd (Makefile.am): Likewise.
623         * modules/dirname (Makefile.am): Likewise.
624         * modules/dup2 (Makefile.am): Likewise.
625         * modules/eealloc (Makefile.am): Likewise.
626         * modules/error (Makefile.am): Likewise.
627         * modules/euidaccess (Makefile.am): Likewise.
628         * modules/exclude (Makefile.am): Likewise.
629         * modules/exitfail (Makefile.am): Likewise.
630         * modules/fcntl-safer (Makefile.am): Likewise.
631         * modules/fcntl (Makefile.am): Likewise.
632         * modules/file-type (Makefile.am): Likewise.
633         * modules/fileblocks (Makefile.am): Likewise.
634         * modules/filemode (Makefile.am): Likewise.
635         * modules/filenamecat (Makefile.am): Likewise.
636         * modules/fnmatch (Makefile.am): Likewise.
637         * modules/fopen-safer (Makefile.am): Likewise.
638         * modules/fpending (Makefile.am): Likewise.
639         * modules/fprintftime (Makefile.am): Likewise.
640         * modules/free (Makefile.am): Likewise.
641         * modules/fsusage (Makefile.am): Likewise.
642         * modules/ftruncate (Makefile.am): Likewise.
643         * modules/fts (Makefile.am): Likewise.
644         * modules/gc-arcfour (Makefile.am): Likewise.
645         * modules/gc-des (Makefile.am): Likewise.
646         * modules/gc-hmac-md5 (Makefile.am): Likewise.
647         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
648         * modules/gc-md4 (Makefile.am): Likewise.
649         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
650         * modules/gc-sha1 (Makefile.am): Likewise.
651         * modules/gc (Makefile.am): Likewise.
652         * modules/getaddrinfo (Makefile.am): Likewise.
653         * modules/getcwd (Makefile.am): Likewise.
654         * modules/getdelim (Makefile.am): Likewise.
655         * modules/getdomainname (Makefile.am): Likewise.
656         * modules/getgroups (Makefile.am): Likewise.
657         * modules/gethostname (Makefile.am): Likewise.
658         * modules/gethrxtime (Makefile.am): Likewise.
659         * modules/getline (Makefile.am): Likewise.
660         * modules/getloadavg (Makefile.am): Likewise.
661         * modules/getlogin_r (Makefile.am): Likewise.
662         * modules/getndelim2 (Makefile.am): Likewise.
663         * modules/getopt (Makefile.am): Likewise.
664         * modules/getpagesize (Makefile.am): Likewise.
665         * modules/getpass-gnu (Makefile.am): Likewise.
666         * modules/getpass (Makefile.am): Likewise.
667         * modules/getsubopt (Makefile.am): Likewise.
668         * modules/gettime (Makefile.am): Likewise.
669         * modules/gettimeofday (Makefile.am): Likewise.
670         * modules/getugroups (Makefile.am): Likewise.
671         * modules/getusershell (Makefile.am): Likewise.
672         * modules/glob (Makefile.am): Likewise.
673         * modules/group-member (Makefile.am): Likewise.
674         * modules/hard-locale (Makefile.am): Likewise.
675         * modules/hash (Makefile.am): Likewise.
676         * modules/hmac-md5 (Makefile.am): Likewise.
677         * modules/hmac-sha1 (Makefile.am): Likewise.
678         * modules/human (Makefile.am): Likewise.
679         * modules/idcache (Makefile.am): Likewise.
680         * modules/imaxabs (Makefile.am): Likewise.
681         * modules/imaxdiv (Makefile.am): Likewise.
682         * modules/inet_ntop (Makefile.am): Likewise.
683         * modules/inet_pton (Makefile.am): Likewise.
684         * modules/intprops (Makefile.am): Likewise.
685         * modules/inttostr (Makefile.am): Likewise.
686         * modules/inttypes (Makefile.am): Likewise.
687         * modules/isapipe (Makefile.am): Likewise.
688         * modules/javaversion (Makefile.am): Likewise.
689         * modules/lchmod (Makefile.am): Likewise.
690         * modules/lchown (Makefile.am): Likewise.
691         * modules/localcharset (Makefile.am): Likewise.
692         * modules/long-options (Makefile.am): Likewise.
693         * modules/lstat (Makefile.am): Likewise.
694         * modules/malloc (Makefile.am): Likewise.
695         * modules/mathl (Makefile.am): Likewise.
696         * modules/mbchar (Makefile.am): Likewise.
697         * modules/md2 (Makefile.am): Likewise.
698         * modules/md4 (Makefile.am): Likewise.
699         * modules/md5 (Makefile.am): Likewise.
700         * modules/memcasecmp (Makefile.am): Likewise.
701         * modules/memchr (Makefile.am): Likewise.
702         * modules/memcmp (Makefile.am): Likewise.
703         * modules/memcoll (Makefile.am): Likewise.
704         * modules/memcpy (Makefile.am): Likewise.
705         * modules/memmem (Makefile.am): Likewise.
706         * modules/memmove (Makefile.am): Likewise.
707         * modules/mempcpy (Makefile.am): Likewise.
708         * modules/memrchr (Makefile.am): Likewise.
709         * modules/memset (Makefile.am): Likewise.
710         * modules/memxor (Makefile.am): Likewise.
711         * modules/mkancesdirs (Makefile.am): Likewise.
712         * modules/mkdir-p (Makefile.am): Likewise.
713         * modules/mkdir (Makefile.am): Likewise.
714         * modules/mkdtemp (Makefile.am): Likewise.
715         * modules/mkstemp (Makefile.am): Likewise.
716         * modules/mktime (Makefile.am): Likewise.
717         * modules/modechange (Makefile.am): Likewise.
718         * modules/mountlist (Makefile.am): Likewise.
719         * modules/nanosleep (Makefile.am): Likewise.
720         * modules/obstack (Makefile.am): Likewise.
721         * modules/openat (Makefile.am): Likewise.
722         * modules/pagealign_alloc (Makefile.am): Likewise.
723         * modules/pathmax (Makefile.am): Likewise.
724         * modules/physmem (Makefile.am): Likewise.
725         * modules/poll (Makefile.am): Likewise.
726         * modules/posixtm (Makefile.am): Likewise.
727         * modules/posixver (Makefile.am): Likewise.
728         * modules/putenv (Makefile.am): Likewise.
729         * modules/quote (Makefile.am): Likewise.
730         * modules/quotearg (Makefile.am): Likewise.
731         * modules/raise (Makefile.am): Likewise.
732         * modules/read-file (Makefile.am): Likewise.
733         * modules/readline (Makefile.am): Likewise.
734         * modules/readlink (Makefile.am): Likewise.
735         * modules/readtokens (Makefile.am): Likewise.
736         * modules/readutmp (Makefile.am): Likewise.
737         * modules/realloc (Makefile.am): Likewise.
738         * modules/regex (Makefile.am): Likewise.
739         * modules/rename-dest-slash (Makefile.am): Likewise.
740         * modules/rename (Makefile.am): Likewise.
741         * modules/rijndael (Makefile.am): Likewise.
742         * modules/rmdir (Makefile.am): Likewise.
743         * modules/rpmatch (Makefile.am): Likewise.
744         * modules/safe-read (Makefile.am): Likewise.
745         * modules/safe-write (Makefile.am): Likewise.
746         * modules/same-inode (Makefile.am): Likewise.
747         * modules/same (Makefile.am): Likewise.
748         * modules/save-cwd (Makefile.am): Likewise.
749         * modules/savedir (Makefile.am): Likewise.
750         * modules/setenv (Makefile.am): Likewise.
751         * modules/settime (Makefile.am): Likewise.
752         * modules/sha1 (Makefile.am): Likewise.
753         * modules/sig2str (Makefile.am): Likewise.
754         * modules/snprintf (Makefile.am): Likewise.
755         * modules/stat-macros (Makefile.am): Likewise.
756         * modules/stat-time (Makefile.am): Likewise.
757         * modules/stdbool (Makefile.am): Likewise.
758         * modules/stdint (Makefile.am): Likewise.
759         * modules/stdlib-safer (Makefile.am): Likewise.
760         * modules/stpcpy (Makefile.am): Likewise.
761         * modules/stpncpy (Makefile.am): Likewise.
762         * modules/strcase (Makefile.am): Likewise.
763         * modules/strcasestr (Makefile.am): Likewise.
764         * modules/strchrnul (Makefile.am): Likewise.
765         * modules/strcspn (Makefile.am): Likewise.
766         * modules/strdup (Makefile.am): Likewise.
767         * modules/strerror (Makefile.am): Likewise.
768         * modules/strftime (Makefile.am): Likewise.
769         * modules/strndup (Makefile.am): Likewise.
770         * modules/strnlen (Makefile.am): Likewise.
771         * modules/strpbrk (Makefile.am): Likewise.
772         * modules/strsep (Makefile.am): Likewise.
773         * modules/strstr (Makefile.am): Likewise.
774         * modules/strtod (Makefile.am): Likewise.
775         * modules/strtoimax (Makefile.am): Likewise.
776         * modules/strtok_r (Makefile.am): Likewise.
777         * modules/strtol (Makefile.am): Likewise.
778         * modules/strtoll (Makefile.am): Likewise.
779         * modules/strtoul (Makefile.am): Likewise.
780         * modules/strtoull (Makefile.am): Likewise.
781         * modules/strtoumax (Makefile.am): Likewise.
782         * modules/strverscmp (Makefile.am): Likewise.
783         * modules/sys_socket (Makefile.am): Likewise.
784         * modules/sys_stat (Makefile.am): Likewise.
785         * modules/sysexits (Makefile.am): Likewise.
786         * modules/time_r (Makefile.am): Likewise.
787         * modules/timegm (Makefile.am): Likewise.
788         * modules/timespec (Makefile.am): Likewise.
789         * modules/tmpfile-safer (Makefile.am): Likewise.
790         * modules/trim (Makefile.am): Likewise.
791         * modules/unistd-safer (Makefile.am): Likewise.
792         * modules/unlinkdir (Makefile.am): Likewise.
793         * modules/unlocked-io (Makefile.am): Likewise.
794         * modules/userspec (Makefile.am): Likewise.
795         * modules/utime (Makefile.am): Likewise.
796         * modules/utimecmp (Makefile.am): Likewise.
797         * modules/utimens (Makefile.am): Likewise.
798         * modules/vasnprintf (Makefile.am): Likewise.
799         * modules/vasprintf (Makefile.am): Likewise.
800         * modules/vsnprintf (Makefile.am): Likewise.
801         * modules/xalloc (Makefile.am): Likewise.
802         * modules/xgetcwd (Makefile.am): Likewise.
803         * modules/xnanosleep (Makefile.am): Likewise.
804         * modules/xreadlink (Makefile.am): Likewise.
805         * modules/xstrtod (Makefile.am): Likewise.
806         * modules/xstrtol (Makefile.am): Likewise.
807         * modules/xstrtold (Makefile.am): Likewise.
808         * modules/yesno (Makefile.am): Likewise.
809         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
810
811 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
812
813         * modules/error (Makefile.am): Distribute files through
814         EXTRA_DIST, not lib_SOURCES.
815
816 2006-10-12  Eric Blake  <ebb9@byu.net>
817
818         * modules/error (Makefile.am): Distribute files in /lib.
819         * modules/obstack (Makefile.am): Likewise.
820
821 2006-10-12  Bruno Haible  <bruno@clisp.org>
822
823         * modules/acl (Makefile.am): Distribute all files in lib/ through
824         EXTRA_DIST.
825         * modules/arcfour (Makefile.am): Likewise.
826         * modules/arctwo (Makefile.am): Likewise.
827         * modules/argmatch (Makefile.am): Likewise.
828         * modules/argz (Makefile.am): Likewise.
829         * modules/atexit (Makefile.am): Likewise.
830         * modules/backupfile (Makefile.am): Likewise.
831         * modules/c-strtod (Makefile.am): Likewise.
832         * modules/c-strtold (Makefile.am): Likewise.
833         * modules/calloc (Makefile.am): Likewise.
834         * modules/canon-host (Makefile.am): Likewise.
835         * modules/canonicalize (Makefile.am): Likewise.
836         * modules/chdir-long (Makefile.am): Likewise.
837         * modules/chdir-safer (Makefile.am): Likewise.
838         * modules/check-version (Makefile.am): Likewise.
839         * modules/chown (Makefile.am): Likewise.
840         * modules/cloexec (Makefile.am): Likewise.
841         * modules/close-stream (Makefile.am): Likewise.
842         * modules/closeout (Makefile.am): Likewise.
843         * modules/crc (Makefile.am): Likewise.
844         * modules/cycle-check (Makefile.am): Likewise.
845         * modules/des (Makefile.am): Likewise.
846         * modules/dirfd (Makefile.am): Likewise.
847         * modules/dirname (Makefile.am): Likewise.
848         * modules/dup2 (Makefile.am): Likewise.
849         * modules/euidaccess (Makefile.am): Likewise.
850         * modules/exclude (Makefile.am): Likewise.
851         * modules/exitfail (Makefile.am): Likewise.
852         * modules/fcntl-safer (Makefile.am): Likewise.
853         * modules/file-type (Makefile.am): Likewise.
854         * modules/fileblocks (Makefile.am): Likewise.
855         * modules/filemode (Makefile.am): Likewise.
856         * modules/filenamecat (Makefile.am): Likewise.
857         * modules/fnmatch (Makefile.am): Likewise.
858         * modules/fopen-safer (Makefile.am): Likewise.
859         * modules/fpending (Makefile.am): Likewise.
860         * modules/fprintftime (Makefile.am): Likewise.
861         * modules/free (Makefile.am): Likewise.
862         * modules/fsusage (Makefile.am): Likewise.
863         * modules/ftruncate (Makefile.am): Likewise.
864         * modules/fts (Makefile.am): Likewise.
865         * modules/gc (Makefile.am): Likewise.
866         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
867         * modules/getaddrinfo (Makefile.am): Likewise.
868         * modules/getcwd (Makefile.am): Likewise.
869         * modules/getdelim (Makefile.am): Likewise.
870         * modules/getdomainname (Makefile.am): Likewise.
871         * modules/getgroups (Makefile.am): Likewise.
872         * modules/gethostname (Makefile.am): Likewise.
873         * modules/gethrxtime (Makefile.am): Likewise.
874         * modules/getline (Makefile.am): Likewise.
875         * modules/getloadavg (Makefile.am): Likewise.
876         * modules/getlogin_r (Makefile.am): Likewise.
877         * modules/getopt (Makefile.am): Likewise.
878         * modules/getpass (Makefile.am): Likewise.
879         * modules/getpass-gnu (Makefile.am): Likewise.
880         * modules/getsubopt (Makefile.am): Likewise.
881         * modules/gettime (Makefile.am): Likewise.
882         * modules/gettimeofday (Makefile.am): Likewise.
883         * modules/getugroups (Makefile.am): Likewise.
884         * modules/getusershell (Makefile.am): Likewise.
885         * modules/glob (Makefile.am): Likewise.
886         * modules/group-member (Makefile.am): Likewise.
887         * modules/hard-locale (Makefile.am): Likewise.
888         * modules/hash (Makefile.am): Likewise.
889         * modules/hmac-md5 (Makefile.am): Likewise.
890         * modules/hmac-sha1 (Makefile.am): Likewise.
891         * modules/human (Makefile.am): Likewise.
892         * modules/idcache (Makefile.am): Likewise.
893         * modules/imaxabs (Makefile.am): Likewise.
894         * modules/imaxdiv (Makefile.am): Likewise.
895         * modules/inet_ntop (Makefile.am): Likewise.
896         * modules/inet_pton (Makefile.am): Likewise.
897         * modules/inttostr (Makefile.am): Likewise.
898         * modules/isapipe (Makefile.am): Likewise.
899         * modules/lchown (Makefile.am): Likewise.
900         * modules/long-options (Makefile.am): Likewise.
901         * modules/lstat (Makefile.am): Likewise.
902         * modules/malloc (Makefile.am): Likewise.
903         * modules/mathl (Makefile.am): Likewise.
904         * modules/mbchar (Makefile.am): Likewise.
905         * modules/md2 (Makefile.am): Likewise.
906         * modules/md4 (Makefile.am): Likewise.
907         * modules/md5 (Makefile.am): Likewise.
908         * modules/memcasecmp (Makefile.am): Likewise.
909         * modules/memchr (Makefile.am): Likewise.
910         * modules/memcmp (Makefile.am): Likewise.
911         * modules/memcoll (Makefile.am): Likewise.
912         * modules/memcpy (Makefile.am): Likewise.
913         * modules/memmem (Makefile.am): Likewise.
914         * modules/memmove (Makefile.am): Likewise.
915         * modules/mempcpy (Makefile.am): Likewise.
916         * modules/memrchr (Makefile.am): Likewise.
917         * modules/memset (Makefile.am): Likewise.
918         * modules/memxor (Makefile.am): Likewise.
919         * modules/mkancesdirs (Makefile.am): Likewise.
920         * modules/mkdir (Makefile.am): Likewise.
921         * modules/mkdir-p (Makefile.am): Likewise.
922         * modules/mkdtemp (Makefile.am): Likewise.
923         * modules/mkstemp (Makefile.am): Likewise.
924         * modules/mktime (Makefile.am): Likewise.
925         * modules/modechange (Makefile.am): Likewise.
926         * modules/mountlist (Makefile.am): Likewise.
927         * modules/nanosleep (Makefile.am): Likewise.
928         * modules/openat (Makefile.am): Likewise.
929         * modules/pagealign_alloc (Makefile.am): Likewise.
930         * modules/physmem (Makefile.am): Likewise.
931         * modules/poll (Makefile.am): Likewise.
932         * modules/posixtm (Makefile.am): Likewise.
933         * modules/posixver (Makefile.am): Likewise.
934         * modules/putenv (Makefile.am): Likewise.
935         * modules/quote (Makefile.am): Likewise.
936         * modules/quotearg (Makefile.am): Likewise.
937         * modules/raise (Makefile.am): Likewise.
938         * modules/read-file (Makefile.am): Likewise.
939         * modules/readline (Makefile.am): Likewise.
940         * modules/readlink (Makefile.am): Likewise.
941         * modules/readtokens (Makefile.am): Likewise.
942         * modules/readutmp (Makefile.am): Likewise.
943         * modules/realloc (Makefile.am): Likewise.
944         * modules/regex (Makefile.am): Likewise.
945         * modules/rename (Makefile.am): Likewise.
946         * modules/rename-dest-slash (Makefile.am): Likewise.
947         * modules/rijndael (Makefile.am): Likewise.
948         * modules/rmdir (Makefile.am): Likewise.
949         * modules/rpmatch (Makefile.am): Likewise.
950         * modules/safe-read (Makefile.am): Likewise.
951         * modules/safe-write (Makefile.am): Likewise.
952         * modules/same (Makefile.am): Likewise.
953         * modules/save-cwd (Makefile.am): Likewise.
954         * modules/savedir (Makefile.am): Likewise.
955         * modules/setenv (Makefile.am): Likewise.
956         * modules/settime (Makefile.am): Likewise.
957         * modules/sha1 (Makefile.am): Likewise.
958         * modules/sig2str (Makefile.am): Likewise.
959         * modules/snprintf (Makefile.am): Likewise.
960         * modules/stdlib-safer (Makefile.am): Likewise.
961         * modules/stpcpy (Makefile.am): Likewise.
962         * modules/stpncpy (Makefile.am): Likewise.
963         * modules/strcase (Makefile.am): Likewise.
964         * modules/strcasestr (Makefile.am): Likewise.
965         * modules/strchrnul (Makefile.am): Likewise.
966         * modules/strcspn (Makefile.am): Likewise.
967         * modules/strdup (Makefile.am): Likewise.
968         * modules/strerror (Makefile.am): Likewise.
969         * modules/strftime (Makefile.am): Likewise.
970         * modules/strndup (Makefile.am): Likewise.
971         * modules/strnlen (Makefile.am): Likewise.
972         * modules/strpbrk (Makefile.am): Likewise.
973         * modules/strsep (Makefile.am): Likewise.
974         * modules/strstr (Makefile.am): Likewise.
975         * modules/strtod (Makefile.am): Likewise.
976         * modules/strtoimax (Makefile.am): Likewise.
977         * modules/strtok_r (Makefile.am): Likewise.
978         * modules/strtol (Makefile.am): Likewise.
979         * modules/strtoll (Makefile.am): Likewise.
980         * modules/strtoul (Makefile.am): Likewise.
981         * modules/strtoull (Makefile.am): Likewise.
982         * modules/strtoumax (Makefile.am): Likewise.
983         * modules/strverscmp (Makefile.am): Likewise.
984         * modules/time_r (Makefile.am): Likewise.
985         * modules/timegm (Makefile.am): Likewise.
986         * modules/tmpfile-safer (Makefile.am): Likewise.
987         * modules/unistd-safer (Makefile.am): Likewise.
988         * modules/unlinkdir (Makefile.am): Likewise.
989         * modules/userspec (Makefile.am): Likewise.
990         * modules/utime (Makefile.am): Likewise.
991         * modules/utimecmp (Makefile.am): Likewise.
992         * modules/utimens (Makefile.am): Likewise.
993         * modules/vasnprintf (Makefile.am): Likewise.
994         * modules/vasprintf (Makefile.am): Likewise.
995         * modules/vsnprintf (Makefile.am): Likewise.
996         * modules/xalloc (Makefile.am): Likewise.
997         * modules/xgetcwd (Makefile.am): Likewise.
998         * modules/xnanosleep (Makefile.am): Likewise.
999         * modules/xreadlink (Makefile.am): Likewise.
1000         * modules/xstrtod (Makefile.am): Likewise.
1001         * modules/xstrtol (Makefile.am): Likewise.
1002         * modules/xstrtold (Makefile.am): Likewise.
1003         * modules/yesno (Makefile.am): Likewise.
1004
1005 2006-10-12  Jim Meyering  <jim@meyering.net>
1006
1007         * m4/getloadavg.m4: Revert the change below.
1008
1009         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
1010         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
1011         fail with a symlink, which is what coreutils' ./bootstrap now
1012         creates by default.
1013
1014 2006-10-12  Bruno Haible  <bruno@clisp.org>
1015
1016         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
1017         mingw.
1018         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
1019         MSVC and mingw explicitly.
1020
1021 2006-10-11  Simon Josefsson  <jas@extundo.com>
1022             Bruno Haible  <bruno@clisp.org>
1023
1024         Add support for multiple gnulib-tool invocations in the scope of a
1025         single configure.ac file.
1026         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
1027         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
1028         with the same contents as the _LIBADD variable.
1029         (func_emit_initmacro_start, func_emit_initmacro_end,
1030         func_emit_initmacro_done): New functions.
1031         (func_import, func_create_testdir): Invoke them. Allow the identifiers
1032         gl_LIBOBJS and gl_LTLIBOBJS.
1033
1034 2006-10-11  Bruno Haible  <bruno@clisp.org>
1035
1036         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
1037         (func_create_testdir): Don't create po/Makefile.am, don't invoke
1038         autoreconf. Instead, invoke autopoint explicitly but move back the
1039         *.m4 files from gnulib.
1040
1041 2006-10-11  Bruno Haible  <bruno@clisp.org>
1042
1043         * gnulib-tool (func_usage): Make module names after --create-testdir
1044         optional.
1045         (func_create_testdir): If no module was specified, use nearly all
1046         modules.
1047
1048 2006-10-12  Jim Meyering  <jim@meyering.net>
1049
1050         Big performance improvement for fts-based tools that use FTS_NOSTAT.
1051         Avoid spurious inode-mismatch problems on non-POSIX file systems.
1052         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
1053         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
1054         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
1055         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
1056         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
1057         (fts_set_stat_required): New function.
1058         (fts_open): Defer the calls to fts_stat, if possible or requested.
1059         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
1060         into fts_stat itself.
1061         (fts_read): Perform any required (deferred) fts_stat call.
1062         (fts_build): Likewise, for the directory we're about to open and read.
1063         In the readdir loop, carefully decide whether each entry will require
1064         an eventual call to fts_stat, using dirent.d_type info if available.
1065         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
1066         a command line argument into this function.  Update all callers.
1067         Map a return value of FTS_DOT to FTS_D for a command line argument.
1068         * modules/fts (Depends-on): Add d-type.  Alphabetize.
1069         Thanks to Miklos Szeredi for his tenacity and for the initial
1070         bug report about "find" failing on a FUSE-based file system.
1071
1072         * lib/fts.c (fts_open): Use consistent indentation.
1073
1074 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1075
1076         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
1077         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
1078         reported by Jim Meyering.  All uses of cache variables renamed
1079         to match Autoconf's.
1080         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
1081         the other one.
1082
1083         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
1084         Fix misspelling in diagnostic.
1085
1086 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1087
1088         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
1089         defined.  Problem reported by Matthew Woehlke.
1090
1091         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
1092         Add support for Tandem NonStop R series.
1093         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
1094         Use new macro.
1095
1096         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
1097         (has_trailing_slash): Omit size arg; all callers changed.
1098         Omit 'inline', since it doesn't help performance and we'd
1099         need to configure it.
1100         Don't count //, ///, etc. as having a trailing slash.
1101         As a side effect, this removes a C99ism reported by Matthew Woehlke.
1102         (rpl_rename_dest_slash): On failure, use rename's errno rather
1103         than (in some cases) an incorrect or junk errno.
1104         Simplify code by removing need to compute length; this does
1105         cause it to make two passes instead of one over the file name,
1106         but it's worth it.
1107
1108         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
1109         change, since Autoconf's version may no longer be appropriate now
1110         that we are using CVS Autoconf's version.  Add support for Tandem.
1111
1112 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1113             Bruno Haible  <bruno@clisp.org>
1114
1115         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
1116         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
1117         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
1118         gl_AC_TYPE_LONG_LONG.
1119
1120         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
1121         instead of HAVE_LONG_LONG.
1122         * lib/printf-args.c (printf_fetchargs): Likewise.
1123         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
1124         * lib/vasnprintf.c (VASNPRINTF): Likewise.
1125         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
1126         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
1127         gl_AC_TYPE_LONG_LONG.
1128
1129 2006-10-11  Bruno Haible  <bruno@clisp.org>
1130
1131         * m4/longlong.m4: Add comments.
1132         * m4/ulonglong.m4: Likewise.
1133
1134 2006-10-10  Bruno Haible  <bruno@clisp.org>
1135
1136         Make it possible to #define stpcpy, strdup to aliases.
1137         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
1138         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
1139
1140 2006-10-10  Bruno Haible  <bruno@clisp.org>
1141
1142         Make it possible to #define gcd to an alias.
1143         * lib/gcd.c: Include config.h.
1144
1145 2006-10-10  Bruno Haible  <bruno@clisp.org>
1146
1147         Make it possible to #define c_isascii to an alias.
1148         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
1149         defined. Undefine the macros before defining them, to avoid gcc
1150         warnings.
1151         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
1152         define NO_C_CTYPE_MACROS early.
1153
1154 2006-10-10  Bruno Haible  <bruno@clisp.org>
1155
1156         Make it possible to #define set_program_name to an alias.
1157         * lib/progname.c: Don't undefine set_program_name; instead, undefine
1158         ENABLE_RELOCATABLE early.
1159
1160 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
1161
1162         Port to Tandem NSK OSS, which has 64-bit signed int but at most
1163         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
1164         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
1165         More generally, don't assume that 64-bit signed int is available
1166         if unsigned int is, and vice versa.
1167         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
1168         unsigned symbols, not on their signed counterparts.
1169         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
1170         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
1171         (UINT64_C, UINTMAX_C):
1172         Likewise.
1173         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
1174         unsigned counterparts.
1175         (Have_long_long, Unsigned): New macros.
1176         (Int): Renamed from INT.
1177         (strtoimax): Use the new macros.
1178         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
1179         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
1180         * modules/inttypes (inttypes.h): Substitute
1181         HAVE_UNSIGNED_LONG_LONG_INT.
1182         * modules/stdint (stdint.h): Likewise.
1183         (Files): Add m4/ulonglong.m4.
1184
1185 2006-10-10  Bruno Haible  <bruno@clisp.org>
1186
1187         Fix a gcc -Wshadow warning.
1188         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
1189         to 'bucket'.
1190         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
1191         gl_linked_indexof_from_to): Likewise.
1192         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
1193         Likewise.
1194         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
1195         Likewise.
1196         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
1197         Reported by Eric Blake.
1198
1199 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
1200
1201         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
1202         for NetBSD.  Problem reported by Bruno Haible.
1203
1204 2006-10-09  Jim Meyering  <jim@meyering.net>
1205
1206         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
1207         Patch from Bruno Haible.
1208
1209 2006-10-09  Jim Meyering  <jim@meyering.net>
1210
1211         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
1212         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
1213         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
1214
1215 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1216
1217         Don't include <config.h> twice; this doesn't work in some cases,
1218         e.g., when config.h has "#define intmax_t long long int" and
1219         we include <config.h>, <inttypes.h>, <config.h> in that order.
1220         Problem reported by Matthew Woehlke in:
1221         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
1222         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
1223         * lib/fts-cycle.c: Don't include config.h.
1224         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
1225         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
1226         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
1227         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
1228         inttypes.h.
1229         * lib/xstrtoumax.c: Likewise.
1230         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
1231         __strtol and the like, so that this module is more like its siblings.
1232         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
1233         Remove; no longer needed now that we assume gnulib inttypes.h.
1234
1235 2006-10-08  Bruno Haible  <bruno@clisp.org>
1236
1237         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
1238         option.
1239
1240 2006-10-07  Jim Meyering  <jim@meyering.net>
1241
1242         * modules/inttypes (inttypes.h): Revert what seems to have been
1243         an inadvertent part of today's change: use "|", not "/" in the
1244         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
1245
1246 2006-10-07  Bruno Haible  <bruno@clisp.org>
1247
1248         * modules/sublist: New file.
1249
1250 2006-10-07  Bruno Haible  <bruno@clisp.org>
1251
1252         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
1253         * modules/argz (argz.h): Likewise.
1254         * modules/arpa_inet (arpa/inet.h): Likewise.
1255         * modules/byteswap (byteswap.h): Likewise.
1256         * modules/configmake (configmake.h): Likewise.
1257         * modules/fcntl (fcntl.h): Likewise.
1258         * modules/fnmatch (fnmatch.h): Likewise.
1259         * modules/getopt (getopt.h): Likewise.
1260         * modules/glob (glob.h): Likewise.
1261         * modules/inttypes (inttypes.h): Likewise.
1262         * modules/netinet_in (netinet/in.h): Likewise.
1263         * modules/poll (poll.h): Likewise.
1264         * modules/stdbool (stdbool.h): Likewise.
1265         * modules/stdint (stdint.h): Likewise.
1266         * modules/sys_select (sys/select.h): Likewise.
1267         * modules/sys_socket (sys/socket.h): Likewise.
1268         * modules/sys_stat (sys/stat.h): Likewise.
1269         * modules/sysexits (sysexits.h): Likewise.
1270         * modules/unistd (unistd.h): Likewise.
1271         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1272         Add a "DO NOT EDIT" comment to the generated file.
1273         (func_import): Likewise for gnulib-comp.m4.
1274
1275 2006-10-07  Bruno Haible  <bruno@clisp.org>
1276
1277         * lib/gl_sublist.h: New file.
1278         * lib/gl_sublist.c: New file.
1279
1280 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
1281
1282         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
1283         name (relative to the original working directory) and the file
1284         name component (relative to the temporary working directory).  All
1285         callers changed.
1286         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
1287         * lib/mkdir-p.c (make_dir_parents): Likewise.
1288         * lib/mkdir-p.h (make_dir_parents): Likewise.
1289
1290 2006-10-06  Eric Blake  <ebb9@byu.net>
1291
1292         Define several macros for use by the clean-temp module.
1293         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
1294         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
1295         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
1296
1297         * lib/clean-temp.h (close_stream_temp): New declaration.
1298         * lib/clean-temp.c (includes): Pull in headers according to what
1299         other modules are in use.
1300         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
1301
1302 2006-10-06  Bruno Haible  <bruno@clisp.org>
1303
1304         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
1305         instead of fopen, fwriteerror.
1306
1307 2006-10-06  Bruno Haible  <bruno@clisp.org>
1308
1309         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
1310         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
1311         int.
1312         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
1313         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
1314         Return an error indicator.
1315         Suggested by Eric Blake.
1316
1317 2006-10-06  Bruno Haible  <bruno@clisp.org>
1318
1319         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
1320         Reported by Eric Blake.
1321
1322 2006-10-06  Bruno Haible  <bruno@clisp.org>
1323
1324         * modules/closeout (Description): Mention stderr too.
1325
1326 2006-10-06  Bruno Haible  <bruno@clisp.org>
1327         and Paul Eggert  <eggert@cs.ucla.edu>
1328
1329         * lib/closeout.c (close_stdout): Also close stderr.
1330         * lib/closeout.h: Update comment.
1331
1332 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
1333
1334         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
1335         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
1336         * lib/dirchownmod.c: Include lchown.h.
1337         * lib/lchown.c: Don't include files that lchown.h now includes.
1338         Don't declare chown, since lchown.h now does that.
1339         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
1340         (lchown): Define to rpl_chown if lchown is declared but
1341         does not exist.  Declare using a prototype if lchown is not
1342         declared.  Add a copyright notice.
1343         * lib/mkstemp.h: Include <unistd.h>.
1344         * lib/openat.c: Include lchown.h.
1345
1346         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
1347         we now test for that separately.
1348         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
1349         rather than O_NOFOLLOW, when testing whether it's possible to
1350         avoid a race condition reliably.
1351         * lib/savewd.c (savewd_chdir): Likewise.
1352
1353         Remove macros that are no longer needed now that stdint.h is
1354         reliable.
1355         * lib/fsusage.c (UINTMAX_MAX): Remove.
1356         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
1357         * lib/utimecmp.c (SIZE_MAX): Remove.
1358
1359         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
1360
1361         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
1362         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
1363         O_NOATIME works.
1364
1365 2006-10-05  Bruno Haible  <bruno@clisp.org>
1366
1367         * lib/gl_list.h (gl_sortedlist_search_from_to,
1368         gl_sortedlist_indexof_from_to): New declarations.
1369         (gl_list_implementation): New fields sortedlist_search_from_to,
1370         sortedlist_indexof_from_to.
1371         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
1372         inline functions.
1373         * lib/gl_list.c (gl_sortedlist_search_from_to,
1374         gl_sortedlist_indexof_from_to): New functions.
1375         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
1376         function.
1377         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
1378         (gl_array_sortedlist_search_from_to): New function.
1379         (gl_array_list_implementation): Update.
1380         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
1381         function.
1382         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
1383         (gl_carray_sortedlist_search_from_to): New function.
1384         (gl_carray_list_implementation): Update.
1385         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
1386         gl_linked_sortedlist_indexof_from_to): New functions.
1387         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
1388         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
1389         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
1390         gl_tree_sortedlist_indexof_from_to): New functions.
1391         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
1392         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
1393         Update.
1394         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
1395         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
1396         Update.
1397
1398 2006-10-05  Bruno Haible  <bruno@clisp.org>
1399
1400         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
1401         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
1402         (struct gl_list_implementation): Add fields search_from_to,
1403         indexof_from_to. Remove fields search, indexof.
1404         (gl_list_search): Use the search_from_to method.
1405         (gl_list_search_from, gl_list_search_from_to): New functions.
1406         (gl_list_indexof): Use the indexof_from_to method.
1407         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
1408         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
1409         (gl_list_search_from, gl_list_search_from_to): New functions.
1410         (gl_list_indexof): Use the indexof_from_to method.
1411         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
1412         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
1413         gl_array_indexof. Add start_index, end_index arguments.
1414         (gl_array_search_from_to): Renamed from gl_array_search. Add
1415         start_index, end_index arguments.
1416         (gl_array_remove, gl_array_list_implementation): Update.
1417         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
1418         gl_carray_indexof. Add start_index, end_index arguments.
1419         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
1420         start_index, end_index arguments.
1421         (gl_carray_remove, gl_carray_list_implementation): Update.
1422         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
1423         gl_linked_search. Add start_index, end_index arguments.
1424         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
1425         start_index, end_index arguments.
1426         (gl_linked_remove): Update.
1427         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
1428         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
1429         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
1430         field to 'size_t'.
1431         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
1432         gl_tree_search. Add start_index, end_index arguments.
1433         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
1434         start_index, end_index arguments.
1435         (gl_tree_remove): Update.
1436         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
1437         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
1438         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
1439         function.
1440         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
1441         gl_tree_search. Add start_index, end_index arguments.
1442         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
1443         start_index, end_index arguments.
1444         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
1445         Update.
1446         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
1447
1448 2006-10-05  Bruno Haible  <bruno@clisp.org>
1449
1450         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
1451
1452         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
1453         fwriteerror_temp): New declarations.
1454         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
1455         (descriptors): New variable.
1456         (cleanup): First, close the descriptors.
1457         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
1458         fclose_temp, fwriteerror_temp): New functions.
1459
1460 2006-10-04  Jim Meyering  <jim@meyering.net>
1461
1462         * lib/fts.c (fts_open): Tiny comment change.
1463
1464 2006-10-04  Bruno Haible  <bruno@clisp.org>
1465
1466         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
1467         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
1468         gl_LOCK_BODY.
1469         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
1470         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
1471         gl_LOCK_EARLY_BODY.
1472         (gl_LOCK): Require gl_LOCK_BODY.
1473
1474 2006-10-04  Bruno Haible  <bruno@clisp.org>
1475
1476         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
1477         (gl_oset_search_atleast): New declaration.
1478         (struct gl_oset_implementation): Add field 'search_atleast'.
1479         (gl_oset_search_atleast): New inline function.
1480         * lib/gl_oset.c (gl_oset_search_atleast): New function.
1481         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
1482         (gl_array_oset_implementation): Update.
1483         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
1484         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
1485         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
1486
1487 2006-10-04  Bruno Haible  <bruno@clisp.org>
1488
1489         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
1490
1491 2006-10-03  Bruno Haible  <bruno@clisp.org>
1492
1493         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
1494         from gl_avltreehash_list_implementation.
1495
1496 2006-10-03  Bruno Haible  <bruno@clisp.org>
1497
1498         * lib/gl_oset.c (gl_oset_add): Fix return type.
1499
1500 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
1501
1502         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
1503
1504 2006-10-02  Eric Blake  <ebb9@byu.net>
1505
1506         * modules/strnlen (Depends-on): Add extensions.
1507
1508 2006-10-02  Eric Blake  <ebb9@byu.net>
1509
1510         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
1511         definition in 2.60+.
1512
1513 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
1514
1515         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
1516         checks.
1517
1518 2006-10-02  Bruno Haible  <bruno@clisp.org>
1519
1520         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
1521         to the AUTOMAKE_OPTIONS.
1522         Reported by Jim Meyering.
1523
1524 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
1525
1526         Work around bug in Solaris 10 /proc file system:
1527         /proc/self/fd/NNN/.. isn't the parent directory of
1528         the directory whose file descriptor is NNN.  This needs to
1529         be worked around at run time, not compile time, since a
1530         program might be built on Solaris 8, where things work, and
1531         run on Solaris 10.
1532         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
1533         to use the following interface instead:
1534         (OPENAT_BUFFER_SIZE): New macro.
1535         (openat_proc_name): New function.
1536         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
1537         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
1538         Likewise.
1539         * lib/openat-proc.c: New file.
1540         * modules/openat (Files): Add lib/openat-proc.c.
1541         (Depends-on): Add same-inode, stdbool.
1542         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
1543
1544 2006-09-29  Bruno Haible  <bruno@clisp.org>
1545
1546         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
1547         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
1548         argument. Set stdout_closed before testing for ferror, not after.
1549         (fwriteerror, fwriteerror_no_ebadf): New functions.
1550
1551 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1552
1553         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
1554
1555 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
1556
1557         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
1558         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
1559
1560 2006-09-28  Jim Meyering  <jim@meyering.net>
1561
1562         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
1563         Include <unistd.h>.
1564
1565 2006-09-28  Bruno Haible  <bruno@clisp.org>
1566
1567         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
1568         * modules/linkedhash-list (Depends-on): Likewise.
1569         * modules/rbtreehash-list (Depends-on): Likewise.
1570
1571 2006-09-28  Bruno Haible  <bruno@clisp.org>
1572
1573         * lib/strndup.h: Simplify the redefinition of strndup.
1574         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
1575         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
1576
1577 2006-09-28  Bruno Haible  <bruno@clisp.org>
1578
1579         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
1580         * lib/gl_linkedhash_list.c: Likewise.
1581         * lib/gl_rbtreehash_list.c: Likewise.
1582
1583 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
1584
1585         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
1586         getaddrinfo.
1587
1588         * lib/__fpending.h: Don't include <stdio_ext.h> unless
1589         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
1590         it causes <stdio_ext.h> to cause a compile-time error.
1591         Problem reported by Nelson H. F. Beebe.
1592         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
1593         of HAVE_DECL___PENDING.
1594
1595         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
1596         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
1597         declaration.
1598
1599 2006-09-27  Jim Meyering  <jim@meyering.net>
1600
1601         This file could end up with a definition for a function
1602         named __strndup, rather than rpl_strndup on a system with
1603         incomplete weak_alias support.
1604         * lib/strndup.c (strndup): Rename from __strndup.
1605         Remove #defines that used to map __strndup to strndup.
1606         Don't use K&R prototypes.
1607         Remove LIBC-related code, since this file is not sync'd with glibc.
1608         * lib/strndup.h: Revamp, accordingly.
1609         * m4/strndup.m4: Modernize.
1610
1611 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
1612
1613         * modules/savewd (Depends-on): Add 'raise'.
1614         * lib/savewd.c: Include <signal.h>, for 'raise'.
1615
1616 2006-09-26  Jim Meyering  <jim@meyering.net>
1617
1618         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
1619         when we detect Darwin 8.7.0's acl_get_file bug.
1620         Rearrange to perform the new (below) run-test while $LIBS
1621         contains any acl-related library.  Set USE_ACL at the end.
1622         (gl_ACL_GET_FILE): New function.
1623
1624 2006-09-26  Eric Blake  <ebb9@byu.net>
1625
1626         * lib/verror.c: Include <config.h> unconditionally.
1627
1628 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
1629
1630         * modules/clock-time (Maintainer): Add self.
1631         * modules/getlogin_r (Depends-on): Add extensions.
1632
1633 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1634
1635         * modules/clock-time: New module.
1636         * modules/nanosleep (Depends-on): Add clock-time.
1637         * modules/gethrxtime (Depends-on): Likewise.
1638         * modules/gettime (Depends-on): Likewise.
1639         * modules/settime (Depends-on): Likewise.
1640
1641         * modules/fts-lgpl: Depend on openat.
1642         * modules/mkancesdirs: Depend on savewd.
1643         * modules/mkdir-p: Likewise.
1644
1645 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1646
1647         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
1648
1649         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
1650         `gl_have_arbitrary_file_name_length_limit' to
1651         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
1652         actually works between configure runs.
1653
1654 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1655             Bruno Haible  <bruno@clisp.org>
1656
1657         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
1658
1659 2006-09-25  Jim Meyering  <jim@meyering.net>
1660
1661         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
1662         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
1663
1664 2006-09-25  Eric Blake  <ebb9@byu.net>
1665
1666         * gnulib-tool (func_import, func_create_testdir): Fix typos in
1667         exec's in 2006-09-18 patch when shuffling fds.
1668
1669 2006-09-25  Bruno Haible  <bruno@clisp.org>
1670
1671         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
1672         Reported by Jim Meyering.
1673
1674 2006-09-24  Jim Meyering  <jim@meyering.net>
1675
1676         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
1677         compare a pointer against a literal "0".  That caused failures with
1678         at least HP-UX's hpcc.
1679
1680 2006-09-22  Simon Josefsson  <jas@extundo.com>
1681
1682         * modules/gc-sha1:
1683         * modules/gc-md4:
1684         * modules/gc-hmac-sha1:
1685         * modules/gc-hmac-md5:
1686         * modules/gc-des:
1687         * modules/gc-arcfour: Distribute more files.
1688
1689 2006-09-22  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1690
1691         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
1692         (gl_linked_iterator_from_to): Initialize struct completely.
1693         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
1694         (gl_tree_iterator_from_to): Likewise
1695         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
1696         * lib/gl_array_list.c [lint] (gl_array_iterator)
1697         (gl_array_iterator_from_to): Likewise.
1698         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
1699         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
1700         (gl_carray_iterator_from_to): Likewise.
1701
1702         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
1703         * lib/md4.c (md4_process_block): Remove unused variable.
1704         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
1705         parentheses for clarity.
1706
1707 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1708
1709         * modules/bison-i18n (Depends-on): Add gettext.
1710
1711 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1712
1713         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
1714         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
1715         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
1716         also add missing comma that caused broken test.
1717         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
1718         stdlib.h, for `abort'.
1719         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
1720         variables.
1721         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
1722         include unistd.h if present, for `rmdir'.
1723         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
1724         variables.
1725         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
1726         in the process include standard headers for prototypes.
1727         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
1728         gets declared on GNU/Linux.
1729         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
1730         unistd.h, for `rmdir'.
1731         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
1732
1733         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
1734         always true.
1735         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
1736
1737         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
1738
1739 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1740
1741         * gnulib-tool (func_version): Create output all at once.  This
1742         may help avoid triggering unnecessary SIGPIPEs, and at any
1743         rate it doesn't hurt.
1744
1745 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1746             Bruno Haible  <bruno@clisp.org>
1747
1748         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
1749         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1750         * m4/signed.m4 (bh_C_SIGNED): Likewise.
1751
1752         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
1753         (gl_FUNC_VASPRINTF): Invoke it.
1754
1755 2006-09-22  Bruno Haible  <bruno@clisp.org>
1756
1757         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
1758         getloadavg.c as first argument.
1759
1760 2006-09-22  Bruno Haible  <bruno@clisp.org>
1761
1762         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
1763         at the beginning of the gl_INIT macro.
1764         * modules/getloadavg (configure.ac): Pass $gl_source_base to
1765         gl_GETLOADAVG.
1766
1767 2006-09-22  Bruno Haible  <bruno@clisp.org>
1768
1769         * gnulib-tool (func_create_megatestdir): Don't include the config-h
1770         module.
1771         Suggested by Ralf Wildenhues.
1772
1773 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
1774
1775         Import this patch from libc:
1776
1777         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
1778
1779         * lib/regex_internal.c (re_string_reconstruct): Handle
1780         offset < pstr->valid_raw_len && pstr->offsets_needed case.
1781         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
1782         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
1783         re_string_context_at.
1784
1785         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
1786         now requires it.
1787         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
1788         gl_REGEX now does it for us.
1789         (gl_REGEX): Add test taken from
1790         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
1791
1792         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
1793         Check that large offsets work.  Modernize Autoconf usages.
1794         Prefer "yes" to mean a good thing rather than a bad.
1795         Don't put "#define mkstemp" in config.h, as this might interfere
1796         with standard system headers that "#define mkstemp mkstemp64".
1797
1798         * modules/mkstemp (Depends-on): Add extensions, so that
1799         mkstemp is visible on some platforms.
1800         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
1801         (Include): Change to "mkstemp.h" from <stdlib.h>.
1802         (Files): Add mkstemp.h.
1803
1804         * lib/mkstemp.h: New file, since some standard headers
1805         #define mkstemp.
1806         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
1807         Include "mkstemp.h".
1808         Make the _LIBC code resemble glibc original more,
1809         e.g., use K&R style.
1810         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
1811         (mkstemp): Remove, since mkstemp.h does this for us.
1812         * lib/stdlib--.h: Include mkstemp.h.
1813
1814         Import this patch from libc:
1815
1816         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
1817
1818         * lib/tempname.c (__gen_tempname): Change attempts_min
1819         into a macro.  Use preprocessor to decide how to initialize
1820         attempts [Coverity CID 67].
1821
1822 2006-09-20  Bruno Haible  <bruno@clisp.org>
1823
1824         * lib/mkdtemp.c: Import from libc.
1825         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
1826                 * sysdeps/posix/tempname.c (__gen_tempname): Change
1827                 attempts_min into a macro.  Use preprocessor to decide how to
1828                 initialize attempts [Coverity CID 67].
1829         2001-11-27  Paul Eggert  <eggert@twinsun.com>
1830                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
1831                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
1832
1833 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1834
1835         * gnulib-tool (func_exit): New function, to allow to pass the
1836         exit status portably through the trap.  Use everywhere.
1837         (--help, --version): Signal a write error.
1838         (trap): catch SIGPIPE, for write errors.
1839         Exit at the end of the trap, with the correct exit status.
1840
1841 2006-09-19  Karl Berry  <karl@gnu.org>
1842
1843         * doc/gnulib.texi: note about the license texinfo files.
1844
1845 2006-09-19  Eric Blake  <ebb9@byu.net>
1846
1847         * gnulib-tool: Avoid space-tab.
1848
1849 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
1850
1851         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
1852         that prevented coreutils 6.1 from building.  Problem reported
1853         by Petter Reinholdtsen.
1854
1855 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
1856
1857         * gnulib-tool (avoidlist): Fix typo that broke options like
1858         --avoid=lock that are used by coreutils bootstrap.
1859
1860 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
1861
1862         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
1863         more systematically.
1864
1865 2006-09-18  Jim Meyering  <jim@meyering.net>
1866
1867         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
1868
1869 2006-09-18  Bruno Haible  <bruno@clisp.org>
1870
1871         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
1872
1873 2006-09-18  Bruno Haible  <bruno@clisp.org>
1874
1875         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
1876         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
1877         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
1878         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
1879         * m4/gettext.m4: Require autoconf >= 2.52.
1880         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
1881         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
1882         of gl_cv_header_inttypes_h.
1883
1884 2006-09-18  Bruno Haible  <bruno@clisp.org>
1885
1886         * lib/javaversion.c: Include configmake.h.
1887
1888 2006-09-18  Bruno Haible  <bruno@clisp.org>
1889
1890         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
1891         avoid that the while loops be executed in a subshell.
1892
1893 2006-09-18  Bruno Haible  <bruno@clisp.org>
1894
1895         * MODULES.html.sh (func_module): Break long lines.
1896         Suggested by Bruce Korb <bkorb@gnu.org>.
1897
1898 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1899
1900         Speed up by a factor of 1.12.
1901         * gnulib-tool (nl): New variable.
1902         (func_import): Rewrite include directive extraction to only read each
1903         directive once.
1904
1905 2006-09-17  Bruno Haible  <bruno@clisp.org>
1906
1907         * modules/javaversion (Makefile.am): Remove DEFS setting.
1908         (Depends-on): Add configmake, for PKGDATADIR definition.
1909
1910 2006-09-17  Bruno Haible  <bruno@clisp.org>
1911
1912         * gnulib-tool (func_create_testdir): Rewrite all files at once.
1913
1914 2006-09-17  Bruno Haible  <bruno@clisp.org>
1915
1916         * gnulib-tool (func_append): New function, stolen from libtool.m4.
1917         (func_modules_transitive_closure, func_modules_add_dummy,
1918         func_modules_to_filelist, func_import, func_create_testdir,
1919         func_create_megatestdir, ...): Use it wherever possible.
1920         Suggested by Ralf Wildenhues.
1921
1922 2006-09-16  Karl Berry  <karl@gnu.org>
1923
1924         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
1925         to avoid sectioning errors.
1926         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
1927         [ifinfo]: blank line after @center-ed titles.
1928         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
1929         Spell FSF address consistently with others.
1930         (These changes approved by rms.)
1931
1932 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1933
1934         Speed up by a factor of 1.61.
1935         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
1936         already checked module names again.
1937
1938 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1939
1940         Speed up by a factor of 1.13.
1941         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
1942         for new_files, and the input to func_add_or_update.
1943
1944 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1945
1946         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
1947         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
1948
1949 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1950
1951         * modules/mkancesdirs (Depends-on): Add fcntl.
1952         * modules/savewd: New file.
1953         * MODULES.html.sh (File system functions): Add savewd.
1954
1955         * modules/configmake (Makefile.am): Add support for the
1956         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
1957
1958 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1959
1960         * m4/savewd.m4: New file.
1961
1962 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1963
1964         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
1965         (dirchownmod): New arg FD.  All callers changed.
1966         Use FD rather than opening the directory ourself, as opening is
1967         now the caller's responsibility.
1968         * lib/dirchownmod.h: Likewise.
1969         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
1970         hosts that require <sys/types.h> before <sys/stat.h>.  Include
1971         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
1972         (test_dir): Remove.
1973         (mkancesdirs): Return length of prefix of FILE that has already
1974         been made, or -2 if there is a child doing the work.  Redo
1975         algorithm so that it is O(N) rather than O(N**2).  Optimize away
1976         ".", and treat ".." specially since it might stray back into
1977         already-created areas.  Use a subprocess if necessary.  New arg
1978         WD; all users changed.  MAKE_DIR function should now return 1
1979         if it creates a directory that is not readable.  Return -2 if
1980         a child process is spun off.
1981         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
1982         Adjust signature to match code.
1983         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
1984         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
1985         all users changed.
1986         * lib/savewd.c, lib/savewd.h: New files.
1987
1988 2006-09-15  Jim Meyering  <jim@meyering.net>
1989
1990         * modules/rename-dest-slash: New module.
1991         * MODULES.html.sh (posix_compat): Add it here.
1992
1993         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
1994
1995 2006-09-15  Jim Meyering  <jim@meyering.net>
1996
1997         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
1998         file.
1999
2000         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
2001
2002 2006-09-15  Jim Meyering  <jim@meyering.net>
2003
2004         * lib/rename-dest-slash.c (has_trailing_slash): Use
2005         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
2006         (rpl_rename_dest_slash): Perform the cheaper trailing slash
2007         test before testing whether SRC is a directory.
2008         Suggestions from Bruno Haible.
2009
2010         Avoid a warning about an unused variable.
2011         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
2012         into the #ifdef block where it's used.
2013
2014         * lib/rename-dest-slash.c: New file.
2015
2016 2006-09-14  Bruno Haible  <bruno@clisp.org>
2017
2018         * lib/allocsa.c: Include <config.h> unconditionally.
2019         * lib/asnprintf.c: Likewise.
2020         * lib/asprintf.c: Likewise.
2021         * lib/c-strcasecmp.c: Likewise.
2022         * lib/c-strcasestr.c: Likewise.
2023         * lib/c-strncasecmp.c: Likewise.
2024         * lib/c-strstr.c: Likewise.
2025         * lib/classpath.c: Likewise.
2026         * lib/clean-temp.c: Likewise.
2027         * lib/concatpath.c: Likewise.
2028         * lib/copy-file.c: Likewise.
2029         * lib/csharpcomp.c: Likewise.
2030         * lib/csharpexec.c: Likewise.
2031         * lib/execute.c: Likewise.
2032         * lib/fatal-signal.c: Likewise.
2033         * lib/findprog.c: Likewise.
2034         * lib/fwriteerror.c: Likewise.
2035         * lib/gl_array_list.c: Likewise.
2036         * lib/gl_array_oset.c: Likewise.
2037         * lib/gl_avltree_list.c: Likewise.
2038         * lib/gl_avltree_oset.c: Likewise.
2039         * lib/gl_avltreehash_list.c: Likewise.
2040         * lib/gl_carray_list.c: Likewise.
2041         * lib/gl_linked_list.c: Likewise.
2042         * lib/gl_linkedhash_list.c: Likewise.
2043         * lib/gl_list.c: Likewise.
2044         * lib/gl_oset.c: Likewise.
2045         * lib/gl_rbtree_list.c: Likewise.
2046         * lib/gl_rbtree_oset.c: Likewise.
2047         * lib/gl_rbtreehash_list.c: Likewise.
2048         * lib/imaxabs.c: Likewise.
2049         * lib/imaxdiv.c: Likewise.
2050         * lib/javacomp.c: Likewise.
2051         * lib/javaexec.c: Likewise.
2052         * lib/javaversion.c: Likewise.
2053         * lib/linebreak.c: Likewise.
2054         * lib/localcharset.c: Likewise.
2055         * lib/lock.c: Likewise.
2056         * lib/mbchar.c: Likewise.
2057         * lib/mbswidth.c: Likewise.
2058         * lib/mkdtemp.c: Likewise.
2059         * lib/pipe.c: Likewise.
2060         * lib/printf-args.c: Likewise.
2061         * lib/printf-parse.c: Likewise.
2062         * lib/progname.c: Likewise.
2063         * lib/progreloc.c: Likewise.
2064         * lib/readlink.c: Likewise.
2065         * lib/sh-quote.c: Likewise.
2066         * lib/stpcpy.c: Likewise.
2067         * lib/stpncpy.c: Likewise.
2068         * lib/strcasecmp.c: Likewise.
2069         * lib/strcasestr.c: Likewise.
2070         * lib/strcspn.c: Likewise.
2071         * lib/striconv.c: Likewise.
2072         * lib/strncasecmp.c: Likewise.
2073         * lib/strnlen1.c: Likewise.
2074         * lib/strstr.c: Likewise.
2075         * lib/strtok_r.c: Likewise.
2076         * lib/tls.c: Likewise.
2077         * lib/tmpdir.c: Likewise.
2078         * lib/unicodeio.c: Likewise.
2079         * lib/unsetenv.c: Likewise.
2080         * lib/vasnprintf.c: Likewise.
2081         * lib/vasprintf.c: Likewise.
2082         * lib/wait-process.c: Likewise.
2083         * lib/xallocsa.c: Likewise.
2084         * lib/xsetenv.c: Likewise.
2085         * lib/xstriconv.c: Likewise.
2086
2087 2006-09-13  Simon Josefsson  <jas@extundo.com>
2088
2089         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
2090         that internally, suggested by Ralf Wildenhues
2091         <Ralf.Wildenhues@gmx.de>.
2092
2093 2006-09-13  Simon Josefsson  <jas@extundo.com>
2094
2095         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
2096         @LIBOBJS@.
2097         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2098
2099 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
2100
2101         * lib/_fpending.c: Include <config.h> unconditionally, since we no
2102         longer worry about uses that don't define HAVE_CONFIG_H.
2103         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
2104         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
2105         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
2106         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
2107         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
2108         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
2109         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
2110         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
2111         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
2112         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
2113         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
2114         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
2115         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
2116         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
2117         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
2118         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
2119         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
2120         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
2121         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
2122         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
2123         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
2124         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
2125         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
2126         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
2127         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
2128         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
2129         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
2130         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
2131         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
2132         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
2133         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
2134         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
2135         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
2136         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
2137         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
2138         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
2139         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
2140         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
2141         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
2142         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
2143         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
2144         Likewise.
2145
2146 2006-09-13  Eric Blake  <ebb9@byu.net>
2147
2148         * lib/getopt.c: Fix typo in last commit.
2149
2150 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2151
2152         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
2153         dgettext.
2154
2155 2006-09-12  Jim Meyering  <jim@meyering.net>
2156
2157         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
2158         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
2159         Reported by Nelson H. F. Beebe.
2160
2161 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
2162
2163         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
2164         program_invocation_name and program_invocation_short_name are
2165         initialized.
2166         * lib/argp-namefrob.h: Move declarations of program_invocation_name
2167         and program_invocation_short_name to argp.h, so they are visible
2168         to user programs.
2169         * lib/argp.h: Likewise
2170
2171 2006-09-10  Bruno Haible  <bruno@clisp.org>
2172
2173         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
2174         m4/inttypes_h.m4, m4/uintmax_t.m4.
2175
2176 2006-09-10  Bruno Haible  <bruno@clisp.org>
2177
2178         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
2179         gl_AC_TYPE_UINTMAX_T.
2180
2181 2006-09-10  Bruno Haible  <bruno@clisp.org>
2182
2183         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
2184
2185 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
2186
2187         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
2188         convention.  Text proposed by Bruno Haible.
2189         (struct argp_option): Document the use of N_() wrappers.
2190
2191         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
2192         '\v', and translate the two parts separately, instead of feeding
2193         the whole string to gettext.  This allows to exclude
2194         '\v' from the strings visible to the translator by writing doc
2195         strings as N_("..") "\v" N_("..").
2196
2197 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
2198
2199         * config/srclist.txt: Undo latest change; the bug was fixed.
2200
2201 2006-09-09  Bruno Haible  <bruno@clisp.org>
2202
2203         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
2204         assignments if building a library without libtool.
2205         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
2206         in func_emit_lib_Makefile_am.
2207         (func_import): When building a static library libfoo.a, arrange to
2208         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
2209         (func_create_testdir): Likewise.
2210         * modules/gc (configure.ac, Makefile.am): If building statically,
2211         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
2212         * modules/iconvme (configure.ac, Makefile.am): Likewise.
2213         * modules/striconv (configure.ac, Makefile.am): Likewise.
2214         Based on a suggestion by Ralf Wildenhues.
2215
2216 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2217
2218         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2219         Check for unistd.h too, since Autoconf doesn't assume POSIX.
2220         Also:
2221
2222         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2223         Add year_2050_test to catch glibc bug 2821
2224         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
2225
2226         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
2227         Prefer #ifdef to #if.
2228
2229         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
2230         Return from 'main' instead of calling 'exit'.
2231
2232 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2233
2234         * lib/mktime.c (guess_time_tm): Fix bug where mktime
2235         returned the maximum time_t value rather than (time_t) -1.
2236         Problem originally reported by William Bardwell
2237         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
2238
2239         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
2240         Moved to here ...
2241         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
2242         ... from here.
2243
2244 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2245
2246         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
2247         2821 is fixed.
2248
2249 2006-09-08  Jim Meyering  <jim@meyering.net>
2250
2251         Don't make generated files read-only.  That would bother too many
2252         people.  However, do retain the ability to work when targets are
2253         read-only: remove the destination and temporary files before writing
2254         them (when generated via sed or echo), or by using the -f option for
2255         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
2256         * modules/alloca-opt, modules/argz, modules/arpa_inet:
2257         * modules/byteswap, modules/configmake, modules/fcntl:
2258         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
2259         * modules/localcharset, modules/netinet_in, modules/poll:
2260         * modules/stdbool, modules/stdint, modules/sys_select:
2261         * modules/sys_socket, modules/sys_stat, modules/sysexits:
2262
2263 2006-09-08  Jim Meyering  <jim@meyering.net>
2264
2265         Avoid new build failure on FreeBSD 6.0.
2266         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
2267         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
2268         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
2269
2270 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2271
2272         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
2273
2274 2006-09-07  Jim Meyering  <jim@meyering.net>
2275
2276         Fix global typo in last change: use chmod u-w, not chmod u-x.
2277         Spotted by Paul Eggert and Bruce Korb.
2278         * modules/alloca-opt, modules/argz, modules/arpa_inet:
2279         * modules/byteswap, modules/configmake, modules/fcntl:
2280         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
2281         * modules/localcharset, modules/netinet_in, modules/poll:
2282         * modules/stdbool, modules/stdint, modules/sys_select:
2283         * modules/sys_socket, modules/sys_stat, modules/sysexits:
2284
2285 2006-09-06  Jim Meyering  <jim@meyering.net>
2286
2287         Make generated files be read-only.
2288         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
2289         Ensure that each generated file is now read-only.
2290         * modules/argz: Likewise.
2291         * modules/arpa_inet: Likewise.
2292         * modules/byteswap: Likewise.
2293         * modules/configmake: Likewise.
2294         * modules/fcntl: Likewise.
2295         * modules/fnmatch: Likewise.
2296         * modules/getopt: Likewise.
2297         * modules/glob: Likewise.
2298         * modules/inttypes: Likewise.
2299         * modules/netinet_in: Likewise.
2300         * modules/poll: Likewise.
2301         * modules/stdbool: Likewise.
2302         * modules/stdint: Likewise.
2303         * modules/sys_select: Likewise.
2304         * modules/sys_socket: Likewise.
2305         * modules/sys_stat: Likewise.
2306         * modules/sysexits: Likewise.
2307         * modules/localcharset: Same as above, but continue using temporary
2308         file named "t-$@" (why different?) rather than the "$@-t" used
2309         everywhere else.
2310
2311         * modules/sysexits (Makefile.am): Replace literal occurrences
2312         of "sysexit.h" more readable, and more consistent, "$@".
2313
2314 2006-09-06  Bruno Haible  <bruno@clisp.org>
2315
2316         * modules/striconv: New file.
2317         * modules/xstriconv: New file.
2318         * MODULES.html.sh (Internationalization functions): Add striconv,
2319         xstriconv.
2320
2321 2006-09-06  Bruno Haible  <bruno@clisp.org>
2322
2323         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
2324         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
2325         not using libtool correctly.
2326
2327 2006-09-06  Bruno Haible  <bruno@clisp.org>
2328
2329         * lib/striconv.h: New file.
2330         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
2331         iconvstring.c.
2332         * lib/xstriconv.h: New file.
2333         * lib/xstriconv.c: New file.
2334
2335 2006-09-06  Bruno Haible  <bruno@clisp.org>
2336
2337         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2338         lib_..._LDFLAGS.
2339
2340 2006-09-05  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2341
2342         * lib/argz_.h: Sync from Libtool.
2343
2344         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
2345                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2346
2347         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
2348
2349 2006-09-05  Davide Angelocola <davide.angelocola@tiscali.it>
2350
2351         * modules/trim: New file.
2352
2353 2006-09-05  Davide Angelocola <davide.angelocola@tiscali.it>
2354
2355         * lib/trim.h: New file.
2356         * lib/trim.c: New file.
2357
2358 2006-09-05  Bruno Haible  <bruno@clisp.org>
2359
2360         * MODULES.html.sh (String handling): Add trim.
2361
2362 2006-09-04  Karl Berry  <karl@gnu.org>
2363
2364         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
2365         until next release.
2366
2367 2006-09-03  Bruno Haible  <bruno@clisp.org>
2368
2369         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
2370         correctly.
2371
2372 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
2373
2374         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
2375         not gl_GETLOADAVG.  Omit unneeded semicolons.
2376         Problems reported by Ralf Wildenhues in
2377         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
2378         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
2379         at the end, which is the usual gnulib style.
2380
2381         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
2382         of doing all the work ourselves.
2383         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
2384         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
2385
2386 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
2387
2388         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
2389         Problem reported by Ralf Wildenhues in
2390         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
2391
2392         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
2393         HAVE_STRUCT_STATFS_F_FSTYPENAME.
2394
2395 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
2396
2397         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
2398         yesterday's patch by changing test -n to test -z.
2399
2400 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
2401
2402         * modules/getloadavg (Files): Add m4/getloadavg.m4.
2403         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
2404         the former is now obsolescent.
2405
2406         * modules/chdir-long (Depends-on): Add fcntl.
2407
2408 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
2409
2410         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
2411         obsolescent, and programs should use gnulib instead.
2412         * m4/getloadavg.m4: New file, with contents taken from Autoconf
2413         but with prefixes changed.
2414
2415 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
2416
2417         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
2418         or stdbool.h, because they might not exist while configuring.
2419
2420         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
2421         Don't include unistd.h or limits.h; not needed, since chdir-long.h
2422         does that for us.
2423         (O_DIRECTORY): Remove.
2424
2425 2006-08-31  Eric Blake  <ebb9@byu.net>
2426
2427         * gnulib-tool: Don't let emacs change spaces to TAB.
2428
2429 2006-08-31  Bruno Haible  <bruno@clisp.org>
2430
2431         * gnulib-tool: When calling func_import more than once, do it in a
2432         subshell.
2433         Reported by Eric Blake <ebb9@byu.net>.
2434
2435 2006-08-31  Bruno Haible  <bruno@clisp.org>
2436
2437         * gnulib-tool (nl): Remove variable.
2438         (sed_transform_lib_file): Use more robust test for config-h module.
2439         (func_import): Fix typo in 2006-08-25 patch.
2440
2441 2006-08-31  Bruno Haible  <bruno@clisp.org>
2442
2443         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
2444         specified, augment Makefile.am variables instead of assigning them.
2445
2446 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2447
2448         Work around a bug in both the Linux and SunOS 64-bit kernels:
2449         nanosleep mishandles sleeps for longer than 2**31 seconds.
2450         Problem reported by Frank v Waveren in
2451         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
2452         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
2453         Check for nanosleep bug.
2454         (LIB_NANOSLEEP): Append clock_gettime library if needed.
2455
2456 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2457
2458         Work around a bug in both the Linux and SunOS 64-bit kernels:
2459         nanosleep mishandles sleeps for longer than 2**31 seconds.
2460         Problem reported by Frank v Waveren in
2461         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
2462         * lib/nanosleep.c (BILLION): New constant.
2463         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
2464         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
2465         implementation.
2466
2467 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2468
2469         * modules/nanosleep (Depends-on): Add gettime.
2470
2471 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2472         and Simon Josefsson  <jas@extundo.com>
2473         and Oskar Liljeblad  <oskar@osk.mine.nu>
2474
2475         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
2476         * gnulib-tool (func_import): New license type 'unmodifiable license
2477         text'.
2478         * modules/fdl: Use it.  Longer description.
2479         * module/gpl, module/lgpl: New files.
2480
2481 2006-08-30  Jim Meyering  <jim@meyering.net>
2482
2483         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
2484         shadowing the parameter.
2485
2486 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2487
2488         Sync from Libtool:
2489
2490         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2491
2492         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
2493         sharing with gnulib.  Report by Eric Blake.
2494
2495 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2496
2497         * modules/isapipe: New file.
2498         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
2499
2500 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2501
2502         * modules/configmake (Makefile.am): Add a comment, and omit
2503         the CONFIGMAKE_ prefix from generated macro names.  Suggested
2504         by Bruno Haible.
2505
2506 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2507
2508         * m4/isapipe.m4: New file.
2509
2510 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2511
2512         * lib/isapipe.c, lib/isapipe.h: New files.
2513
2514 2006-08-29  Jim Meyering  <jim@meyering.net>
2515
2516         * modules/configmake (Makefile.am): Make configmake.h depend on
2517         Makefile.  Otherwise, a stale configmake.h could hang around.
2518
2519 2006-08-29  Eric Blake  <ebb9@byu.net>
2520
2521         * lib/error.c (error_at_line, print_errno_message): Match libc, after
2522         resolution of upstream bug 3044.
2523
2524 2006-08-29  Bruno Haible  <bruno@clisp.org>
2525
2526         * modules/localcharset (Depends-on): Add configmake.
2527         (Makefile.am): Remove setting of LIBDIR through DEFS.
2528
2529 2006-08-29  Bruno Haible  <bruno@clisp.org>
2530
2531         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
2532         defined.
2533
2534 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2535
2536         * modules/fcntl: New file.
2537         * modules/chdir-safer (Depends-on): Add fcntl.
2538         * modules/fts: Likewise.
2539         * modules/mkdir-p: Likewise.
2540
2541         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
2542         This undoes the most recent change, since we're now addressing the
2543         problem in a different way.
2544
2545         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
2546         into output, since the output might be called Makefile.am even
2547         if $makefile_name is something different.
2548         (func_import): Use $makefile_am rather than
2549         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
2550         empty.
2551
2552         * modules/inttypes (Files): Add m4/inttypes-h.m4.
2553
2554 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2555
2556         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
2557         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
2558         recent change to stdint.m4, since we're now addressing the problem in a
2559         different way.
2560
2561 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2562
2563         * m4/fcntl_h.m4: New file.
2564
2565 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2566
2567         * lib/fcntl_.h: New file.
2568         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
2569         the fcntl module.
2570         * lib/dirchownmod.c: Likewise.
2571         * lib/fts.c: Likewise.
2572
2573         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
2574         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
2575         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
2576         just before including <inttypes.h>, to avoid circular inclusion.
2577
2578 2006-08-28  Jim Meyering  <jim@meyering.net>
2579
2580         * doc/visibility.texi: Actually read and correct the grammar of the
2581         sentence affected by yesterday's change.
2582
2583 2006-08-28  Eric Blake  <ebb9@byu.net>
2584
2585         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
2586         needs wrapper.
2587
2588 2006-08-28  Eric Blake  <ebb9@byu.net>
2589
2590         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
2591
2592 2006-08-28  Eric Blake  <ebb9@byu.net>
2593
2594         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
2595
2596 2006-08-28  Bruno Haible  <bruno@clisp.org>
2597
2598         * modules/c-strstr: New file, from GNU gettext.
2599         * MODULES.html.sh (String handling): Add c-strstr.
2600
2601 2006-08-28  Bruno Haible  <bruno@clisp.org>
2602
2603         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
2604         macros.
2605         Reported by Eric Blake.
2606
2607 2006-08-28  Bruno Haible  <bruno@clisp.org>
2608
2609         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
2610         (VASNPRINTF): Return a string of length > INT_MAX without failing.
2611         * lib/vasprintf.c: Include errno.h, limits.h.
2612         (EOVERFLOW): New fallback definition.
2613         (vasprintf): Test here whether the string length is > INT_MAX.
2614         * lib/vsnprintf.c: Include errno.h, limits.h.
2615         (EOVERFLOW): New fallback definition.
2616         (vsnprintf): Fix bug when generated string was too long for the buffer.
2617         Test here whether the string length is > INT_MAX.
2618
2619 2006-08-28  Bruno Haible  <bruno@clisp.org>
2620
2621         * lib/inttypes_.h (SCNX*): Remove definitions.
2622         Reported by Eric Blake.
2623
2624 2006-08-28  Bruno Haible  <bruno@clisp.org>
2625
2626         * lib/c-strstr.h: New file, from GNU gettext.
2627         * lib/c-strstr.c: New file, from GNU gettext.
2628
2629 2006-08-28  Bruno Haible  <bruno@clisp.org>
2630
2631         * gnulib-tool: Reorder some statements.
2632
2633 2006-08-28  Bruno Haible  <bruno@clisp.org>
2634
2635         * gnulib-tool: New option --makefile-name.
2636         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
2637         $makefile_name.
2638         (func_import): Write $makefile_name to the cache file, and read it from
2639         there unless explicitly specified. Use $makefile_name as file name
2640         instead of Makefile.am. Adjust the recommendations accordingly.
2641
2642 2006-08-28  Bruno Haible  <bruno@clisp.org>
2643
2644         * gnulib-tool (func_verify_module): Check against misapplying patch.
2645
2646 2006-08-28  Bruno Haible  <bruno@clisp.org>
2647
2648         * gnulib-tool (func_relativize, func_relconcat): New functions.
2649         Give an error if --local-dir is given with --update.
2650         Remove trailing slashes from $local_gnulib_dir.
2651         (func_import): Store the relativized $local_gnulib_dir in
2652         gnulib-cache.m4, and read it from there if not specified explicitly.
2653
2654 2006-08-28  Bruno Haible  <bruno@clisp.org>
2655
2656         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
2657         is the current directory. Respect also $local_gnulib_dir.
2658
2659 2006-08-28  Bruno Haible  <bruno@clisp.org>
2660             Simon Josefsson  <jas@extundo.com>
2661
2662         BeOS portability.
2663         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
2664
2665 2006-08-27  Jim Meyering  <jim@meyering.net>
2666
2667         * doc/visibility.texi: Remove duplicate word: "pointer".
2668
2669 2006-08-26  Bruno Haible  <bruno@clisp.org>
2670
2671         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
2672         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
2673         (Makefile.am): Create inttypes.h from inttypes_.h.
2674         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
2675
2676         * modules/imaxabs: New file.
2677
2678         * modules/imaxdiv: New file.
2679
2680 2006-08-26  Bruno Haible  <bruno@clisp.org>
2681
2682         * m4/inttypes.m4: New file.
2683         * m4/_inttypes_h.m4: Remove file.
2684         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
2685         PRI_MACROS_BROKEN.
2686         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
2687
2688         * m4/imaxabs.m4: New file.
2689
2690         * m4/imaxdiv.m4: New file.
2691
2692 2006-08-26  Bruno Haible  <bruno@clisp.org>
2693
2694         * lib/inttypes_.h: New file.
2695         * lib/inttypes.h: Remove file.
2696         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
2697
2698         * lib/imaxabs.c: New file.
2699
2700         * lib/imaxdiv.c: New file.
2701
2702 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
2703
2704         New config-h module, so that "make" output needn't be cluttered
2705         by -DHAVE_CONFIG_H.
2706         * MODULES.html.sh (Support for building libraries and executables):
2707         Add config-h.
2708         * modules/config-h: New file.
2709         * gnulib-tool (nl, sed_transform_lib_file): New vars.
2710         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
2711         the config-h module is used.
2712
2713         New configmake module, so that "make" output needn't be cluttered
2714         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
2715         * MODULES.html.sh (Support for building libraries and executables):
2716         Add configmake.
2717         * modules/configmake: New file.
2718
2719 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
2720
2721         * m4/config-h.m4: New file.
2722
2723 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
2724
2725         * config/srclist.txt: Add elisp-comp.
2726
2727 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
2728
2729         * MODULES.html.sh (Support for building libraries and executables):
2730         Add elisp-comp.
2731         * build-aux/elisp-comp: New file.
2732         * modules/elisp-comp: New file.
2733
2734 2006-08-24  Bruno Haible <bruno@clisp.org>
2735
2736         * gnulib-tool (func_create_testdir): Use non-default values of
2737         sourcebase and m4base.
2738
2739 2006-08-24  Bruno Haible <bruno@clisp.org>
2740
2741         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
2742         HTML structure.
2743
2744 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
2745
2746         * modules/openat (Depends-on): Add lchown.
2747
2748 2006-08-23  Bruno Haible <bruno@clisp.org>
2749
2750         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
2751         of gl_LOCK_EARLY instead of gl_LOCK.
2752
2753 2006-08-23  Bruno Haible  <bruno@clisp.org>
2754
2755         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
2756         on OSF/1 to no.
2757         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
2758
2759 2006-08-23  Bruno Haible  <bruno@clisp.org>
2760
2761         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
2762         as unusable.
2763
2764         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
2765         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
2766         (gl_LOCK): New macro.
2767
2768 2006-08-22  Simon Josefsson  <jas@extundo.com>
2769
2770         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
2771         to md5 module.
2772
2773 2006-08-22  Simon Josefsson  <jas@extundo.com>
2774
2775         * MODULES.html.sh: Add "Support for maintaining and release
2776         projects".
2777
2778         * build-aux/gnupload: New file, from coreutils.
2779
2780 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2781
2782         Avoid the need for AC_LIBSOURCES in m4 macros.
2783         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
2784         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
2785         * modules/check-version (EXTRA_DIST): Add check-version.h.
2786         * modules/crc (EXTRA_DIST): Add crc.h.
2787         * modules/des (EXTRA_DIST): Add des.h.
2788         * modules/gc (EXTRA_DIST): Add gc.h.
2789         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
2790         * modules/getline (EXTRA_DIST): Add getline.h.
2791         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
2792         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
2793         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
2794         * modules/md2 (EXTRA_DIST): Add md2.h.
2795         * modules/md4 (EXTRA_DIST): Add md4.h.
2796         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
2797         * modules/read-file (EXTRA_DIST): Add read-file.h.
2798         * modules/readline (EXTRA_DIST): Add readline.h.
2799         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
2800         rijndael-api-fst.h.
2801
2802 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2803
2804         * m4/rijndael.m4 (gl_ARCFOUR):
2805         * m4/arctwo.m4 (gl_ARCTWO):
2806         * m4/check-version.m4 (gl_CHECK_VERSION):
2807         * m4/crc.m4 (gl_CRC):
2808         * m4/des.m4 (gl_DES):
2809         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
2810         * m4/gc.m4 (gl_GC):
2811         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
2812         * m4/getline.m4 (gl_FUNC_GETLINE):
2813         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
2814         * m4/hmac-md5.m4 (gl_HMAC_MD5):
2815         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
2816         * m4/md2.m4 (gl_MD2):
2817         * m4/md4.m4 (gl_MD4):
2818         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
2819         * m4/read-file.m4 (gl_FUNC_READ_FILE):
2820         * m4/readline.m4 (gl_FUNC_READLINE):
2821         * m4/rijndael.m4 (gl_RIJNDAEL):
2822         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
2823         to get the necessary .h files and whatnot.
2824
2825 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2826
2827         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
2828         gnulib rather than the other way around.
2829         * config/srclistvars.sh (COREUTILS): Remove.
2830
2831 2006-08-22  Jim Meyering  <jim@meyering.net>
2832
2833         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
2834
2835         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
2836
2837 2006-08-22  Eric Blake  <ebb9@byu.net>
2838
2839         * modules/regexprops-generic: New file.
2840         * MODULES.html.sh (Support for building documentation): List it.
2841
2842 2006-08-22  Eric Blake  <ebb9@byu.net>
2843
2844         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
2845         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
2846         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
2847         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
2848
2849 2006-08-22  Bruno Haible <bruno@clisp.org>
2850
2851         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
2852         and lib_LTLIBRARIES like the other lib_* variables.
2853
2854 2006-08-22  Bruno Haible <bruno@clisp.org>
2855
2856         * build-aux/x-to-1.in: New file, from GNU gettext.
2857
2858 2006-08-22  Bruno Haible  <bruno@clisp.org>
2859
2860         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
2861         <utmpx.h> exists.
2862
2863 2006-08-22  Bruno Haible  <bruno@clisp.org>
2864
2865         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
2866         <utmpx.h> exists.
2867
2868 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2869
2870         BeOS portability.
2871         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
2872         exist.
2873         Problem reported by Bruno Haible.
2874
2875 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2876
2877         Avoid the need for AC_LIBSOURCES in m4 macros.
2878         * modules/acl (EXTRA_DIST): Add acl.h.
2879         * modules/argmatch (Files): Add m4/argmatch.m4.
2880         (configure.ac): Add gl_ARGMATCH.
2881         (EXTRA_DIST): Renamed from lib_SOURCES, for
2882         consistency with the other modules.  Remove argmatch.c.
2883         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
2884         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
2885         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
2886         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
2887         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
2888         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
2889         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
2890         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
2891         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
2892         * modules/closeout (EXTRA_DIST): Add closeout.h.
2893         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
2894         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
2895         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
2896         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
2897         dirname.h; remove basename.c and stripslash.c.
2898         * modules/exclude (EXTRA_DIST): Add exclude.h.
2899         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
2900         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
2901         * modules/file-type (EXTRA_DIST): Add file-type.h.
2902         * modules/filemode (EXTRA_DIST): Add filemode.h.
2903         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
2904         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
2905         * modules/fpending (EXTRA_DIST): Add __fpending.h.
2906         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
2907         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
2908         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
2909         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
2910         * modules/getdate (EXTRA_DIST): Add getdate.c.
2911         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
2912         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
2913         * modules/getpass (EXTRA_DIST): Add getpass.h.
2914         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
2915         * modules/group-member (EXTRA_DIST): Add group-member.h.
2916         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
2917         * modules/hash (EXTRA_DIST): Add hash.h.
2918         * modules/human (EXTRA_DIST): Add human.h.
2919         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
2920         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
2921         * modules/lchown (EXTRA_DIST): Add lchown.h.
2922         * modules/long-options (EXTRA_DIST): Add long-options.h.
2923         * modules/lstat (EXTRA_DIST): Add lstat.h.
2924         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
2925         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
2926         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
2927         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
2928         * modules/memxor (EXTRA_DIST): Add memxor.h.
2929         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
2930         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
2931         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
2932         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
2933         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
2934         * modules/physmem (EXTRA_DIST): Add physmem.h.
2935         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
2936         * modules/posixver (EXTRA_DIST): Add posixver.h.
2937         * modules/quote (EXTRA_DIST): Add quote.h.
2938         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
2939         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
2940         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
2941         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
2942         regex_internal.h regexec.c.
2943         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
2944         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
2945         * modules/same (EXTRA_DIST): Add same.h.
2946         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
2947         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
2948         * modules/savedir (EXTRA_DIST): Add savedir.h.
2949         * modules/sha1 (EXTRA_DIST): Add sha1.h.
2950         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
2951         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
2952         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
2953         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
2954         * modules/strdup (EXTRA_DIST): Add strdup.h.
2955         * modules/strftime (EXTRA_DIST): Add strftime.h.
2956         * modules/strndup (EXTRA_DIST): Add strndup.h.
2957         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
2958         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
2959         * modules/time_r (EXTRA_DIST): Add time_r.h.
2960         * modules/timespec (EXTRA_DIST): Add timespec.h.
2961         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
2962         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
2963         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
2964         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
2965         * modules/userspec (EXTRA_DIST): Add userspec.h.
2966         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
2967         * modules/utimens (EXTRA_DIST): Add utimens.h.
2968         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
2969         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
2970         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
2971         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
2972         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
2973         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
2974         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
2975         * modules/yesno (EXTRA_DIST): Add yesno.h.
2976
2977 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2978
2979         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
2980
2981         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
2982         * m4/dev-ino.m4, same-inode.m4: Remove.
2983
2984         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
2985         * m4/acl.m4 (AC_FUNC_ACL):
2986         * m4/backupfile.m4 (gl_BACKUPFILE):
2987         * m4/c-strtod.m4 (gl_C99_STRTOLD):
2988         * m4/canon-host.m4 (gl_CANON_HOST):
2989         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2990         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
2991         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
2992         * m4/cloexec.m4 (gl_CLOEXEC):
2993         * m4/close-stream.m4 (gl_CLOSE_STREAM):
2994         * m4/closeout.m4 (gl_CLOSEOUT):
2995         * m4/dirfd.m4 (gl_FUNC_DIRFD):
2996         * m4/dirname.m4 (gl_DIRNAME):
2997         * m4/exclude.m4 (gl_EXCLUDE):
2998         * m4/exitfail.m4 (gl_EXITFAIL):
2999         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
3000         * m4/file-type.m4 (gl_FILE_TYPE):
3001         * m4/filemode.m4 (gl_FILEMODE):
3002         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
3003         * m4/fpending.m4 (gl_FUNC_FPENDING):
3004         * m4/fprintftime.m4 (gl_FPRINTFTIME):
3005         * m4/fts.m4 (gl_FUNC_FTS):
3006         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
3007         * m4/getdate.m4 (gl_GETDATE):
3008         * m4/gethrxtime.m4 (gl_GETHRXTIME):
3009         * m4/getpagesize.m4 (gl_GETPAGESIZE):
3010         * m4/getpass.m4 (gl_FUNC_GETPASS):
3011         * m4/gettime.m4 (gl_GETTIME):
3012         * m4/getugroups.m4 (gl_GETUGROUPS):
3013         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
3014         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
3015         * m4/hard-locale.m4 (gl_HARD_LOCALE):
3016         * m4/hash.m4 (gl_HASH):
3017         * m4/idcache.m4 (gl_IDCACHE):
3018         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
3019         * m4/lchown.m4 (gl_FUNC_LCHOWN):
3020         * m4/long-options.m4 (gl_LONG_OPTIONS):
3021         * m4/lstat.m4 (gl_FUNC_LSTAT):
3022         * m4/md5.m4 (gl_MD5):
3023         * m4/memcasecmp.m4 (gl_MEMCASECMP):
3024         * m4/memcoll.m4 (gl_MEMCOLL):
3025         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
3026         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
3027         * m4/memxor.m4 (gl_MEMXOR):
3028         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
3029         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
3030         * m4/modechange.m4 (gl_MODECHANGE):
3031         * m4/mountlist.m4 (gl_MOUNTLIST):
3032         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3033         * m4/openat.m4 (gl_FUNC_OPENAT):
3034         * m4/pathmax.m4 (gl_PATHMAX):
3035         * m4/physmem.m4 (gl_PHYSMEM):
3036         * m4/posixtm.m4 (gl_POSIXTM):
3037         * m4/posixver.m4 (gl_POSIXVER):
3038         * m4/quote.m4 (gl_QUOTE):
3039         * m4/quotearg.m4 (gl_QUOTEARG):
3040         * m4/readtokens.m4 (gl_READTOKENS):
3041         * m4/readutmp.m4 (gl_READUTMP):
3042         * m4/regex.m4 (gl_REGEX):
3043         * m4/safe-read.m4 (gl_SAFE_READ):
3044         * m4/safe-write.m4 (gl_SAFE_WRITE):
3045         * m4/same.m4 (gl_SAME):
3046         * m4/save-cwd.m4 (gl_SAVE_CWD):
3047         * m4/savedir.m4 (gl_SAVEDIR):
3048         * m4/settime.m4 (gl_SETTIME):
3049         * m4/sha1.m4 (gl_SHA1):
3050         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
3051         * m4/stat-macros.m4 (gl_STAT_MACROS):
3052         * m4/stat-time.m4 (gl_STAT_TIME):
3053         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
3054         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
3055         * m4/strdup.m4 (gl_FUNC_STRDUP):
3056         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
3057         * m4/strndup.m4 (gl_FUNC_STRNDUP):
3058         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
3059         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
3060         * m4/time_r.m4 (gl_TIME_R):
3061         * m4/timespec.m4 (gl_TIMESPEC):
3062         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
3063         * m4/unlinkdir.m4 (gl_UNLINKDIR):
3064         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
3065         * m4/userspec.m4 (gl_USERSPEC):
3066         * m4/utimecmp.m4 (gl_UTIMECMP):
3067         * m4/utimens.m4 (gl_UTIMENS):
3068         * m4/xalloc.m4 (gl_XALLOC):
3069         * m4/xgetcwd.m4 (gl_XGETCWD):
3070         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
3071         * m4/xreadlink.m4 (gl_XREADLINK):
3072         * m4/xstrtod.m4 (gl_XSTRTOD):
3073         * m4/yesno.m4 (gl_YESNO):
3074         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3075         to get the necessary .h files and whatnot.
3076
3077 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
3078             Bruno Haible <bruno@clisp.org>
3079
3080         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
3081         /bin/sh understanding of '!' conditional negation.
3082
3083 2006-08-21  Jim Meyering  <jim@meyering.net>
3084
3085         * modules/openat (Depends-on): Really alphabetize.
3086
3087         * modules/acl (Depends-on): Add error and quote.
3088
3089         * check-module (find_included_lib_files): Add at-func.c to the
3090         ok-to-include-more-than-once white list.
3091
3092         * modules/openat (Depends-on): Add lstat.  Alphabetize.
3093
3094 2006-08-21  Bruno Haible <bruno@clisp.org>
3095
3096         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3097         Emit a pkgdata_DATA variable only if some snippets add contents to it.
3098         Reported by Martin Lambers <marlam@marlam.de>.
3099
3100 2006-08-21  Bruno Haible <bruno@clisp.org>
3101
3102         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
3103         specify an installation location, don't emit a noinst_LIBRARIES or
3104         noinst_LTLIBRARIES assignment.
3105
3106 2006-08-21  Bruno Haible  <bruno@clisp.org>
3107
3108         BeOS portability.
3109         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
3110         BeOS has mbrtowc() but no <wctype.h>.
3111
3112 2006-08-21  Bruno Haible  <bruno@clisp.org>
3113
3114         BeOS portability.
3115         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
3116         exist.
3117
3118 2006-08-21  Bruno Haible  <bruno@clisp.org>
3119
3120         BeOS portability.
3121         * lib/mbchar.h: Include <wctype.h> only if it exists.
3122
3123 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3124
3125         Remove files that are no longer needed by their respective modules.
3126         * m4/obstack.m4: Remove.
3127         * m4/strerror_r.m4: Remove.
3128         * m4/uint32_t.m4: Remove.
3129         * m4/uintptr_t.m4: Remove.
3130         * m4/ullong_max.m4: Remove.
3131         * m4/xstrtoimax.m4: Remove.
3132         * m4/xstrtoumax.m4: Remove.
3133
3134         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
3135         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
3136         dependencies now capture this.
3137
3138         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
3139         Do not use AC_LIBSOURCES, since gnulib modules now do this.
3140         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
3141         * m4/human.m4 (gl_HUMAN): Likewise.
3142         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
3143         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
3144
3145         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
3146
3147         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
3148         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
3149         stdint.
3150         * m4/human.m4 (gl_HUMAN): Likewise.
3151         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
3152         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
3153         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3154         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3155         * m4/xstrtol (gl_XSTRTOL): Likewise.
3156
3157         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
3158         AC_TYPE_LONG_LONG_INT.
3159         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3160         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
3161         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
3162         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3163
3164         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
3165         on stdbool.
3166
3167         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
3168         (gl_PREREQ_XSTRTOUL): Remove.
3169
3170         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
3171
3172         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
3173         mode.
3174
3175 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3176
3177         Add and change modules to make it easier for coreutils to use
3178         gnulib-tool.
3179         * modules/backupfile (Files): Remove m4/d-ino.m4.
3180         (Depends-on): Add d-ino.
3181         * modules/cycle-check (Depends-on): Add stdint.
3182         (lib_SOURCES): Add cycle-check.h.
3183         * modules/d-ino: New module.
3184         * modules/d-type: New module.
3185         * modules/error (Files): Remove m4/strerror_r.m4.
3186         * modules/filemode (Files): Add m4/st_dm_mode.m4.
3187         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3188         m4/inttypes_h.m4, m4/uintmax_t.m4.
3189         (Depends-on): Add stdint.
3190         (lib_SOURCES): Add fsusage.h.
3191         * modules/getcwd (Files): Remove d-ino.m4.
3192         (Depends-on): Add d-ino.
3193         * modules/getndelim2 (Depends-on): Add stdint.
3194         * modules/glob (Files): Remove m4/d-type.m4.
3195         (Depends-on): Add d-type.
3196         * modules/host-os: New module.
3197         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
3198         m4/inttypes_h.m4, m4/uintmax_t.m4.
3199         * Depends-on: Add stdint.
3200         (lib_SOURCES): Add human.h.
3201         * modules/inttostr (Files): Remove m4/intmax_t.m4,
3202         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
3203         m4/uintmax_t.m4, m4/ulonglong.m4.
3204         (Depends-on): Add stdint.
3205         (EXTRA_DIST): Add inttostr.h.
3206         * modules/lchmod: New module.
3207         * modules/link-follow: New module.
3208         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
3209         (Depends-on): Add lchmod.
3210         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
3211         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
3212         (Depends-on): Add stdint.
3213         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
3214         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3215         (Depends-on): Add stdint.
3216         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
3217         * modules/perl: New module.
3218         * modules/regex (Depends-on): Add stdint.
3219         * modules/rmdir-errno: New module.
3220         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
3221         m4/intmax_t.m4.
3222         (Depends-on): Add stdint.
3223         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
3224         m4/uintmax_t.m4.
3225         (Depends-on): Add stdint.
3226         * modules/unlink-busy: New module.
3227         * modules/utimecmp (Depends-on): Add stdint.
3228         * modules/uptime: New module.
3229         * modules/winsz-ioctl: New module.
3230         * modules/winsz-termios: New module.
3231         * modules/xnanosleep (Depends-on): Add nanosleep.
3232         * modules/ullong_max: Remove.
3233         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
3234         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
3235         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
3236         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
3237         (Depends-on): Add inttypes.
3238         (lib_SOURCES): Add xstrtol.h.
3239         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
3240         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
3241         * MODULES.html.sh: Move 'assert' into the assert section.
3242         Move 'dummy' into the linking section.
3243         Remove ullong_max.
3244         Add section for compatibility checks for POSIX:2001 functions,
3245         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
3246         winsz-ioctl, and winsz-termios into it.
3247         Add lchmod.
3248         Add top-level Misc section and put host-os, perl, and uptime
3249         into it.
3250
3251 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3252
3253         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
3254         now assume the stdint module.  Do not include inttypes.h.
3255         * lib/fsusage.h: Likewise.
3256         * lib/getndelim2.c: Likewise.
3257         * lib/human.h: Likewise.
3258         * lib/inttostr.h: Likewise.
3259         * lib/obstack.c: Likewise.
3260         * lib/regex_internal.h: Likewise.
3261         * lib/tempname.c: Likewise.
3262         * lib/utimecmp.c: Likewise.
3263         * lib/xstrtol.h: Likewise.
3264
3265         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
3266
3267         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
3268         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
3269         * lib/xtime.h: Likewise.
3270
3271 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
3272
3273         * modules/openat (Files): Add lib/fchmodat.c.
3274         Fixes problem reported by Jay Youngman.
3275
3276 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
3277
3278         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
3279         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
3280
3281 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
3282             Bruno Haible  <bruno@clisp.org>
3283
3284         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3285         and is a script that invokes bison. Tighten the code. Add comments.
3286
3287 2006-08-18  Jim Meyering  <jim@meyering.net>
3288
3289         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
3290         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
3291         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
3292         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
3293
3294 2006-08-18  Bruno Haible  <bruno@clisp.org>
3295
3296         * modules/bison-i18n: New file.
3297         * MODULES.html.sh (Internationalization functions): Add it.
3298
3299 2006-08-18  Bruno Haible  <bruno@clisp.org>
3300
3301         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
3302         sys/statvfs.h. When getmntinfo was found, check its declaration and
3303         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
3304
3305 2006-08-18  Bruno Haible  <bruno@clisp.org>
3306
3307         * m4/bison-i18n.m4: New file, from bison.
3308
3309 2006-08-18  Bruno Haible  <bruno@clisp.org>
3310
3311         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
3312         (ME_DUMMY): Treat "kernfs" as a dummy.
3313         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
3314
3315 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
3316
3317         Update from coreutils.
3318
3319         2006-08-15  Jim Meyering  <jim@meyering.net>
3320
3321         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
3322
3323         2006-01-17  Jim Meyering  <jim@meyering.net>
3324
3325         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
3326
3327         2006-01-11  Jim Meyering  <jim@meyering.net>
3328
3329         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
3330         Check for the lchmod function.
3331
3332 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
3333
3334         Update from coreutils.
3335
3336         * lib/__fpending.h: Add copyright notice.
3337         * lib/fprintftime.h: Likewise.
3338         * lib/savedir.c: Use (C) in copyright notice.
3339         * lib/savedir.h: Likewise.
3340
3341         2006-08-15  Jim Meyering  <jim@meyering.net>
3342
3343         * lib/at-func.c: New file, with the logic of all emulated at-functions.
3344         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
3345         in support of the EXPECTED_ERRNO macro.
3346         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
3347         definitions.  Instead, define the appropriate symbols and include
3348         "at-func.c".
3349         * lib/mkdirat.c (mkdirat): Likewise.
3350         * lib/fchmodat.c (fchmodat): Likewise.
3351         (ENOSYS): Remove definition.
3352         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
3353         it.  Don't include "unistd--.h" -- it wasn't ever used.
3354
3355         2006-01-17  Jim Meyering  <jim@meyering.net>
3356
3357         Rewrite fts.c not to change the current working directory,
3358         by using openat, fstatat, fdopendir, etc..
3359
3360         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
3361         (HAVE_OPENAT_SUPPORT): Define.
3362         [_LIBC] (fchdir): Don't undef or define; no longer used.
3363         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
3364         Now, this `function' always succeeds, and consumes its file descriptor
3365         parameter -- so callers must not close such FDs.  Update callers.
3366         (diropen_fd, opendirat, cwd_advance_fd): New functions.
3367         (diropen): Add parameter, SP.  Adjust all callers.
3368         Implement using diropen_fd, rather than open.
3369         (fts_open): Initialize new member, fts_cwd_fd.
3370         Remove fts_rft-setting code.
3371         (fts_close): Close fts_cwd_fd, if necessary.
3372         (__opendir2): Define in terms of opendir or opendirat,
3373         depending on whether the FST_NOCHDIR flag is set.
3374         (fts_build): Since fts_safe_changedir consumes its FD, and since
3375         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
3376         and close the dup'd file descriptor upon failure.
3377         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
3378         (fts_safe_changedir): Tweak semantics to reflect that this function
3379         now calls cwd_advance_fd and hence consumes its FD argument.
3380         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
3381         [struct FTS] (fts_rft): Remove now-unused member.
3382         [struct FTS] (fts_cycle.state): Improve comment.
3383
3384         * lib/openat.c (openat_needs_fchdir): New function.
3385         * lib/openat.h (openat_needs_fchdir): Declare it.
3386
3387 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
3388
3389         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
3390         Problem and fix reported by Pádraig Brady in
3391         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
3392
3393 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3394
3395         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
3396
3397 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3398
3399         * lib/memcoll.c (memcoll): Optimize for the common case where the
3400         arguments are bytewise equal.
3401
3402 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3403
3404         * doc/regexprops-generic.texi: Add a copyright notice.
3405
3406 2006-08-15  Bruno Haible  <bruno@clisp.org>
3407
3408         * modules/tmpdir (License): Change to LGPL.
3409
3410 2006-08-15  Bruno Haible  <bruno@clisp.org>
3411
3412         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
3413         module.
3414
3415 2006-08-14  Simon Josefsson  <jas@extundo.com>
3416
3417         * config/srclist.txt: Add gnupload.
3418
3419 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3420
3421         Change copyright notice from LGPL 2 to GPL 2, since that's the
3422         standard form used in the gnulib repository.
3423         * tests/test-lock.c: Likewise.
3424         * tests/test-stdint.c: Likewise.
3425         * tests/test-tls.c: Likewise.
3426
3427         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
3428         prelude-manager.  User shorter URLs for GNU projects, without '?'.
3429         Add copyright notice.
3430
3431         * check-module: Add copyright notice.  Output a copyright
3432         notice if "--version" is specified.
3433         * modules/COPYING: New file.
3434         * tests/test-getaddrinfo.c: Add copyright notice.
3435         * tests/test-verify.c: Likewise.
3436
3437 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3438
3439         Change copyright notice from LGPL 2 to GPL 2, since that's the
3440         standard form used in the gnulib repository.
3441         * lib/lock.c: LGPL -> GPL.
3442         * lib/lock.h: Likewise.
3443         * lib/strnlen1.c: Likewise.
3444         * lib/strnlen1.h: Likewise.
3445         * lib/tls.c: Likewise.
3446         * lib/tls.h: Likewise.
3447         * lib/tmpdir.c: Likewise.
3448
3449         * lib/TODO: Remove; this belongs only in coreutils.
3450
3451 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3452
3453         Add copyright notices to long-enough files that lack them, since
3454         otherwise the files aren't clearly free.  Use the same notice that
3455         getdate.texi already uses.
3456         * doc/alloca-opt.texi: Add copyright notice.
3457         * doc/alloca.texi: Likewise.
3458         * doc/ctime.texi: Likewise.
3459         * doc/functions.texi: Likewise.
3460         * doc/gcd.texi: Likewise.
3461         * doc/gnulib-tool.texi: Likewise.
3462         * doc/inet_ntoa.texi: Likewise.
3463         * doc/visibility.texi: Likewise.
3464
3465         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
3466         * doc/quote.texi: Add copyright notice.
3467
3468         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
3469         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
3470         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
3471         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
3472         is now obsolete, and give a pointer to the Sun list.
3473         Add copyright notice.
3474
3475 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3476
3477         * config/srclistvars.sh: Add copyright notice.
3478
3479 2006-08-14  Eric Blake  <ebb9@byu.net>
3480
3481         Import the following change from libc:
3482
3483         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
3484
3485         Upstream bug 2997.
3486         * lib/misc/error.c: Add space between program name and message if file
3487         name is missing.
3488
3489 2006-08-12  Karl Berry  <karl@gnu.org>
3490
3491         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
3492         remove, these originate in gnulib now.
3493
3494 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3495
3496         * doc/Makefile (standards.info standards.html standards.dvi):
3497         Also depend on make-stds.texi.
3498
3499 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
3500
3501         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
3502         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
3503
3504         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
3505         in wchar_t.  Problem reported by Eric Blake.
3506
3507         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
3508         LEN is smaller than SIZE.  Suggested by Bruno Haible.
3509         Also, help the compiler to keep LEN in a register.
3510
3511 2006-08-11  Eric Blake  <ebb9@byu.net>
3512
3513         * users.txt: Sort.  Add tar.
3514
3515 2006-08-11  Bruno Haible  <bruno@clisp.org>
3516
3517         * users.txt: New file.
3518
3519 2006-08-11  Bruno Haible  <bruno@clisp.org>
3520
3521         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
3522         before <wchar.h>. Needed for OSF/1 and BSD/OS.
3523
3524 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
3525
3526         * modules/snprintf (Depends-on): Remove minmax.
3527         (Maintainer): Add self and Bruno.
3528
3529 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
3530
3531         * lib/.cppi-disable: Add snprintf.h, socket_.h.
3532         * lib/snprintf.c: Include <errno.h> and <limits.h>.
3533         (EOVERFLOW): Define if the system does not.
3534         Do not include "minmax.h"; it wasn't used.
3535         (snprintf): Don't assume size_t promotes to an unsigned type.
3536         Fix bug when generated string was too long for the buffer: the
3537         buffer's contents are supposed to be the initial prefix of the
3538         output.  Don't assume vasnprintf returns EOVERFLOW if the size
3539         exceeds INT_MAX; do the check ourselves.
3540
3541         Import the following changes from libc:
3542
3543         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
3544
3545         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
3546         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
3547         set wc to the byte which couldn't be converted.
3548         (re_string_reconstruct): Don't clear valid_raw_len before calling
3549         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
3550         tip_context using re_string_context_at.
3551
3552         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
3553
3554         * lib/posix/regex.h: g++ still cannot handled [restrict].
3555
3556         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
3557
3558         * lib/posix/regex.h: Remove special handling for VMS.
3559
3560 2006-08-10  Jim Meyering  <jim@meyering.net>
3561
3562         * modules/same-inode: New module.
3563         * modules/dev-ino: New module.
3564         * modules/cycle-check: Depend on these modules, rather than simply
3565         including their .h files.
3566         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
3567         required via m4/cycle-check.m4.
3568         * modules/same: Depend on new same-inode module, rather than
3569         including same-inode.h.
3570         * modules/chdir-safer: New file.
3571
3572         * modules/chown (Depends-on): Add stat-macros.
3573
3574 2006-08-10  Jim Meyering  <jim@meyering.net>
3575
3576         * m4/cycle-check.m4: New file.
3577         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
3578         * m4/dev-ino.m4, m4/same-inode.m4: New files.
3579
3580 2006-08-10  Eric Blake  <ebb9@byu.net>
3581
3582         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
3583         in from original proposal.
3584
3585 2006-08-10  Eric Blake  <ebb9@byu.net>
3586         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3587
3588         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
3589         namespace.
3590
3591 2006-08-10  Bruno Haible  <bruno@clisp.org>
3592
3593         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
3594         as well.
3595
3596 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3597
3598         Sync from coreutils.
3599
3600         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
3601
3602         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
3603         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
3604
3605 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3606
3607         * modules/restrict: Remove; no longer needed now that we assume
3608         Autoconf 2.59 or later.
3609         * MODULES.html.sh: Remove 'restrict'.
3610         * modules/argp (Depends-on): Remove 'restrict'.
3611         * modules/base64 (Depends-on): Likewise.
3612         * modules/gc (Depends-on): Likewise.
3613         * modules/getaddrinfo (Depends-on): Likewise.
3614         * modules/glob (Depends-on): Likewise.
3615         * modules/inet_ntop (Depends-on): Likewise.
3616         * modules/inet_pton (Depends-on): Likewise.
3617         * modules/memxor (Depends-on): Likewise.
3618         * modules/regex (Depends-on): Likewise.
3619         * modules/strtok_r (Depends-on): Likewise.
3620         * modules/time_r (Depends-on): Likewise.
3621
3622 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3623
3624         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
3625         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
3626         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
3627         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
3628         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
3629         * m4/memxor.m4 (gl_MEMXOR): Likewise.
3630         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
3631         gl_C_RESTRICT replaced by AC_C_RESTRICT.
3632
3633         Merge from coreutils.
3634         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
3635         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
3636         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
3637         * m4/time_r.m4 (gl_TIME_R): Likewise.
3638
3639 2006-08-09  Karl Berry  <karl@gnu.org>
3640
3641         * config/srclist.txt: no more gettext-tools, per Bruno.
3642
3643 2006-08-08  Eric Blake  <ebb9@byu.net>
3644
3645         * modules/verror: New module.
3646         * MODULES.html.sh: Document it.
3647
3648 2006-08-08  Eric Blake  <ebb9@byu.net>
3649
3650         * lib/verror.h, lib/verror.c: New files.
3651
3652 2006-08-08  Eric Blake  <ebb9@byu.net>
3653
3654         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
3655         verror_at_line output complies with GNU Coding Standards even when
3656         file is NULL.
3657
3658 2006-08-07  Bruno Haible  <bruno@clisp.org>
3659
3660         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
3661         versions of AIX.
3662         Reported by Ralf Wildenhues.
3663
3664 2006-08-07  Bruno Haible  <bruno@clisp.org>
3665
3666         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
3667         in an AC_DEFUN. Needed so that the autoconf snippets can use
3668         AC_REQUIRE.
3669
3670 2006-08-06  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3671
3672         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3673         Initialize pkgdata_DATA.
3674         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
3675         overriding it.
3676
3677 2006-08-06  Eric Blake  <ebb9@byu.net>
3678
3679         * lib/error.h: Fold in some upstream changes from glibc.
3680         * lib/error.c: Likewise.
3681
3682 2006-08-04  Bruno Haible  <bruno@clisp.org>
3683
3684         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3685         Make the mostlyclean-local rule depend on mostlyclean-generic.
3686         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
3687
3688 2006-07-31  Bruno Haible  <bruno@clisp.org>
3689
3690         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
3691         <stdlib.h>, <string.h>.
3692
3693 2006-07-30  Bruno Haible  <bruno@clisp.org>
3694
3695         * modules/readlink (License): Change to LGPL.
3696
3697 2006-07-30  Bruno Haible  <bruno@clisp.org>
3698
3699         * modules/javaversion (Makefile.am): Distribute javaversion.java and
3700         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
3701         set PKGDATADIR to point to it.
3702
3703 2006-07-30  Bruno Haible  <bruno@clisp.org>
3704
3705         * modules/csharpexec (configure.ac): Comment out macro invocation.
3706         * modules/javaexec (configure.ac): Likewise.
3707         * modules/javacomp-script (configure.ac): Likewise.
3708
3709         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
3710
3711 2006-07-30  Bruno Haible  <bruno@clisp.org>
3712
3713         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
3714         linked-list.
3715
3716 2006-07-30  Bruno Haible  <bruno@clisp.org>
3717
3718         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
3719
3720 2006-07-30  Bruno Haible  <bruno@clisp.org>
3721
3722         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3723         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
3724         get removed.
3725
3726 2006-07-29  Bruno Haible  <bruno@clisp.org>
3727
3728         Make it possible for gnulib-tool to work with locally modified or
3729         augmented gnulib repositories.
3730         * gnulib-tool (func_usage): Document --local-dir option.
3731         (local_gnulib_dir): New variable.
3732         Handle --local-dir option.
3733         (func_lookup_file): New function.
3734         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
3735         (func_get_description, func_get_filelist, func_get_description,
3736         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
3737         func_get_automake_snippet, func_get_include_directive,
3738         func_get_license, func_get_maintainer): Use func_lookup_file.
3739         (func_import, func_create_testdir): Use func_lookup_file.
3740
3741 2006-07-29  Bruno Haible  <bruno@clisp.org>
3742
3743         * modules/setenv (Depends-on): Add unistd.
3744
3745 2006-07-29  Bruno Haible  <bruno@clisp.org>
3746
3747         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
3748
3749 2006-07-29  Bruno Haible  <bruno@clisp.org>
3750
3751         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
3752
3753 2006-07-29  Bruno Haible  <bruno@clisp.org>
3754
3755         * gnulib-tool (import, update): If there is no Makefile.am, look at
3756         aclocal.m4, instead of bailing out.
3757
3758 2006-07-29  Bruno Haible  <bruno@clisp.org>
3759
3760         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
3761         Categorize the options by when they are useful.
3762
3763 2006-07-29  Bruno Haible  <bruno@clisp.org>
3764
3765         * gnulib-tool (func_usage): Document option --no-libtool.
3766         Handle option --no-libtool.
3767         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
3768         for changed semantics of $libtool variable.
3769         (func_import): Likewise. If libtool is not used, show this through
3770         an option --no-libtool.
3771         (func_create_testdir): Update.
3772
3773 2006-07-29  Bruno Haible  <bruno@clisp.org>
3774
3775         * gnulib-tool (func_import): Extend error message about missing
3776         --doc-base.
3777
3778 2006-07-29  Bruno Haible  <bruno@clisp.org>
3779
3780         * gnulib-tool (func_import): Don't create the $docbase directory if
3781         there is no file to store there.
3782
3783 2006-07-29  Bruno Haible  <bruno@clisp.org>
3784
3785         * gnulib-tool (autoconf_minversion): If a --dir option is given and
3786         relevant, look for configure.ac there, not in the current directory.
3787         Also use a simple search for AC_PREREQ, not "autoconf --trace".
3788
3789 2006-07-29  Bruno Haible  <bruno@clisp.org>
3790
3791         * gnulib-tool (SORT): New variable.
3792         (func_usage): Undocument --assume-autoconf option.
3793         Remove --assume-autoconf option handling.
3794         (autoconf_minversion): Determine from the contents of configure.ac.
3795         (func_import): Remove autoconf_minversion handling.
3796         Suggested by Eric Blake.
3797
3798 2006-07-29  Bruno Haible  <bruno@clisp.org>
3799
3800         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
3801
3802 2006-07-29  Bruno Haible  <bruno@clisp.org>
3803
3804         * config/srclist.txt (*setenv.[ch]): Remove rules.
3805
3806 2006-07-28  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3807
3808         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
3809
3810 2006-07-28  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3811
3812         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
3813         arpa/inet.h.
3814
3815 2006-07-28  Simon Josefsson  <jas@extundo.com>
3816
3817         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
3818         * modules/inet_pton (Depends-on): Likewise.
3819
3820 2006-07-28  Simon Josefsson  <jas@extundo.com>
3821
3822         * m4/netinet_in_h.m4: New file.
3823
3824 2006-07-28  Simon Josefsson  <jas@extundo.com>
3825
3826         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
3827         #include's.
3828
3829 2006-07-28  Simon Josefsson  <jas@extundo.com>
3830
3831         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
3832         #include's.
3833
3834 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
3835
3836         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
3837         setgid on directories only if they set these bits.
3838         * lib/modechange.h: Remove obsolete comment about masks.
3839
3840 2006-07-28  Eric Blake  <ebb9@byu.net>
3841
3842         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
3843         macro expansion.
3844
3845 2006-07-28  Bruno Haible <bruno@clisp.org>
3846
3847         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
3848
3849 2006-07-28  Bruno Haible  <bruno@clisp.org>
3850
3851         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
3852
3853 2006-07-28  Bruno Haible  <bruno@clisp.org>
3854
3855         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
3856         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
3857         Define fallbacks.
3858         Avoids link error on FreeBSD 4.x.
3859         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
3860
3861         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
3862         encoding.
3863         * lib/mbswidth.c (iswcntrl): Likewise.
3864
3865 2006-07-27  Bruno Haible  <bruno@clisp.org>
3866
3867         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
3868         test.
3869
3870 2006-07-27  Bruno Haible  <bruno@clisp.org>
3871
3872         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
3873         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
3874         defined.
3875
3876 2006-07-26  Eric Blake  <ebb9@byu.net>
3877
3878         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
3879
3880 2006-07-26  Eric Blake  <ebb9@byu.net>
3881
3882         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
3883         like mingw that lack mkstemp.
3884         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
3885         avoid compilation warning on mingw.
3886
3887 2006-07-26  Bruno Haible  <bruno@clisp.org>
3888
3889         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
3890         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
3891         INT_FAST*_MIN, INTPTR_MIN.
3892
3893 2006-07-25  Bruno Haible  <bruno@clisp.org>
3894
3895         * modules/version-etc (Depends-on): Add stdarg.
3896
3897 2006-07-25  Bruno Haible  <bruno@clisp.org>
3898
3899         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
3900         complex commands.
3901
3902 2006-07-25  Bruno Haible  <bruno@clisp.org>
3903
3904         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
3905         defined in <stdarg.h> or config.h.
3906
3907 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
3908
3909         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
3910         (gl_STDIO_SAFER): Remove.
3911
3912 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
3913
3914         * MODULES.html.sh (File stream based Input/Output):
3915         Add fopen-safer, tmpfile-safer; remove stdio-safer.
3916         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
3917         * modules/fopen-safer, modules/tmpfile-safer: New files.
3918         * modules/stdio-safer: Remove.
3919
3920 2006-07-24  Bruno Haible  <bruno@clisp.org>
3921
3922         * modules/tmpdir: New file.
3923         * MODULES.html.sh (File system functions): Add it.
3924
3925 2006-07-24  Bruno Haible  <bruno@clisp.org>
3926
3927         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
3928         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
3929
3930 2006-07-24  Bruno Haible  <bruno@clisp.org>
3931
3932         * modules/clean-temp: New file.
3933
3934 2006-07-24  Bruno Haible  <bruno@clisp.org>
3935
3936         * m4/tmpdir.m4: New file, from GNU gettext.
3937
3938 2006-07-24  Bruno Haible  <bruno@clisp.org>
3939
3940         * lib/tmpdir.h: New file, from GNU gettext.
3941         * lib/tmpdir.c: New file, from GNU gettext.
3942
3943 2006-07-24  Bruno Haible  <bruno@clisp.org>
3944
3945         * lib/clean-temp.h: New file, from GNU gettext.
3946         * lib/clean-temp.c: New file, from GNU gettext.
3947
3948 2006-07-23  Eric Blake  <ebb9@byu.net>
3949
3950         * modules/stdio-safer (Files): Add tmpfile-safer.c.
3951         (Depends-on): Add binary-io.
3952
3953 2006-07-23  Eric Blake  <ebb9@byu.net>
3954
3955         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
3956
3957 2006-07-23  Eric Blake  <ebb9@byu.net>
3958
3959         * lib/tmpfile-safer.c: New file.
3960         * lib/stdio-safer.h (fopen_safer): Add prototype.
3961         * lib/stdio--.h (tmpfile): Make safer.
3962
3963 2006-07-23  Bruno Haible  <bruno@clisp.org>
3964
3965         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
3966         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
3967         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
3968         gl_linked_remove_at): Use it.
3969
3970 2006-07-22  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3971         and Simon Josefsson <jas@extundo.com>
3972
3973         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
3974
3975         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
3976
3977 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3978
3979         * modules/close-stream: New file.
3980         * modules/closeout (Description): Make it clear that it exits
3981         with a diagnostic on error.
3982         (Depends-on): Add close-stream.  Remove fpending, stdbool.
3983         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
3984
3985 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3986
3987         * m4/close-stream.m4: New file.
3988
3989 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3990
3991         * lib/close-stream.c, lib/close-stream.h: New files.
3992
3993 2006-07-22  Bruno Haible  <bruno@clisp.org>
3994
3995         Merge from GNU gettext 0.15.
3996
3997         2006-05-01  Bruno Haible  <bruno@clisp.org>
3998
3999                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
4000
4001         2006-07-22  Bruno Haible  <bruno@clisp.org>
4002
4003                 * modules/javaversion: New file.
4004                 * MODULES.html.sh (Java): Add javaversion.
4005
4006         2006-03-12  Bruno Haible  <bruno@clisp.org>
4007
4008                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
4009
4010         2005-12-04  Bruno Haible  <bruno@clisp.org>
4011
4012                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
4013                 (untested).
4014
4015         2006-06-21  Bruno Haible  <bruno@clisp.org>
4016
4017                 Avoid warnings from recent versions of mcs.
4018                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
4019                 -o, -L, -r any more. Use options documented since mcs-1.0
4020                 instead. Similarly for -g.
4021
4022         2005-12-04  Bruno Haible  <bruno@clisp.org>
4023
4024                 * build-aux/csharpcomp.sh.in: Suffix for resources is
4025                 .resources, not .resource.
4026
4027         2005-07-09  Bruno Haible  <bruno@clisp.org>
4028
4029                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
4030                 add a .dll suffix.
4031                 Reported by Mark Junker <mjscod@gmx.de>.
4032
4033         2006-07-22  Bruno Haible  <bruno@clisp.org>
4034
4035                 * modules/gettext: Upgrade to gettext-0.15.
4036                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
4037                 m4/visibility.m4.
4038                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
4039
4040 2006-07-22  Bruno Haible  <bruno@clisp.org>
4041
4042         Merge from GNU gettext 0.15.
4043
4044         2006-03-25  Bruno Haible  <bruno@clisp.org>
4045
4046                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
4047
4048         2006-07-21  Bruno Haible  <bruno@clisp.org>
4049
4050                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
4051                 "1.1".
4052
4053         2006-05-09  Bruno Haible  <bruno@clisp.org>
4054
4055                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
4056                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
4057                 for the conftestver execution.
4058
4059         2006-05-01  Bruno Haible  <bruno@clisp.org>
4060
4061                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
4062                 optional target-version argument. Verify that the compiler
4063                 groks source of the specified source-version, or add -source
4064                 option as necessary. Verify that the compiler produces
4065                 bytecode in the specified target-version, or add -target and
4066                 -source options as necessary. Make the result of the test
4067                 available as variable CONF_JAVAC. Also log error output in
4068                 config.log.
4069
4070         2006-03-11  Bruno Haible  <bruno@clisp.org>
4071
4072                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
4073
4074         2006-05-09  Bruno Haible  <bruno@clisp.org>
4075
4076                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
4077                 CLASSPATH_SEPARATOR to a semicolon.
4078
4079         2006-03-12  Bruno Haible  <bruno@clisp.org>
4080
4081                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
4082                 available as variable CONF_JAVA, for subsequent autoconf
4083                 tests. Also log error output in config.log.
4084
4085         2006-07-19  Bruno Haible  <bruno@clisp.org>
4086
4087                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
4088                 that getline works on glibc2 systems. Needed to avoid trouble
4089                 in relocatable.c.
4090                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
4091
4092         2005-12-04  Bruno Haible  <bruno@clisp.org>
4093
4094                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
4095                 launcher (untested).
4096
4097         2005-12-04  Bruno Haible  <bruno@clisp.org>
4098
4099                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
4100
4101         2006-07-22  Bruno Haible  <bruno@clisp.org>
4102
4103                 * gettext.m4: Update from GNU gettext-0.15.
4104                 * nls.m4: Likewise.
4105                 * po.m4: Likewise.
4106                 * inttypes-pri.m4: Likewise.
4107                 * inttypes-h.m4: Renamed from inttypes.m4.
4108                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
4109
4110 2006-07-22  Bruno Haible  <bruno@clisp.org>
4111
4112         Merge from GNU gettext 0.15.
4113
4114         2005-07-05  Bruno Haible  <bruno@clisp.org>
4115
4116                 * printf-args.c (printf_fetchargs): Work around broken
4117                 definition of wint_t on mingw.
4118
4119         2005-02-12  Bruno Haible  <bruno@clisp.org>
4120
4121                 * xallocsa.h: Add extern "C" for C++.
4122
4123         2006-05-17  Bruno Haible  <bruno@clisp.org>
4124
4125                 Cygwin portability.
4126                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
4127
4128         2006-04-30  Bruno Haible  <bruno@clisp.org>
4129
4130                 * progreloc.c: Include <mach-o/dyld.h> if available.
4131                 (find_executable): Use _NSGetExecutablePath when possible.
4132
4133         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4134
4135                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
4136                 function.
4137
4138         2005-12-29  Bruno Haible  <bruno@clisp.org>
4139
4140                 * progreloc.c (set_program_name_and_installdir): Fix
4141                 compilation error.
4142
4143         2005-12-04  Bruno Haible  <bruno@clisp.org>
4144
4145                 Cygwin portability.
4146                 * progreloc.c: Include <windows.h> also on Cygwin.
4147                 (find_executable): Add support for Cygwin.
4148                 (set_program_name_and_installdir): Handle also platforms with
4149                 nonempty EXEEXT.
4150
4151         2006-07-11  Bruno Haible  <bruno@clisp.org>
4152
4153                 * javacomp.c: Fix a comment.
4154                 Reported by Jim Meyering.
4155
4156         2006-04-30  Bruno Haible  <bruno@clisp.org>
4157
4158                 * javacomp.h (compile_java_class): Add source_version,
4159                 target_version arguments.
4160                 * javacomp.c: Rewritten to choose only a compiler that
4161                 respects the specified source_version and target_version.
4162
4163         2006-06-27  Bruno Haible  <bruno@clisp.org>
4164
4165                 Assume correct S_ISDIR macro.
4166                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
4167
4168         2006-07-22  Bruno Haible  <bruno@clisp.org>
4169
4170                 * javaversion.h: New file, from GNU gettext.
4171                 * javaversion.c: New file, from GNU gettext.
4172                 * javaversion.java: New file, from GNU gettext.
4173                 * javaversion.class: New file, from GNU gettext.
4174
4175         2006-05-17  Bruno Haible  <bruno@clisp.org>
4176
4177                 Cygwin portability.
4178                 * javaexec.c (execute_java_class): Test for jview program
4179                 also on Cygwin.
4180
4181         2006-04-09  Bruno Haible  <bruno@clisp.org>
4182
4183                 * fatal-signal.c: Don't include string.h.
4184                 (at_fatal_signal): Use a copying loop instead of memcpy.
4185
4186         2005-12-04  Bruno Haible  <bruno@clisp.org>
4187
4188                 * csharpexec.c: Add support for 'clix' launcher (untested).
4189                 (execute_csharp_using_sscli): New function.
4190                 (execute_csharp_program): Call it.
4191
4192         2006-06-21  Bruno Haible  <bruno@clisp.org>
4193
4194                 Avoid warnings from recent versions of mcs.
4195                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
4196                 -o, -L, -r any more. Use options documented since mcs-1.0
4197                 instead. Similarly for -g.
4198
4199         2005-07-09  Bruno Haible  <bruno@clisp.org>
4200
4201                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
4202                 add a .dll suffix.
4203                 Reported by Mark Junker <mjscod@gmx.de>.
4204
4205         2006-06-17  Bruno Haible  <bruno@clisp.org>
4206
4207                 * config.charset: Update for NetBSD 3.0.
4208
4209         2006-05-17  Bruno Haible  <bruno@clisp.org>
4210
4211                 Cygwin portability.
4212                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
4213
4214         2006-05-16  Bruno Haible  <bruno@clisp.org>
4215
4216                 * localcharset.c [CYGWIN]: Include <windows.h>.
4217                 (get_charset_aliases): For Cygwin, return the same CPxxx
4218                 aliases list as under WIN32.
4219                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
4220                 the environment variables. Fall back to GetACP().
4221
4222         2006-04-05  Bruno Haible  <bruno@clisp.org>
4223
4224                 * config.charset: Update Juan Manuel Guerrero's address.
4225
4226         2005-02-12  Bruno Haible  <bruno@clisp.org>
4227
4228                 * allocsa.h: Add extern "C" for C++.
4229
4230         2005-02-10  Bruno Haible  <bruno@clisp.org>
4231
4232                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
4233                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
4234
4235         2006-07-22  Bruno Haible  <bruno@clisp.org>
4236
4237                 * gettext.h: Update to GNU gettext-0.15.
4238
4239 2006-07-22  Bruno Haible  <bruno@clisp.org>
4240
4241         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
4242         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
4243         lib-prefix.m4, longdouble.m4, ssize_t.m4.
4244
4245 2006-07-21  Eric Blake  <ebb9@byu.net>
4246
4247         * modules/stdlib-safer: New file.
4248         * MODULES.html.sh (File stream based Input/Output): Add
4249         stdlib-safer.
4250
4251 2006-07-21  Eric Blake  <ebb9@byu.net>
4252
4253         * lib/stdlib-safer.h: New file from coreutils, required by
4254         stdlib--.h.
4255
4256 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
4257
4258         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
4259
4260 2006-07-20  Bruno Haible  <bruno@clisp.org>
4261
4262         * gnulib-tool: Recognize new option --assume-autoconf.
4263         (autoconf_minversion): New variable.
4264         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
4265
4266 2006-07-20  Bruno Haible  <bruno@clisp.org>
4267
4268         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
4269
4270 2006-07-19  Derek R. Price  <derek@ximbiot.com>
4271
4272         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
4273         Reindent and repaginate.
4274
4275 2006-07-19  Derek Price  <derek@ximbiot.com>
4276
4277         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
4278         Correct grammar.
4279
4280 2006-07-17  Bruno Haible  <bruno@clisp.org>
4281
4282         * modules/list: New file.
4283         * modules/array-list: New file.
4284         * modules/carray-list, modules/carray-list-tests: New files.
4285         * modules/linked-list, modules/linked-list-tests: New files.
4286         * modules/avltree-list, modules/avltree-list-tests: New files.
4287         * modules/rbtree-list, modules/rbtree-list-tests: New files.
4288         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
4289         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
4290         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
4291         * modules/oset: New file.
4292         * modules/array-oset: New file.
4293         * modules/avltree-oset, modules/avltree-oset-tests: New files.
4294         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
4295         * tests/test-carray_list.c: New file.
4296         * tests/test-linked_list.c: New file.
4297         * tests/test-avltree_list.c: New file.
4298         * tests/test-rbtree_list.c: New file.
4299         * tests/test-linkedhash_list.c: New file.
4300         * tests/test-avltreehash_list.c: New file.
4301         * tests/test-rbtreehash_list.c: New file.
4302         * tests/test-avltree_oset.c: New file.
4303         * tests/test-rbtree_oset.c: New file.
4304         * MODULES.html.sh (Container data structures): New section.
4305
4306 2006-07-17  Bruno Haible  <bruno@clisp.org>
4307
4308         * m4/gl_list.m4: New file.
4309
4310 2006-07-17  Bruno Haible  <bruno@clisp.org>
4311
4312         * lib/gl_list.h: New file.
4313         * lib/gl_list.c: New file.
4314         * lib/gl_array_list.h: New file.
4315         * lib/gl_array_list.c: New file.
4316         * lib/gl_carray_list.h: New file.
4317         * lib/gl_carray_list.c: New file.
4318         * lib/gl_linked_list.h: New file.
4319         * lib/gl_linked_list.c: New file.
4320         * lib/gl_anylinked_list1.h: New file.
4321         * lib/gl_anylinked_list2.h: New file.
4322         * lib/gl_avltree_list.h: New file.
4323         * lib/gl_avltree_list.c: New file.
4324         * lib/gl_anyavltree_list1.h: New file.
4325         * lib/gl_anyavltree_list2.h: New file.
4326         * lib/gl_rbtree_list.h: New file.
4327         * lib/gl_rbtree_list.c: New file.
4328         * lib/gl_anyrbtree_list1.h: New file.
4329         * lib/gl_anyrbtree_list2.h: New file.
4330         * lib/gl_anytree_list1.h: New file.
4331         * lib/gl_anytree_list2.h: New file.
4332         * lib/gl_linkedhash_list.h: New file.
4333         * lib/gl_linkedhash_list.c: New file.
4334         * lib/gl_anyhash_list1.h: New file.
4335         * lib/gl_anyhash_list2.h: New file.
4336         * lib/gl_avltreehash_list.h: New file.
4337         * lib/gl_avltreehash_list.c: New file.
4338         * lib/gl_rbtreehash_list.h: New file.
4339         * lib/gl_rbtreehash_list.c: New file.
4340         * lib/gl_anytreehash_list1.h: New file.
4341         * lib/gl_anytreehash_list2.h: New file.
4342
4343         * lib/gl_oset.h: New file.
4344         * lib/gl_oset.c: New file.
4345         * lib/gl_array_oset.h: New file.
4346         * lib/gl_array_oset.c: New file.
4347         * lib/gl_avltree_oset.h: New file.
4348         * lib/gl_avltree_oset.c: New file.
4349         * lib/gl_rbtree_oset.h: New file.
4350         * lib/gl_rbtree_oset.c: New file.
4351         * lib/gl_anytree_oset.h: New file.
4352
4353 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
4354
4355         * m4/mkancesdirs.m4: New file.
4356         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
4357         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
4358         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
4359         it.
4360
4361 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
4362
4363         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
4364         * lib/mkancesdirs.h: New files.
4365         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
4366         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
4367         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
4368         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
4369         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
4370         callers changed.  Revamp internals significantly, by not
4371         attempting to create directories that are temporarily more
4372         permissive than the final results.  Do not attempt to use
4373         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
4374         This removes some race conditions, fixes some bugs, and simplifies
4375         things.  Use new dirchownmod function to do owner and mode changes.
4376         * lib/mkdir-p.h: Likewise.
4377         * lib/modechange.c (octal_to_mode): New function.
4378         (struct mode_change): New member mentioned.
4379         (make_node_op_equals): New arg mentioned.  All callers changed.
4380         (mode_compile): Keep track of which mode bits the user has explicitly
4381         mentioned.
4382         (mode_adjust): New arg DIR, so that we implement the X op correctly.
4383         New arg PMODE_BITS, to keep track of which mode bits the user
4384         mentioned; it treats S_ISUID and S_ISGID speciall.
4385         All callers changed.
4386         * lib/modechange.h: Likewise.
4387
4388 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
4389
4390         * MODULES.html.sh: Add mkancestors.
4391         * modules/mkancesdirs: New module.
4392         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
4393         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
4394         The chdir-safer and afs files are now orphans; I'll remove them
4395         unless someone speaks up.
4396         Add lib/dirchownmod.c, lib/dirchownmod.h.
4397         (Depends-on): Remove alloca, chown, save-cwd, dirname.
4398         Add lchown, mkancesdirs.
4399         (Maintainer): Add self.
4400
4401 2006-07-15  Karl Berry  <karl@gnu.org>
4402
4403         * gnulib-tool: help message wording/arrangement.
4404
4405 2006-07-14  Simon Josefsson  <jas@extundo.com>
4406
4407         * doc/gnulib.texi (Libtool and Windows): New section.
4408
4409 2006-07-12  Simon Josefsson  <jas@extundo.com>
4410
4411         * modules/gendocs (License): Fix license, approved by Karl.
4412
4413 2006-07-12  Eric Blake  <ebb9@byu.net>
4414
4415         * MODULES.html.sh: Add gendocs.
4416
4417 2006-07-11  Eric Blake  <ebb9@byu.net>
4418
4419         * modules/fdl: New module, to install doc/fdl.texi.
4420         * MODULES.html.sh: Add new section for documentation modules.
4421         * gnulib-tool: Avoid space-tab.
4422         (--doc-base): New option, to manage files from doc.
4423
4424 2006-07-11  Eric Blake  <ebb9@byu.net>
4425
4426         * m4/absolute-header.m4: Fix comments to match recent change.
4427
4428 2006-07-11  Eric Blake  <ebb9@byu.net>
4429
4430         * gnulib-tool: List --doc-base before --tests-base.
4431
4432 2006-07-11  Derek R. Price  <derek@ximbiot.com>
4433
4434         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
4435
4436 2006-07-11  Bruno Haible  <bruno@clisp.org>
4437
4438         * README: Mention where to put documentation.
4439
4440 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4441
4442         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
4443
4444 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
4445
4446         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
4447         to stdint.m4.
4448
4449 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
4450
4451         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
4452         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
4453         "no/such/file/stdint.h" when there is no such file, so that
4454         the resulting C code can be parsed by dodgy compilers.
4455         Problems reported by Bob Proulx.
4456
4457 2006-07-10  Derek R. Price  <derek@ximbiot.com>
4458
4459         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
4460         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
4461         macros into the GNU _D_EXACT_NAMLEN.
4462         * lib/savedir.c:  Likewise.
4463         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
4464
4465 2006-07-10  Derek R. Price  <derek@ximbiot.com>
4466         and Paul Eggert  <eggert@cs.ucla.edu>
4467
4468         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
4469         * m4/savedir.m4:
4470         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
4471         macros into the GNU _D_EXACT_NAMLEN.
4472
4473 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4474
4475         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
4476         around the absolute name, to work around a problem with the HP-UX
4477         11.23 native C compiler, reported by Bob Proulx.
4478
4479 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4480
4481         * doc/maintain.texi, make-stds.texi: Sync from
4482         <http://savannah.gnu.org/projects/gnustandards>.
4483
4484 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4485
4486         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
4487
4488 2006-07-09  Jim Meyering  <jim@meyering.net>
4489
4490         * m4/glob.m4: Remove a doubled word in a comment.
4491
4492 2006-07-09  Jim Meyering  <jim@meyering.net>
4493
4494         * lib/argp-pv.c: Remove a doubled word in a comment.
4495         * lib/check-version.c (check_version): Likewise.
4496         * lib/javacomp.c (compile_java_class): Likewise.
4497
4498 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
4499
4500         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
4501         for the benefit of people using Autoconf 2.60.  If you want to
4502         support older Autoconf versions you can copy m4/onceonly_2_57.m4
4503         (or m4/onceonly.m4, if pre-2.57) manually.
4504
4505 2006-07-08  Jim Meyering  <jim@meyering.net>
4506
4507         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
4508         comment.
4509         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
4510         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
4511         comment.
4512
4513 2006-07-08  Jim Meyering  <jim@meyering.net>
4514
4515         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
4516
4517 2006-07-07  Simon Josefsson  <jas@extundo.com>
4518
4519         * tests/test-crc.c: Change expected crc value, the test vector
4520         were probably computed using the old broken crc.c?
4521
4522 2006-07-06  Simon Josefsson  <jas@extundo.com>
4523
4524         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
4525         now the canonical place for the M4 file).
4526
4527         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
4528         from the sys_socket dependency now.
4529
4530         * modules/inet_pton (Files): Ditto.
4531
4532         * modules/inet_ntop (Files): Ditto.
4533
4534 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
4535
4536         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
4537         not gl_PREREQ_GETUSERSHELL.
4538
4539 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4540
4541         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
4542         with only one argument, for Autoconf 2.60.
4543         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
4544         expand to nothing, so add a shell command to avoid syntax error.
4545         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
4546
4547 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4548
4549         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
4550
4551 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4552
4553         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
4554         no longer needed.  Check for isblank decl.
4555         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
4556         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
4557         of existence.
4558
4559 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4560
4561         * lib/getloadavg.c: Use __VMS, not VMS.
4562         * lib/getopt.c: Likewise.
4563         * lib/getpagesize.h: Likewise.
4564         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
4565         and probably does not work.
4566
4567 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4568
4569         * lib/.cppi-disable: Add wcwidth.
4570         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
4571         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
4572         (ISGRAPH): Remove.  All uses changed to isgraph.
4573         (FOLD) [!defined _LIBC]: Remove special case.
4574         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
4575         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
4576         HAVE_ISBLANK.
4577         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
4578         case.
4579
4580 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
4581
4582         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
4583         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
4584         brackets.  Other minor changes to suppress some compiler
4585         warnings.
4586
4587 2006-07-06  Derek R. Price  <derek@ximbiot.com>
4588         and Paul Eggert  <eggert@cs.ucla.edu>
4589
4590         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
4591         of invoking obsolescent AC_HEADER_DIRENT macro.
4592         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
4593         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
4594         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
4595         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
4596         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
4597         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
4598         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
4599         * m4/readdir.m4: Remove; no longer needed.
4600
4601 2006-07-06  Derek R. Price  <derek@ximbiot.com>
4602         and Paul Eggert  <eggert@cs.ucla.edu>
4603
4604         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
4605         Don't worry about this obsolete case any more.
4606         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
4607         directories.
4608         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
4609         worry about this obsolete case any more.
4610         * lib/fts.c: Likewise.
4611         * lib/getcwd.c: Likewise.
4612         * lib/glob.h: Likewise.
4613         * lib/savedir.c: Likewise.
4614
4615 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
4616
4617         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
4618         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
4619         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
4620         needed.
4621         All uses removed.
4622         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4623         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
4624         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
4625         needed.
4626         * m4/getdate.m4 (gl_GETDATE): Likewise.
4627         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
4628         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
4629         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
4630         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4631         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
4632         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
4633         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
4634         needed.
4635
4636 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
4637
4638         * lib/memcasecmp.c: Include <limits.h>.
4639         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
4640         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
4641         Don't assume isdigit succeeds only on '0' through '9'.
4642
4643 2006-07-05  Eric Blake  <ebb9@byu.net>
4644
4645         * modules/getaddrinfo (Depends-on): Add snprintf.
4646
4647 2006-07-05  Eric Blake  <ebb9@byu.net>
4648
4649         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
4650         to avoid 'header present but could not be compiled' on cygwin.
4651
4652 2006-07-05  Eric Blake  <ebb9@byu.net>
4653
4654         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
4655         missing from netdb.h.
4656         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
4657
4658 2006-07-05  Derek R. Price  <derek@ximbiot.com>
4659
4660         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
4661         no longer needed.
4662         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
4663         * m4/getdate.m4 (gl_GETDATE): Likewise.
4664         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
4665         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
4666         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
4667         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4668         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
4669
4670 2006-07-05  Derek R. Price  <derek@ximbiot.com>
4671
4672         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
4673         All uses of is_space replaced by isspace.
4674         * lib/exit.h: Don't talk about STDC_HEADERS.
4675         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
4676         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
4677         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
4678         replaced by isprint etc.
4679         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
4680         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
4681         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
4682         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
4683         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
4684         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
4685
4686 2006-07-05  Bruno Haible  <bruno@clisp.org>
4687
4688         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
4689         the function exists, before testing against AIX.
4690         Reported by Martin Lambers <marlam@marlam.de>.
4691
4692 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
4693
4694         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
4695         From Mark D. Baushke.
4696
4697 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
4698
4699         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
4700         to the absolute name, not just one, to bypass Sun C 5.8's
4701         "warning: #include of /usr/include/... may be non-portable".
4702
4703 2006-07-04  Eric Blake  <ebb9@byu.net>
4704
4705         * modules/dirname-tests: New test module.
4706         * tests/test-dirname.c: New file, replacing dirname.c
4707         TEST_DIRNAME section that was recently deleted.
4708
4709 2006-07-04  Bruno Haible  <bruno@clisp.org>
4710
4711         Assume ANSI C header files and <ctype.h> functions.
4712         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
4713         (mbsnwidth): Use isprint, iscntrl instead.
4714
4715 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4716
4717         Merge from coreutils.
4718         * MODULES.html.sh: Add xstrtold.
4719         * modules/xstrtold: New file.
4720         * modules/cycle-check (Files): Add lib/same-inode.h.
4721         * modules/dirname (Files): Add m4/double-slash-root.m4.
4722         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
4723         * modules/mkdir-p (Files): Add lib/same-inode.h.
4724         * modules/same (Files): Add lib/same-inode.h.
4725
4726 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4727
4728         * m4/absolute-header.m4: Renamed from full-header-path.m4.
4729         This is to keep the terminology clean; POSIX talks about
4730         "absolute pathnames", not "full pathnames", but the GNU
4731         Coding Standards say to use "path" for something else;
4732         so use "absolute" to keep both sides happy.
4733         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
4734         Set gl_absolute_header, not gl_full_header_path.
4735         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
4736         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
4737         All uses changed.
4738
4739         Merge from coreutils.
4740
4741         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
4742
4743         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
4744         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
4745         want to require the building of c-strtod.o.
4746         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
4747         needs -lm directly.
4748         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
4749
4750         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
4751
4752         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
4753         --as-needed option if available.  Problem reported by Albert Chin in
4754         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
4755         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
4756         cc merely issues a bunch of annoying warnings for --as-needed
4757         (this problem was reported by Bob Proulx).  Also, try linking with
4758         -lm to detect a bug in binutils 2.16 (this problem was reported
4759         by Ralf Wildenhues).
4760
4761         2006-06-18  Jim Meyering  <jim@meyering.net>
4762
4763         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
4764         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
4765         macro.
4766         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
4767         also check for glibc-2.4's abort-inducing bug.
4768
4769         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
4770         Low-probability clean-up should be to use rmdir to get rid of
4771         the just-created directory, not unlink.
4772
4773         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
4774         configure fail, and request a bug report to inform us about it.
4775         Add a comment that, barring reports to the contrary, in 2007 we'll
4776         assume ftruncate is universally available.
4777
4778         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
4779
4780         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
4781
4782         2006-03-12  Jim Meyering  <jim@meyering.net>
4783
4784         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
4785         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
4786         * m4/same.m4 (gl_SAME): Likewise.
4787         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
4788
4789         2006-03-11  Eric Blake  <ebb9@byu.net>
4790
4791         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
4792         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
4793         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
4794         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
4795
4796 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4797
4798         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
4799         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
4800         reported by Mark D. Baushke, one in
4801         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
4802
4803         Merge from coreutils.
4804
4805         * lib/.cppi-disable: Add stdint_.h.
4806         * lib/.cvsignore: Add stdint.h.
4807
4808         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
4809
4810         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
4811         both double and long double versions.
4812         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
4813         * lib/xstrtold.c: New file.
4814         * lib/xstrtod.h (xstrtold): New decl.
4815
4816         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
4817
4818         * lib/filemode.c (setst): Remove.
4819         (strmode): Rewrite to avoid setst.  This makes the code shorter,
4820         (arguably) clearer, and the generated code is a bit smaller on my
4821         Debian GNU/Linux stable x86 host.
4822
4823         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
4824
4825         * lib/filemode.c: Include "filemode.h" first, to test the interface.
4826         Assume that filemode.h includes sys/types.h and sys/stat.h.
4827         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
4828         (ftypelet): Reorder to put common cases first, for efficiency.
4829         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
4830         to do 'M'.
4831         (strmode): Renamed from mode_string, and now stores 12 bytes instead
4832         of 10, for compatibility with FreeBSD.  All callers changed.
4833         (filemodestring): Now stores 12 bytes instead of 10, and sets file
4834         types that can't be deduced solely from st_mode.  First arg is now a
4835         const pointer.
4836         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
4837         (strmode): Renamed from mode_string.
4838         (filemodestring): New decl.
4839         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
4840         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
4841         needed.
4842         (S_ISPORT, S_ISWHT): New macros, if not already defined.
4843
4844         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
4845
4846         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
4847         fsusage.h now does that.  Include fsusage.h first, to test interface.
4848         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
4849         at most one method (the old code could have generated decls that
4850         didn't conform to C89, not that this was ever exercised).
4851         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
4852
4853         2006-03-19  Jim Meyering  <jim@meyering.net>
4854
4855         Work even in a chroot where d_ino values for entries in "/"
4856         don't match the stat.st_ino values for the same names.
4857         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
4858         number, iterate through all entries again, using lstat instead.
4859         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
4860         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
4861
4862         * lib/getcwd.c (__getcwd): Clarify a comment.
4863         Use memcpy in place of a call to strcpy.
4864
4865         2006-03-12  Jim Meyering  <jim@meyering.net>
4866
4867         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
4868         matches that of the current directory (which we're about to chdir ".."
4869         out of), then save the dev-ino of the parent, instead.
4870
4871         * lib/same-inode.h (SAME_INODE): New file/macro.
4872         * lib/chdir-safer.c (SAME_INODE): Remove definition.
4873         Include "same-inode.h", instead.
4874         * lib/same.c: Likewise.
4875         * lib/cycle-check.h: Include "same-inode.h".
4876         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
4877         * lib/cycle-check.c (SAME_INODE): Remove definition.
4878         * lib/root-dev-ino.h: Include "same-inode.h".
4879
4880         2006-03-11  Eric Blake  <ebb9@byu.net>
4881
4882         * lib/same.c (same_name): s/base_name/last_component/
4883         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
4884         * lib/filenamecat.c (file_name_concat): Likewise.
4885
4886         2006-03-11  Eric Blake  <ebb9@byu.net>,
4887                     Paul Eggert  <eggert@cs.ucla.edu>
4888
4889         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
4890         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
4891         drive prefix.
4892         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
4893         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
4894         (last_component): New method.
4895         * lib/dirname.c (dir_len): Determine when drive letters need a
4896         subsequent slash.  Preserve // when it is special.
4897         (dir_name): Don't append dot when drive letter is absolute.
4898         [TEST_DIRNAME]: Move into a full-blown gnulib test.
4899         * lib/basename.c (base_name): New semantics - malloc the result.
4900         Preserve // when it is special.  Preserve relative files that look
4901         like drive letters.
4902         (base_len): Preserve // when it is special.
4903         (last_component): New method, similar to old base_name semantics.
4904         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
4905         base_name.  Strip redundant slashes from ///.
4906
4907 2006-07-03  Jim Meyering  <jim@meyering.net>
4908
4909         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
4910         macro is used before the first cycle_check call.
4911
4912 2006-07-03  Eric Blake  <ebb9@byu.net>
4913
4914         * modules/dirname (Depends-on): Add xstrndup.
4915
4916 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
4917
4918         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
4919         test cases, so that config.log is a bit easier to follow.
4920
4921 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
4922
4923         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
4924         both are 64 bits, since this seems to be the tradition, and this
4925         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
4926         we ever run into a host that prefers long long to long in this
4927         case, we'll need another configure-time test.  Problem reported by
4928         Jim Meyering.
4929
4930 2006-07-02  Eric Blake  <ebb9@byu.net>
4931
4932         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
4933
4934 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4935
4936         * modules/inttypes (Depends-on): No longer depends on stdint.
4937         * modules/stdint (Description): Say more about assumptions.
4938         Say that the fast types might differ.  Say macros are used.
4939         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
4940         (Makefile.am): Revise list of substituted symbols to match
4941         new stdint.m4.
4942         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
4943         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
4944         * tests/test-stdint.c (verify_same_types)
4945         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
4946         the code conforms to C99/C89.
4947         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
4948         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
4949
4950 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4951
4952         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
4953         but fix a bug, by requiring at least 64 bits.
4954         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
4955         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
4956         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
4957         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
4958
4959         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
4960         changes.  Make 2.59 a prerequisite.  Check and substitute for
4961         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
4962         inttypes.h.  Do not use special include files; just use the
4963         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
4964         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
4965         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
4966         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
4967         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
4968         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
4969         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
4970         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
4971         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
4972         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
4973         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
4974         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
4975         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
4976         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
4977         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
4978         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
4979         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
4980         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
4981         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
4982         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
4983         WINT_MAX.  Check for C99 conformance more strictly, by detecting
4984         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
4985         not check for things that C99 does not require, e.g., int8_t.  If
4986         a test isn't needed unless <stdint.h> isn't working, and is
4987         unlikely to be needed for any other reason, then don't do it
4988         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
4989         size_t, since we assume C89 freestanding at least.  Do not check
4990         for sig_atomic_t, wchar_t, or wint_t, since the code now does
4991         the right thing even if the types are not defined.  Instead use:
4992         (gl_STDINT_TYPE_PROPERTIES): New macro.
4993         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
4994         testing whether <sys/types.h> clashes, as Autoconf does this for
4995         us now.  All uses removed.
4996         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
4997         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
4998         (gl_CHECK_TYPE_SAME):
4999         Remove; no longer needed.
5000         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
5001         exists, since we'll return 0 anyway in that case.
5002         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
5003
5004 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5005
5006         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
5007         possible collision with system files.
5008         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
5009         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
5010         WCHAR_MIN and WCHAR_MAX in this case.
5011         (<stddef.h>): Do not include; no longer needed.
5012         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
5013         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
5014         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
5015         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
5016         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
5017         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
5018         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
5019         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
5020         !defined(__c99))]: Include in this case too, since it's harmless
5021         now.
5022         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
5023         dangerous to do so.
5024         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
5025         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
5026         (_STDINT_MIN, _STDINT_MAX): New macros.
5027         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
5028         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
5029         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
5030         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
5031         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
5032         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
5033         macros, not typedefs; this simplifies things quite a bit.
5034         Use long int for all types narrower than int64_t.
5035         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
5036         Define in terms of long long int or int64_t or long int,
5037         not int64_t or int32_t.  This saves some compile-time testing.
5038         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
5039         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
5040         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
5041         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
5042         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
5043         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
5044         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
5045         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
5046         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
5047         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
5048         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5049         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5050         undef any previous version and define our own version, for
5051         simplicity and consistency with the new macros for types.
5052         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5053         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5054         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
5055         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
5056         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
5057         @WINT_T_SUFFIX@ to keep things simple here.
5058         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
5059         Simplify by assuming typical 8/16/32/64 host, since we're
5060         already doing that elsewhere anyway.
5061         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
5062         and assume long long int is 64 bits if available.  This
5063         speeds up 'configure'.
5064
5065 2006-07-01  Eric Blake  <ebb9@byu.net>
5066
5067         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
5068         Reported by Andreas Buening.
5069
5070 2006-07-01  Eric Blake  <ebb9@byu.net>
5071
5072         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
5073
5074 2006-06-30  Jim Hyslop <jhyslop@dreampossible.ca>  (tiny change)
5075
5076         * lib/getaddrinfo.c: fixed typo
5077
5078 2006-06-29  Jim Meyering  <jim@meyering.net>
5079
5080         * modules/strftime (Maintainer): Add my name, since with the
5081         FPRINTFTIME changes strftime.c has forked from glibc.
5082
5083 2006-06-29  Eric Blake  <ebb9@byu.net>
5084
5085         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
5086
5087 2006-06-29  Eric Blake  <ebb9@byu.net>
5088
5089         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
5090
5091 2006-06-29  Eric Blake  <ebb9@byu.net>
5092
5093         * lib/stat_.h: New file.
5094
5095 2006-06-29  Eric Blake  <ebb9@byu.net>
5096
5097         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
5098         unused static function.
5099
5100 2006-06-29  Eric Blake  <ebb9@byu.net>
5101
5102         * doc/functions.texi (Function Portability): Document missing lstat
5103         on mingw.
5104
5105 2006-06-29  Eric Blake  <ebb9@byu.net>
5106
5107         * MODULES.html.sh: Add sys_stat.
5108         * modules/sys_stat: New module.
5109         * modules/mkstemp (Depends-on): Add sys_stat.
5110
5111 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5112
5113         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
5114
5115 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5116
5117         * m4/c-bs-a.m4: Removed.
5118
5119 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5120
5121         * lib/strftime.c: Assume strftime() exists.
5122
5123 2006-06-29  Derek Price  <derek@ximbiot.com>
5124
5125         * modules/c-bs-a: Removed - \a is C89.
5126         * MODULES.html.sh: Remove c-bs-a.
5127
5128 2006-06-29  Bruno Haible  <bruno@clisp.org>
5129
5130         * modules/wcwidth (License): Change to LGPL.
5131
5132 2006-06-28  Simon Josefsson  <jas@extundo.com>
5133
5134         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
5135         on _WIN32.
5136
5137         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
5138         getnameinfo.
5139
5140 2006-06-28  Simon Josefsson  <jas@extundo.com>
5141
5142         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
5143
5144 2006-06-28  Simon Josefsson  <jas@extundo.com>
5145
5146         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
5147         functions there.  It will succeed on Windows XP, but on Windows
5148         2000 and (presumably) earlier, it will fail, and use the internal
5149         re-implementation.
5150         (use_win32_p): New function.
5151         (getaddrinfo): Use strtoul on servname, to support numeric ports.
5152         Support AI_NUMERICSERV to disable getservbyname.
5153         (getnameinfo): New function, only supports
5154         NI_NUMERICHOST|NI_NUMERICSERV for now.
5155
5156         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
5157         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
5158         getnameinfo.
5159
5160 2006-06-28  Eric Blake  <ebb9@byu.net>
5161
5162         * modules/wcwidth: New file.
5163         * modules/mbchar (Depends-on): Add wcwidth.
5164         * modules/mbswidth (Depends-on): Add wcwidth.
5165         * MODULES.html.sh: Add wcwidth.
5166
5167 2006-06-28  Eric Blake  <ebb9@byu.net>
5168
5169         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
5170         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
5171
5172 2006-06-28  Eric Blake  <ebb9@byu.net>
5173
5174         * lib/xvasprintf.h: Fix comments.
5175
5176 2006-06-28  Eric Blake  <ebb9@byu.net>
5177
5178         * lib/mbchar.h (wcwidth): Include wcwidth.h.
5179         * lib/mbswidth.c (wcwidth): Move from here...
5180         * lib/wcwidth.h: ...to this new file.
5181
5182 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5183
5184         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
5185
5186         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
5187         it's obsolete.
5188         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
5189
5190 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5191
5192         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
5193         Autoconf 2.60 says this stuff was obsolete.
5194
5195 2006-06-28  Bruno Haible  <bruno@clisp.org>
5196
5197         * modules/wcwidth (Files): Add m4/wchar_t.m4.
5198
5199 2006-06-28  Bruno Haible  <bruno@clisp.org>
5200
5201         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
5202         gt_TYPE_WCHAR_T.
5203
5204 2006-06-28  Bruno Haible  <bruno@clisp.org>
5205
5206         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
5207         declaration for wcwidth.
5208         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
5209
5210 2006-06-28  Bruno Haible  <bruno@clisp.org>
5211
5212         * lib/mkdtemp.c [MINGW]: Include <io.h>.
5213         (mkdir): Define using _mkdir.
5214
5215 2006-06-28  Bruno Haible  <bruno@clisp.org>
5216
5217         * lib/getaddrinfo.h: Fix POSIX URL.
5218         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
5219         _WIN32.
5220         (use_win32_p): Make static.
5221         (getaddrinfo): Reject service name if it is empty or does not consist
5222         solely of decimal digits, or if its value is > 65535.
5223         (getnameinfo): Remove useless casts.
5224
5225 2006-06-27  Simon Josefsson  <jas@extundo.com>
5226
5227         * modules/sys_select: New file, suggested by Bruno Haible, Paul
5228         Eggert and Martin Lambers.
5229
5230 2006-06-27  Simon Josefsson  <jas@extundo.com>
5231
5232         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
5233         Eggert and Martin Lambers.
5234
5235 2006-06-27  Bruno Haible  <bruno@clisp.org>
5236
5237         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
5238         result to 0, not to empty.
5239         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
5240
5241 2006-06-27  Bruno Haible  <bruno@clisp.org>
5242
5243         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
5244
5245 2006-06-26  Simon Josefsson  <jas@extundo.com>
5246
5247         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
5248         present.
5249
5250 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
5251
5252         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
5253         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
5254         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
5255
5256 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
5257
5258         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
5259
5260 2006-06-26  Bruno Haible  <bruno@clisp.org>
5261
5262         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
5263
5264 2006-06-26  Bruno Haible  <bruno@clisp.org>
5265
5266         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
5267
5268 2006-06-26  Bruno Haible  <bruno@clisp.org>
5269
5270         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
5271         SGI C compiler in pre-C99 mode.
5272         Suggested by Mark D. Baushke and Larry Jones.
5273
5274 2006-06-26  Bruno Haible  <bruno@clisp.org>
5275
5276         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
5277         WCHAR_MAX.
5278         Reported by Mark D. Baushke and Larry Jones.
5279
5280 2006-06-26  Bruno Haible  <bruno@clisp.org>
5281
5282         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
5283         in pre-C99 mode.
5284         Suggested by Mark D. Baushke and Larry Jones.
5285
5286 2006-06-23  Simon Josefsson  <jas@extundo.com>
5287             Bruno Haible  <bruno@clisp.org>
5288
5289         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
5290         Emit mostlyclean-local rule.
5291         (func_emit_tests_Makefile_am): Likewise.
5292         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
5293
5294 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
5295
5296         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
5297
5298 2006-06-23  Bruno Haible  <bruno@clisp.org>
5299
5300         * tests/test-stdint.c: Update to match ISO C 99 Technical
5301         Corrigendum 1.
5302
5303 2006-06-23  Bruno Haible  <bruno@clisp.org>
5304
5305         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
5306
5307 2006-06-23  Bruno Haible  <bruno@clisp.org>
5308
5309         * lib/stdint_.h: Treat IRIX like OpenBSD.
5310
5311 2006-06-23  Bruno Haible  <bruno@clisp.org>
5312
5313         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
5314         ISO C 99 Technical Corrigendum 1.
5315
5316 2006-06-22  Simon Josefsson  <jas@extundo.com>
5317
5318         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
5319         MinGW.
5320
5321 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
5322
5323         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
5324         needed.  Some compiler complained about some of them.  Problem reported
5325         by Larry Jones in
5326         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
5327
5328 2006-06-21  Simon Josefsson  <jas@extundo.com>
5329
5330         * tests/test-getaddrinfo.c: New file.
5331
5332         * modules/getaddrinfo-tests: New file.
5333
5334         * MODULES.html.sh: Add inet_pton.
5335
5336         * modules/inet_pton: New file.
5337
5338 2006-06-21  Simon Josefsson  <jas@extundo.com>
5339
5340         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
5341         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
5342         of using the (limited) gnulib implementation on Windows XP.
5343
5344         * m4/inet_pton.m4: New file.
5345
5346 2006-06-21  Simon Josefsson  <jas@extundo.com>
5347
5348         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
5349         variable.
5350
5351         * lib/socket_.h: Don't define WINVER.
5352
5353         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
5354         slightly modified to work in gnulib.
5355
5356 2006-06-21  Simon Josefsson  <jas@extundo.com>
5357
5358         * doc/gnulib.texi (Windows sockets): Add.
5359
5360 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
5361
5362         * lib/read-file.c (fread_file): Start with buffer allocation of
5363         0 bytes rather than 1 byte; this simplifies the code.
5364         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
5365         code to free buffer and save/restore errno.
5366         (internal_read_file): Remove unused local.
5367
5368 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
5369
5370         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
5371         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
5372         Problem reported by Denis Excoffier in
5373         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
5374
5375 2006-06-19  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
5376
5377         * modules/sys_socket, modules/socklen: Include sys/types since
5378         FreeBSD 4.x's sys/socket.h needs it.
5379
5380 2006-06-19  Simon Josefsson  <jas@extundo.com>
5381
5382         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
5383
5384 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
5385
5386         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
5387
5388 2006-06-19  Bruno Haible  <bruno@clisp.org>
5389
5390         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
5391         and FULL_PATH_INTTYPES_H in angle brackets.
5392         Reported by Mark D. Baushke <mdb@gnu.org>.
5393
5394 2006-06-17  Eric Blake  <ebb9@byu.net>
5395
5396         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
5397         errno.
5398
5399 2006-06-17  Bruno Haible  <bruno@clisp.org>
5400
5401         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
5402         <sys/inttypes.h>.
5403
5404 2006-06-17  Bruno Haible  <bruno@clisp.org>
5405
5406         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
5407         whether errno is declared. Assume <errno.h> declares errno.
5408
5409 2006-06-17  Bruno Haible  <bruno@clisp.org>
5410
5411         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
5412
5413 2006-06-17  Bruno Haible  <bruno@clisp.org>
5414
5415         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
5416         problem on Solaris 2.5.1.
5417
5418 2006-06-16  Eric Blake  <ebb9@byu.net>
5419
5420         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
5421         * lib/unicodeio.c [!defined errno]: Likewise.
5422         * lib/strtol.c [!defined errno]: Likewise.
5423         * lib/strtod.c [!defined errno]: Likewise.
5424
5425 2006-06-15  Eric Blake  <ebb9@byu.net>
5426
5427         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
5428
5429 2006-06-15  Eric Blake  <ebb9@byu.net>
5430
5431         * config/srclist.txt (ssize_t.m4): Lose sync.
5432
5433 2006-06-15  Bruno Haible  <bruno@clisp.org>
5434
5435         * modules/stdint (Files): Include m4/full-header-path.m4,
5436         m4/size_max.m4, m4/wchar_t.m4.
5437         (Makefile.am): Many more substitutions.
5438         * modules/stdint-tests: New file.
5439         * tests/test-stdint.c: New file.
5440
5441 2006-06-15  Bruno Haible  <bruno@clisp.org>
5442
5443         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
5444         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
5445         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
5446         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
5447         gl_CHECK_TYPE_SAME): New macros.
5448
5449 2006-06-15  Bruno Haible  <bruno@clisp.org>
5450
5451         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
5452
5453 2006-06-15  Bruno Haible  <bruno@clisp.org>
5454
5455         * lib/stdint_.h: Rewritten to be fully auto-configured.
5456         Fixes bug on HP-UX/IA64.
5457
5458 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
5459
5460         * lib/getdate.y (__attribute__): Don't define if already defined.
5461         Problem reported by Larry Jones.
5462         * lib/utimens.c (__attribute__): Likewise.
5463
5464 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
5465
5466         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
5467         reported by Andreas Schwab.
5468
5469 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5470             Bruno Haible  <bruno@clisp.org>
5471
5472         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
5473         check for the declaration of strnlen and a run test that exposes the
5474         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
5475         rpl_strndup.
5476
5477 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5478             Bruno Haible  <bruno@clisp.org>
5479
5480         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
5481
5482 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5483
5484         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
5485         compile test, for Tru64 4.0D.
5486
5487 2006-05-28  Karl Berry  <karl@gnu.org>
5488
5489         * config/srclist.txt (printf-args.c): lose sync.
5490
5491 2006-05-26  Martin Lambers  <marlam@marlam.de>
5492
5493         * lib/getpass.c: Updates the test for the native W32 API, and adds
5494         missing includes, thus fixing compilation warnings.
5495
5496 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
5497
5498         * lib/exclude.c (exclude_fnmatch): New function.
5499         (excluded_file_name): Call exclude_fnmatch.
5500         * lib/exclude.h (excluded_file_name): New prototype
5501
5502 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
5503
5504         * lib/tempname.c (small_open, large_open): New macros.
5505         (__open, __open64) [!_LIBC]: Remove.
5506         (__gen_tempname): Use small_open and large_open instead of __open
5507         and __open64.  This fixes a portability bug on HP-UX 11.11i
5508         reported by Simon Wing-Tang in
5509         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
5510
5511 2006-05-24  Bruno Haible  <bruno@clisp.org>
5512
5513         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
5514         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
5515         Reported by Thorsten Maerz <torte@netztorte.de> via
5516         Aaron Stone <aaron@serendipity.cx>.
5517
5518 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
5519
5520         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
5521         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
5522         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
5523         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
5524         not really conditional on the cache.
5525         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
5526
5527 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
5528
5529         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
5530         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
5531         (my_usleep): Don't mishandle maximum value.
5532
5533 2006-05-19  Jim Meyering  <jim@meyering.net>
5534
5535         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
5536
5537 2006-05-17  Bruno Haible  <bruno@clisp.org>
5538
5539         Cygwin portability.
5540         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
5541
5542 2006-05-17  Bruno Haible  <bruno@clisp.org>
5543
5544         * lib/stdint_.h: Fix recognition of Cygwin.
5545
5546 2006-05-15  Bruno Haible  <bruno@clisp.org>
5547
5548         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
5549         on libtool patch by Ralf Wildenhues.
5550
5551 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
5552
5553         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
5554         test for C99 conformance; (bool) 0.5 is an integer constant
5555         expression, but (bool) -0.5 is not.  Problem reported by Fedor
5556         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
5557
5558 2006-05-11  Simon Josefsson  <jas@extundo.com>
5559
5560         * m4/xvasprintf.m4: Fix obvious typo.
5561
5562 2006-05-11  Jim Meyering  <jim@meyering.net>
5563
5564         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
5565         James Lemley.
5566
5567 2006-05-10  Simon Josefsson  <jas@extundo.com>
5568
5569         * lib/md4.c: Typo fix, update copyright years.
5570         (K1, K2): Don't use L because it turn computations into 64-bit on
5571         64-bit platforms.
5572
5573 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
5574
5575         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
5576         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
5577         unwanted sign propagation, e.g., on hosts with 64-bit int.
5578         There still are some problems with reeelly weird theoretical hosts
5579         (e.g., 33-bit int) but it's not worth worrying about now.
5580         * lib/sha1.c (rol): Likewise.
5581         (K1, K2, K3, K4): Remove unnecessary L suffix.
5582
5583 2006-05-10  Bruno Haible  <bruno@clisp.org>
5584
5585         * lib/des.c: Cast to avoid warnings.
5586
5587 2006-05-09  Bruno Haible  <bruno@clisp.org>
5588
5589         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
5590         (Depends-on): Depend also on xsize, stdarg.
5591         (configure.ac): Add gl_XVASPRINTF.
5592
5593 2006-05-09  Bruno Haible  <bruno@clisp.org>
5594
5595         * m4/xvasprintf.m4: New file.
5596
5597 2006-05-09  Bruno Haible  <bruno@clisp.org>
5598
5599         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
5600         (EOVERFLOW): Define fallback value.
5601         (xstrcat): New function.
5602         (xvasprintf): Recognize the special case of a string concatenation.
5603
5604 2006-05-08  Eric Blake  <ebb9@byu.net>
5605
5606         * gnulib-tool (func_version): Base copyright year on CVS date.
5607         (func_emit_copyright_notice): New function.
5608         (func_emit_lib_Makefile_am): Use it.
5609         (func_emit_tests_Makefile_am): Likewise.
5610         (func_import): Likewise.
5611
5612 2006-05-08  Bruno Haible  <bruno@clisp.org>
5613
5614         * modules/stdarg: New file.
5615         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
5616
5617 2006-05-08  Bruno Haible  <bruno@clisp.org>
5618
5619         * m4/stdarg.m4: New file, from GNU gettext.
5620
5621 2006-05-08  Bruno Haible  <bruno@clisp.org>
5622
5623         * config/srclist.txt (build-aux/config.rpath): different from latest
5624         release.
5625
5626 2006-05-08  Bruno Haible  <bruno@clisp.org>
5627
5628         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
5629
5630 2006-05-05  Jim Meyering  <jim@meyering.net>
5631
5632         * m4/warning.m4: New file, derived from bison's file by the same name.
5633
5634 2006-05-03  Bruno Haible  <bruno@clisp.org>
5635
5636         * lib/stdint_.h: Shorter URL.
5637         * lib/inttypes.h: Likewise.
5638
5639 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5640
5641         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
5642
5643 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5644
5645         * lib/verify.h: Document the internals better.  Most of this change
5646         was written by Bruno Haible.
5647
5648 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5649
5650         * doc/verify.texi: New file, partly based on a proposal by
5651         Bruno Haible.
5652
5653 2006-05-02  Bruno Haible  <bruno@clisp.org>
5654
5655         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
5656         test from here...
5657         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
5658
5659 2006-04-29  Bruno Haible  <bruno@clisp.org>
5660
5661         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
5662         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
5663
5664 2006-04-29  Bruno Haible  <bruno@clisp.org>
5665
5666         * gnulib-tool: Make --update option actually work.
5667
5668 2006-04-29  Bruno Haible  <bruno@clisp.org>
5669
5670         * doc/gcd.texi: New file.
5671         * doc/gnulib.texi: Include it.
5672
5673 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
5674
5675         * lib/getdate.y (get_date): When adding relative date, start with the
5676         initial time, not with the result of the first mktime call.
5677
5678 2006-04-25  Bruno Haible  <bruno@clisp.org>
5679
5680         * gnulib-tool (func_import): Output the include directives in three
5681         blocks, sorted separately.
5682         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5683
5684 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
5685
5686         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
5687         to define main with arguments, for C++.  Reported by Eric Blake.
5688         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
5689         Prefer 'int main ()' to 'int main (void)', for C++.
5690         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
5691         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
5692         for 'main', for C99 and C++.
5693
5694 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
5695
5696         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
5697         Don't assume that exit status -1 is valid.
5698         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
5699         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
5700         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
5701         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
5702         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
5703         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
5704         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
5705         functions can be used without declaring them, or that you can
5706         exit with status -1.
5707         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
5708
5709 2006-04-24  Karl Berry  <karl@gnu.org>
5710
5711         * config/srclist.txt (longdouble.m4): sync lost.
5712
5713 2006-04-24  Eric Blake  <ebb9@byu.net>
5714
5715         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
5716
5717 2006-04-24  Bruno Haible  <bruno@clisp.org>
5718
5719         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
5720         poll() implementation in AIX.
5721         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5722
5723 2006-04-24  Bruno Haible  <bruno@clisp.org>
5724
5725         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
5726         assigned exactly once.
5727
5728 2006-04-23  Claudio Fontana  <claudio@gnu.org>
5729             Bruno Haible  <bruno@clisp.org>
5730
5731         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
5732         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
5733         for AM_CPPFLAGS.
5734
5735 2006-04-23  Bruno Haible  <bruno@clisp.org>
5736
5737         * modules/copy-file: Depend on unistd.
5738         * modules/execute: Likewise.
5739         * modules/fatal-signal: Likewise.
5740         * modules/findprog: Likewise.
5741         * modules/mkdtemp : Likewise.
5742         * modules/pipe: Likewise.
5743         * modules/wait-process: Likewise.
5744
5745 2006-04-23  Bruno Haible  <bruno@clisp.org>
5746
5747         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
5748         condition was already detected.
5749         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5750
5751 2006-04-23  Bruno Haible  <bruno@clisp.org>
5752
5753         * lib/copy-file.c: Include <unistd.h> unconditionally.
5754         * lib/execute.c: Likewise.
5755         * lib/fatal-signal.c: Likewise.
5756         * lib/findprog.c: Likewise.
5757         * lib/mkdtemp.c: Likewise.
5758         * lib/pipe.h: Likewise.
5759         * lib/pipe.c: Likewise.
5760         * lib/wait-process.h: Likewise.
5761
5762 2006-04-23  Bruno Haible  <bruno@clisp.org>
5763
5764         * gnulib-tool (func_usage): Fix --import description. Document
5765         --update.
5766         (func_import): Create temporary file in a temporary directory, if
5767         --dry-run is specified. Silence errors from 'grep' when there are no
5768         m4 files in $m4dir.
5769         (func_create_testdir): Silence errors from 'grep' when there are no
5770         m4 files in $m4dir.
5771         Reported by Karl Berry <karl@freefriends.org>.
5772
5773 2006-04-20  Bruno Haible  <bruno@clisp.org>
5774
5775         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
5776         one argument, so that the code will be portable to Autoconf 2.60.
5777         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
5778         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
5779         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
5780
5781 2006-04-19  Derek Price  <derek@ximbiot.com>
5782             Eric Blake  <ebb9@byu.net>
5783
5784         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
5785         rather than "/full/path.h".  Update comment to match.  Shorten &
5786         generalize m4_translit call via AS_TR_CPP.
5787
5788 2006-04-19  Derek Price  <derek@ximbiot.com>
5789             Eric Blake  <ebb9@byu.net>
5790
5791         * lib/inttypes.h: Correct grammar in comment.
5792
5793 2006-04-18  Derek Price  <derek@ximbiot.com>
5794             Paul Eggert  <eggert@cs.ucla.edu>
5795
5796         * modules/inttypes: New file.
5797         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
5798
5799 2006-04-18  Derek Price  <derek@ximbiot.com>
5800             Paul Eggert  <eggert@cs.ucla.edu>
5801
5802         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
5803         New files.
5804
5805 2006-04-18  Derek Price  <derek@ximbiot.com>
5806             Paul Eggert  <eggert@cs.ucla.edu>
5807
5808         * lib/inttypes.h: New file.
5809         * lib/strtoimax.c: Assume <inttypes.h>.
5810
5811 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
5812
5813         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
5814         isn't mounted.  Problem reported by Kir Kolyshkin.
5815
5816 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
5817
5818         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
5819         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
5820         Derek R. Price.
5821         * lib/regex.h (RE_DUP_MAX): Update comment to match current
5822         implementation.
5823
5824 2006-04-12  Eric Blake  <ebb9@byu.net>
5825
5826         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
5827         is now done automatically by the corresponding Autoconf macro.
5828
5829 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
5830
5831         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
5832         time_r.h.
5833
5834 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5835
5836         Merge regex changes from libc, removing some of our
5837         POSIX-conformance changes that were rejected and redoing them in a
5838         less-intrusive way.
5839
5840         * lib/regcomp.c (re_compile_internal, init_dfa):
5841         Length arg is now size_t, not Idx.  All uses changed.
5842         (peek_token): Forward decl now says internal_function.
5843         (__re_error_msgid, __re_error_msgid_idx):
5844         Now static rather than extern with attribute_hidden.
5845         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
5846         For some reason libc prefers K&R style defns for external functions.
5847         (regerror) [!defined _LIBC]: Likewise.
5848         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
5849         (seek_collating_symbol_entry, lookup_collation_sequence_value):
5850         (build_range_exp, build_collating_symbol):
5851         Use K&R-style defn.
5852         (re_compile_fastmap): Use '\0' to memset, not 0.
5853         (utf8_sb_map): Make the calculations more obvious.
5854         (init_dfa, parse_bracket_exp, build_charclass_op):
5855         Call calloc and cast result, as glibc does.
5856         (init_word_char, fetch_token, peek_token, peek_token_bracket):
5857         (build_range_exp, build_collating_symbol):
5858         Now internal functions.
5859
5860         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
5861
5862         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
5863         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
5864         Don't depend on VMS; depend on __VMS instead, for POSIX
5865         namespace cleanness.
5866         (regoff_t): Define to ssize_t, not long int.
5867
5868         Remove the REG_ macros named below.  Instead, make the old names
5869         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
5870         __USE_GNU_REGEX.
5871         (REG_BACKSLASH_ESCAPE_IN_LISTS):
5872         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
5873         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
5874         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
5875         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
5876         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
5877         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
5878         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
5879         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
5880         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
5881         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
5882         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
5883         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
5884         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
5885         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
5886         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
5887         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
5888         (REG_NREGS):
5889         Remove.  All uses replaced by the old RE_* names.
5890         (RE_BACKSLASH_ESCAPE_IN_LISTS):
5891         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
5892         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
5893         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
5894         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
5895         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
5896         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
5897         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
5898         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
5899         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
5900         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
5901         Don't bother having these macros be independent of each others'
5902         values, since they no longer exist in the POSIX name space.
5903
5904         Rename the following member names back to their old names,
5905         unless !__USE_GNU_REGEX.  All uses changed back.
5906         (buffer): Renamed from re_buffer.
5907         (allocated): Renamed from re_allocated.
5908         (used): Renamed from re_used.
5909         (syntax): Renamed from re_syntax.
5910         (fastmap): Renamed from re_fastmap.
5911         (translate): Renamed from re_translate.
5912         (can_be_null): Renamed from re_can_be_null.
5913         (regs_allocated): Renamed from re_regs_allocated.
5914         (fastmap_accurate): Renamed from re_fastmap_accurate.
5915         (no_sub): Renamed from re_no_sub.
5916         (not_bol): Renamed from re_not_bol.
5917         (not_eol): Renamed from re_not_eol.
5918         (newline_anchor): Renamed from re_newline_anchor.
5919         (num_regs): Renamed from rm_num_regs.
5920         (start): Renamed from rm_start.
5921         (end): Renamed from rm_end.
5922
5923         (free_state): Move up a bit.
5924
5925         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
5926         #define to be empty.
5927         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
5928         when that is what is intended.
5929         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
5930         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
5931         (MAX): New macro.
5932         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
5933         All uses changed back to re_malloc, etc.  It's now the caller's
5934         responsibility to check for overflow; all callers changed.
5935         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
5936         (re_x2nrealloc): Remove.
5937         (free_state): Remove decl.
5938
5939         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
5940         (re_set_registers, re_exec):
5941         Use K&R-style defn.
5942
5943         2006-01-31  Roland McGrath  <roland@redhat.com>
5944
5945         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
5946         Reported by Mike Frysinger <vapier@gentoo.org>.
5947
5948         2006-01-15  Andreas Jaeger  <aj@suse.de>
5949
5950         [BZ #1950]
5951         * lib/regex_internal.c (re_string_reconstruct): Adjust for
5952         build_wcs_upper_buffer change.
5953         (build_wcs_upper_buffer): Change return type.
5954
5955         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
5956
5957         * lib/regex_internal.h: Include <stdint.h> if available.
5958
5959         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
5960
5961         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
5962
5963         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
5964
5965         * lib/regcomp.c: Adjust for changed secondary hash function.
5966
5967         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
5968
5969         * lib/regex.h: Pretty printing.
5970         Clean up namespace a bit.
5971
5972         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
5973
5974         * lib/regexec.c (update_cur_sifted_state, check_arrival,
5975         check_arrival_add_next_nodes): Avoid using uninitialized variable.
5976
5977         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
5978                     Ulrich Drepper  <drepper@redhat.com>
5979
5980         [BZ #1302]
5981         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
5982         changed.
5983         (bitset_word_t): Renamed from bitset_word.  All uses changed.
5984
5985         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
5986
5987         [BZ #281]
5988         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
5989         * lib/regcomp.c: Remove unnecessary uses of
5990         unsigned RE_TRANSLATE_TYPE.
5991         * lib/regex_internal.h: Likewise.
5992         * lib/regex_internal.c: Likewise.
5993         * lib/regexec.c: Likewise.
5994         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
5995
5996         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
5997
5998         * lib/regexec.c (find_recover_state): Remove unnecessary
5999         initialization.
6000         (transit_state_bkref): Make DFA a const pointer.
6001         (get_subexp): Likewise.
6002         (check_arrival): Likewise.
6003         (update_cur_sifted_state): Likewise.
6004         (re_search_internal): Likewise.
6005         (prune_impossible_nodes): Likewise.
6006         (acquire_init_state_context): Likewise.
6007         (proceed_next_node): Likewise.
6008         (set_regs): Likewise.
6009         (free_fail_stack_return): Likewise.
6010         (check_arrival_expand_ecl): Mark DFA parameter as const.
6011         (check_arrival_expand_ecl_sub): Likewise.
6012         (check_subexp_limits): Likewise.
6013         (sub_epsilon_src_nodes):  Likewise.
6014         (add_epsilon_src_nodes):  Likewise.
6015         (merge_state_array): Likewise.
6016         (update_regs): Likewise.
6017         (build_trtable): Likewise.
6018         (sift_states_backward): Mark MCTX parameter as const.
6019         (build_sifted_states): Likewise.
6020         (update_cur_sifted_state): Likewise.
6021         (sift_states_mkref): Likewise.
6022         (check_arrival_expand_ecl): Mark eclosure as const.
6023         (check_dst_limits_calc_pos_1): Likewise.
6024         * lib/regex_internal.h (re_match_context_t): Make dfa a const
6025         pointer.
6026
6027         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
6028
6029         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
6030         (transit_state_sb): Likewise.
6031         (transit_state_mb): Likewise.
6032         (sift_states_iter_mb): Likewise.
6033         (check_arrival_add_next_nodes): Likewise.
6034         (check_node_accept_bytes): Change first parameter to pointer-to-const.
6035         [_LIBC] (re_search_2_stub): Use mempcpy.
6036
6037         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
6038         mbrtowc for very simple UTF-8 case.
6039
6040         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
6041         a pointer-to-const.
6042         (re_acquire_state_context): Likewise.
6043         * lib/regex_internal.h: Adjust prototypes.
6044
6045         * lib/regex.c: Prevent using C++ compilers.
6046
6047         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
6048         (re_acquire_state_context): Likewise.
6049
6050 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6051
6052         * modules/regex (Depends-on): Add ssize_t.
6053
6054 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6055
6056         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
6057         translation table.
6058
6059 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6060
6061         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
6062
6063 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
6064             Bruno Haible  <bruno@clisp.org>
6065
6066         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
6067         <sys/types.h> and <inttypes.h>.
6068
6069 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6070
6071         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
6072         `__error_t_defined', so argp.h will not typedef the former.
6073
6074 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
6075
6076         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
6077         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
6078         glibc names.  Even if glibc is changed to conform to POSIX, the
6079         traditional names will be available anyway, since regex depends on
6080         the extensions module.  Also, fix a longstanding typo in the
6081         implementation of Spencer ERE test #75 from grep 2.3.  Problems
6082         reported by Emanuele Giaquinta.  Also, change sense of cached
6083         variable, so that the message makes sense.
6084
6085 2006-03-24  Simon Josefsson  <jas@extundo.com>
6086
6087         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
6088         including some doc fixes.
6089         (base64_encode_alloc): Fix +1 bug on allocation failures.
6090
6091 2006-03-24  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6092
6093         * lib/base64.c (base64_encode): Do not read past end of array with
6094         unsanitized input on systems with CHAR_BIT > 8.
6095
6096 2006-03-24  Eric Blake  <ebb9@byu.net>
6097
6098         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
6099
6100 2006-03-22  Karl Berry  <karl@gnu.org>
6101
6102         * config/srclist.txt (*setenv.[ch]): get from coreutils.
6103         * config/srclistvars.sh (COREUTILS): new var.
6104
6105 2006-03-17  Jim Meyering  <jim@meyering.net>
6106
6107         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
6108         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
6109
6110 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6111
6112         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
6113         no longer needs it.  Instead, check that regoff_t is as least
6114         as wide as ptrdiff_t.
6115
6116         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
6117         so that our regex.h stays compatible with the installed regex.
6118         This is helpful for installers who configure --without-included-regex.
6119         Problem reported by Emanuele Giaquinta.
6120
6121 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6122
6123         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
6124         Typedef to long int, not to off_, as POSIX will likely change
6125         in that direction.
6126
6127 2006-03-15  Eric Blake  <ebb9@byu.net>
6128
6129         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
6130
6131 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6132
6133         * lib/argp-help.c (validate_uparams): Fix typo
6134         * lib/argp-parse.c (argp_default_options): Consistently begin help
6135         messages with a lowercase letter.
6136
6137 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
6138
6139         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
6140         overrun buffers and shouldn't be used (much as gets shouldn't be
6141         used).
6142         * lib/time_r.c (asctime_r, ctime_r): Likewise.
6143
6144 2006-03-08  Simon Josefsson  <jas@extundo.com>
6145
6146         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
6147         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6148
6149 2006-03-08  Simon Josefsson  <jas@extundo.com>
6150
6151         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
6152         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6153
6154 2006-03-08  Simon Josefsson  <jas@extundo.com>
6155
6156         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
6157         signal that configure disabled the device.
6158
6159 2006-03-08  Simon Josefsson  <jas@extundo.com>
6160
6161         * build-aux/maint.mk: Fix refresh-po, to handle no translated
6162         languages.
6163
6164 2006-03-07  Simon Josefsson  <jas@extundo.com>
6165
6166         * modules/getopt (Depends-on): Add unistd.
6167
6168         * modules/unistd: New file.
6169
6170 2006-03-07  Simon Josefsson  <jas@extundo.com>
6171
6172         * modules/gc-random: New file.
6173
6174 2006-03-07  Simon Josefsson  <jas@extundo.com>
6175
6176         * m4/unistd_h.m4: New file.
6177
6178 2006-03-07  Simon Josefsson  <jas@extundo.com>
6179
6180         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
6181         test to be side-effect free by storing the result in the cache
6182         variable gl_cv_lib_readline, and moving the assignment of
6183         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
6184         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6185
6186 2006-03-07  Simon Josefsson  <jas@extundo.com>
6187
6188         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
6189         error on missing devices (the functions will return an error).
6190
6191         * m4/gc.m4: Move random stuff to gc-random.m4
6192
6193 2006-03-07  Simon Josefsson  <jas@extundo.com>
6194
6195         * lib/unistd_.h: New file.
6196
6197 2006-03-07  Simon Josefsson  <jas@extundo.com>
6198
6199         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
6200
6201 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6202
6203         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
6204         Problem reported by Juan Manuel Guerrero.
6205
6206 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6207
6208         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
6209         the unistd module.
6210         * lib/getlogin_r.c: Likewise.
6211         * lib/getlogin_r.h: Likewise.
6212         * lib/glob.c: Likewise.
6213         * lib/pagealign_alloc.c: Likewise.
6214         * lib/unistd_.h: Remove; no longer needed.
6215
6216 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6217
6218         * MODULES.html.sh (Support for systems lacking POSIX:2001):
6219         Add unistd.
6220         * modules/c-stack (Depends-on): Add unistd.
6221         * modules/getlogin_r: Likewise.
6222         * modules/glob: Likewise.
6223         * modules/pagealign_alloc: Likewise.
6224         * modules/unistd (Files): Remove lib/unistd_.h.
6225         (EXTRA_DIST): Remove.
6226         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
6227         need unistd_.h.
6228         (MOSTLYCLEANFILES): Remove unistd.h-t.
6229
6230 2006-03-03  Simon Josefsson  <jas@extundo.com>
6231
6232         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
6233
6234 2006-03-03  Simon Josefsson  <jas@extundo.com>
6235
6236         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
6237         libidn and bison.
6238
6239 2006-03-03  Simon Josefsson  <jas@extundo.com>
6240
6241         * build-aux/maint.mk: Add indent target.
6242
6243 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
6244
6245         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
6246         our replacement poll.h in any case, to avoid a differing
6247         declaration from a system header.  Seen on AIX.
6248
6249 2006-03-01  Simon Josefsson  <jas@extundo.com>
6250
6251         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
6252         <kasal@ucw.cz>.
6253
6254 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
6255
6256         * modules/gettime (Depends-on): Add extensions module.
6257         * modules/nanosleep (Depends-on): Likewise.
6258         * modules/settime (Depends-on): Likewise.
6259
6260 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
6261
6262         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
6263         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
6264         pedantically.
6265         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6266         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
6267
6268         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
6269         not "==".  Reported by Ralf Wildenhues.
6270
6271 2006-03-01  Karl Berry  <karl@gnu.org>
6272
6273         * doc/Copyright/request-*: new files, synced from gnuorg.
6274
6275 2006-03-01  Karl Berry  <karl@gnu.org>
6276
6277         * config/srclist.txt (Copyright/*): new entries.
6278
6279 2006-02-28  Simon Josefsson  <jas@extundo.com>
6280
6281         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
6282
6283 2006-02-27  Simon Josefsson  <jas@extundo.com>
6284
6285         * lib/base64.h: Indent #define's.  From Jim Meyering
6286         <jim@meyering.net>.
6287
6288 2006-02-27  Jim Meyering  <jim@meyering.net>
6289
6290         Revert the change of 2006-02-24, so these files can continue
6291         to be sync'd from gettext.
6292         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
6293         of `config.h'.
6294
6295 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
6296
6297         * modules/intprops: New file.
6298         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
6299         Add intprops.
6300         * modules/getloadavg (Files): Remove lib/intprops.h.
6301         (Depends-on): Add intprops.
6302         * modules/human: Likewise.
6303         * modules/inttostr: Likewise.
6304         * modules/openat: Likewise.
6305         * modules/sig2str: Likewise.
6306         * modules/userspec: Likewise.
6307         * modules/utimecmp: Likewise.
6308         * modules/xnanosleep: Likewise.
6309         * modules/xstrtol: Likewise.
6310
6311 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
6312
6313         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
6314         * modules/lock-tests (TESTS): Use $(EXEEXT).
6315         * modules/tls-tests: Likewise.
6316         * modules/argp-tests: Likewise.
6317         (check_PROGRAMS): New var, replacing...
6318         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
6319
6320 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6321
6322         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
6323         `config.h'.
6324
6325 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
6326
6327         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
6328
6329 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6330
6331         Sync from coreutils.
6332         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
6333         gl_CHDIR_SAFER.
6334
6335 2006-02-22  Jim Meyering  <jim@meyering.net>
6336
6337         Sync from coreutils.
6338         * m4/chdir-safer.m4: New file.
6339
6340 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
6341
6342         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
6343         AT_FDCWD exceeds INT_MAX.
6344         * lib/openat.h (AT_FDCWD): Likewise.
6345
6346 2006-02-17  Eric Blake  <address@hidden>
6347
6348         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
6349
6350 2006-02-16  Simon Josefsson  <jas@extundo.com>
6351
6352         * modules/getaddrinfo (Depends-on): Add sys_socket.
6353
6354 2006-02-15  Simon Josefsson  <jas@extundo.com>
6355
6356         * build-aux/maint.mk: Add dsyntax-check rule.
6357
6358 2006-02-15  Eric Blake  <ebb9@byu.net>
6359
6360         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
6361         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
6362         'present but cannot compile' warnings on cygwin.
6363         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
6364         use ws2tcpip.h if sys/socket.h works.
6365         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
6366         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
6367
6368 2006-02-14  Simon Josefsson  <jas@extundo.com>
6369
6370         * modules/maintainer-makefile (Files): Rename.
6371
6372         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
6373         and (the local) Makefile.cfg to maint-cfg.mk.
6374
6375         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
6376         to the latter.
6377
6378         * modules/maintainer-makefile: New module.
6379
6380         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
6381         severaly stripped to make it possible to build it up from scratch
6382         with reliable tests.
6383
6384         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
6385         fixes to permit overriding the default actions when configure and
6386         makefile are not available.
6387
6388 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
6389
6390         Sync from coreutils.
6391         * modules/lstat (Depends-on): Don't depend on xalloc.
6392         (License): Change from GPL to LGPL, since this is now simply a
6393         replacement for a libc function.
6394
6395 2006-02-14  Jim Meyering  <jim@meyering.net>
6396
6397         Sync from coreutils.
6398
6399         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
6400         failure on deficient systems, and simplify gnulib lgpl dependencies.
6401         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
6402         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
6403
6404         * lib/xalloc-die.c: Remove unused definition of N_.
6405
6406 2006-02-14  Jim Meyering  <jim@meyering.net>
6407
6408         Sync from coreutils.
6409         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
6410         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
6411         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
6412         double-quote uses of that variable, to accommodate the rare case in
6413         which getmntent is available in none of the libraries checked.  This
6414         happens at least on FreeBSD 5.0.
6415
6416 2006-02-13  Simon Josefsson  <jas@extundo.com>
6417
6418         * gnulib-tool (Usage): Fix --import, from
6419         karl@freefriends.org (Karl Berry).
6420
6421 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6422
6423         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
6424
6425 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
6426
6427         * lib/argp-namefrob.h: Restore changes accidentally lost during the
6428         "autoupdate" on 2005-12-12.
6429
6430 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
6431
6432         * modules/closeout (Depends-on): Remove atexit.
6433
6434 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
6435
6436         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
6437         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
6438
6439 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
6440
6441         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
6442         __EXTENSIONS__ if this causes compilation to fail.  Problem
6443         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
6444         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
6445
6446 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
6447
6448         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
6449         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
6450         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
6451         All uses changed.
6452
6453 2006-01-26  Simon Josefsson  <jas@extundo.com>
6454
6455         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
6456         prototype is visible on mingw32.
6457
6458         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
6459         for mingw32.
6460
6461         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
6462         mingw32).
6463
6464 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
6465
6466         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
6467         attempt to open for write; this always fails, at least on POSIX
6468         hosts.  This reinstates the 2006-01-09 change, which was
6469         inadvertently removed.
6470
6471 2006-01-26  Bruno Haible  <bruno@clisp.org>
6472
6473         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
6474         Reported by Paul Eggert.
6475
6476 2006-01-26  Bruno Haible  <bruno@clisp.org>
6477             Paul Eggert  <eggert@cs.ucla.edu>
6478
6479         * lib/stdbool_.h (_Bool)
6480         [(! (defined __cplusplus || defined __BEOS__)
6481           && !defined __GNUC__
6482           && !(defined __HP_cc || defined __xlc__
6483                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
6484                || defined __sgi))]:
6485         #define to signed char in these cases too; this simplifies
6486         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
6487         etc., separately) and makes it more conservative.
6488
6489 2006-01-25  Simon Josefsson  <jas@extundo.com>
6490
6491         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
6492         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
6493         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
6494
6495 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
6496
6497         * lib/argp-namefrob.h: Bugfix. Remove stray #
6498
6499 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
6500
6501         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
6502         so that we test the test.
6503         Check for yet another HP-UX cc bug involving *bool |= bool.
6504
6505 2006-01-25  Karl Berry  <karl@gnu.org>
6506
6507         * config/srclist.txt (vasnprintf.c): sync lost.
6508
6509 2006-01-25  Jim Meyering  <jim@meyering.net>
6510
6511         Sync from the stable (b5) branch of coreutils:
6512
6513         * lib/fts.c (fts_children): Don't let close() clobber errno from
6514         failed fchdir().
6515
6516         * lib/fts.c (fts_stat): When following a symlink-to-directory,
6517         don't necessarily interpret stat-fails+lstat-succeeds as indicating
6518         a dangling symlink.  That can also happen at least for ELOOP.
6519         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
6520         FYI, this bug predates the inclusion of fts.c in coreutils.
6521
6522         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
6523         in their own block, so pre-c99 compilers don't object.
6524
6525         Avoid the double-free (first in fts_read, second in fts_close) that
6526         would occur when an `active' directory is made inaccessible (e.g.,
6527         via chmod a-x) during a traversal.
6528         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
6529         before returning.  Reproduce this failure by
6530         mkdir -p a/b; cd a; chmod a-x . b
6531         Reported by Stavros Passas.
6532
6533 2006-01-25  Jim Meyering  <jim@meyering.net>
6534
6535         * lib/fileblocks.c: Remove more useless parentheses.
6536         * lib/readutmp.h: Likewise.
6537
6538 2006-01-25  Bruno Haible  <bruno@clisp.org>
6539
6540         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
6541         warnings.
6542         Reported by Paul Eggert.
6543
6544 2006-01-25  Bruno Haible  <bruno@clisp.org>
6545
6546         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
6547         rid of a trap command. For Solaris sh.
6548         Reported by Mark D. Baushke <mdb@gnu.org>.
6549
6550 2006-01-24  Simon Josefsson  <jas@extundo.com>
6551
6552         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
6553         Bruno.
6554
6555 2006-01-24  Karl Berry  <karl@gnu.org>
6556
6557         * config/srclist.txt (argp-namefrob.h): sync lost.
6558
6559 2006-01-24  Jim Meyering  <jim@meyering.net>
6560
6561         * modules/openat (Files): Add lib/intprops.h.
6562         From Mark D. Baushke.
6563
6564 2006-01-24  Jim Meyering  <jim@meyering.net>
6565
6566         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
6567         Reported by Mark D. Baushke.
6568
6569 2006-01-24  Jim Meyering  <jim@meyering.net>
6570
6571         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
6572
6573 2006-01-24  Bruno Haible  <bruno@clisp.org>
6574
6575         * modules/strnlen (Maintainer): Change from glibc to all.
6576
6577 2006-01-24  Bruno Haible  <bruno@clisp.org>
6578
6579         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
6580         Patch by Paul Eggert.
6581
6582 2006-01-24  Bruno Haible  <bruno@clisp.org>
6583
6584         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
6585         already has it.
6586         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
6587         2005-11-26.
6588
6589         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
6590         'signed char' to avoid problems with the built-in _Bool type.
6591         Reported by Paul Eggert on 2005-11-26.
6592
6593 2006-01-24  Bruno Haible  <bruno@clisp.org>
6594
6595         * gnulib-tool (func_import): Avoid constructing complicated sed
6596         expressions inside backquote.
6597         Report and solution by Mark D. Baushke <mdb@gnu.org>.
6598
6599 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
6600
6601         These changes imported from libc.
6602         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
6603         test and two separate function calls.
6604         * lib/strndup.c (__strndup): Add libc_hidden_def.
6605
6606 2006-01-23  Simon Josefsson  <jas@extundo.com>
6607
6608         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
6609         Remove the test_*_SOURCES variable: automake infers it by default.
6610         * modules/tls-tests: Likewise.
6611
6612 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6613
6614         Work around porting bugs reported by Dieter in
6615         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
6616         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
6617         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
6618         Include "getopt.h" first, to check interface.
6619         (getenv): Declare only if defined HAVE_DECL_GETENV &&
6620         !HAVE_DECL_GETENV.
6621         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
6622         (__strndup): Revert to K&R-style function dfns, the glibc style.
6623         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
6624         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
6625         Include strnlen.h first, to get prototype properly.
6626         (strnlen): Renamed from __strnlen.
6627         Remove weak alias.
6628
6629 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6630
6631         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
6632
6633 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6634
6635         * config/srclist.txt: Adjust to reflect glibc reorganization.
6636         This affects only comments.
6637
6638 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6639
6640          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
6641          Reported by Bruce Korb <bkorb@gnu.org>.
6642
6643 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
6644
6645         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
6646         to pacify gcc -Wswitch-default.
6647
6648 2006-01-22  Bruno Haible  <bruno@clisp.org>
6649
6650         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
6651         temporary buffer for sprintf, take into account the precision also
6652         for 'd', 'i', 'u', 'o', 'x', 'X'.
6653
6654 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
6655
6656         * modules/argp-tests: New module
6657         * tests/test-argp.c: New file
6658         * tests/test-argp-2.sh: New file
6659
6660 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
6661
6662         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
6663         (__argp_base_name): Removed
6664         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
6665         typo.
6666         (__argp_base_name): Provide macro definition or extern declaration
6667         depending on the configuration
6668
6669 2006-01-20  Simon Josefsson  <jas@extundo.com>
6670
6671         * modules/inet_ntop (Depends-on): Depend on sys_socket.
6672
6673 2006-01-20  Simon Josefsson  <jas@extundo.com>
6674
6675         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
6676
6677 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
6678
6679         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
6680         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
6681         Suggested by Bruno Haible.
6682
6683 2006-01-20  Karl Berry  <karl@gnu.org>
6684
6685         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
6686         until changes propagate, I guess.
6687
6688 2006-01-19  Simon Josefsson  <jas@extundo.com>
6689
6690         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
6691
6692 2006-01-19  Simon Josefsson  <jas@extundo.com>
6693
6694         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
6695
6696 2006-01-19  Simon Josefsson  <jas@extundo.com>
6697
6698         * gnulib-tool: Set check_PROGRAMS.
6699
6700         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
6701         modules/des-tests, modules/gc-arcfour-tests,
6702         modules/gc-arctwo-tests, modules/gc-des-tests,
6703         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
6704         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
6705         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
6706         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
6707         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
6708         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
6709         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
6710         test_*_SOURCES.
6711
6712 2006-01-18  Simon Josefsson  <jas@extundo.com>
6713
6714         * modules/socklen (Depends-on): Depend on sys_socket.
6715
6716 2006-01-18  Simon Josefsson  <jas@extundo.com>
6717
6718         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
6719         modules/des-tests, modules/gc-arcfour-tests,
6720         modules/gc-arctwo-tests, modules/gc-des-tests,
6721         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
6722         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
6723         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
6724         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
6725         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
6726         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
6727         $(EXEEXT) to automake TESTS variable, for mingw32.
6728
6729 2006-01-17  Simon Josefsson  <jas@extundo.com>
6730
6731         * modules/socklen (Include): Need sys/socket.h.
6732
6733 2006-01-17  Bruno Haible  <bruno@clisp.org>
6734
6735         * modules/ssize_t (Include): Add <sys/types.h>.
6736
6737 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
6738
6739         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
6740         it's not portable and it doesn't work with cross-compiles.
6741         Problem reported by Bruno Haible.  Fix missing-$ typo in
6742         'test "gl_cv_ignore_unused_libraries" ...' that prevented
6743         -zignore from being used with Sun's C compiler.
6744
6745 2006-01-12  Simon Josefsson  <jas@extundo.com>
6746
6747         * lib/base64.c: Fix warning, reported by Bruno Haible
6748         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
6749
6750 2006-01-12  Bruno Haible  <bruno@clisp.org>
6751
6752         * modules/ldd: New file.
6753         * build-aux/ldd.sh.in: New file.
6754         * MODULES.html.sh (Support for building libraries and executables): Add
6755         ldd.
6756
6757 2006-01-12  Bruno Haible  <bruno@clisp.org>
6758
6759         * m4/ldd.m4: New file.
6760
6761 2006-01-12  Bruno Haible  <bruno@clisp.org>
6762
6763         * gnulib-tool (func_import, func_create_testdir): Don't go into an
6764         endless loop while replacing $auxdir with build-aux.
6765
6766 2006-01-11  Simon Josefsson  <jas@extundo.com>
6767
6768         * lib/stdint_.h (SIZE_MAX): Add missing (.
6769
6770 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
6771
6772         Sync from coreutils.
6773         * lib/md5.c: Fix commentary typos.
6774         (alignof, UNALIGNED_P): No need for a GCC-specific version.
6775         * lib/md5.h (__attribute__): Remove; unused.
6776         * lib/sha1.c: Fix commentary to match md5 better.
6777         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
6778         so that we don't need to worry about alignment.  All uses changed.
6779         This merges the 2005-10-28 md5 change into sha1.
6780
6781 2006-01-11  Jim Meyering  <jim@meyering.net>
6782
6783         Sync from coreutils.
6784         * lib/md5.c (OP): Fix spacing.
6785
6786 2006-01-11  Bruno Haible  <bruno@clisp.org>
6787
6788         Ensure automatic ordering between gl_LOCK and gl_ARGP.
6789         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
6790         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
6791
6792 2006-01-11  Bruno Haible  <bruno@clisp.org>
6793
6794         Ensure automatic ordering between gl_LOCK and gl_ARGP.
6795         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
6796         the "early" section as well.
6797
6798 2006-01-11  Bruno Haible  <bruno@clisp.org>
6799
6800         Avoid "ar: no archive members specified" error on MacOS X.
6801         * gnulib-tool (func_modules_add_dummy): New function.
6802         (func_import, func_create_testdir): Invoke it.
6803
6804 2006-01-11  Bruno Haible  <bruno@clisp.org>
6805
6806         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
6807         with $auxdir in AC_CONFIG_FILES statements.
6808
6809 2006-01-11  Bruno Haible  <bruno@clisp.org>
6810
6811         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6812         Initialize also noinst_HEADERS to empty.
6813
6814 2006-01-11  Bruno Haible  <bruno@clisp.org>
6815
6816         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
6817         variables.
6818         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
6819         autoreconf.
6820
6821 2006-01-11  Bruno Haible  <bruno@clisp.org>
6822
6823         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
6824         overridable by the user.
6825         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6826
6827 2006-01-10  Simon Josefsson  <jas@extundo.com>
6828
6829         * modules/sys_socket: New file.
6830
6831 2006-01-10  Simon Josefsson  <jas@extundo.com>
6832
6833         * m4/sys_socket_h.m4: New file.
6834
6835 2006-01-10  Simon Josefsson  <jas@extundo.com>
6836
6837         * lib/socket_.h: New file.
6838
6839 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6840
6841         * modules/readutmp (Maintainer): Add myself.
6842
6843 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6844
6845         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
6846         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
6847         People who are still concerned with buggy memcmp implementations
6848         can invoke gl_FUNC_MEMCMP themselves.
6849
6850 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6851
6852         * lib/regex_internal.h (BITSET_WORD_BITS):
6853         Work around a bug in 64-bit PGC (before version 6.1-2), where the
6854         preprocessor mishandles large unsigned values as if they were signed.
6855         Problem reported by Claudio Fontana in
6856         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
6857
6858 2006-01-10  Jim Meyering  <jim@meyering.net>
6859
6860         Avoid the double-free (first in fts_read, second in fts_close) that
6861         would occur when an `active' directory is made inaccessible (e.g.,
6862         via chmod a-x) during a traversal.
6863         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
6864         before returning.  Reproduce this failure by
6865         mkdir -p a/b; cd a; chmod a-x . b
6866         Reported by Stavros Passas.
6867
6868         Sync from coreutils.
6869         * lib/sha1.c: Tweak grammar in a comment.
6870
6871 2006-01-10  Jim Meyering  <jim@meyering.net>
6872
6873         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
6874         Patch by Joerg Sonnenberger.
6875
6876 2006-01-10  Bruno Haible  <bruno@clisp.org>
6877
6878         * modules/readutmp: Depend on module free.
6879         * modules/strtok_r: Depend on module restrict.
6880
6881 2006-01-10  Bruno Haible  <bruno@clisp.org>
6882
6883         * modules/gettext (configure.ac): Add an invocation of
6884         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
6885
6886 2006-01-10  Bruno Haible  <bruno@clisp.org>
6887
6888         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
6889         Reported by Werner Lemberg <wl@gnu.org>.
6890
6891 2006-01-10  Bruno Haible  <bruno@clisp.org>
6892
6893         * lib/localcharset.c: Update from GNU gettext.
6894
6895 2006-01-10  Bruno Haible  <bruno@clisp.org>
6896
6897         * lib/argp.h (__const): Remove macro. Use const instead.
6898         * lib/argp-fmtstream.h (__const): Likewise.
6899         * lib/glob_.h (__const): Remove macro.
6900         * lib/glob-libc.h: Use const instead of __const.
6901
6902 2006-01-10  Bruno Haible  <bruno@clisp.org>
6903
6904         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
6905         variable.
6906         Needed to avoid an automake error regarding the 'gettext' module.
6907
6908 2006-01-09  Simon Josefsson  <jas@extundo.com>
6909
6910         * modules/inet_ntop (Depends-on): Add restrict.
6911
6912 2006-01-09  Simon Josefsson  <jas@extundo.com>
6913
6914         * modules/gc-rijndael-tests (License): Put under LGPL.
6915
6916         * modules/gc-des-tests (License): Likewise.
6917
6918         * modules/gc-arcfour-tests (License): Likewise.
6919
6920         * modules/gc-arctwo-tests (License): Likewise.
6921
6922         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
6923
6924         * modules/gc-hmac-sha1-tests (Files): Likewise.
6925
6926         * modules/gc-hmac-md5-tests (License): Likewise.
6927
6928         * modules/gc-sha1-tests (License): Likewise.
6929
6930         * modules/gc-md5-tests (License): Likewise.
6931
6932         * modules/gc-md4-tests (License): Likewise.
6933
6934         * modules/gc-md2-tests (License): Likewise.
6935
6936         * modules/gc-tests (License): Likewise.
6937
6938         * modules/des-tests (License): Likewise.
6939
6940         * modules/md4-tests (License): Likewise.
6941
6942         * modules/md2-tests (License): Likewise.
6943
6944 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6945
6946         Sync from coreutils:
6947
6948         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
6949         * modules/lib-ignore: New file.
6950         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
6951         chdir-safer.m4, lchmod.m4.
6952         * modules/openat: Add mkdirat.c, openat-priv.h.
6953
6954 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6955
6956         Sync from coreutils.
6957         * m4/lib-ignore.m4: New file.
6958         * m4/lchmod.m4: New file.
6959
6960 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6961
6962         Sync from coreutils.
6963         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
6964         for write access: POSIX says that must fail.
6965         * lib/fts.c (diropen): Likewise.
6966         * lib/save-cwd.c (save_cwd): Likewise.
6967         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
6968         well, for minor improvements on hosts that lack O_DIRECTORY.
6969         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
6970         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
6971         Fall back on chown if open failed with EACCES.
6972
6973         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
6974         Report an error at compile-time if only a 1-second nominal clock
6975         resolution is found.
6976
6977         * lib/lchmod.h: New file.
6978         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
6979         (make_dir_parents): Use lchown rather than chown, and
6980         lchmod rather than chmod.
6981
6982         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
6983         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
6984         "proc" reported by n0dalus.
6985
6986         * lib/mountlist.c: Include <limits.h>.
6987         (dev_from_mount_options)
6988         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
6989         New function.  It no longer assumes "dev=" has the System V meaning
6990         on Linux (since it doesn't).  It also parses "dev=" more carefully.
6991         (read_file_system_list)
6992         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
6993         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
6994         dev= in that case.
6995
6996         * lib/posixtm.h (PDS_PRE_2000): New macro.
6997         * lib/posixtm.c (year): Arg is now syntax_bits rather than
6998         allow_century.  All usages changed.  Reject dates outside the range
6999         1969-1999 if PDS_PRE_2000 is used.
7000
7001 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7002
7003         Sync from coreutils.
7004         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
7005         (Time of day items): Mention the possibility of leap seconds.
7006         Problem reported by Dr. David Alan Gilbert.
7007
7008 2006-01-09  Jim Meyering  <jim@meyering.net>
7009
7010         Sync from coreutils.
7011
7012         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
7013
7014         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
7015
7016         * lib/modechange.c (mode_compile): Reject an invalid mode string
7017         that starts with an octal digit.  From Andreas Gruenbacher.
7018
7019         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
7020         and dup to open_safer and dup_safer, respectively.
7021         (openat_permissive): Fix typo in comment.
7022
7023         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
7024         "gettext.h"; either no longer needed or are guaranteed by openat.h.
7025         (_): Remove; no longer needed.
7026         (openat): Renamed from rpl_openat; no need for rpl_openat
7027         since openat.h renames openat for us.
7028         Replace most of the body with a call to openat_permissive,
7029         to avoid duplicate code.
7030         Port to (probably hypothetical) environments were mode_t is
7031         wider than int.
7032         (openat_permissive): Require mode arg, so that we can check
7033         types better.  Put it just after flags.  Change cwd failure
7034         indicator from pointer-to-bool to pointer-to-errno-value.
7035         All callers changed.
7036         Invoke openat_save_fail and/or openat_restore_fail if
7037         cwd_errno is null, so that openat can call us.
7038         (openat_permissive, fdopendir, fstatat, unlinkat):
7039         Simplify errno handling to avoid some duplicate code,
7040         as it's OK to set errno on success.
7041         * lib/openat.h: Revamp code so that function macros depend on
7042         __OPENAT_PREFIX only, not also on AT_FDCWD.
7043         (openat_ro): Remove.  Caller changed to use openat_permissive.
7044         (openat_permissive): Now a macro, if not a function.
7045         (openat_restore_fail, openat_save_fail): Now always functions,
7046         since mkdirat needs them even if __OPENAT_PREFIX is defined.
7047
7048         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
7049         and openat.c.
7050         * lib/mkdirat.c: Include openat-priv.h.
7051         Remove definitions of macros defined therein.
7052         * lib/openat.c: Likewise.
7053
7054         * lib/mkdirat.c (mkdirat): New file and function.
7055         * lib/openat.h (mkdirat): Declare.
7056
7057         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
7058
7059         * lib/openat.h (openat_permissive): Declare.
7060         (openat_ro): Define.
7061
7062         * lib/openat.c (EXPECTED_ERRNO): New macro.
7063         (openat_permissive): New function -- used in remove.c rewrite.
7064         (all functions): Set errno just before returning, only if there
7065         was an actual failure.
7066         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
7067
7068         Emulate openat-family functions using Linux's procfs, if possible.
7069         Idea and some code based on Ulrich Drepper's glibc changes.
7070
7071         * lib/openat.c: (BUILD_PROC_NAME): New macro.
7072         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
7073         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
7074         before falling back on save_cwd and restore_cwd.
7075         (fdopendir, fstatat, unlinkat): Likewise.
7076
7077         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
7078         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
7079
7080         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
7081         as second argument to va_arg.  Otherwise, some versions of gcc
7082         warn that `if this code is reached, the program will abort'.
7083
7084 2006-01-09  Jim Meyering  <jim@meyering.net>
7085
7086         Sync from coreutils.
7087         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
7088         Require openat-priv.h.
7089
7090 2006-01-09  Bruno Haible  <bruno@clisp.org>
7091
7092         * modules/strnlen (Include): Use strnlen.h.
7093
7094 2006-01-09  Bruno Haible  <bruno@clisp.org>
7095
7096         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
7097
7098 2006-01-09  Bruno Haible  <bruno@clisp.org>
7099
7100         * lib/sysexit_.h (EX_OK): New macro.
7101         Suggested by Martin Lambers <marlam@marlam.de>.
7102
7103 2006-01-09  Bruno Haible  <bruno@clisp.org>
7104
7105         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
7106         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
7107
7108 2006-01-09  Bruno Haible  <bruno@clisp.org>
7109
7110         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
7111         numbers.
7112
7113 2006-01-09  Bruno Haible  <bruno@clisp.org>
7114
7115         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
7116         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
7117         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
7118         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
7119
7120 2006-01-09  Bruno Haible  <bruno@clisp.org>
7121
7122         * build-aux/javacomp.sh.in: New file, moved from lib/.
7123         * modules/javacomp-script (Files): Update.
7124         (configure.ac): Add AC_CONFIG_FILES invocation.
7125         (EXTRA_DIST): Remove variable.
7126
7127         * build-aux/javaexec.sh.in: New file, moved from lib/.
7128         * modules/javaexec (Files): Update.
7129         (configure.ac): Add AC_CONFIG_FILES invocation.
7130         (EXTRA_DIST): Remove javaexec.sh.in.
7131
7132         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
7133         * modules/csharpcomp-script (Files): Update.
7134         (configure.ac): Add AC_CONFIG_FILES invocation.
7135         (EXTRA_DIST): Remove variable.
7136
7137         * build-aux/csharpexec.sh.in: New file, moved from lib/.
7138         * modules/csharpexec (Files): Update.
7139         (configure.ac): Add AC_CONFIG_FILES invocation.
7140         (EXTRA_DIST): Remove csharpexec.sh.in.
7141
7142 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7143
7144         Sync from coreutils.
7145
7146         Add POSIX ACL support
7147         * lib/acl.h (copy_acl, set_acl): Add declarations.
7148         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
7149         systems other than Linux.
7150         (chmod_or_fchmod): New function: use fchmod when possible,
7151         and chmod otherwise.
7152         (file_has_acl): Add a POSIX ACL implementation, with a
7153         Linux-specific subcase.
7154         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
7155         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
7156         acls are unsupported.
7157         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
7158         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
7159         are unsupported.
7160
7161 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7162
7163         Sync from coreutils.
7164         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
7165
7166 2006-01-07  Bruno Haible  <bruno@clisp.org>
7167
7168         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
7169         gl_EARLY.
7170
7171 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7172
7173         * lib/strftime.c (tzname): Don't declare if it is already #defined.
7174         Problem reported for Mingw by Mark Junker.
7175
7176 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7177
7178         * README: Gnulib normally doesn't generate a tarball.
7179
7180 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
7181
7182         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
7183         long int, not int, for nanosecond counts, so that people who are
7184         used to POSIX struct timespec won't be surprised.  Reported by Jim
7185         Meyering.
7186
7187 2005-12-28  Bruno Haible  <bruno@clisp.org>
7188
7189         * build-aux/config.rpath: Update from GNU gettext.
7190
7191 2005-12-16  Jim Meyering  <jim@meyering.net>
7192
7193         * modules/fprintftime: New module.
7194         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
7195
7196 2005-12-16  Jim Meyering  <jim@meyering.net>
7197
7198         * m4/fprintftime.m4: New file.
7199
7200 2005-12-16  Jim Meyering  <jim@meyering.net>
7201
7202         * lib/fprintftime.c, lib/fprintftime.h: New files.
7203
7204 2005-12-15  Simon Josefsson  <jas@extundo.com>
7205
7206         * modules/socklen (configure.ac): Fix M4 macro name, to align with
7207         new m4/socklen.m4.
7208
7209 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7210
7211         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
7212         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
7213
7214 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7215
7216         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
7217         * lib/argp-help.c (fill_in_uparams): Check if the constructed
7218         struct uparams is valid. Fall back to the default values if it is
7219         not.
7220
7221 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7222
7223         * modules/argp (Files): Add argp-pin.c
7224         (Depends-on): dirname
7225         (lib_SOURCES): Add argp-pin.c
7226
7227 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7228
7229         * m4/argp.m4:  Check if program_invocation_name and
7230         program_invocation_short_name are declared and define appropriate
7231         macros if they are not.
7232
7233 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7234
7235         * lib/argp-help.c (__argp_base_name): New function
7236         (__argp_short_program_name): Rewrite using __argp_base_name
7237         * lib/argp-namefrob.h: Define program_invocation_name and
7238         program_invocation_short_name if requested
7239         (__argp_base_name): Add prototype
7240         * lib/argp-parse.c (argp_def): Use gettext wrappers
7241         (argp_default_parser): Use __argp_base_name
7242         * lib/argp-pin.c: New file. Defines program_invocation_name and
7243         program_invocation_short_name on systems that lack them.
7244
7245 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
7246
7247         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
7248         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
7249         porting problem reported by Georg Schwarz in
7250         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
7251
7252 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
7253
7254         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
7255         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
7256         porting problem reported by Georg Schwarz in
7257         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
7258
7259 2005-12-05  Bruno Haible  <bruno@clisp.org>
7260
7261         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
7262         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
7263         Reported by Mark Junker <mjscod@gmx.de>.
7264
7265 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
7266
7267         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
7268         Use implementation from Albert Chin, with some
7269         comments/corrections by Stepan Kasal and myself.
7270
7271 2005-12-02  Bruno Haible  <bruno@clisp.org>
7272
7273         * gnulib-tool (func_import): Accept GPLed build tool modules when
7274         --lgpl is given.
7275         * modules/csharpcomp-script: New file.
7276         * modules/csharpcomp: Depend on it.
7277         * modules/javacomp-script: New file.
7278         * modules/javacomp: Depend on it.
7279         Suggested by Simon Josefsson.
7280
7281 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
7282
7283         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
7284         statement, to work around an HP-UX 10.20 compiler bug reported by
7285         Peter O'Gorman.
7286
7287 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
7288
7289         * modules/savedir (Depends-on): Add openat.
7290
7291 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
7292
7293         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
7294         (uintmax_t) [defined uintmax_t]: Do not declare.
7295         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
7296         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
7297         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
7298         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
7299         sake of portability to weird hosts that C allows (though we don't
7300         know of any practical examples).
7301
7302         * lib/savedir.h (fdsavedir): New decl.
7303         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
7304         contains most of the former guts of savedir.
7305         (savedir): Use savedirstream.
7306         Include "openat.h".
7307
7308 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
7309
7310         * modules/obstack (Files): Add m4/ulonglong.m4.
7311         Problem reported by Davide Angelocola.
7312
7313 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
7314
7315         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
7316         coreutils no longer futzes with rounding modes.
7317
7318 2005-11-14  Jim Meyering  <jim@meyering.net>
7319
7320         * lib/mkstemp-safer.c: Include <config.h>, required for possible
7321         replacement of mkstemp.
7322
7323 2005-11-10  Simon Josefsson  <jas@extundo.com>
7324
7325         * lib/readline.c: Remove EOL.
7326
7327 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
7328
7329         * modules/gethrxtime (Depends-on): Add gettime.
7330
7331 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
7332
7333         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
7334         or gettimeofday; no longer needed.
7335
7336 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
7337
7338         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
7339         time business.
7340         (gethrxtime) [! (HAVE_NANOUPTIME
7341         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
7342         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
7343         our own approximation.
7344
7345 2005-11-08  Eric Blake  <ebb9@byu.net>
7346
7347         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
7348
7349 2005-11-08  Eric Blake  <ebb9@byu.net>
7350
7351         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
7352
7353 2005-11-04  Bruno Haible  <bruno@clisp.org>
7354
7355         * gnulib-tool: Implement --update mode.
7356
7357 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
7358
7359         Fix porting problem reported by Theodoros V. Kalamatianos.
7360         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
7361         Don't assume that futimes failing means we must fail.
7362
7363 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
7364
7365         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
7366         variables to suggest the intended function of the PATH_MAX check.
7367
7368 2005-10-30  Kean Johnston  <jkj@sco.com>
7369
7370         Trivial changes to support SCO systems.
7371         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
7372         as PATH_MAX.
7373         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
7374         where __ptr is null when no I/O is pending.
7375
7376 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
7377
7378         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
7379         leave errno alone.  Problem reported by Dmitry V. Levin.
7380
7381 2005-10-28  Simon Josefsson  <jas@extundo.com>
7382
7383         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
7384         Test more.
7385
7386         * tests/test-gc-md2.c, tests/test-md2.c: New files.
7387
7388         * modules/md2, modules/md2-tests: New files.
7389
7390 2005-10-28  Simon Josefsson  <jas@extundo.com>
7391
7392         * m4/inet_ntop.m4: More tests.
7393
7394         * m4/gc-md2.m4, md2.m4: New file.
7395
7396 2005-10-28  Simon Josefsson  <jas@extundo.com>
7397
7398         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
7399         "restrict" keywords, as per POSIX.  Protect the function
7400         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
7401         Don't use K&R prototypes.  Check the sprintf return values.
7402         Re-define EAFNOSUPPORT if not present.  Indent.
7403
7404         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
7405         suggested by Bruno Haible <bruno@clisp.org>.
7406
7407         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
7408
7409         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
7410
7411         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
7412         libgcrypt).
7413
7414         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
7415
7416         * lib/md2.h, lib/md2.c: New files.
7417
7418 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
7419
7420         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
7421         errno alone.  Problem reported by Frederic Jolliton.
7422
7423 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
7424
7425         * modules/verify (License): Change from GPL to LGPL.  This is a
7426         tiny module and there are apparently near-equivalents that are
7427         under the BSD license.
7428
7429 2005-10-24  Simon Josefsson  <jas@extundo.com>
7430
7431         * modules/sha1: Relicense to LGPL.
7432
7433 2005-10-24  Simon Josefsson  <jas@extundo.com>
7434
7435         * lib/md4.h: Shrink buffer size, now that we changed the type.
7436
7437 2005-10-23  Simon Josefsson  <jas@extundo.com>
7438
7439         * gnulib-tool (func_import): Fix --tests-base.
7440
7441 2005-10-22  Simon Josefsson  <jas@extundo.com>
7442
7443         * modules/arcfour (Depends-on): Need stdint.
7444
7445 2005-10-22  Simon Josefsson  <jas@extundo.com>
7446
7447         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
7448         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
7449
7450 2005-10-22  Simon Josefsson  <jas@extundo.com>
7451
7452         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
7453         suggested by Bruno Haible <bruno@clisp.org>.
7454
7455 2005-10-22  Simon Josefsson  <jas@extundo.com>
7456
7457         * lib/crc.h: Include stddef.h, for size_t.
7458
7459 2005-10-22  Simon Josefsson  <jas@extundo.com>
7460
7461         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
7462         arcfour_context struct (simplify test vector testing in GNU
7463         Shishi).
7464
7465 2005-10-21  Simon Josefsson  <jas@extundo.com>
7466
7467         * modules/des, modules/des-tests: New files.
7468
7469         * modules/gc-des, modules/gc-des-tests: New files.
7470
7471         * tests/test-des.c, tests/test-gc-des.c: New file.
7472
7473 2005-10-21  Simon Josefsson  <jas@extundo.com>
7474
7475         * modules/arctwo, modules/arctwo-tests: New files.
7476
7477         * tests/test-arctwo.c: New file.
7478
7479         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
7480
7481         * tests/test-gc-arctwo.c: New file.
7482
7483 2005-10-21  Simon Josefsson  <jas@extundo.com>
7484
7485         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
7486         Bruno Haible <bruno@clisp.org>.
7487
7488         * m4/gc-des.m4: New file.
7489
7490 2005-10-21  Simon Josefsson  <jas@extundo.com>
7491
7492         * m4/arctwo.m4: New file.
7493
7494         * m4/gc-arctwo.m4: New file.
7495
7496 2005-10-21  Simon Josefsson  <jas@extundo.com>
7497
7498         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
7499         block.
7500
7501 2005-10-21  Simon Josefsson  <jas@extundo.com>
7502
7503         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
7504         <bruno@clisp.org>.
7505
7506         * lib/hmac-sha1.c (hmac_sha1): Likewise.
7507
7508         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
7509         Bruno Haible <bruno@clisp.org>.
7510
7511         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
7512         <bruno@clisp.org>.
7513
7514 2005-10-21  Simon Josefsson  <jas@extundo.com>
7515
7516         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
7517
7518 2005-10-21  Simon Josefsson  <jas@extundo.com>
7519
7520         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
7521
7522 2005-10-21  Simon Josefsson  <jas@extundo.com>
7523
7524         * lib/des.h, lib/des.c: New files.
7525
7526         * lib/gc-gnulib.c: Support DES.c
7527
7528 2005-10-21  Simon Josefsson  <jas@extundo.com>
7529
7530         * lib/arctwo.h, lib/arctwo.c: New files.
7531
7532         * lib/gc-gnulib.c: Support ARCTWO.
7533
7534 2005-10-21  Simon Josefsson  <jas@extundo.com>
7535
7536         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
7537         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7538
7539 2005-10-21  Simon Josefsson  <jas@extundo.com>
7540
7541         * gnulib-tool (func_import, func_create_testdir): Define automake
7542         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
7543         Makefile.am snippet),
7544         suggested by Bruno Haible <bruno@clisp.org>.
7545
7546         * modules/gc (Makefile.am): Use it.
7547
7548 2005-10-21  Bruno Haible  <bruno@clisp.org>
7549
7550         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
7551         patch.
7552
7553 2005-10-19  Simon Josefsson  <jas@extundo.com>
7554
7555         * tests/test-gc-rijndael.c: New file.
7556
7557         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
7558
7559 2005-10-19  Simon Josefsson  <jas@extundo.com>
7560
7561         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
7562         interface too.
7563
7564 2005-10-19  Simon Josefsson  <jas@extundo.com>
7565
7566         * tests/test-gc-arcfour.c: New file.
7567
7568         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
7569
7570 2005-10-19  Simon Josefsson  <jas@extundo.com>
7571
7572         * modules/gc-md4, modules/gc-md4-tests: New file.
7573
7574         * tests/test-gc-md4.c: New file.
7575
7576 2005-10-19  Simon Josefsson  <jas@extundo.com>
7577
7578         * m4/gc-md4.m4: New file.
7579
7580 2005-10-19  Simon Josefsson  <jas@extundo.com>
7581
7582         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
7583         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
7584         <kasal@ucw.cz>.
7585
7586 2005-10-19  Simon Josefsson  <jas@extundo.com>
7587
7588         * m4/gc-arcfour.m4: New file.
7589
7590         * m4/gc-rijndael.m4: New file.
7591
7592 2005-10-19  Simon Josefsson  <jas@extundo.com>
7593
7594         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
7595
7596 2005-10-19  Simon Josefsson  <jas@extundo.com>
7597
7598         * lib/gc-gnulib.c: Support ARCFOUR.
7599
7600 2005-10-19  Simon Josefsson  <jas@extundo.com>
7601
7602         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
7603         support.
7604
7605         * lib/gc.h: Add ECB enum type.
7606
7607         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
7608
7609 2005-10-18  Simon Josefsson  <jas@extundo.com>
7610
7611         * tests/test-md5.c: New file.
7612
7613         * modules/md5-tests: New file.
7614
7615 2005-10-18  Simon Josefsson  <jas@extundo.com>
7616
7617         * tests/test-md4.c: New file.
7618
7619         * modules/md4, modules/md4-tests: New files.
7620
7621 2005-10-18  Simon Josefsson  <jas@extundo.com>
7622
7623         * m4/md4.m4: New file.
7624
7625 2005-10-18  Simon Josefsson  <jas@extundo.com>
7626
7627         * lib/md4.h, lib/md4.c: New files, based on md5.?.
7628
7629 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
7630
7631         * gnulib-tool (func_create_testdir): Omit the second check whether
7632         BUILT_SOURCES in nonempty.
7633
7634 2005-10-17  Simon Josefsson  <jas@extundo.com>
7635
7636         * tests/test-rijndael.c: New file.
7637
7638 2005-10-17  Simon Josefsson  <jas@extundo.com>
7639
7640         * modules/sha1: Depend on stdint instead of md5.
7641
7642         * modules/md5: Depend on stdint, remove uint32_t.
7643
7644 2005-10-17  Simon Josefsson  <jas@extundo.com>
7645
7646         * modules/gc-sha1-tests: New file.
7647
7648         * tests/test-gc-sha1.c: New file.
7649
7650 2005-10-17  Simon Josefsson  <jas@extundo.com>
7651
7652         * m4/md5.m4: Remove call to uint32_t.m4.
7653
7654 2005-10-17  Simon Josefsson  <jas@extundo.com>
7655
7656         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
7657
7658         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
7659         md5.h.
7660
7661         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
7662
7663         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
7664
7665 2005-10-17  Simon Josefsson  <jas@extundo.com>
7666
7667         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
7668
7669 2005-10-17  Simon Josefsson  <jas@extundo.com>
7670
7671         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
7672
7673 2005-10-17  Simon Josefsson  <jas@extundo.com>
7674
7675         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
7676
7677         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
7678
7679 2005-10-17  Bruno Haible  <bruno@clisp.org>
7680
7681         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
7682         that it can also be used in a test.
7683
7684 2005-10-16  Bruno Haible  <bruno@clisp.org>
7685
7686         * gnulib-tool (func_emit_tests_Makefile_am): Also define
7687         TESTS_ENVIRONMENT, so that individual tests can augment it.
7688
7689         * gnulib-tool (func_create_testdir): Use an intermediate target for
7690         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
7691         macros, like $(ALLOCA_H), which cannot be passed through the command
7692         line.
7693
7694 2005-10-15  Simon Josefsson  <jas@extundo.com>
7695
7696         * modules/rijndael-tests: New file.
7697
7698         * modules/rijndael: New file.
7699
7700 2005-10-15  Simon Josefsson  <jas@extundo.com>
7701
7702         * m4/rijndael.m4: New file.
7703
7704 2005-10-15  Simon Josefsson  <jas@extundo.com>
7705
7706         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
7707
7708         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
7709
7710 2005-10-14  Simon Josefsson  <jas@extundo.com>
7711
7712         * tests/test-arcfour.c: New file.
7713
7714         * modules/arcfour, modules/arcfour-tests: New files.
7715
7716 2005-10-14  Simon Josefsson  <jas@extundo.com>
7717
7718         * m4/arcfour.m4: New file.
7719
7720 2005-10-14  Simon Josefsson  <jas@extundo.com>
7721
7722         * lib/arcfour.h, lib/arcfour.c: New files.
7723
7724 2005-10-14  Roland McGrath  <roland@redhat.com>
7725
7726         Import from libc.  [BZ #1331]
7727         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
7728         macro argument.
7729         Reported by Matej Vela <vela@debian.org>.
7730
7731 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
7732
7733         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
7734         include <wchar.h>; no longer needed.
7735
7736 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
7737
7738         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
7739
7740 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
7741         and  Ulrich Drepper  <drepper@redhat.com>
7742
7743         Import from libc.
7744         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
7745         instead of inline stream orientation test and two separate
7746         function calls.  Pay no attention to USE_IN_LIBIO.
7747
7748 2005-10-13  Simon Josefsson  <jas@extundo.com>
7749
7750         * modules/gc-hmac-md5-tests: New file.
7751
7752         * tests/test-gc-hmac-sha1.c: New file.
7753
7754         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
7755
7756         * modules/gc-hmac-md5-tests: New file.
7757
7758         * tests/test-gc-md5.c: New file.
7759
7760         * modules/gc-md5-tests: New file.
7761
7762 2005-10-13  Simon Josefsson  <jas@extundo.com>
7763
7764         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
7765         Move memory allocation outside of loop.
7766
7767 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
7768
7769         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
7770         intermediate directory is in a read-only file system.  Problem
7771         reported by Eric Blake.
7772
7773 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
7774
7775         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
7776
7777 2005-10-12  Simon Josefsson  <jas@extundo.com>
7778
7779         * tests/test-hmac-sha1.c: New file.
7780
7781         * modules/hmac-sha1-tests: New file.
7782
7783         * modules/hmac-sha1: New file.
7784
7785 2005-10-12  Simon Josefsson  <jas@extundo.com>
7786
7787         * modules/gc-sha1: New file.
7788
7789 2005-10-12  Simon Josefsson  <jas@extundo.com>
7790
7791         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
7792
7793         * tests/test-gc-pbkdf2-sha1.c: New file.
7794
7795 2005-10-12  Simon Josefsson  <jas@extundo.com>
7796
7797         * modules/gc-md5, modules/gc-hmac-md5: New files.
7798
7799         * modules/gc (Files): Remove md5, memxor and hmac files.
7800
7801 2005-10-12  Simon Josefsson  <jas@extundo.com>
7802
7803         * m4/gc-pbkdf2-sha1.m4: New file.
7804
7805         * m4/gc-hmac-sha1.m4: New file.
7806
7807         * m4/gc-sha1: New file.
7808
7809         * m4/hmac-sha1.m4: New file.
7810
7811 2005-10-12  Simon Josefsson  <jas@extundo.com>
7812
7813         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
7814
7815         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
7816
7817 2005-10-12  Simon Josefsson  <jas@extundo.com>
7818
7819         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
7820         suggested by Bruno Haible <bruno@clisp.org>.
7821
7822 2005-10-12  Simon Josefsson  <jas@extundo.com>
7823
7824         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
7825
7826 2005-10-12  Simon Josefsson  <jas@extundo.com>
7827
7828         * lib/gc-pbkdf2-sha1.c: New file.
7829
7830         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
7831
7832 2005-10-12  Simon Josefsson  <jas@extundo.com>
7833
7834         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
7835
7836         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
7837
7838 2005-10-12  Simon Josefsson  <jas@extundo.com>
7839
7840         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
7841         GC_USE_HMAC_MD5, respectively.
7842
7843         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
7844         (gc_md5): Fix typo.
7845
7846         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
7847
7848         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
7849
7850         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
7851
7852 2005-10-12  Bruno Haible  <bruno@clisp.org>
7853
7854         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
7855         Reported by Stepan Kasal <kasal@ucw.cz>.
7856
7857 2005-10-11  Simon Josefsson  <jas@extundo.com>
7858
7859         * tests/test-crc.c: New file.
7860
7861         * modules/crc, modules/crc-tests: New files.
7862
7863 2005-10-11  Simon Josefsson  <jas@extundo.com>
7864
7865         * m4/crc.m4: New file.
7866
7867 2005-10-11  Simon Josefsson  <jas@extundo.com>
7868
7869         * lib/gc.h: Add gc_hash and gc_hash_buffer.
7870
7871         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
7872
7873         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
7874
7875 2005-10-11  Simon Josefsson  <jas@extundo.com>
7876
7877         * lib/crc.h, lib/crc.c: New files.
7878
7879         * lib/gc.h (gc_hash_buffer): Add doc.
7880
7881 2005-10-11  Bruno Haible  <bruno@clisp.org>
7882
7883         * modules/c-strcasestr: New file.
7884         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
7885
7886 2005-10-11  Bruno Haible  <bruno@clisp.org>
7887
7888         * modules/c-strcase: New file.
7889         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
7890
7891 2005-10-11  Bruno Haible  <bruno@clisp.org>
7892
7893         * lib/strcasecmp.c: Include limits.h.
7894         (strcasecmp): Avoid integer overflow on exotic platforms.
7895         * lib/strncasecmp.c: Include limits.h.
7896         (strncasecmp): Avoid integer overflow on exotic platforms.
7897         Reported by Paul Eggert.
7898
7899 2005-10-11  Bruno Haible  <bruno@clisp.org>
7900
7901         * lib/c-strcasestr.h: New file, from GNU gettext.
7902         * lib/c-strcasestr.c: New file, from GNU gettext.
7903
7904 2005-10-11  Bruno Haible  <bruno@clisp.org>
7905
7906         * lib/c-strcase.h: New file, from GNU gettext.
7907         * lib/c-strcasecmp.c: New file, from GNU gettext.
7908         * lib/c-strncasecmp.c: New file, from GNU gettext.
7909
7910 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
7911
7912         * modules/mempcpy (License): GPL -> LGPL.
7913         * modules/strchrnul (License): Likewise.
7914         * modules/sysexits (License): Likewise.
7915
7916 2005-10-08  Simon Josefsson  <jas@extundo.com>
7917
7918         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
7919
7920 2005-10-07  Simon Josefsson  <jas@extundo.com>
7921
7922         * m4/memxor.m4: Remove gl_C_RESTRICT call.
7923
7924 2005-10-06  Simon Josefsson  <jas@extundo.com>
7925
7926         * tests/test-hmac-md5.c: New file.
7927
7928         * modules/hmac-md5-tests: New file.
7929
7930         * modules/hmac-md5: New file.
7931
7932 2005-10-06  Simon Josefsson  <jas@extundo.com>
7933
7934         * m4/hmac-md5.m4: New file.
7935
7936         * m4/memxor.m4: Require gl_C_RESTRICT.
7937
7938 2005-10-06  Simon Josefsson  <jas@extundo.com>
7939
7940         * lib/memxor.c (memxor): Avoid casts and warnings.
7941
7942 2005-10-06  Simon Josefsson  <jas@extundo.com>
7943
7944         * lib/hmac-md5.c: New file.
7945
7946         * lib/hmac.h: New file.
7947
7948 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
7949
7950         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
7951         promotes to int, not unsigned int, to catch the AIX 5.3
7952         compiler bug.
7953
7954 2005-10-05  Simon Josefsson  <jas@extundo.com>
7955
7956         * modules/memxor: New file.
7957
7958         * modules/iconv (Files): Move config.rpath to havelib, it is used
7959         there.
7960
7961         * modules/havelib (Files): Add config.rpath.
7962
7963 2005-10-05  Simon Josefsson  <jas@extundo.com>
7964
7965         * m4/memxor.m4: New file.
7966
7967 2005-10-05  Simon Josefsson  <jas@extundo.com>
7968
7969         * lib/memxor.c (memxor): Fix compiler error.
7970
7971         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
7972         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
7973
7974         * lib/memxor.h, lib/memxor.c: New files.
7975
7976         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
7977         we assume all systems have it, suggested by Jim Meyering
7978         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
7979         any systems lack sys/socket.h; mingw32 is known to lack it, but we
7980         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
7981         same reasons.
7982
7983 2005-10-05  Simon Josefsson  <jas@extundo.com>
7984
7985         * config/srclist.txt: Add glibc bug 1423 for md5.h.
7986
7987 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
7988
7989         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
7990         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
7991         needed, since the source code now assumes these .h files.
7992
7993 2005-10-05  Derek Price  <derek@ximbiot.com>
7994
7995         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
7996
7997 2005-10-05  Bruno Haible  <bruno@clisp.org>
7998
7999         * modules/stdint (License): Change to LGPL.
8000
8001 2005-10-04  Simon Josefsson  <jas@extundo.com>
8002
8003         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
8004         D. Baushke" <mdb@gnu.org>.
8005
8006 2005-10-04  Bruno Haible  <bruno@clisp.org>
8007
8008         * lib/verify.h (verify_true): Provide alternative definition for C++.
8009
8010 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
8011
8012         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
8013         (SSIZE_MAX): New macro, if not already defined.
8014         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
8015         than 2 GiB.
8016
8017 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8018
8019         Sync from coreutils.
8020         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
8021         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
8022         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
8023         ULLONG_MAX doesn't work with 2.7.2.1.
8024
8025 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8026
8027         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
8028         From Ben Pfaff.
8029
8030         * modules/exclude (Depends-on): Depend on verify.
8031         * modules/strtoimax (Depends-on): Likewise.
8032         * modules/utimecmp (Depends-on): Likewise.
8033
8034 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8035
8036         * lib/exclude.c: Include verify.h.
8037         (verify): Remove.  All callers changed to use verify.h's version.
8038         * lib/strtoimax.c: Likewise.
8039         * lib/utimecmp.c: Likewis.e
8040
8041         Sync from coreutils.
8042         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
8043         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
8044         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
8045         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
8046         bother returning ENOSYS if settimeofday or stime fails; just let
8047         them return whatever errno they want to return.
8048         * lib/utimens.c: Include unistd.h, for dup2.
8049         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
8050         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
8051
8052 2005-10-02  Jim Meyering  <jim@meyering.net>
8053
8054         Sync from coreutils.
8055         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
8056         from glibc-2.2.5 that fails for read-only files.
8057
8058 2005-10-02  Jim Meyering  <jim@meyering.net>
8059
8060         Sync from coreutils.
8061         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
8062         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
8063         `#if HAVE_CONFIG_H'.
8064         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
8065         Remove AT_FDCWD test.
8066         Do not consume the fd unless successful.
8067         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
8068         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
8069         block, so that we don't even try to compile it if settimeofday is
8070         available.  This works around a compilation failure on OSF1 V5.1,
8071         due to stime requiring a `long int*' while tv_sec is `int'.
8072
8073 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
8074
8075         Sync from coreutils.
8076         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
8077         against `yes', rather than just testing for nonempty.
8078
8079 2005-10-01  Simon Josefsson  <jas@extundo.com>
8080
8081         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
8082         and Darwin.
8083
8084         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
8085         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
8086         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
8087         freeaddrinfo and gai_strerror are declared by the POSIX headers.
8088         Check if struct addrinfo is declared.
8089
8090 2005-10-01  Simon Josefsson  <jas@extundo.com>
8091
8092         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
8093         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
8094         AI_* and EAI_* definitions.  Protect function declarations.
8095
8096 2005-10-01  Jim Meyering  <jim@meyering.net>
8097
8098         Sync from coreutils.
8099
8100         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
8101         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
8102         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
8103         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8104         in the inet and nsl libraries.  Required on Solaris 5.7.
8105
8106 2005-10-01  Jim Meyering  <jim@meyering.net>
8107
8108         Sync from coreutils.
8109         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8110         in the inet and nsl libraries.  Required on Solaris 5.7.
8111
8112 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
8113
8114         * lib/getdelim.c (getdelim): Remove unused variables.
8115
8116 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
8117
8118         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
8119         so that the code works even with ancient cpp.  Portability problem
8120         with GCC 2.7.2.1 reported by Thomas M.Ott.
8121
8122 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
8123
8124         * modules/regex (Depends-on): Add strcase.
8125
8126         * modules/gethostname (Licence): Change from GPL to LGPL, since
8127         gethostname.c is a trivial implementation of a standard library
8128         function.
8129         * modules/poll (License): Change from GPL to LGPL, since it's
8130         derived from LGPL code.
8131
8132 2005-09-27  Jim Meyering  <jim@meyering.net>
8133
8134         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
8135         HAVE_CONFIG_H.
8136
8137         * lib/intprops.h (signed_type_or_expr__): Define.
8138         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
8139         for unsigned types.
8140
8141 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
8142
8143         * lib/verify.h (verify_expr): Remove, replacing with:
8144         (verify_true): New macro that returns true instead of void.
8145         (verify_type__): Remove.
8146         (verify): Use verify_true rather than verify_type__.
8147
8148 2005-09-26  Bruno Haible  <bruno@clisp.org>
8149
8150         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
8151         is necessary.
8152         (lib_SOURCES): Remove mbchar.c.
8153         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
8154         (Files): Add m4/mbrtowc.m4.
8155         * modules/mbiter: Likewise.
8156         * modules/mbuiter: Likewise.
8157
8158 2005-09-26  Bruno Haible  <bruno@clisp.org>
8159
8160         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
8161         compile mbchar.c if they are not both present.
8162         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
8163         * m4/mbiter.m4 (gl_MBITER): Likewise.
8164         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
8165         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
8166         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
8167
8168 2005-09-25  Jim Meyering  <jim@meyering.net>
8169
8170         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
8171         also uses socklen_t.
8172
8173 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
8174
8175         * lib/utimens.c (ENOSYS): Define if not already defined.
8176         (futimens): Support having a null PATH if the file descriptor
8177         is nonnegative.
8178
8179         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
8180         Remove.
8181         (__attribute): Define to empty unless GCC 3.1 or later.
8182         This works around a core dump on OpenBSD 3.4, which has GCC
8183         2.95.3, which dumps core when given __attribute__(()).  It also
8184         simplifies other tests, since we really don't want to bother with
8185         worrying about which ancient version of GCC supported what.
8186         Original problem reported by Yoann Vandoorselaere, with part of
8187         the fix suggested by Derek Price.
8188
8189 2005-09-24  Jim Meyering  <jim@meyering.net>
8190
8191         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
8192         so we can once again use a positive bitfield width of 1 -- now we
8193         don't have to explain why we were using a bitfield width of 2.
8194
8195 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8196
8197         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
8198         and similarly for the other external symbols.  Problem reported
8199         by James Gallager.
8200
8201         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
8202         bug reported by Jim Meyering.
8203
8204         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
8205         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
8206         not needed, since socklen is a prerequisite module.
8207
8208 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8209
8210         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
8211         Problem reported by Eric Blake.
8212         (getaddrinfo): Initialize se so that it's not garbage.
8213         Redo internal storage allocation so that it doesn't make unportable
8214         assumptions about alignment.
8215         Fix a memory leak.
8216
8217         * lib/utimens.c (futimens): Use futimesat if available.
8218         Prefer it to futimes since it doesn't have the futimes bug.
8219
8220         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
8221         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
8222         Instead, declare a function that returns a pointer to an array,
8223         and use verify_type__ to declare the size of the array.
8224         Problem and germ of a solution reported by Bruno Haible.
8225         (verify_type__): Use 2, not 1, for bitfield size, to avoid
8226         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
8227
8228 2005-09-23  Jim Meyering  <jim@meyering.net>
8229
8230         Sync from coreutils.
8231         Correct build failure (socklen_t not defined) on at least
8232         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
8233         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
8234
8235 2005-09-23  Jim Meyering  <jim@meyering.net>
8236
8237         * modules/getaddrinfo (Depends-on): Add socklen.
8238
8239 2005-09-23  Bruno Haible  <bruno@clisp.org>
8240
8241         * tests/test-verify.c: New file.
8242
8243 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8244
8245         Sync from coreutils.
8246
8247         * modules/argmatch (Depends-on): Add verify.
8248         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
8249         unistd-safer.
8250         * modules/save-cwd (Depends-on): Likewise.
8251
8252         * modules/openat (Files): Add lib/openat-die.c.
8253         (Depends-on): Remove error, exitfail.
8254         Add dirname.
8255
8256         * modules/verify: New file.
8257         * MODULES.html.sh (Diagnostics <assert.h>): New section,
8258         with "verify" module.
8259
8260 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8261
8262         Sync from coreutils.
8263
8264         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
8265         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
8266         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
8267         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
8268         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
8269         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
8270         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
8271         Don't bother checking for string.h, stdlib.h, unistd.h.
8272         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
8273         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
8274         module's job.
8275         * m4/jm-macros.m4 (gl_MACROS): Likewise.
8276         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
8277
8278         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
8279         (gl_GETDATE): Use it.
8280
8281         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
8282
8283 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8284
8285         Sync from coreutils.
8286
8287         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
8288         stat-time.h.
8289         * lib/argmatch.h: Include verify.h
8290         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
8291         (ARGMATCH_ASSERT): Remove; unused.
8292         * lib/canonicalize.c: Assume STDC_HEADERS.
8293         * lib/exclude.c: Include "strcase.h".
8294         * lib/regex_internal.h [!defined _LIBC]: Likewise.
8295         * lib/getusershell.c: Include stdio--.h rather than stdio.h
8296         and stdio-safer.h.
8297         (getusershell): Call fopen, not fopen_safer.
8298         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
8299         Do not include unistd-safer.h.
8300         (save_cwd): Don't call fd_safer; no longer needed
8301         now that we include fcntl--.h.
8302
8303         * lib/getdate.y (relative_time): New type.
8304         (RELATIVE_TIME_0): New constant.
8305         (parser_control): Use relative_time instead of doing it ourselves.
8306         (%union): Add new relative_time rel member.
8307         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
8308         Now typeless.
8309         (relunit, relunit_snumber): Now of type rel.
8310         (zone, rel, relunit, get_date): Adjust to above changes.
8311
8312         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
8313         Do not include unistd-safer.h.
8314         (getloadavg): Don't call fd_safer; no longer needed
8315         now that we include fcntl--.h.
8316
8317         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
8318         (make_dir_parents): Treat ENOSYS like EEXIST.
8319
8320         Improve quality of diagnostics on restore_cwd failure.
8321         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
8322         (make_dir_parents): Last arg is now int * (for errno), not bool *.
8323         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
8324         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
8325         each time through the loop.  Do not diagnose restore_cwd failure;
8326         that is the caller's job (and perhaps the caller does not care).
8327
8328         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
8329         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
8330         If the file already exists but is not a directory, don't bother
8331         to try to make its parents.
8332         Close potential file descriptor leak if we can't chdir("/") (!).
8333         Don't always return true if chdir($PWD) fails; return true only
8334         if the requested action was done successfully (except for the
8335         chdir($PWD)).
8336         Don't log final directory unless we actually made it.
8337         Refactor to avoid duplicate code to fix up permissions.
8338         Don't attempt to fix up parent permissions if chdir($PWD) fails.
8339
8340         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
8341         to make it a bit faster and (I hope) clearer.
8342         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
8343         Fix bug in formats like %2N.
8344
8345         * lib/verify.h: New file.
8346
8347 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8348
8349         Sync from coreutils.
8350         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
8351
8352 2005-09-22  Jim Meyering  <jim@meyering.net>
8353
8354         Sync from coreutils.
8355
8356         * m4/lstat.m4 (gl_FUNC_LSTAT):
8357         Use AC_LIBSOURCES to require lstat.c and lstat.h.
8358         Remove obsolete comment.
8359         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
8360         * m4/xstrtod.m4: Likewise.
8361
8362         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
8363
8364 2005-09-22  Jim Meyering  <jim@meyering.net>
8365
8366         Sync from coreutils.
8367
8368         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
8369
8370         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
8371         the .tm_year member, since otherwise gcc-4.0 would now warn about
8372         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
8373
8374         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
8375         order to avoid an unsuppressible warning from gcc on 64-bit systems.
8376
8377         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
8378         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
8379         when run in a time zone for which daylight savings time is in effect
8380         for the starting date.
8381
8382         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
8383         stop us from restricting permissions of just-created absolute-named
8384         directories.
8385         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
8386         to restore initial working directory.
8387         * lib/mkdir-p.c (make_dir_parents): New parameter:
8388         different_working_dir, to tell caller if/when we change the working
8389         directory and are unable to return to the initial one.
8390         * lib/mkdir-p.h (make_dir_parents): Update prototype.
8391         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
8392         `return false'.  This fixes a bug introduced on 2004-07-30.
8393
8394         * lib/openat.c (fdopendir): Be sure to close the supplied
8395         file descriptor before returning.  This makes our replacement
8396         implementation a little closer to Solaris's, where fdopendir
8397         ties the file descriptor to the returned DIR* pointer.
8398         * lib/openat.c (unlinkat): New function.
8399         * lib/openat.h (unlinkat): Add prototype.
8400         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
8401         (openat_restore_fail): Rename from openat_restore_die.
8402         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
8403
8404         Provide an alternative to exiting immediately upon save_cwd or
8405         restore_cwd failure.  Now, an application can arrange e.g.,
8406         to perform a longjump in that case.
8407         * lib/openat.c: Include dirname.h.
8408         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
8409         (rpl_openat, fdopendir, fstatat): Call openat_save_die
8410         and openat_restore_die rather than calling error directly.
8411         Don't include "error.h" or "exitfail.h"; they're no longer needed.
8412
8413         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
8414         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
8415         define.
8416
8417         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
8418         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
8419                             int utc, int nanoseconds);
8420         Background:
8421         date should not have to allocate a megabyte of virtual memory to
8422         handle a format argument like +%1048575T.  When implemented with
8423         strftime, it must allocate such a buffer, use strftime to fill it
8424         in, print it, then free it.
8425         With fprintftime, it simply prints everything and exits.
8426         With no need for memory allocation, that's one fewer way to fail.
8427         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
8428         optional field width, not before, so we accept %9:z, not %:9z.
8429         (my_strftime): Be sure to use L_('x') for literals.
8430
8431         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
8432         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
8433         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
8434         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
8435         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
8436         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
8437         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
8438         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
8439         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
8440         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
8441         * lib/xgethostname.c, lib/xreadlink.c:
8442         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
8443
8444         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
8445         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
8446         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
8447         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
8448         and don't include <sys/file.h>).
8449
8450 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
8451
8452         Sync from coreutils.
8453
8454         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
8455         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
8456         [!LDAV_DONE]: Avoid unused variable warning.
8457
8458 2005-09-21  Bruno Haible  <bruno@clisp.org>
8459
8460         * lib/unicodeio.h (unicode_to_mb): New declaration.
8461
8462 2005-09-20  Derek Price  <derek@ximbiot.com>
8463
8464         * lib/getaddrinfo.c: Don't include <netdb.h> included from
8465         getaddrinfo.h.
8466
8467 2005-09-20  Bruno Haible  <bruno@clisp.org>
8468
8469         * gnulib-tool: Remove trailing slashes from the values specified for
8470         --source-base, --m4-base, --tests-base, --aux-dir.
8471         Suggested by Simon Josefsson <jas@extundo.com>.
8472
8473 2005-09-20  Bruno Haible  <bruno@clisp.org>
8474
8475         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
8476         func_modules_to_filelist, func_import, func_create_testdir): Make all
8477         sorting results locale-independent, so that gnulib-cache.m4 doesn't
8478         change when gnulib-tool is invoked in a different locale.
8479
8480 2005-09-19  Simon Josefsson  <jas@extundo.com>
8481
8482         * m4/socklen.m4: Fix typo.
8483
8484 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8485
8486         Use a consistent style for including <config.h>.
8487         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
8488         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
8489         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
8490         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
8491         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
8492         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
8493         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
8494         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
8495         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
8496         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
8497         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
8498         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
8499         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
8500         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
8501         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
8502         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
8503         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
8504         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
8505         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
8506         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
8507         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
8508         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
8509         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
8510         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
8511         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
8512         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
8513         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
8514         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
8515         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
8516         lib/xstrtoumax.c, lib/yesno.c:
8517         Standardize inclusion of config.h.
8518         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
8519         lib/inttostr.h:  Removed inclusion of config.h from header files.
8520         * lib/inttostr.c:  Adjusted in-tree users.
8521         * lib/timespec.h: Remove superfluous warning to include config.h.
8522         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
8523         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
8524         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
8525         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
8526         config.h with HAVE_CONFIG_H.
8527
8528 2005-09-19  Jim Meyering  <jim@meyering.net>
8529
8530         * modules/pathmax (License): Change to LGPL.
8531
8532 2005-09-19  Derek Price  <derek@ximbiot.com>
8533
8534         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
8535
8536 2005-09-19  Bruno Haible  <bruno@clisp.org>
8537
8538         * gnulib-tool (import): Provide default for --tests-base.
8539
8540 2005-09-19  Bruno Haible  <bruno@clisp.org>
8541
8542         * doc/quote.texi: New file, extracted from gnulib.texi.
8543         * doc/ctime.texi: New file, extracted from gnulib.texi.
8544         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
8545         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
8546         * doc/gnulib.texi: Include them.
8547
8548 2005-09-18  Bruno Haible  <bruno@clisp.org>
8549
8550         Portability fix.
8551         * gnulib-tool (func_readlink): New function.
8552         (func_ln_if_changed): Use it.
8553
8554 2005-09-18  Bruno Haible  <bruno@clisp.org>
8555
8556         * gnulib-tool: Support --with-tests also with --import.
8557         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
8558         (func_import): Use variables $testsbase and $inctests. Emit a
8559         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
8560         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
8561         SUBDIRS += $testsdir.
8562         (func_create_testdir): Update.
8563
8564 2005-09-18  Bruno Haible  <bruno@clisp.org>
8565
8566         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
8567         instead of $dry_run.
8568         (func_cp_if_changed, func_mv_if_changed): Remove functions.
8569         (func_ln_if_changed): Don't handle dry-run here.
8570         (func_import): In dry-run mode, detect more precisely which actions
8571         would be performed, and don't use "...ing" verbs.
8572
8573 2005-09-18  Bruno Haible  <bruno@clisp.org>
8574
8575         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
8576         (func_import): Use join on two temporary files instead of three nested
8577         loops, in order to determine which files are new or old.
8578
8579 2005-09-18  Bruno Haible  <bruno@clisp.org>
8580
8581         * gnulib-tool (func_import): Comment out code that spits out the
8582         new files with --dry-run.
8583
8584 2005-09-18  Bruno Haible  <bruno@clisp.org>
8585
8586         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
8587
8588 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8589
8590         * lib/stat-time.h: New file.
8591         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
8592         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
8593         in a different way.
8594         (timespec_cmp): New function.
8595         * lib/utimecmp.c: Include stat-time.h.
8596         (SYSCALL_RESOLUTION): Depend on whether various struct stat
8597         members exist, not on the obsolescent ST_MTIM_NSEC.
8598         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
8599
8600 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8601
8602         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
8603
8604 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8605
8606         * MODULES.html.sh (File system functions): Add stat-time.
8607         * modules/stat-time: New file.
8608         * modules/timespec (Files): Remove m4/st_mtim.m4; this
8609         is now done in a different way, by the stat-time module.
8610         * modules/utimecmp (Depends-on): Add stat-time.
8611
8612 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8613
8614         * m4/st_mtim.m4: Remove.  Superseded by...
8615         * m4/stat-time.m4: New file.
8616         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
8617         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
8618
8619 2005-09-15  Derek Price  <derek@ximbiot.com>
8620
8621         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
8622
8623 2005-09-15  Derek Price  <derek@ximbiot.com>
8624
8625         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
8626         * lib/regex_internal.c: Ditto, using this...
8627         (__GNUC_PREREQ): ...new macro.
8628         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
8629         using...
8630         (__GNUC_PREREQ): ...this new macro.
8631
8632         * lib/strstr.h: Include string.h. Define strstr as a macro here.
8633
8634 2005-09-15  Derek Price  <derek@ximbiot.com>
8635             Paul Eggert  <eggert@cs.ucla.edu>
8636
8637         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
8638         changes, consolidating in...
8639         * lib/regex_internal.h: ...this file.
8640
8641 2005-09-13  Jim Meyering  <jim@meyering.net>
8642
8643         * lib/canon-host.c: Filter through gnu indent and reword comments
8644         slightly.
8645         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
8646
8647 2005-09-13  Derek Price  <derek@ximbiot.com>
8648
8649         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
8650         failure.
8651         Reported by Jim Meyering  <jim@meyering.net>.
8652
8653 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8654
8655         * lib/base64.c: Typo.
8656         (base64_encode): Put b64str in initialized data section.
8657
8658 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
8659
8660         Merge glibc and coreutils changes into gnulib, plus a few
8661         extra fixes.
8662         * lib/md5.c: Use #error rather than a string.
8663         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
8664         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
8665         (__attribute__): Define to empty for non recent-GCC.
8666         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
8667         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
8668         Renamed from their non-__ counterparts, with new macros replacing
8669         them if not _LIBC.  Add __THROW attribute.
8670         (rol): Remove.
8671         (struct md5_ctx): Align buffer if using GCC.
8672         * lib/sha1.h (struct sha1_ctx): Likewise.
8673         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
8674         The old name was backwards.
8675         (NOTSWAP): Remove; not used.
8676         (rol): New macro, moved here from md5.h.
8677         (sha1_process_block): Remove a FIXME that doesn't make sense.
8678
8679 2005-09-12  Derek Price  <derek@ximbiot.com>
8680
8681         Return usable errors from canon-host.
8682         * lib/canon-host.h: New file.
8683         * lib/canon-host.c (canon_host): Wrap...
8684         (canon_host_r): ...this new function, which now relies exclusively on
8685         getaddrinfo.
8686         (ch_strerror): New function.
8687         (last_cherror): New global.
8688         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
8689         interface.
8690         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
8691         void *.
8692         (freeaddrinfo): Free ai->ai_canonname when set.
8693
8694 2005-09-12  Derek Price  <derek@ximbiot.com>
8695
8696         Make canon-host require getaddrinfo.
8697         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
8698         AC_LIBSOURCE canon-host.h.  Call...
8699         (gl_PREREQ_CANON_HOST): ...this new function, which requires
8700         gl_GETADDRINFO.
8701         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
8702
8703 2005-09-12  Derek Price  <derek@ximbiot.com>
8704
8705         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
8706         LGPL.
8707         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
8708
8709 2005-09-12  Derek Price  <derek@ximbiot.com>
8710
8711         * lib/gai_strerror.c: Include config.h when available.  Include
8712         getaddrinfo.h before other headers to test interface.
8713         Reported by Larry Jones <lawrence.jones@ugs.com>.
8714
8715 2005-09-12  Derek Price  <derek@ximbiot.com>
8716             Paul Eggert  <eggert@cs.ucla.edu>
8717
8718         * modules/glob (Files): Add glob-libc.h.
8719
8720 2005-09-12  Derek Price  <derek@ximbiot.com>
8721             Paul Eggert  <eggert@cs.ucla.edu>
8722
8723         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
8724         glob_.h, glob-libc.h.
8725         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
8726
8727 2005-09-12  Derek Price  <derek@ximbiot.com>
8728             Paul Eggert  <eggert@cs.ucla.edu>
8729
8730         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
8731         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
8732         protecting things that should be done only in gnulib contexts.
8733         * lib/glob_.h: New file, containing only the glob things needed for
8734         gnulib.
8735         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
8736         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
8737         (glob, globfree, glob_pattern_p): Now defined simply in terms of
8738         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
8739         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
8740         and to respect the namespace rules better.
8741
8742 2005-09-08  Simon Josefsson  <jas@extundo.com>
8743
8744         * modules/socklen: New file.
8745
8746 2005-09-08  Simon Josefsson  <jas@extundo.com>
8747
8748         * m4/socklen.m4: New file.
8749
8750 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8751
8752         * modules/utimens (Files): Add m4/utimbuf.m4, since
8753         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
8754         Reported by Sergey Poznyakoff.
8755
8756 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8757
8758         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
8759         definitions, since that's the preferred style in glibc.
8760         Fix a minor spacing issue, and update copyright notice to match
8761         glibc's.
8762
8763 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8764
8765         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
8766
8767 2005-09-06  Simon Josefsson  <jas@extundo.com>
8768
8769         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
8770         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
8771
8772 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8773
8774         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
8775         warning.
8776
8777 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8778
8779         * config/srclist.txt: Add glibc bug 1302.
8780
8781 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
8782
8783         Change bitset word type from unsigned int to unsigned long int,
8784         as this has better performance on typical 64-bit hosts.
8785         Port bitset code to hosts with unusual word sizes.
8786         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
8787         (build_collating_symbol):
8788         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
8789         argument is a bitset.  This is merely a style issue, but it makes
8790         it clearer that an entire array is expected.
8791         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
8792         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
8793         Port to the case where bitset_word is not the same as unsigned int.
8794         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
8795         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
8796         Likewise.
8797         * lib/regexec.c (check_dst_limits_calc_pos_1,
8798         check_subexp_matching_top):
8799         (build_trtable, group_nodes_into_DFAstates):
8800         Likewise.
8801         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
8802         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
8803         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
8804         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
8805         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
8806         * lib/regcomp.c (optimize_subexps, lower_subexp):
8807         Work even if bitset_word has holes in its bitwise representation.
8808         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
8809         * lib/regexec.c (check_dst_limits_calc_pos_1,
8810         check_subexp_matching_top):
8811         Likewise.
8812         * lib/regex_internal.c (re_string_reconstruct):
8813         Don't assume UCHAR_MAX == 255.
8814         * lib/regex_internal.h (bitset_set_all): Likewise.
8815         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
8816         All uses changed.
8817         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
8818         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
8819         All uses changed.
8820         (BITSET_WORD_MAX): New macro.
8821         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
8822         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
8823         (bitset_empty, bitset_copy):
8824         Prefer sizeof (bitset) to multiplying it out ourselves.
8825         (bitset_not_merge): Remove; unused.
8826         (bitset_contain): Return bool, not unsigned int with one bit on.
8827         All callers changed.
8828         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
8829         alignment than re_node_set; do this by defining a new internal
8830         type struct dests_alloc and using it to allocate memory.
8831
8832 2005-09-05  Bruno Haible  <bruno@clisp.org>
8833
8834         * gnulib-tool (func_import): Fix comparison in handling of symbolic
8835         links.
8836
8837 2005-09-04  Martin Lambers <marlam@marlam.de>  (tiny change)
8838
8839         * modules/size_max (Makefile.am): Add size_max.h
8840
8841 2005-09-04  Derek Price  <derek@ximbiot.com>
8842
8843         * gnulib-tool (func_import): Fix reversed $symbolic logic.
8844
8845 2005-09-03  Simon Josefsson  <jas@extundo.com>
8846
8847         * gnulib-tool: Fix typo.
8848
8849 2005-09-03  Simon Josefsson  <jas@extundo.com>
8850
8851         * config/srclist.txt: Add glibc bug 1293.
8852
8853 2005-09-03  Derek Price  <derek@ximbiot.com>
8854
8855         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
8856         From Larry Jones <lawrence.jones@ugs.com>.
8857
8858 2005-09-02  Simon Josefsson  <jas@extundo.com>
8859
8860         * modules/socklen: New file.
8861
8862 2005-09-02  Simon Josefsson  <jas@extundo.com>
8863
8864         * modules/havelib: New module.
8865
8866         * modules/gettext, modules/iconv, modules/lock, modules/readline:
8867         Use havelib.
8868
8869 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
8870
8871         Check for arithmetic overflow when calculating sizes, to prevent
8872         some buffer-overflow issues.  These patches are conservative, in the
8873         sense that when I couldn't determine whether an overflow was possible,
8874         I inserted a run-time check.
8875         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
8876         macros.
8877         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
8878         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
8879         (re_xnrealloc, re_x2nrealloc): New inline functions.
8880         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
8881         parse_bracket_exp):
8882         (build_equiv_class, build_charclass): Check for arithmetic overflow
8883         in size expression calculations.
8884         * lib/regex_internal.c (re_string_realloc_buffers):
8885         (build_wcs_upper_buffer, re_node_set_add_intersect):
8886         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
8887         (re_dfa_add_node, register_state): Likewise.
8888         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
8889         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
8890         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
8891         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
8892
8893 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
8894
8895         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
8896         m4/ulonglong.m4.  Problem reported by Martin Lambers.
8897
8898 2005-09-02  Bruno Haible  <bruno@clisp.org>
8899
8900         Support for lib vs. lib64 distinction on biarch platforms.
8901         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
8902         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
8903         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
8904
8905 2005-09-02  Bruno Haible  <bruno@clisp.org>
8906
8907         * gnulib-tool (import): In the other first-use case, provide defaults
8908         as well.
8909
8910 2005-09-02  Bruno Haible  <bruno@clisp.org>
8911
8912         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
8913         patches not yet found in the latest gettext release.
8914
8915 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8916
8917         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
8918         to avoid a collision with bits/local_lim.h in glibc.
8919         All uses changed.  Problem reported by Dmitry V. Levin in
8920         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
8921
8922         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
8923         bugs in int versus size_t comparisons.
8924         (re_string_context_at): Fix bug where the code assumed that
8925         Idx is signed.
8926
8927         Use bool where appropriate.
8928         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
8929         All callers changed.
8930         (calc_eclosure_iter): Likewise, for ROOT arg.
8931         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
8932         (build_charclass_op): Likewise, for NON_MATCH arg.
8933         * lib/regex_internal.c (re_string_allocate, re_string_construct):
8934         (re_string_construct_common): Likewise, for ICASE arg.
8935         * lib/regexec.c (re_search_2_stub, re_search_stub):
8936         Likewise, for RET_LEN arg.
8937         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
8938         (set_regs): Likewise, for FL_BACKTRACK arg.
8939         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
8940         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
8941         (calc_eclosure_iter, parse_bracket_exp):
8942         Use bool for internal variables that are booleans.
8943         * lib/regexec.c (re_search_internal, check_matching,
8944         proceed_next_node):
8945         (set_regs, build_sifted_states, sift_states_bkref):
8946         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
8947         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
8948         (find_collation_sequence_value):
8949         Likewise.
8950         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
8951         (re_node_set_compare):
8952         Return bool, not int. All callers changed.
8953         * lib/regexec.c (check_halt_node_context, check_dst_limits):
8954         (build_trtable, check_node_accept): Likewise.
8955         * lib/regex_internal.h: Include stdbool.h.
8956
8957         Fix bugs uncovered when converting to bool.
8958         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
8959         failure instead of charging ahead blindly.
8960         * lib/regex_internal.c (register_state): Likewise.
8961         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
8962         for freeing internal storage.
8963         (group_nodes_into_DFA_states): Use unsigned int, not int, for
8964         bitset pieces used as boolean, to avoid undefined behavior
8965         on hosts that do int overflow checking.
8966
8967 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8968
8969         * config/srclist.txt: Add glibc bugs 1285-1287.
8970
8971 2005-09-01  Jim Meyering  <jim@meyering.net>
8972
8973         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
8974         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
8975         Require gl_STAT_MACROS, too.
8976
8977 2005-09-01  Bruno Haible  <bruno@clisp.org>
8978
8979         * gnulib-tool (import): In the first-use case, provide defaults.
8980
8981 2005-09-01  Bruno Haible  <bruno@clisp.org>
8982
8983         * gnulib-tool (func_import): Remove the .tmp files.
8984
8985 2005-09-01  Bruno Haible  <bruno@clisp.org>
8986
8987         * gnulib-tool (func_import): Fix handling of symbolic links.
8988
8989 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8990
8991         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
8992         old glibc regex code mishandles strings longer than 2**31 bytes.
8993         This patch fixes this when the regex code is used in gnulib
8994         (i.e., outside glibc).
8995
8996         This patch should not affect the use of the regex code inside
8997         glibc.  No doubt this problem also needs to be handled for glibc
8998         as well, but the result will be an incompatible change to the
8999         glibc ABI, and the old ABI will have to be supported too.  That
9000         can be the the subject for another patch.
9001
9002         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
9003         governing whether the rest of this patch is active.  By default,
9004         the macro is disabled and the patch has no effect.
9005         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
9006         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
9007         (struct re_pattern_buffer, re_search, re_search_2, re_match):
9008         (re_match_2, re_set_registers): Use the new types.
9009         * lib/regex_internal.h (Idx, re_hashval_t): New types.
9010         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
9011         New macros.
9012         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
9013         (re_string_context_at, bin_tree_t, re_dfastate_t):
9014         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
9015         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
9016         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
9017         (re_string_char_size_at, re_string_wchar_at):
9018         (re_string_elem_size_at):
9019         Use the new types and macros to port to 64-bit hosts.
9020         Use unsigned types for internal values, so that the code
9021         mostly works even for arrays larger than SSIZE_MAX.
9022         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
9023         (search_duplicated_node, calc_eclosure_iter, fetch_number):
9024         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
9025         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
9026         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
9027         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
9028         (calc_inveclosure, parse_dup_op, build_range_exp):
9029         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
9030         (fetch_number, create_token_tree, mark_opt_subexp):
9031         Likewise.
9032         * lib/regex_internal.c (re_string_construct_common,
9033         create_ci_newstate):
9034         (create_cd_newstate, re_string_allocate, re_string_construct):
9035         (re_string_realloc_buffers, build_wcs_upper_buffer):
9036         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
9037         (re_string_reconstruct, re_string_peek_byte_case):
9038         (re_string_fetch_byte_case, re_string_context_at):
9039         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
9040         (re_node_set_init_copy, re_node_set_add_intersect):
9041         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9042         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9043         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
9044         (re_acquire_state, re_acquire_state_context, register_state):
9045         Likewise.
9046         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
9047         search_cur_bkref_entry):
9048         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
9049         (re_search_internal, re_search_2_stub, re_search_stub)
9050         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
9051         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
9052         (update_cur_sifted_state, check_dst_limits):
9053         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9054         (check_subexp_limits, sift_states_bkref, merge_state_array):
9055         (check_subexp_matching_top, get_subexp, get_subexp_sub):
9056         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
9057         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
9058         (expand_bkref_cache, check_node_accept_bytes):
9059         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
9060         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
9061         (acquire_init_state_context, check_halt_node_context):
9062         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
9063         (sift_states_backward, clean_state_log_if_needed):
9064         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
9065         (find_recover_state, transit_state_sb, transit_state_mb):
9066         (transit_state_bkref, build_trtable, match_ctx_clean):
9067         Likewise.
9068         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
9069         to work around an assumption that REG_MISSING is negative.
9070
9071         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
9072         (seek_collating_symbol_entry) [defined _LIBC]:
9073         (lookup_collation_sequence_value) [defined _LIBC]:
9074         (build_range_exp, build_collating_symbol) [defined _LIBC]:
9075         Use prototypes rather than old-style function definitions.
9076         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
9077         (transit_state_sb) [0]:
9078         (find_collation_sequence_value) [defined _LIBC]: Likewise.
9079
9080         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
9081         rm_eo.
9082
9083         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
9084         (optimize_subexps, lower_subexp):
9085         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
9086         since the signed shift might overflow.  Use 1u<<31 instead.
9087         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9088         Likewise.
9089         * lib/regexec.c (check_dst_limits_calc_pos_1,
9090         check_subexp_matching_top): Likewise.
9091
9092         * lib/regcomp.c (optimize_subexps, lower_subexp):
9093         Use CHAR_BIT rather than 8, for clarity.
9094         * lib/regexec.c (check_dst_limits_calc_pos_1):
9095         (check_subexp_matching_top): Likewise.
9096         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
9097         have to worry about portability issues when shifting it left.
9098         Remove no-longer-needed test for table_size > 0.
9099         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
9100         in a word, as the resulting behavior is undefined.
9101         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
9102         in one case, a <= should have been an <, and in another case the
9103         whole test was missing.
9104         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
9105         the standard name CHAR_BIT.
9106         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
9107         this is not true on one's complement and signed-magnitude hosts.
9108
9109         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
9110         next_last_offset.
9111         (struct re_dfa_t): Remove unused member states_alloc.
9112         * lib/regcomp.c (init_dfa): Don't initialize unused members.
9113
9114 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9115
9116         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
9117         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
9118         and large-file glibc and in 32-bit large-file Solaris.
9119
9120 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9121
9122         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
9123         lengths fit in regoff_t; this isn't true if regoff_t is the same
9124         width as size_t.
9125         * lib/regex.c (re_search_internal): 5th arg is LAST_START
9126         (= START + RANGE) instead of RANGE.  This avoids overflow
9127         problems when regoff_t is the same width as size_t.
9128         All callers changed.
9129         (re_search_2_stub): Check for overflow when adding the
9130         sizes of the two strings.
9131         (re_search_stub): Check for overflow when adding START
9132         to RANGE; if it occurs, substitute the extreme value.
9133
9134 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9135
9136         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
9137
9138 2005-08-31  Jim Meyering  <jim@meyering.net>
9139
9140         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
9141         a pointer-to-const.
9142         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
9143         (register_state): Likewise.
9144         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
9145         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9146         (group_nodes_into_DFAstates): Likewise.
9147
9148 2005-08-31  Jim Meyering  <jim@meyering.net>
9149
9150         * check-module: Add a FIXME comment.
9151
9152 2005-08-31  Eric Blake  <ebb9@byu.net>
9153
9154         * modules/unistd-safer (Files): Add unistd--.h.
9155         * modules/stdio-safer (Files): Add stdio--.h.
9156
9157 2005-08-31  Derek Price  <derek@ximbiot.com>
9158
9159         * lib/getdelim.c (getdelim): Return EOF on EOF.
9160         Reported by Larry Jones <lawrence.jones@ugs.com>.
9161
9162 2005-08-31  Bruno Haible  <bruno@clisp.org>
9163
9164         Avoid unnecessary diffs in the generated lib/Makefile.am.
9165         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
9166         the generated files.
9167         (func_import): Don't set cmd.
9168
9169 2005-08-31  Bruno Haible  <bruno@clisp.org>
9170
9171         * lib/strstr.c: Include <stddef.h>, for NULL.
9172         * lib/strcasestr.c: Likewise.
9173         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9174
9175 2005-08-31  Bruno Haible  <bruno@clisp.org>
9176
9177         * gnulib-tool: New option --macro-prefix.
9178         (func_import): Use macro_prefix.
9179         (import): Handle option --macro-prefix.
9180
9181 2005-08-31  Bruno Haible  <bruno@clisp.org>
9182
9183         * gnulib-tool (import): Rename most ac_* variables to cached_*.
9184         Also use new variables cached_lgpl, cached_libtool.
9185
9186 2005-08-31  Bruno Haible  <bruno@clisp.org>
9187
9188         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
9189         always instantiating them.
9190
9191 2005-08-31  Bruno Haible  <bruno@clisp.org>
9192
9193         * gnulib-tool (func_import): Read the previous cached settings
9194         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
9195         earlier added by gnulib but are now dropped. Warn when a gnulib file
9196         overwrites a non-gnulib file.
9197
9198 2005-08-31  Bruno Haible  <bruno@clisp.org>
9199
9200         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
9201         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
9202         projects that don't keep autogenerated files in CVS. Put into
9203         actioncmd only the specified modules, not the transitive closure.
9204
9205 2005-08-31  Bruno Haible  <bruno@clisp.org>
9206
9207         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
9208         Create directories that shall be filled.
9209         (import): Don't look for gl_* macros in configure.ac. Recurse across
9210         all directories containing a gnulib-cache.m4 files, if meaningful.
9211
9212 2005-08-31  Bruno Haible  <bruno@clisp.org>
9213
9214         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
9215         (import): Set seen_libtool when we see gl_LIBTOOL.
9216
9217 2005-08-31  Bruno Haible  <bruno@clisp.org>
9218
9219         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
9220         declaration macro definitions from generated gnulib.m4.
9221
9222 2005-08-30  "Oskar Liljeblad" <oskar@osk.mine.nu>
9223
9224         * lib/iconvme.h: Add prototype for iconv_alloc.
9225
9226 2005-08-29  Simon Josefsson  <jas@extundo.com>
9227
9228         * lib/iconvme.c: Fix errno.
9229
9230 2005-08-29  Bruno Haible  <bruno@clisp.org>
9231
9232         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
9233         that it works when the directory contains spaces.
9234
9235 2005-08-29  Bruno Haible  <bruno@clisp.org>
9236
9237         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
9238
9239 2005-08-29  Bruno Haible  <bruno@clisp.org>
9240
9241         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
9242         Emit more advice.
9243
9244 2005-08-29  Bruno Haible  <bruno@clisp.org>
9245         and Stepan Kasal  <kasal@ucw.cz>
9246
9247         * check-module: If more parameters are given, check each of them
9248         separately; add more exceptions, as noted by Jim Meyering.
9249         (check_module): New procedure.
9250         (%exempt_header): Now contains all exceptions.
9251
9252 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
9253
9254         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
9255
9256 2005-08-29  "Oskar Liljeblad" <oskar@osk.mine.nu>
9257
9258         * lib/iconvme.c: Split iconv_string into iconv_alloc.
9259
9260 2005-08-28  Bruno Haible  <bruno@clisp.org>
9261
9262         * m4/gnulib-tool.m4: New file.
9263
9264 2005-08-27  Jim Meyering  <jim@meyering.net>
9265
9266         * modules/unistd-safer (Files): Add pipe-safer.c.
9267         * modules/fcntl-safer (Files): Add creat-safer.c.
9268
9269 2005-08-27  Jim Meyering  <jim@meyering.net>
9270
9271         * m4/stdlib-safer.m4: New file.  From coreutils.
9272         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
9273         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
9274         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
9275         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
9276         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
9277
9278 2005-08-27  Jim Meyering  <jim@meyering.net>
9279
9280         * lib/fopen-safer.c: Merge minor changes from coreutils.
9281         * lib/dup-safer.c: Likewise.
9282         * lib/fd-safer.c: Likewise.
9283
9284         Merge from coreutils.
9285         * lib/stdio--.h: New file.
9286         * lib/stdlib--.h: New file.
9287         * lib/mkstemp-safer.c: New file.
9288
9289         GNU tar needs these.
9290         * lib/pipe-safer.c: New file.
9291         * lib/creat-safer.c: New file.
9292         * lib/fcntl--.h (creat): Define to creat_safer.
9293         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
9294         * lib/unistd--.h (pipe): Define to pipe_safer.
9295         * lib/unistd-safer.h: Declare pipe_safer.
9296
9297 2005-08-26  Simon Josefsson  <jas@extundo.com>
9298
9299         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
9300         Haible <bruno@clisp.org>.
9301
9302 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
9303
9304         * lib/regex_internal.h: Remove all references to
9305         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
9306         or better.
9307         (bitset_not, bitset_merge, bitset_not_merge):
9308         (bitset_mask, re_string_allocate, re_string_construct):
9309         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
9310         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
9311         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
9312         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
9313         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9314         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9315         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
9316         (re_acquire_state_context):
9317         Remove unnecessary forward decls.
9318         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
9319         Put __attribute at function definition,
9320         now that the function decl has been removed.
9321         * lib/regex_internal.c (re_string_peek_byte_case):
9322         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
9323         Likewise.
9324
9325 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
9326
9327         * m4/regex.m4: Add AC_PREREQ(2.50).
9328         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
9329
9330 2005-08-25  Simon Josefsson  <jas@extundo.com>
9331
9332         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
9333         __fsetlocking.
9334
9335 2005-08-25  Simon Josefsson  <jas@extundo.com>
9336
9337         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
9338         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
9339         GLIBC specific code.
9340
9341 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9342
9343         Make regex safe for g++.  This fixes one real bug (an "err"
9344         that should have been "*err").  g++ problem reported by
9345         Sam Steingold.
9346         * lib/regex_internal.h (re_calloc): New macro, consistent with
9347         re_malloc etc.  All callers of calloc changed to use re_calloc.
9348         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
9349         not int.  All callers changed.
9350         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
9351         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
9352         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
9353         (find_recover_state): Change "err" to "*err"; this fixes what
9354         appears to be a real bug.
9355         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
9356         versus int.
9357
9358 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9359
9360         * modules/regex (Depends-on): Add malloc, since the code
9361         assumes that !malloc(0) means failure.
9362
9363 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9364
9365         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
9366
9367         alloca modernization/simplification for regex.
9368         * lib/regex.c: Remove portability cruft for alloca.  This no longer
9369         needs to be at the start of the file, and can be moved into
9370         regex_internal.h and simplified.
9371         * lib/regex_internal.h: Include <alloca.h>.
9372         (__libc_use_alloca) [!defined _LIBC]: New macro.
9373         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
9374         now works outside glibc.
9375
9376 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9377
9378         * config/srclist.txt: Add glibc bugs 1241, 1245.
9379
9380 2005-08-25  Jim Meyering  <jim@meyering.net>
9381
9382         * lib/open-safer.c: Include <config.h>.
9383         Otherwise, we'd lose LARGEFILE support in any file using
9384         e.g. "fcntl--.h"
9385
9386 2005-08-25  Bruno Haible  <bruno@clisp.org>
9387
9388         * m4/minmax.m4: Require autoconf 2.52.
9389         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
9390         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
9391         alternatives of translit over the alphabet.
9392         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
9393
9394 2005-08-24  Simon Josefsson  <jas@extundo.com>
9395
9396         * tests/test-getpass.c: New file.
9397
9398 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9399
9400         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
9401         for GNU regex features.
9402
9403 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9404
9405         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
9406         * lib/regex.h (regerror): Likewise.
9407
9408         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
9409         requires this.  (The code never needed it.)
9410
9411         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
9412         All uses of recently-renamed identifiers changed to use the new,
9413         POSIX-compliant names.  The code will build and run just fine
9414         without these changes, but it's better to eat our own dog food
9415         and use the standard-conforming names.
9416
9417         * lib/regex.h: Fix a multitude of POSIX name space violations.
9418         These changes have an effect only for programs that define
9419         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
9420         do not change anything for programs compiled in the normal way.
9421         Also, there is no effect on the ABI.
9422
9423         (_REGEX_SOURCE): New macro.
9424         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
9425         defined and _GNU_SOURCE is not; this fixes a name space violation.
9426
9427         Rename the following macros to obey POSIX requirements.
9428         The old names are still visible as macros if _REGEX_SOURCE is defined.
9429         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
9430         RE_BACKSLASH_ESCAPE_IN_LISTS.
9431         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
9432         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
9433         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
9434         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
9435         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
9436         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
9437         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
9438         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
9439         (REG_INTERVALS): renamed from RE_INTERVALS.
9440         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
9441         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
9442         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
9443         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
9444         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
9445         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
9446         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
9447         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
9448         RE_UNMATCHED_RIGHT_PAREN_ORD.
9449         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
9450         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
9451         (REG_DEBUG): renamed from RE_DEBUG.
9452         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
9453         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
9454         unusual, since we can't clash with the POSIX REG_ICASE.
9455         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
9456         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
9457         (REG_NO_SUB): renamed from RE_NO_SUB.
9458         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
9459         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
9460         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
9461         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
9462         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
9463         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
9464         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
9465         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
9466         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
9467         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
9468         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
9469         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
9470         RE_SYNTAX_POSIX_MINIMAL_BASIC.
9471         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
9472         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
9473         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
9474         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
9475         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
9476         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
9477         (REG_FIXED): Renamed from REGS_FIXED.
9478         (REG_NREGS): Renamed from RE_NREGS.
9479
9480         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
9481         of other REG_* macros, since POSIX says the user is allowed to
9482         #undef these macros selectively.
9483
9484         (reg_errcode_t): Update comment stating what other tables need
9485         to be consistent.
9486
9487         Rename the following enum values to obey POSIX requirements.
9488         The old names are still visible as macros.
9489         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
9490         is not defined, since GNU is supposed to be a superset of POSIX as
9491         much as possible, and since we want reg_errcode_t to be a signed
9492         type for implementation consistency.
9493         (_REG_NOERROR): Renamed from REG_NOERROR.
9494         (_REG_NOMATCH): Renamed from REG_NOMATCH.
9495         (_REG_BADPAT): Renamed from REG_BADPAT.
9496         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
9497         (_REG_ECTYPE): Renamed from REG_ECTYPE.
9498         (_REG_EESCAPE): Renamed from REG_EESCAPE.
9499         (_REG_ESUBREG): Renamed from REG_ESUBREG.
9500         (_REG_EBRACK): Renamed from REG_EBRACK.
9501         (_REG_EPAREN): Renamed from REG_EPAREN.
9502         (_REG_EBRACE): Renamed from REG_EBRACE.
9503         (_REG_BADBR): Renamed from REG_BADBR.
9504         (_REG_ERANGE): Renamed from REG_ERANGE.
9505         (_REG_ESPACE): Renamed from REG_ESPACE.
9506         (_REG_BADRPT): Renamed from REG_BADRPT.
9507         (_REG_EEND): Renamed from REG_EEND.
9508         (_REG_ESIZE): Renamed from REG_ESIZE.
9509         (_REG_ERPAREN): Renamed from REG_ERPAREN.
9510         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
9511         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
9512         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
9513         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
9514
9515         (_REG_RE_NAME, _REG_RM_NAME): New macros.
9516         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
9517         changed.  But support the old name if the new one is not defined
9518         and if _REGEX_SOURCE.
9519
9520         Change the following member names in struct re_pattern_buffer.
9521         The old names are still supported if !_REGEX_SOURCE.
9522         The new names are always supported, regardless of _REGEX_SOURCE.
9523         (re_buffer): Renamed from buffer.
9524         (re_allocated): Renamed from allocated.
9525         (re_used): Renamed from used.
9526         (re_syntax): Renamed from syntax.
9527         (re_fastmap): Renamed from fastmap.
9528         (re_translate): Renamed from translate.
9529         (re_can_be_null): Renamed from can_be_null.
9530         (re_regs_allocated): Renamed from regs_allocated.
9531         (re_fastmap_accurate): Renamed from fastmap_accurate.
9532         (re_no_sub): Renamed from no_sub.
9533         (re_not_bol): Renamed from not_bol.
9534         (re_not_eol): Renamed from not_eol.
9535         (re_newline_anchor): Renamed from newline_anchor.
9536
9537         Change the following member names in struct re_registers.
9538         The old names are still supported if !_REGEX_SOURCE.
9539         The new names are always supported, regardless of _REGEX_SOURCE.
9540         (rm_num_regs): Renamed from num_regs.
9541         (rm_start): Renamed from start.
9542         (rm_end): Renamed from end.
9543
9544         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
9545         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
9546         Prepend __ to parameter names.
9547
9548         Undo yesterday's changes.
9549
9550 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9551
9552         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
9553         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
9554         lib/regex.c.
9555
9556 2005-08-24  Jim Meyering  <jim@meyering.net>
9557
9558         Sync from coreutils.
9559         * m4/fcntl-safer.m4: New file.
9560
9561         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
9562         and object files for this module.
9563
9564 2005-08-24  Jim Meyering  <jim@meyering.net>
9565
9566         Sync from coreutils.
9567         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
9568
9569 2005-08-24  Jim Meyering  <jim@meyering.net>
9570
9571         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
9572         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
9573
9574 2005-08-24  Jim Meyering  <jim@meyering.net>
9575
9576         * modules/fcntl-safer: New module.
9577         * modules/fts (Depends-on): Add fcntl-safer.
9578         * MODULES.html.sh (File descriptor based Input/Output):
9579         Add fcntl-safer.
9580
9581 2005-08-24  Bruno Haible  <bruno@clisp.org>
9582
9583         Support for unit test modules.
9584         * modules/README: Mention tests modules.
9585         * modules/TEMPLATE-TESTS: New file.
9586         * gnulib-tool: New options --extract-tests-module, --with-tests and
9587         --tests-base (unused for the moment).
9588         (testsbase, inctests): New variables.
9589         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
9590         (func_verify_module): Exclude TEMPLATE-TESTS.
9591         (func_verify_nontests_module, func_verify_tests_module): New functions.
9592         (func_get_dependencies): Add implicit dependency for tests modules.
9593         (func_get_tests_module): New function.
9594         (func_modules_transitive_closure): When --with-tests was specified,
9595         include the unit tests as well, unless explicitly avoided.
9596         (func_emit_lib_Makefile_am): Ignore the tests modules here.
9597         (func_emit_tests_Makefile_am): New function.
9598         (func_create_testdir): When --with-tests was specified, emit a
9599         tests/ directory.
9600         * MODULES.html.sh (Future developments): Update.
9601
9602 2005-08-24  Bruno Haible  <bruno@clisp.org>
9603
9604         * modules/tls-tests: New file.
9605         * tests/test-tls.c: New file, from GNU gettext.
9606
9607 2005-08-24  Bruno Haible  <bruno@clisp.org>
9608
9609         * modules/lock-tests: New file.
9610         * tests/test-lock.c: New file, from GNU gettext.
9611
9612 2005-08-24  Bruno Haible  <bruno@clisp.org>
9613
9614         * lib/lock.h: Add multiple inclusion guard.
9615         * lib/tls.h: Add multiple inclusion guard.
9616
9617 2005-08-24  Bruno Haible  <bruno@clisp.org>
9618
9619         * gnulib-tool: Add support for the --aux-dir option to
9620         --create-testdir, --create-megatestdir, --test, --megatest.
9621         (func_create_testdir, func_create_megatestdir): Optionally emit a
9622         AC_CONFIG_AUX_DIR directive.
9623         (create-testdir, create-megatestdir, test, megatest): Provide a
9624         default value for $auxdir.
9625
9626 2005-08-24  Bruno Haible  <bruno@clisp.org>
9627
9628         * gnulib-tool (import): Use compound statement instead of subshell
9629         where possible.
9630
9631 2005-08-24  Bruno Haible  <bruno@clisp.org>
9632
9633         * gnulib-tool (import): Change --aux-dir default to "build-aux".
9634
9635 2005-08-24  Bruno Haible  <bruno@clisp.org>
9636
9637         * gnulib-tool (func_version): Update.
9638
9639 2005-08-24  Bruno Haible  <bruno@clisp.org>
9640
9641         * gnulib-tool (func_import, func_create_testdir,
9642         func_create_megatestdir): Quote all autoconf macro arguments.
9643
9644 2005-08-24  Bruno Haible  <bruno@clisp.org>
9645
9646         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
9647         option --force, because --force causes the aclocal.m4 of each
9648         subdirectory to be newer than the corresponding config.h.in.
9649
9650 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9651
9652         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
9653         All contents moved to gl_REGEX.
9654         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
9655         assume that it does.
9656
9657 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9658
9659         * lib/regex.h (REG_NOSYS)
9660         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
9661         Define, since POSIX requires it as of 2001.
9662         (_REG_ENOSYS)
9663         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
9664         New private symbol, used to keep the enum signed in all cases.
9665         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
9666         Youngman in
9667         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
9668
9669         * lib/regex_internal.c (re_string_skip_chars, register_state):
9670         (calc_state_hash):
9671         Remove forward decls; no longer needed now that we use prototypes.
9672         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
9673         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
9674         (clean_state_log_if_needed): Likewise.
9675
9676 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9677
9678         * config/srclist.txt: Add glibc bugs 1231-1233.
9679
9680 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9681
9682         Fix problems reported by Sam Steingold in
9683         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
9684         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
9685         assumed that reg_errcode_t is a signed type, which is not
9686         necessarily true if _XOPEN_SOURCE is not defined.
9687         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
9688         since some compilers warn about it otherwise.
9689
9690 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9691
9692         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
9693         (init_word_char, create_initial_state, duplicate_node_closure):
9694         (fetch_token, peek_token_bracket, build_range_exp):
9695         (build_collating_symbol): Remove forward decls; no longer needed
9696         now that we use prototypes.
9697
9698         * lib/regcomp.c:
9699         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
9700         (re_compile_fastmap_iter, regcomp, regerror, regfree):
9701         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
9702         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
9703         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
9704         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
9705         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
9706         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
9707         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
9708         (build_range_exp, build_collating_symbol, parse_bracket_exp):
9709         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
9710         (build_charclass, build_charclass_op, fetch_number, create_tree):
9711         (create_token_tree, mark_opt_subexp, duplicate_tree):
9712         Use prototypes rather than old-style definitions.
9713
9714         * lib/regex_internal.c:
9715         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
9716         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
9717         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
9718         (re_string_reconstruct, re_string_peek_byte_case):
9719         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
9720         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
9721         (re_node_set_init_copy, re_node_set_add_intersect):
9722         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9723         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9724         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
9725         (re_acquire_state, re_acquire_state_context, register_state):
9726         (create_ci_newstate, create_cd_newstate, free_state):
9727         Likewise.
9728         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
9729         re_search_2):
9730         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
9731         (re_search_internal, prune_impossible_nodes):
9732         (acquire_init_state_context, check_matching, static):
9733         (check_halt_node_context, check_halt_state_context, proceed_next_node):
9734         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
9735         (update_regs, sift_states_backward, build_sifted_states):
9736         (clean_state_log_if_needed, merge_state_array):
9737         (update_cur_sifted_state, add_epsilon_src_nodes):
9738         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
9739         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
9740         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
9741         (find_recover_state, check_subexp_matching_top, transit_state_mb):
9742         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
9743         (check_arrival, check_arrival_add_next_nodes):
9744         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
9745         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
9746         (check_node_accept_bytes, check_node_accept, extend_buffers):
9747         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
9748         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
9749         (sift_ctx_init):
9750         Likewise.
9751
9752         * lib/regex_internal.h:
9753         (re_string_allocate, re_string_construct, re_string_reconstruct):
9754         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
9755         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
9756         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
9757         (re_string_context_at, re_string_peek_byte_case):
9758         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
9759         is defined, since we now use prototypes always.
9760
9761         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
9762         C89 or better.  All uses removed.
9763
9764 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9765
9766         * config/srclist.txt: Add glibc bugs 1220-1227.
9767
9768 2005-08-20  Jim Meyering  <jim@meyering.net>
9769
9770         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
9771         of unused local, dfa.
9772
9773 2005-08-20  Bruno Haible  <bruno@clisp.org>
9774
9775         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
9776
9777 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9778
9779         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
9780         (re_node_set_insert_last, re_dfa_add_node):
9781         Rename local variables to avoid GCC shadowing warnings.
9782
9783 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9784
9785         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
9786         [defined lint]: Suppress bogus uninitialized-variable warnings.
9787
9788         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
9789         and let the caller return REG_ESPACE if out of space.  This
9790         removes an uninitialied-variable warning with GCC 4.0.1, and also
9791         avoids taking the address of a local variable.  All callers
9792         changed.
9793
9794 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9795
9796         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
9797         $LIBCSRC/posix/regexec.c.
9798         Add glibc bug 1217 for regcomp.c.
9799
9800 2005-08-19  Jim Meyering  <jim@meyering.net>
9801
9802         * lib/regexec.c (proceed_next_node): Redo local variables to
9803         avoid GCC shadowing warnings.
9804
9805 2005-08-18  Bruno Haible  <bruno@clisp.org>
9806
9807         * lib/strstr.c (strstr): Fix return value in multibyte case.
9808         * lib/strcasestr.c (strcasestr): Likewise.
9809
9810 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9811
9812         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
9813
9814 2005-08-17  Jim Meyering  <jim@meyering.net>
9815
9816         Make the %s format (seconds since the epoch) work for a negative
9817         number and when used with a zero-padded field width, e.g. %015s.
9818
9819         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
9820         label so that it precedes the code to set `digits'.  Otherwise,
9821         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
9822         print `00-22'.  Now, it prints `-0022', as it should.
9823
9824 2005-08-17  Bruno Haible  <bruno@clisp.org>
9825
9826         * modules/strstr (Files): Add m4/mbrtowc.m4.
9827         (Depends-on): Add mbuiter.
9828
9829 2005-08-17  Bruno Haible  <bruno@clisp.org>
9830
9831         * modules/strcasestr: New file.
9832         * MODULES.html.sh (String handling, based on ANSI C 89): Add
9833         strcasestr.
9834
9835 2005-08-17  Bruno Haible  <bruno@clisp.org>
9836
9837         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
9838
9839 2005-08-17  Bruno Haible  <bruno@clisp.org>
9840
9841         * modules/mbuiter: New file.
9842         * MODULES.html.sh (Extended multibyte and wide character utilities):
9843         Add mbuiter.
9844
9845 2005-08-17  Bruno Haible  <bruno@clisp.org>
9846
9847         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
9848         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
9849
9850 2005-08-17  Bruno Haible  <bruno@clisp.org>
9851
9852         * m4/strcasestr.m4: New file.
9853
9854 2005-08-17  Bruno Haible  <bruno@clisp.org>
9855
9856         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
9857         * lib/strstr.c: Completely rewritten, with multibyte locale support.
9858
9859 2005-08-17  Bruno Haible  <bruno@clisp.org>
9860
9861         * lib/strcasestr.h: New file.
9862         * lib/strcasestr.c: New file.
9863
9864 2005-08-17  Bruno Haible  <bruno@clisp.org>
9865
9866         * lib/strcasecmp.c: Use mbuiter.h.
9867
9868 2005-08-17  Bruno Haible  <bruno@clisp.org>
9869
9870         * lib/mbuiter.h: New file.
9871
9872 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
9873
9874         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
9875         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
9876         and gl_GETOPT are both invoked via different paths (as happens
9877         with GNU tar CVS because it uses both argp and getopt), the former
9878         wins.
9879
9880 2005-08-16  Bruno Haible  <bruno@clisp.org>
9881
9882         * modules/tls: New file.
9883         * MODULES.html.sh (Multithreading): Add tls.
9884
9885 2005-08-16  Bruno Haible  <bruno@clisp.org>
9886
9887         * modules/strnlen1: New file.
9888         * MODULES.html.sh (String handling): Add strnlen1.
9889
9890 2005-08-16  Bruno Haible  <bruno@clisp.org>
9891
9892         * modules/strcase (Files): Add m4/mbrtowc.m4.
9893         (Depends-on): Add strnlen1, mbchar.
9894
9895 2005-08-16  Bruno Haible  <bruno@clisp.org>
9896
9897         * modules/mbiter: New file.
9898         * MODULES.html.sh (Extended multibyte and wide character utilities):
9899         Add mbiter.
9900
9901 2005-08-16  Bruno Haible  <bruno@clisp.org>
9902
9903         * modules/mbfile: New file.
9904         * MODULES.html.sh (Extended multibyte and wide character utilities):
9905         Add mbfile.
9906
9907 2005-08-16  Bruno Haible  <bruno@clisp.org>
9908
9909         * modules/mbchar: New file.
9910         * MODULES.html.sh (Extended multibyte and wide character utilities):
9911         New section.
9912
9913 2005-08-16  Bruno Haible  <bruno@clisp.org>
9914
9915         * m4/tls.m4: New file, from GNU gettext.
9916
9917 2005-08-16  Bruno Haible  <bruno@clisp.org>
9918
9919         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
9920         always.
9921         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
9922
9923 2005-08-16  Bruno Haible  <bruno@clisp.org>
9924
9925         * m4/mbiter.m4: New file.
9926
9927 2005-08-16  Bruno Haible  <bruno@clisp.org>
9928
9929         * m4/mbfile.m4: New file.
9930
9931 2005-08-16  Bruno Haible  <bruno@clisp.org>
9932
9933         * m4/mbchar.m4: New file.
9934
9935 2005-08-16  Bruno Haible  <bruno@clisp.org>
9936
9937         * lib/tls.h: New file, from GNU gettext.
9938         * lib/tls.c: New file, from GNU gettext.
9939
9940 2005-08-16  Bruno Haible  <bruno@clisp.org>
9941
9942         * lib/strnlen1.h: New file.
9943         * lib/strnlen1.c: New file.
9944
9945 2005-08-16  Bruno Haible  <bruno@clisp.org>
9946
9947         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
9948         (mbi_init): Update.
9949         (mbi_avail, mbi_advance): Let the iteration end before the terminating
9950         NUL byte, not after it.
9951
9952 2005-08-16  Bruno Haible  <bruno@clisp.org>
9953
9954         * lib/strcase.h (strcasecmp): Add note in comments.
9955         * lib/strncasecmp.c: Use code from strcasecmp.c.
9956         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
9957         (strcasecmp): Work correctly in multibyte locales.
9958
9959 2005-08-16  Bruno Haible  <bruno@clisp.org>
9960
9961         * lib/mbiter.h: New file.
9962
9963 2005-08-16  Bruno Haible  <bruno@clisp.org>
9964
9965         * lib/mbfile.h: New file.
9966
9967 2005-08-16  Bruno Haible  <bruno@clisp.org>
9968
9969         * lib/mbchar.h: New file.
9970         * lib/mbchar.c: New file.
9971
9972 2005-08-16  Bruno Haible  <bruno@clisp.org>
9973
9974         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
9975         the valid ones. Makes the comparison operations transitive:
9976         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
9977         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
9978
9979 2005-08-15  Simon Josefsson  <jas@extundo.com>
9980
9981         * modules/ssize_t (License): Change to 'unlimited'.
9982
9983         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
9984
9985 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9986
9987         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
9988         Add comments for each pending glibc patch.
9989
9990 2005-08-15  Bruno Haible  <bruno@clisp.org>
9991
9992         * lib/regex.h (__restrict_arr): Don't define to __restrict if
9993         __cplusplus is defined.
9994
9995 2005-08-14  Jim Meyering  <jim@meyering.net>
9996
9997         Sync from coreutils.
9998
9999         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
10000         Use the hash-table-based cycle-detection code not just when
10001         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
10002         Reported by James Youngman in
10003         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
10004         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
10005         FTS_TIGHT_CYCLE_CHECK.
10006         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
10007         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
10008         once again.
10009         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
10010         * lib/fts.c (fd_safer): Remove decl.
10011         Include fcntl--.h rather than unistd-safer.h
10012         (fts_safe_changedir): Don't call fd_safer; no longer needed
10013         now that we include fcntl--.h.
10014
10015 2005-08-12  Simon Josefsson  <jas@extundo.com>
10016
10017         * modules/getndelim2: Use ssize_t module.
10018         * modules/getnline: Likewise.
10019         * modules/safe-read: Likewise.
10020         * modules/xreadlink: Likewise.
10021
10022         * modules/ssize_t: New file.
10023
10024 2005-08-12  Simon Josefsson  <jas@extundo.com>
10025
10026         * m4/readline.m4: Look for termcap, curses or ncurses if required.
10027
10028 2005-08-12  Simon Josefsson  <jas@extundo.com>
10029
10030         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10031         ssize_t.
10032
10033 2005-08-12  Simon Josefsson  <jas@extundo.com>
10034
10035         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
10036         readline, getdelim and check_version.
10037         (Support for systems lacking ISO C 99: Sizes of integer types):
10038         Add size_max.
10039
10040 2005-08-12  Bruno Haible  <bruno@clisp.org>
10041
10042         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
10043
10044 2005-08-11  Simon Josefsson  <jas@extundo.com>
10045
10046         * modules/readline: New file.
10047
10048         * modules/strnlen (Files): Add strnlen.h.
10049
10050 2005-08-11  Simon Josefsson  <jas@extundo.com>
10051
10052         * m4/readline.m4: New file.
10053
10054 2005-08-11  Simon Josefsson  <jas@extundo.com>
10055
10056         * lib/readline.h, readline.c: New file.
10057
10058 2005-08-11  Simon Josefsson  <jas@extundo.com>
10059
10060         * doc/gnulib.texi (Initial import, Finishing touches): Mention
10061         gl_AVOID.
10062
10063 2005-08-11  Bruno Haible  <bruno@clisp.org>
10064
10065         * lib/strnlen.h (strnlen): Change parameter name to match comment.
10066
10067 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
10068
10069         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
10070
10071 2005-08-10  Simon Josefsson  <jas@extundo.com>
10072
10073         * tests/test-iconvme.c: New file.
10074
10075 2005-08-10  Simon Josefsson  <jas@extundo.com>
10076
10077         * m4/strnlen.m4: New file.
10078
10079         * m4/strndup.m4: Don't check for strnlen declaration, done in
10080         strnlen.m4.
10081
10082 2005-08-10  Simon Josefsson  <jas@extundo.com>
10083
10084         * lib/strndup.c: Use strnlen.h.
10085
10086         * lib/strnlen.h: New file.
10087
10088 2005-08-08  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>  (tiny change)
10089
10090         * README: Typos.
10091
10092 2005-08-02  Simon Josefsson  <jas@extundo.com>
10093
10094         * modules/readline: New file.
10095
10096 2005-08-02  Simon Josefsson  <jas@extundo.com>
10097
10098         * modules/getdelim: New file.
10099
10100         * modules/getline: Rewrite, don't use getndelim2.
10101
10102 2005-08-02  Simon Josefsson  <jas@extundo.com>
10103
10104         * m4/getline.m4: Separate out getdelim stuff into separate module.
10105
10106         * m4/getdelim.m4: New file.
10107
10108 2005-08-02  Simon Josefsson  <jas@extundo.com>
10109
10110         * lib/getline.h, getline.c: Rewrite.
10111
10112         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
10113
10114 2005-07-31  Bruno Haible  <bruno@clisp.org>
10115
10116         * lib/lock.h (gl_lock_initializer): New macro.
10117         (gl_lock_define_initialized): Use it.
10118         (gl_rwlock_initializer): New macro.
10119         (gl_rwlock_define_initialized): Use it.
10120         (gl_recursive_lock_initializer): New macro.
10121         (gl_recursive_lock_define_initialized): Use it.
10122
10123 2005-07-30  Karl Berry  <karl@gnu.org>
10124
10125         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
10126         Report from Ben Pfaff, regarding getopt.
10127
10128 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
10129
10130         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
10131         normal way.
10132         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
10133         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
10134         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
10135         (gl_GETOPT): Use the new macros.  Most of the implementation
10136         is moved to the new macros.  This is for programs like Emacs
10137         that don't want all the functionality of gl_GETOPT.
10138
10139 2005-07-26  Bruno Haible  <bruno@clisp.org>
10140
10141         * m4/lock.m4: Update from GNU gettext.
10142
10143 2005-07-26  Bruno Haible  <bruno@clisp.org>
10144
10145         * lib/lock.h: Update from GNU gettext.
10146         * lib/lock.c: Update from GNU gettext.
10147
10148 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
10149
10150         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
10151         obsolescent AC_TRY_RUN.  Include the default includes files, for
10152         'exit'.
10153
10154 2005-07-24  Bruno Haible  <bruno@clisp.org>
10155
10156         * modules/visibility: New file.
10157         * MODULES.html.sh (Misc): Add visibility.
10158
10159 2005-07-24  Bruno Haible  <bruno@clisp.org>
10160
10161         * m4/visibility.m4: New file.
10162
10163 2005-07-24  Bruno Haible  <bruno@clisp.org>
10164
10165         * doc/visibility.texi: New file.
10166
10167 2005-07-22  Bruno Haible  <bruno@clisp.org>
10168
10169         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
10170         $(ALLOCA_H), redundant through BUILT_SOURCES.
10171         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
10172         redundant through BUILT_SOURCES.
10173         * modules/byteswap (Makefile.am): Remove explicit dependency on
10174         $(BYTESWAP_H), redundant through BUILT_SOURCES.
10175         * modules/fnmatch (Makefile.am): Remove explicit dependency on
10176         $(FNMATCH_H), redundant through BUILT_SOURCES.
10177         * modules/getopt (Makefile.am): Remove explicit dependency on
10178         $(GETOPT_H), redundant through BUILT_SOURCES.
10179         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
10180         redundant through BUILT_SOURCES.
10181         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
10182         redundant through BUILT_SOURCES.
10183         * modules/stdbool (Makefile.am): Remove explicit dependency on
10184         $(STDBOOL_H), redundant through BUILT_SOURCES.
10185         * modules/stdint (Makefile.am): Remove explicit dependency on
10186         $(STDINT_H), redundant through BUILT_SOURCES.
10187         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
10188         Remove explicit dependency on $(SYSEXITS_H).
10189         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
10190
10191 2005-07-18  Simon Josefsson  <jas@extundo.com>
10192
10193         * lib/check-version.c (check_version): Accept identical versions too.
10194
10195 2005-07-18  Bruno Haible  <bruno@clisp.org>
10196
10197         * modules/lock: New file.
10198         * MODULES.html.sh (Multithreading): New section.
10199
10200 2005-07-18  Bruno Haible  <bruno@clisp.org>
10201
10202         * m4/lock.m4: New file, from GNU gettext.
10203
10204 2005-07-18  Bruno Haible  <bruno@clisp.org>
10205
10206         * lib/lock.h: New file, from GNU gettext.
10207         * lib/lock.c: New file, from GNU gettext.
10208
10209 2005-07-18  Bruno Haible  <bruno@clisp.org>
10210
10211         * lib/lock.h (gl_once_t): New type.
10212         (gl_once_define, gl_once): New macros.
10213         * lib/lock.c (fresh_once): New variable.
10214         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
10215         functions.
10216
10217 2005-07-16  Simon Josefsson  <jas@extundo.com>
10218
10219         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
10220         workaround, suggested by Bruno.
10221
10222 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
10223
10224         * modules/xalloc (Depends-on): Add xalloc-die.
10225         * modules/xvasprintf (Depends-on): Add xalloc-die.
10226
10227 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
10228
10229         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
10230         with a minor change.
10231
10232 2005-07-15  Bruno Haible  <bruno@clisp.org>
10233
10234         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
10235         When using lib/poll.c, define poll as rpl_poll.
10236
10237 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
10238
10239         * modules/argp (Depends-on): Remove unlocked-io.
10240
10241 2005-07-14  Derek Price  <derek@ximbiot.com>
10242
10243         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
10244         for glob symlink bug.
10245
10246 2005-07-14  Bruno Haible  <bruno@clisp.org>
10247
10248         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
10249         Instead, test for *_unlocked function declarations directly.
10250
10251 2005-07-11  Simon Josefsson  <jas@extundo.com>
10252
10253         * modules/size_max: New file.
10254
10255         * modules/xsize: Depend on size_max module for size_max.m4.
10256
10257 2005-07-11  Simon Josefsson  <jas@extundo.com>
10258
10259         * lib/size_max.h: New file.
10260
10261 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
10262
10263         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
10264         copyright symbol and the year.
10265         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
10266         (version_etc_va): Use parameterized copyright notice.
10267         Reword to conform to the current GNU coding standards.
10268
10269 2005-07-11  Karl Berry  <karl@gnu.org>
10270
10271         * doc/gnulib.texi (Quoting): new node.
10272         (Initial import): more info, from Patrice.
10273
10274 2005-07-11  Bruno Haible  <bruno@clisp.org>
10275
10276         * gnulib-tool (func_usage): Document option --avoid.
10277         (Command line options): Handle --avoid.
10278         (func_acceptable): New function.
10279         (func_modules_transitive_closure): Use it.
10280
10281 2005-07-11  Bruno Haible  <bruno@clisp.org>
10282
10283         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
10284         Reported by Jim Meyering.
10285
10286 2005-07-10  Bruno Haible  <bruno@clisp.org>
10287
10288         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
10289         Needed when size_t is smaller than 'unsigned int'.
10290         Reported by Paul Eggert.
10291
10292 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10293
10294         * modules/argp (Depends-on): Add unlocked-io
10295
10296 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10297
10298         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
10299         block of defines.
10300
10301 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
10302
10303         * config/srclist.txt: Comment out regcomp.c, since we have a porting
10304         fix now.
10305
10306 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
10307         and Paul Eggert  <eggert@cs.ucla.edu>
10308
10309         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
10310         in wint_t, not wchar_t.  Remove now-unnecessary cast.
10311
10312 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10313
10314         * modules/regex (Files): Add lib/regex_internal.c,
10315         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
10316         (Depends-on): Add extensions.
10317         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
10318
10319 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10320
10321         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
10322         pathconf.
10323         * m4/same.m4 (gl_SAME): Likewise.
10324         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
10325
10326         * m4/regex.m4: Adjust to new libc regex implementation.
10327         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
10328         all the .c and .h parts of (the new) regex.
10329         Quote the m4 stuff better.
10330         Check for RE_ICASE bug of old gnulib.
10331         Check for REG_STARTEND of recent libc.
10332         Rename local variables from jm_* to gl_*.
10333         Quote operand of "test -f".
10334         Say "recent enough" version of libc, not "version 2".
10335         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
10336         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
10337         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
10338         Remove check for btowc, isascii.
10339         Require AM_LANGINFO_CODESET.
10340
10341 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10342
10343         * lib/regex.c, regex.h: Sync from libc.
10344         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
10345         * lib/regexec.c:
10346         New files, synced from libc, except that regex_internal.h
10347         currently has a small porting fix.
10348
10349 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10350
10351         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
10352         regex_internal.c, regexec.c.
10353         Add regex_internal.h too, but as a comment, since the libc version
10354         is currently broken in gnulib mode.
10355
10356 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10357
10358         Support programs like Emacs that use gnulib but not gettext.
10359         * MODULES.html.sh (Internationalization functions): Add gettext-h.
10360         * modules/gettext-h: New file.
10361         * modules/gettext (Files): Remove lib/gettext.h.
10362         (Depends-on): Add gettext-h.
10363         (Makefile.am): Remove lib_SOURCES.
10364         * modules/argmatch, modules/c-stack, modules/closeout:
10365         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
10366         * modules/execute, modules/file-type, modules/getaddrinfo:
10367         * modules/getopt, modules/human, modules/javacomp:
10368         * modules/javaexec, modules/mkdir-p, modules/obstack:
10369         * modules/openat, modules/pagealign_alloc, modules/pipe:
10370         * modules/quotearg, modules/regex, modules/rpmatch:
10371         * modules/unicodeio, modules/userspec, modules/version-etc:
10372         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
10373         * modules/xsetenv:
10374         Depend on gettext-h, not gettext.
10375
10376 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
10377
10378         * gnulib-tool (func_import): Add support for 'public domain' license.
10379         * modules/alloca, modules/atexit, modules/memmove:
10380         Now public domain, not GPL.
10381         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
10382         * modules/realloc, modules/strerror, modules/strtod:
10383         Now LGPL, not GPL.
10384
10385 2005-07-05  Bruno Haible  <bruno@clisp.org>
10386
10387         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
10388         autoconf CVS. Needed for mingw.
10389
10390 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10391
10392         Remove the dependency of the strftime module on the tzset module.
10393         * modules/strftime (Depends-on): Remove dependency on tzset.
10394
10395 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10396
10397         Remove the dependency of the strftime module on the tzset module.
10398         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
10399         gl_FUNC_TZSET_CLOBBER.
10400
10401 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10402
10403         Remove the dependency of the strftime module on the tzset module.
10404         * lib/strftime.c (my_strftime)
10405         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
10406         Copy the input structure, to work around some of the bug with
10407         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
10408         Solaris releases, you should also use the tzset module, but we won't
10409         require it as a dependency any more since we don't want LGPLed code
10410         to depend on GPLed code.
10411
10412 2005-07-02  Jim Meyering  <jim@meyering.net>
10413
10414         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
10415         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
10416         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
10417         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
10418
10419 2005-07-02  Jim Meyering  <jim@meyering.net>
10420
10421         * lib/backupfile.c (backup_args): Change a `0' to NULL.
10422
10423 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10424
10425         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
10426         declares only 'struct timespec;' (!).
10427
10428 2005-07-01  Jim Meyering  <jim@meyering.net>
10429
10430         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
10431         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
10432         * lib/save-cwd.c, tempname.c:
10433         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10434         and don't include <sys/file.h>).
10435
10436 2005-06-29  Jim Meyering  <jim@meyering.net>
10437
10438         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
10439         type name.  Use the variable name instead.
10440         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
10441         Likewise.
10442
10443 2005-06-28  Simon Josefsson  <jas@extundo.com>
10444
10445         * modules/check-version (Files): Add check-version.m4.
10446
10447 2005-06-28  Simon Josefsson  <jas@extundo.com>
10448
10449         * m4/check-version.m4: New file, suggested by Jim Meyering
10450         <jim@meyering.net>.
10451
10452 2005-06-28  Simon Josefsson  <jas@extundo.com>
10453
10454         * lib/check-version.h, lib/check-version.c: New files.
10455
10456 2005-06-28  Simon Josefsson  <jas@extundo.com>
10457
10458         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
10459         collision with global variable.  Better indentation.  Don't
10460         increment buffer pointer beyond buffer end.  Based on comments
10461         from Paul Eggert <eggert@cs.ucla.edu>.
10462
10463         * lib/base64.h: Indent.
10464
10465 2005-06-28  Simon Josefsson  <jas@extundo.com>
10466
10467         * doc/gnulib.texi (Library version handling): New section.
10468
10469 2005-06-28  Jim Meyering  <jim@meyering.net>
10470
10471         * check-module (find_included_lib_files): Hard-code another
10472         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
10473         but modules/fts-lgpl (correctly) does not list those files.
10474
10475         * modules/canonicalize (Files): Add lib/pathmax.h.
10476
10477 2005-06-25  Simon Josefsson  <jas@extundo.com>
10478
10479         * modules/check-version: New file.
10480
10481 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
10482
10483         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
10484         initializer of struct addrinfo, as an indication that we don't
10485         care how many members the structure has.
10486
10487 2005-06-24  Derek Price  <derek@ximbiot.com>
10488         and Bruno Haible  <bruno@clisp.org>
10489
10490         Remove stat module & update lstat.
10491         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
10492         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
10493         * m4/stat.m4: Remove this file.
10494
10495 2005-06-24  Derek Price  <derek@ximbiot.com>
10496         and Bruno Haible  <bruno@clisp.org>
10497
10498         Remove stat module & update lstat.
10499         * lib/stat.c: Remove this file...
10500         (slash_aware_lstat): ...moving this content and its support...
10501         * lib/lstat.c (rpl_lstat): ...into here.
10502         * lib/lstat.h: New file.
10503
10504 2005-06-24  Derek Price  <derek@ximbiot.com>
10505         and Bruno Haible  <bruno@clisp.org>
10506
10507         Remove stat module & update lstat.
10508         * config/srclist.txt (libc sources): Remove stat.
10509
10510 2005-06-24  Derek Price  <derek@ximbiot.com>
10511         and Bruno Haible  <bruno@clisp.org>
10512
10513         Remove stat module & update lstat.
10514         * MODULES.html.sh (stat): Remove.
10515         * MODULES.html: Regenerated.
10516         * modules/lstat (Description): Correct function name.
10517         (Files): Add "lstat.h".
10518         (Depends-on): Remove stat, add xalloc, stat-macros.
10519         * modules/stat: Remove this file.
10520         (Include): Add "lstat.h", remove <sys/stat.h>.
10521
10522 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
10523
10524         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
10525         (ranged_convert): Don't save conversion in a temporary struct.
10526         This causes a warning with GCC 4.0.0, and anyway in the typical
10527         case it's not worth the extra 100 bytes or so of code.
10528         (ranged_convert, __mktime_internal): When calling a function via a
10529         pointer P, use P () rather than (*P) (), as we now assume C89 or
10530         better.
10531
10532 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
10533
10534         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
10535         "who -r" failed to give output.  Problem reported by Tim Waugh.
10536
10537         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
10538         (xcalloc): Use it to avoid needless tests.
10539         Problem reported by Jim Meyering.
10540
10541 2005-06-20  Derek Price  <derek@ximbiot.com>
10542
10543         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
10544         unnecessary for Autoconfs > 2.59c.
10545
10546 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
10547
10548         * lib/argp.h (__option_is_short): Check upper limit of
10549         __key. Isprint() requires its argument to have the value
10550         of an unsigned char or EOF.
10551
10552 2005-06-16  Jim Meyering  <jim@meyering.net>
10553
10554         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
10555         when either N or S is zero.
10556
10557 2005-06-16  Derek Price  <derek@ximbiot.com>
10558
10559         * m4/bison.m4: Declare YACC & YFLAGS precious.
10560
10561 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
10562
10563         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
10564         multibyte string or pattern, fall back on unibyte matching.
10565         Problem reported by James Youngman.
10566
10567 2005-06-08  Bruno Haible  <bruno@clisp.org>
10568
10569         * modules/csharpcomp: New file.
10570         * MODULES.html.sh (C#): Add csharpcomp.
10571
10572 2005-06-08  Bruno Haible  <bruno@clisp.org>
10573
10574         * m4/csharpcomp.m4: New file, from GNU gettext.
10575
10576 2005-06-08  Bruno Haible  <bruno@clisp.org>
10577
10578         * lib/csharpcomp.h: New file, from GNU gettext.
10579         * lib/csharpcomp.c: New file, from GNU gettext.
10580         * lib/csharpcomp.sh.in: New file, from GNU gettext.
10581
10582 2005-06-08  Bruno Haible  <bruno@clisp.org>
10583
10584         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
10585         warning on mingw.
10586
10587 2005-06-07  Derek Price  <derek@ximbiot.com>
10588
10589         Sync from CVS.
10590         * lib/glob_.h: Indent nested #ifdef.
10591
10592 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10593
10594         Sync from coreutils.
10595         Use "file name" when talking about file names, instead of "filename"
10596         or "path", as per the GNU coding standards.
10597         * lib/mkdir-p.c: Renamed from makepath.c.
10598         (make_dir_parents): Renamed from make_path.  All callers changed.
10599         * lib/mkdir-p.h: Likewise.  All includers changed.
10600         * lib/filenamecat.c: Renamed from path-concat.c.
10601         (file_name_concat): Renamed from path_concat.  All callers changed.
10602         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
10603         * lib/filenamecat.h: Likewise.  All includers changed.
10604         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
10605         in comments or local variable names.
10606         * lib/basename.c: Likewise.
10607         * lib/canonicalize.c, canonicalize.h: Likewise.
10608         * lib/dirname.c, dirname.h: Likewise.
10609         * lib/euidaccess.c: Likewise.
10610         * lib/exclude.c: Likewise
10611         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
10612         * lib/fsusage.c, fsuage.h: Likewise.
10613         * lib/fts.c, fts_.h: Likewise.
10614         * lib/getcwd.c: Likewise.
10615         * lib/getloadavg.c: Likewise.
10616         * lib/mkstemp.c: Likewise.
10617         * lib/mountlist.c, mountlist.h: Likewise.
10618         * lib/openat.c, openat.h: Likewise.
10619         * lib/readlink-stub.c: Likewise.
10620         * lib/readutmp.c, readutmp.h: Likewise.
10621         * lib/rename.c: Likewise.
10622         * lib/rmdir.c: Likewise.
10623         * lib/same.c: Likewise.
10624         * lib/savedir.c: Likewise.
10625         * lib/stripslash.c: Likewise.
10626         * lib/tempname.c: Likewise.
10627         * lib/xreadlink.c: Likewise.
10628         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
10629         All uses changed.
10630         * lib/exclude.h: Likewise.
10631
10632         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
10633         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10634         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
10635         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10636         * lib/pathmax.h: Include <limits.h> unconditionally, since other
10637         files have been getting away with it for years (MORE/BSD 4.3
10638         is extinct now).
10639         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
10640         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10641
10642         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
10643         Define to 256, not 255, as per modern POSIX.
10644
10645 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10646
10647         Sync from coreutils.
10648         Use "file name" when talking about file names, instead of "filename"
10649         or "path", as per the GNU coding standards.
10650         * MODULES.html.sh: mkdir-p renamed from makepath.
10651         filenamecat renamed from path-concat.
10652         * modules/filenamecat: Renamed from modules/path-concat.
10653         (Files): filenamecat.h and filenamecat.c renamed from
10654         path-concat.h and path-concat.c.
10655         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
10656         (Include): filenamecat.h, not path-concat.h.
10657         * modules/mkdir-p: Renamed from modules/makepath.
10658         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
10659         makepath.c.
10660         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
10661         (Include): mkdir-p.h, not makepath.h.
10662
10663 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10664
10665         Sync from coreutils.
10666         * m4/mkdir-p.m4: Renamed from makepath.m4.
10667         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
10668         Rename files from makepath.c to mkdir-p.c, and from
10669         makepath.h to mkdir-p.h.
10670         * m4/filenamecat.m4: Renamed from path-concat.m4.
10671         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
10672         Rename files from path-concat.c to filenamecat.c,
10673         and from path-concat.h to filenamecat.h.
10674         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
10675         "file name" in local variables or comments.
10676         * m4/rename.m4: Likewise.
10677
10678 2005-06-01  Bruno Haible  <bruno@clisp.org>
10679
10680         * modules/csharpexec: New file.
10681         * MODULES.html.sh (C#): New section.
10682
10683 2005-06-01  Bruno Haible  <bruno@clisp.org>
10684
10685         * m4/csharp.m4: New file, from GNU gettext.
10686         * m4/csharpexec.m4: New file, from GNU gettext.
10687
10688 2005-06-01  Bruno Haible  <bruno@clisp.org>
10689
10690         * lib/csharpexec.h: New file, from GNU gettext.
10691         * lib/csharpexec.c: New file, from GNU gettext.
10692         * lib/csharpexec.sh.in: New file, from GNU gettext.
10693
10694 2005-05-31  Derek Price  <derek@ximbiot.com>
10695             Paul Eggert  <eggert@cs.ucla.edu>
10696
10697         Sync from cvs.
10698         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
10699
10700 2005-05-31  Derek Price  <derek@ximbiot.com>
10701             Paul Eggert  <eggert@cs.ucla.edu>
10702
10703         Sync from cvs.
10704         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
10705
10706 2005-05-29  Derek Price  <derek@ximbiot.com>
10707
10708         * config/srclist.txt (glob_.h, glob.c): Add these files.
10709
10710 2005-05-29  Derek Price  <derek@ximbiot.com>
10711
10712         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
10713         * modules/glob: New file.
10714         * modules/getlogin_r: Add link to POSIX spec in description.
10715
10716 2005-05-29  Derek Price  <derek@ximbiot.com>
10717             Paul Eggert  <eggert@cs.ucla.edu>
10718
10719         * m4/glob.m4: New file.
10720
10721 2005-05-29  Derek Price  <derek@ximbiot.com>
10722             Paul Eggert  <eggert@cs.ucla.edu>
10723
10724         * lib/glob_.h, lib/glob.c: New files.
10725
10726 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10727
10728         * modules/fts (Files): Remove m4/inttypes-pri.m4.
10729         * modules/fts-lgpl (Depends-on): Remove gettext.
10730
10731 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10732
10733         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
10734         and don't require gt_INTTYPES_PRI.
10735
10736 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10737
10738         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
10739
10740         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
10741         the configuration hassle isn't worth it.
10742         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
10743         (LONGEST_MODIFIER, PRIuMAX): Remove.
10744
10745 2005-05-27  Bruno Haible  <bruno@clisp.org>
10746
10747         * lib/getlogin_r.h: Remove second include of <stddef.h>.
10748
10749 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
10750
10751         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
10752         _POSIX_PTHREAD_SEMANTICS for Solaris.
10753
10754 2005-05-25  Derek Price  <derek@ximbiot.com>
10755
10756         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
10757
10758 2005-05-25  Derek Price  <derek@ximbiot.com>
10759             Paul Eggert  <eggert@cs.ucla.edu>
10760
10761         * modules/getlogin_r, m4/getlogin_r.m4: New files.
10762         * lib/getlogin_r.c, getlogin_r.h: New files.
10763
10764 2005-05-25  Bruno Haible  <bruno@clisp.org>
10765             Derek Price  <derek@ximbiot.com>
10766
10767         * lib/getlogin_r.h: Simplify API documentation.
10768
10769 2005-05-23  Derek Price  <derek@ximbiot.com>
10770
10771         * modules/minmax (Files): Add m4/minmax.m4.
10772         (configure.ac): Add gl_MINMAX.
10773
10774 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
10775
10776         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
10777         so that unistd-safer.h (GPL'ed code) need not be included.
10778
10779 2005-05-22  Bruno Haible  <bruno@clisp.org>
10780
10781         * m4/minmax.m4: New file.
10782         Based on a patch by Derek Price <derek@ximbiot.com>.
10783
10784 2005-05-22  Bruno Haible  <bruno@clisp.org>
10785
10786         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
10787         (INT64_MIN): Fix definition.
10788         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
10789
10790         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
10791         NEED_SIGNED_INT_TYPES.
10792
10793         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
10794         HAVE_SYSTEM_INTTYPES.
10795
10796 2005-05-22  Bruno Haible  <bruno@clisp.org>
10797
10798         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
10799         Also include <sys/param.h> if it defines MIN, MAX.
10800         Based on a patch by Derek Price <derek@ximbiot.com>.
10801
10802 2005-05-21  Jim Meyering  <jim@meyering.net>
10803
10804         * modules/fts (Files): Add m4/inttypes-pri.m4.
10805         (Depends-on): Add lstat and remove gettext.  Alphabetize.
10806
10807 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10808
10809         New fts module.
10810         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
10811         (setup_dir, free_dir): New functions.
10812         (enter_dir, leave_dir): Define trivial
10813         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
10814         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
10815         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
10816         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
10817         Move to fts-cycle.c.
10818         (fts_open): Use setup_dir.
10819         (fts_close): Use free_dir.
10820         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
10821         This adds a label and some gotos, but the alternatives were messier.
10822         Check for memory allocation failure when entering a dir.
10823         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
10824         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
10825         (FTS): New member fts_cycle, that is a union that contains the
10826         old active_dir_ht and cycle_state.  All uses changed to mention
10827         fts_cycle.ht and fts_cycle.state.
10828         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
10829         fts.c, with the following changes:
10830         (setup_dir, free_dir): New functions.
10831         (enter_dir): Now returns bool.  Return true if successful, false
10832         if memory exhausted.  All callers changed.
10833         Do not bother partly cleaning up on
10834         memory allocation failure; that is free_dir's job.
10835         However, free ad if hash_insert fails, to avoid memory leak.
10836         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
10837         fts->fts_options to see which union member to use.
10838
10839 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10840
10841         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
10842         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
10843
10844 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10845
10846         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
10847
10848 2005-05-20  Jim Meyering  <jim@meyering.net>
10849
10850         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
10851         Now a macro, to pacify GCC.
10852
10853 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
10854
10855         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
10856         of -1.
10857
10858 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
10859
10860         * lib/chown.c (rpl_chown): Return -1 on failure.
10861
10862 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
10863
10864         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
10865         Don't check for stddef.h.
10866         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
10867         don't use its results.
10868         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
10869         since we include them unconditionally.  Don't require
10870         AM_STDBOOL_H, since stdbool is a prerequisite.
10871         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
10872         since we assume C89 or better.
10873         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
10874         as we don't use their results.
10875         Don't check for fchdir, memmove, memset, strrchr, as we use
10876         them unconditionally.
10877         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
10878         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
10879
10880 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
10881
10882         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
10883         Include <stddef.h> unconditionally, since we assume C89 now.
10884         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
10885         * lib/fts.c: Include fts_.h first, to check interface.
10886         Do not include intprops.h; no longer needed.
10887         Include cycle-check.h and hash.h, since fts_.h no longer does.
10888         Remove unnecessary casts of closedir to void.
10889         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
10890         decide whether to decrement nlinks.
10891         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
10892         (FTS): Use struct hash_table * instead of Hash_table, so that
10893         we no longer need to include hash.h here.
10894
10895 2005-05-18  Jim Meyering  <jim@meyering.net>
10896
10897         * modules/dirfd (License): Change to LGPL.  Most of the code
10898         is already in the public domain.
10899
10900 2005-05-18  Jim Meyering  <jim@meyering.net>
10901
10902         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
10903         Reported by Yoann Vandoorselaere.
10904
10905 2005-05-17  Jim Meyering  <jim@meyering.net>
10906
10907         * m4/fts.m4: New file, from coreutils.
10908
10909 2005-05-17  Jim Meyering  <jim@meyering.net>
10910
10911         * lib/fts.c, lib/fts_.h: New files, from coreutils.
10912
10913 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10914
10915         Sync from coreutils.
10916         * m4/unlinkdir.m4: New file.
10917
10918 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10919
10920         Sync from coreutils.
10921         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
10922         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
10923         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
10924         White space changes only.
10925         * lib/makepath.c (make_path): Port to hosts where leading "//" is
10926         special.
10927         * lib/yesno.c: Include getline.h, not ctype.h.
10928         (yesno): Don't remove leading white space; POSIX doesn't allow it.
10929         Use getline to remove arbitrary restriction on response length.
10930
10931 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10932
10933         * config/srclist-update: Spell out "Street" in FSF postal
10934         mail address; this is the style the FSF seems to prefer.
10935
10936         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
10937         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
10938         this updates FSF postal mail address.
10939
10940         Sync from coreutils.
10941         * modules/unlinkdir: New file.
10942         * modules/yesno (Depends-on): Add getline.
10943         * MODULES.html.sh (File system functions): Add unlinkdir.
10944
10945 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
10946
10947         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
10948         lib/strsep.h:
10949         Change the initial comment to refer to GPL, not LGPL.
10950         gnulib-tool will change it to LGPL as needed.
10951
10952         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
10953         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
10954         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
10955         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
10956         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
10957         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
10958         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
10959         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
10960         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
10961         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
10962         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
10963         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
10964         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
10965         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
10966         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
10967         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
10968         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
10969         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
10970         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
10971         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
10972         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
10973         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
10974         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
10975         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
10976         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
10977         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
10978         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
10979         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
10980         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
10981         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
10982         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
10983         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
10984         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
10985         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
10986         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
10987         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
10988         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
10989         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
10990         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
10991         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
10992         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
10993         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
10994         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
10995         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
10996         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
10997         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
10998         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
10999         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
11000         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
11001         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
11002         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
11003         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
11004         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
11005         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
11006         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
11007         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
11008         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
11009         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
11010         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
11011         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
11012         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
11013         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
11014         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
11015         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
11016         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
11017         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
11018         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
11019         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
11020         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
11021         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
11022         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
11023         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
11024         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
11025         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
11026         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
11027         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
11028         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
11029         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
11030         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
11031         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
11032         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
11033         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
11034         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
11035         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
11036         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
11037         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
11038         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
11039         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
11040         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
11041         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
11042         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
11043         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
11044         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
11045         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
11046         lib/yesno.c, lib/yesno.h:
11047         Update FSF postal mail address.
11048
11049 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11050
11051         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
11052         tests/test-memmem.c, tests/test-stpncpy.c:
11053         Update FSF postal mail address.
11054
11055 2005-05-13  Bruno Haible  <bruno@clisp.org>
11056
11057         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
11058         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
11059         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
11060         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
11061         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
11062         Add support for 64-bit integers in the MSVC compiler.
11063
11064 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11065
11066         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
11067
11068 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
11069
11070         * gnulib-tool (func_import): Sort and uniquify recommended includes.
11071
11072 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
11073
11074         * doc/getdate.texi (General date syntax): Don't say that date
11075         date --iso-8601=ns generates acceptable dates; it doesn't yet.
11076         Problem reported by Nic Ferrier.
11077
11078 2005-05-10  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
11079
11080         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
11081         specified in ai_socktype. Fix invalid ai_protocol
11082         check. ai_protocol is usually set to 0 or depending on
11083         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
11084         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
11085         ai_socktype / ai_protocol in the returned addrinfo structure.
11086
11087 2005-05-10  Simon Josefsson  <jas@extundo.com>
11088
11089         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
11090         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11091
11092 2005-05-10  Karl Berry  <karl@gnu.org>
11093
11094         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
11095         (from http://www.gnu.org/licenses).
11096         * doc/COPYING.LIB: also rename to COPYING.LESSER.
11097         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
11098         fdl.texi suffices.
11099
11100 2005-05-10  Karl Berry  <karl@gnu.org>
11101
11102         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
11103         (COPYING.DOC): remove.
11104
11105         * config/srclist-update: new FSF address.
11106
11107 2005-05-10  Derek Price  <derek@ximbiot.com>
11108
11109         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
11110         possible.
11111
11112 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
11113             Bruno Haible  <bruno@clisp.org>
11114
11115         * modules/inet_ntop: New file.
11116         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11117         inet_ntop.
11118
11119 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
11120             Bruno Haible  <bruno@clisp.org>
11121
11122         * m4/inet_ntop.m4: New file.
11123
11124 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
11125             Bruno Haible  <bruno@clisp.org>
11126
11127         * lib/inet_ntop.h: New file.
11128         * lib/inet_ntop.c: New file, from glibc with modifications.
11129
11130 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
11131
11132         * modules/time_r (License): Change to LGPL.
11133         * modules/extensions (License): Change to LGPL.  Actually,
11134         the license is more permissive than that, but currently gnulib-tool
11135         doesn't know how to handle more-permissive licenses.
11136
11137         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
11138         Problem reported by Dave Love.
11139
11140 2005-05-08  Jim Meyering  <jim@meyering.net>
11141
11142         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
11143         blank.
11144
11145 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
11146
11147         * modules/argmatch (Depends-on): Add stdbool.
11148         * modules/backupfile (Depends-on): Likewise.
11149         * modules/chdir-long (Depends-on): Likewise.
11150         * modules/closeout (Depends-on): Likewise.
11151         * modules/cycle-check (Depends-on): Likewise.
11152         * modules/dirname (Depends-on): Likewise.
11153         * modules/fnmatch (Depends-on): Likewise.
11154         * modules/fsusage (Depends-on): Likewise.
11155         * modules/fwriteerror (Depends-on): Likewise.
11156         * modules/getcwd (Depends-on): Likewise.
11157         * modules/getloadavg (Depends-on): Likewise.
11158         * modules/hard-locale (Depends-on): Likewise.
11159         * modules/makepath (Depends-on): Likewise.
11160         * modules/mountlist (Depends-on): Likewise.
11161         * modules/nanosleep (Depends-on): Likewise.
11162         * modules/posixtm (Depends-on): Likewise.
11163         * modules/quotearg (Depends-on): Likewise.
11164         * modules/readtokens (Depends-on): Likewise.
11165         * modules/readtokens0 (Depends-on): Likewise.
11166         * modules/readutmp (Depends-on): Likewise.
11167         * modules/save-cwd (Depends-on): Likewise.
11168         * modules/strftime (Depends-on): Likewise.
11169         * modules/userspec (Depends-on): Likewise.
11170         * modules/utimecmp (Depends-on): Likewise.
11171         * modules/xgetcwd (Depends-on): Likewise.
11172         * modules/xnanosleep (Depends-on): Likewise.
11173         * modules/xstrtod (Depends-on): Likewise.
11174         * modules/yesno (Depends-on): Likewise.
11175
11176 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
11177
11178         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
11179         needless checks.
11180
11181 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11182
11183         Merge from coreutils.  Among other things,
11184         add bulletproofing for cases where stdin, stdout, or stderr are closed.
11185         * lib/fd-safer.c: New file.
11186         * lib/fcntl-safer.h, open-safer.c: Remove.
11187         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
11188         * lib/dup-safer.c: Include unistd-safer.h first.
11189         Don't include errno.h.
11190         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
11191         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
11192         * lib/file-type.c: Rely on file-type.h change.
11193         * lib/getloadavg.c: Include unistd-safer.h.
11194         (getloadavg): Use safer open.
11195         * lib/getusershell.c: Include "stdio-safer.h".
11196         (getusershell): Use safer fopen.
11197         * lib/long-options.c (long_options): Use NULL rather than 0.
11198         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
11199         'free'.
11200         * lib/modechange.c: Likewise.
11201         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
11202         (MODE_DONE): New constant.
11203         (struct mode_change): Remove 'next' member.
11204         (make_node_op_equals): New function; like the old one of the
11205         same name, except it allocates an array.
11206         (mode_compile, mode_create_from_ref): Use it.
11207         (mode_compile): Allocate result as an array, not a linked list.
11208         Parse octal string ourself, so that we catch mistakes like "+0".
11209         (mode_adjust): Arg is an array, not a linked list.
11210         * lib/modechange.c: Include stat-macros.h, xalloc.h.
11211         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
11212         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
11213         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
11214         Remove.  This is now stat-macros.h's job.
11215         (talloc): Remove.  All callers replaced by xalloc, so that
11216         our invokers don't have to worry about reporting memory failures.
11217         (make_node_op_equals): Remove.
11218         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
11219         New constants.
11220         (struct mode_change): Moved here from modechange.h.
11221         (mode_append_entry): Remove.
11222         (mode_compile): Remove MASKED_OPS arg, since it encouraged
11223         apps to have incorrect behavior.  Use simpler algorithm for head
11224         and tail.  Don't futz with umask; that's now the job of mode_adjust.
11225         Detect more invalid usages rather than having somewhat-random behavior.
11226         Don't insert an "a=" action, as that leads to incorrect behavior.
11227         (mode_compile, mode_create_from_ref): Return NULL on error instead
11228         of an enum, since now there's only one way to have an error.  All
11229         callers changed.
11230         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
11231         at the correct time.  Simplify calculation of "+u" and its ilk.
11232         Don't mishandle "+X".
11233         (mode_free): Remove "register" and localize decls.
11234         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
11235         (struct mode_change): Move to modechange.c; callers don't
11236         need to see this stuff.
11237         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
11238         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
11239         (mode_change, mode_adjust): Reflect the new signatures noted above.
11240         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
11241         that might redefine system include files.
11242         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
11243         (my_usleep): Use NULL rather than (void *) 0.
11244         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
11245         Use siginterrupt to specify that system calls should be interrupted.
11246         (rpl_nanosleep): Move initialization of suspended closer to call of
11247         my_usleep.
11248         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
11249         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
11250         (desirable_utmp_entry): New function.
11251         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
11252         using x2nrealloc, to simplify logic.
11253         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
11254         size calculation.  Do not assume utmp file is a regular file.
11255         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
11256         (READ_UTMP_CHECK_PIDS): New constant.
11257         * lib/save-cwd.c: Include unistd-safer.h.
11258         (save_cwd): Use fd_safer.
11259         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
11260         [!_LIBC] Include "stat-macros.h" instead.
11261         * lib/unistd-safer.h (fd_safer): New decl.
11262
11263 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11264
11265         * modules/getloadavg (Depends-on): Add unistd-safer.
11266         * modules/getusershell (Depends-on): Add stdio-safer.
11267         * modules/lstat (Depends-on): Remove xalloc.
11268         * modules/mkstemp (Depends-on): Add stat-macros.
11269         * modules/modechange (Depends-on): Remove xstrtol.
11270         Add stat-macros, xalloc.
11271         * modules/save-cwd (Depends-on): Add unistd-safer.
11272         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
11273         * modules/unistd-safer (Files): Add lib/fd-safer.c
11274         (Makefile.am): Remove lib_SOURCES.
11275
11276         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
11277         Remove fcntl-safer; unistd-safer supersedes it.
11278
11279 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11280
11281         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
11282         AC_HEADER_STAT.
11283         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
11284         (gl_PREREQ_CHOWN): Remove.
11285         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
11286         it.  Don't require AC_HEADER_STAT.
11287         (gl_PREREQ_LSTAT): Remove.
11288         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
11289         Don't require AC_HEADER_STAT.
11290         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
11291         (gl_PREREQ_RMDIR): Remove.
11292         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
11293         mention stat-macros.h or AC_HEADER_STAT, since we'll make
11294         the stat-macros module a prerequisite.
11295         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
11296         * m4/filemode.m4 (gl_FILEMODE): Likewise.
11297         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
11298         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
11299         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
11300         variable names.
11301         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
11302         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
11303         variable prefixes.
11304         * m4/fcntl-safer.m4: Remove.
11305         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
11306         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
11307         Invoke gl_PREREQ_FD_SAFER.
11308         (gl_PREREQ_FD_SAFER): New macro.
11309         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
11310         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
11311         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
11312         Remove duplicate call to AC_LIBOBJ(readutmp).
11313         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
11314
11315         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
11316         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
11317
11318 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11319
11320         * MODULES.html.sh (Misc): Add byteswap.
11321
11322 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11323
11324         * modules/getcwd (Depends-on): Add extensions.
11325         * modules/openat (Depends-on): Likewise.
11326
11327 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11328
11329         * modules/byteswap: New file.
11330
11331 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11332
11333         * m4/byteswap.m4: New file.
11334
11335 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11336
11337         * lib/byteswap_.h: New file.
11338
11339 2005-04-25  Karl Berry  <karl@gnu.org>
11340
11341         * m4/gettext.m4: Update from GNU gettext 0.14.4.
11342
11343 2005-04-25  Albert Chin  <china@thewrittenword.com>
11344
11345         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
11346         Toolkit C bug.
11347
11348 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
11349
11350         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
11351         (func_ln_if_changed) Remove forcibly for no error message
11352         in case file does not exist.
11353
11354 2005-04-19  Simon Josefsson  <jas@extundo.com>
11355
11356         * gnulib-tool (Options): Make --symlink mean --symbolic.
11357
11358 2005-04-18  Oskar Liljeblad <oskar@osk.mine.nu>
11359
11360         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
11361
11362 2005-04-16  Simon Josefsson  <jas@extundo.com>
11363
11364         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
11365
11366 2005-04-15  Simon Josefsson  <jas@extundo.com>
11367
11368         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
11369
11370 2005-04-15  Simon Josefsson  <jas@extundo.com>
11371
11372         * gnulib-tool: Rename --symlink to --symbolic.
11373
11374 2005-04-15  Oskar Liljeblad <oskar@osk.mine.nu>
11375
11376         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
11377         symbolic links to files instead of copying/moving.  Add --aux-dir,
11378         specifying directory relative --dir where auxiliary build tools
11379         are placed.
11380
11381 2005-04-14  Bruno Haible  <bruno@clisp.org>
11382
11383         * modules/allocsa (License): Change to LGPL.
11384         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
11385
11386 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
11387
11388         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
11389         that "UTC +1 second" continues to work.  Problem reported
11390         by Dmitry V. Levin.
11391         (relunit_snumber): New rule.
11392         (relunit): Use it.
11393
11394 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
11395
11396         * lib/getdate.y (universal_time_zone_table): New constant.
11397         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
11398         universal_time_zone_table.
11399         (lookup_zone): Prefer universal_time_zone_table to
11400         local_time_zone_table, so that "GMT" time stamps are allowed in
11401         London during the summer.  Problem reported by Ian Abbott.
11402
11403 2005-04-12  Jim Meyering  <jim@meyering.net>
11404
11405         * lib/human.c (humblock): Set *options even when returning due to
11406         xstrtoumax conversion failure.  Thanks to a used-uninitialized
11407         warning from gcc-4.
11408
11409 2005-04-09  Jim Meyering  <jim@meyering.net>
11410
11411         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
11412         -Wuninitialized: initialize tm0.tm_year.
11413
11414 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
11415
11416         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
11417         count, since there's no maximum.  All uses changed.
11418         Add member dsts_seen.
11419         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
11420         not being INT_MAX.
11421         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
11422         Use pc_rels_seen to decide whther a date is absolute.
11423
11424         * lib/getdate.y (number): Don't overwrite year.
11425         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
11426         check.
11427
11428 2005-04-02  Simon Josefsson  <jas@extundo.com>
11429
11430         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
11431         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
11432
11433 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
11434
11435         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
11436         where no absolute path name can be longer than PATH_MAX.
11437
11438 2005-03-27  Jim Meyering  <jim@meyering.net>
11439
11440         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
11441
11442 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
11443
11444         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
11445         "one's complement" -> "ones' complement" in comment, as per Knuth.
11446         "value of type" -> "type or expression" in comment.
11447         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
11448
11449 2005-03-26  Jim Meyering  <jim@meyering.net>
11450
11451         Comment nits.
11452         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
11453         Correct typos: s/or/of/.
11454
11455 2005-03-26  Jim Meyering  <jim@meyering.net>
11456
11457         * modules/check-include-files: Move to ../ and rename to...
11458         * check-module: ...this.
11459
11460 2005-03-25  Jim Meyering  <jim@meyering.net>
11461
11462         * modules/xvasprintf (Files): Add xalloc.h.
11463
11464 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
11465
11466         * modules/gettext (Files): config/config.rpath ->
11467         build-aux/config.rpath
11468         * modules/iconv (Files): Likewise.
11469         Problem reported by Oskar Liljeblad.
11470
11471 2005-03-23  Jim Meyering  <jim@meyering.net>
11472
11473         * modules/check-include-files: New script to check for
11474         missing dependencies, multiple includes, etc.
11475
11476         * modules/c-strtold (Depends-on): Add xalloc.
11477         * modules/c-strtod (Depends-on): Add xalloc.
11478         * modules/hash (Depends-on): Add xalloc.
11479         (Files): Remove lib/xalloc.h.
11480
11481         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
11482         * modules/userspec (Files): Add lib/inttostr.h.
11483
11484 2005-03-23  Jim Meyering  <jim@meyering.net>
11485
11486         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
11487
11488 2005-03-22  Jim Meyering  <jim@meyering.net>
11489
11490         * modules/stat-macros: New module.
11491         * modules/canonicalize, modules/euidaccess, modules/file-type,
11492         * modules/filemode, modules/lchown, modules/makepath,
11493         * modules/rmdir, modules/stat: Depend on new stat-macros module
11494         rather than listing lib/stat-macros.h manually.
11495         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
11496
11497 2005-03-22  Jim Meyering  <jim@meyering.net>
11498
11499         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
11500
11501 2005-03-22  Bruno Haible  <bruno@clisp.org>
11502
11503         * config/srclist.txt: Replace target directory 'config' with
11504         'build-aux'.
11505         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
11506         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
11507         ../build-aux/.
11508
11509 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
11510
11511         * modules/chdir-long (Depends-on): Add mempcpy.
11512
11513         * modules/acl, modules/backupfile, modules/c-strtod,
11514         modules/c-strtold, modules/canon-host, modules/canonicalize,
11515         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
11516         modules/exclude, modules/exitfail, modules/file-type,
11517         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
11518         modules/getdate, modules/getline, modules/getpagesize,
11519         modules/getpass, modules/getugroups, modules/group-member,
11520         modules/hard-locale, modules/hash, modules/human, modules/idcache,
11521         modules/inttostr, modules/long-options, modules/makepath,
11522         modules/md5, modules/memcasecmp, modules/memcoll,
11523         modules/modechange, modules/mountlist, modules/path-concat,
11524         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
11525         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
11526         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
11527         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
11528         modules/strftime, modules/strndup, modules/strverscmp,
11529         modules/timespec, modules/unlocked-io, modules/userspec,
11530         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
11531         modules/yesno:
11532         Remove lib_SOURCES line from Makefile.am section, as this is now
11533         done automatically by the corresponding Autoconf macro.
11534
11535 2005-03-21  Jim Meyering  <jim@meyering.net>
11536
11537         Changes imported from coreutils.
11538
11539         * lib/cycle-check.c: Don't include xalloc.h.
11540
11541         * lib/path-concat.c: Don't include assert.h.
11542         (path_concat): Remove assertion that would have triggered
11543         for ABASE starting with more than one slash.
11544         Reported by Andreas Schwab.
11545
11546         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
11547         properly when ABASE is an absolute file name.
11548         Correct the description of this function.
11549         Include <assert.h>.
11550         Add an assertion and a test driver.
11551         This fixes a bug introduced on 2004-07-02.
11552         Andreas Schwab reported the resulting failure of cp --parents:
11553         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
11554
11555 2005-03-21  Jim Meyering  <jim@meyering.net>
11556
11557         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
11558         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
11559
11560 2005-03-21  Jim Meyering  <jim@meyering.net>
11561         and  Paul Eggert  <eggert@cs.ucla.edu>
11562
11563         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
11564         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
11565         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
11566         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
11567         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
11568         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
11569         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
11570         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
11571         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
11572         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
11573         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
11574         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
11575         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
11576         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
11577         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
11578         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
11579         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
11580         for these modules.
11581
11582 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
11583
11584         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
11585         (which shouldn't happen), generate nothing instead of returning 0
11586         immediately, so that nstrftime (NULL, ...) doesn't return 0.
11587
11588 2005-03-16  Bruno Haible  <bruno@clisp.org>
11589
11590         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
11591         HAVE_LONGLONG_64BIT.
11592
11593 2005-03-16  Bruno Haible  <bruno@clisp.org>
11594
11595         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
11596         HAVE_LONGLONG_64BIT.
11597
11598 2005-03-16  Bruno Haible  <bruno@clisp.org>
11599
11600         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
11601         HAVE_LONGLONG_64BIT.
11602
11603 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
11604
11605         * lib/strftime.c (my_strftime): Prepend space to format so that we can
11606         reliably distinguish strftime failure from empty output on POSIX
11607         hosts.
11608
11609 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
11610
11611         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
11612         (iconv_string): Don't guess a size-zero buffer, as that might cause
11613         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
11614         result would be 'too large', where 'too large' is (heuristically)
11615         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
11616         overflow concerns.  This will prevent some unwanted malloc failures
11617         when the inputs are very large.
11618
11619 2005-03-15  Karl Berry  <karl@gnu.org>
11620
11621         * config/srclist.txt (config.rpath): from gettext.
11622         * config/config.rpath: update.
11623
11624 2005-03-15  Bruno Haible  <bruno@clisp.org>
11625
11626         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
11627         to 'negate'.
11628
11629         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
11630         variable.
11631
11632         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
11633         results.
11634
11635 2005-03-14  Simon Josefsson  <jas@extundo.com>
11636
11637         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
11638         <fx@gnu.org>.
11639
11640 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
11641
11642         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
11643         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
11644         intprops.h.
11645         * lib/strtol.c: Likewise.
11646
11647 2005-03-14  Jim Meyering  <jim@meyering.net>
11648
11649         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
11650         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
11651         to be nonzero so that we (and caller) can detect the difference
11652         between a valid zero-length expansion and an error return, even
11653         when the underlying strftime fails before writing anything into
11654         that location.
11655
11656 2005-03-14  Bruno Haible  <bruno@clisp.org>
11657
11658         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
11659         Update from GNU gettext 0.14.3.
11660
11661 2005-03-10  Jim Meyering  <jim@meyering.net>
11662
11663         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
11664
11665 2005-03-10  Jim Meyering  <jim@meyering.net>
11666
11667         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
11668         so that this module works on systems without fchdir.
11669
11670 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
11671
11672         Factor int-properties macros into a single file, except for
11673         glibc-related files.
11674         * lib/intprops.h: New file.
11675         * lib/getloadavg.c: Include it instead of limits.h.
11676         (INT_STRLEN_BOUND): Remove.
11677         * lib/human.c: Include intprops.h.
11678         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
11679         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
11680         302/1000.
11681         * lib/inttostr.h: Include intprops.h instead of limits.h.
11682         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
11683         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
11684         for consistency with intprops.h.
11685         (time_t_is_integer, twos_complement_arithmetic): Use them.
11686         * lib/sig2str.h: Include <signal.h>, intprops.h.
11687         (INT_STRLEN_BOUND): Remove.
11688         * lib/strftime.c (TYPE_SIGNED): Remove.
11689         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
11690         * lib/strtol.c: Adjust comments to match intprops.h.
11691         * lib/userspec.c: Include intprops.h.
11692         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
11693         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
11694         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
11695         instead of rolling our own expressions.
11696         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
11697
11698         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
11699         instead of int.
11700         (my_strftime): Do not mishandle years close to INT_MAX, by doing
11701         the right thing even if adding 1900 would overflow.  Similarly
11702         for tm_mon + 1 and tm_yday + 1.
11703         Make %Y always equivalent to %C%y, and similarly for %G and %g.
11704         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
11705         (DO_SIGNED_NUMBER): New macro.
11706         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
11707
11708 2005-03-07  Bruno Haible  <bruno@clisp.org>
11709
11710         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
11711
11712 2005-03-07  Bruno Haible  <bruno@clisp.org>
11713
11714         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
11715
11716 2005-03-04  Derek R. Price  <derek@ximbiot.com>
11717
11718         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
11719         (func_import): Only replace files via --import when they have actually
11720         changed.
11721
11722 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11723
11724         * m4/mmap-anon.m4: New file.
11725         * m4/pagealign_alloc.m4: New file.
11726
11727 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11728             Bruno Haible  <bruno@clisp.org>
11729
11730         * modules/pagealign_alloc: New file.
11731         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
11732
11733 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11734             Bruno Haible  <bruno@clisp.org>
11735
11736         * lib/pagealign_alloc.h: New file.
11737         * lib/pagealign_alloc.c: New file.
11738
11739 2005-03-03  Bruno Haible  <bruno@clisp.org>
11740
11741         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
11742         Use an all-permissive copyright notice, recommended by RMS.
11743
11744 2005-03-02  Bruno Haible  <bruno@clisp.org>
11745
11746         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
11747         of AIX, the replacement has to be done only after <string.h> is
11748         included, therefore not in config.h. stpncpy.h does the replacement,
11749         and stpncpy.c uses it.
11750
11751 2005-03-02  Bruno Haible  <bruno@clisp.org>
11752
11753         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
11754         stpncpy.c uses it.
11755
11756 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11757
11758         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
11759         The workaround isn't strictly needed for POSIX conformance, and
11760         it's too much of a pain to configure and maintain.  We'll ask
11761         people to fix their kernels instead.
11762         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
11763         (NANOSLEEP_BUG_WORKAROUND): Remove.
11764         (xnanosleep): Remove the workaround.
11765
11766 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11767
11768         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
11769         Reported by Derek Price.
11770         (Include): Add "timespec.h".
11771
11772         * modules/xnanosleep (Depends-on): Remove gethrxtime.
11773
11774 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11775
11776         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
11777         to detect nanosleep bug.
11778
11779 2005-03-01  Bruno Haible  <bruno@clisp.org>
11780
11781         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
11782
11783 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
11784
11785         * modules/gethrxtime: New file.
11786         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
11787         (Depends-on): Add gethrxtime.
11788         (configure.ac): Add gl_XNANOSLEEP.
11789         (Makefile.am): Remove lib_SOURCES line.
11790
11791 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
11792
11793         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
11794         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
11795
11796 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
11797
11798         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
11799         * lib/timespec.h (gettime): Return void, since it always
11800         succeeds now.  All uses changed.
11801         * lib/gettime.c (gettime) Likewise.
11802         [HAVE_NANOTIME]: Prefer nanotime.
11803         Assume gettimeofday succeeds, as POSIX requires.
11804         Assime time () succeeds, since other code already does.
11805         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
11806         (timespec_subtract): Remove.
11807         (NANOSLEEP_BUG_WORKAROUND): New constant.
11808         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
11809         things considerably.  Use it only on GNU/Linux hosts, since the
11810         workaround shouldn't be needed elsewhere.
11811
11812 2005-02-24  Bruno Haible  <bruno@clisp.org>
11813
11814         * modules/gettext (Files): Add m4/glibc2.m4.
11815
11816 2005-02-24  Bruno Haible  <bruno@clisp.org>
11817
11818         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
11819         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
11820         * m4/progtest.m4:
11821         Update from GNU gettext 0.14.2.
11822         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
11823
11824 2005-02-24  Bruno Haible  <bruno@clisp.org>
11825
11826         * lib/localcharset.c: Update from GNU gettext 0.14.2.
11827         * lib/config.charset: Update from GNU gettext 0.14.2.
11828
11829 2005-02-24  Bruno Haible  <bruno@clisp.org>
11830
11831         * lib/gettext.h: Update from GNU gettext 0.14.2.
11832
11833 2005-02-23  Simon Josefsson  <jas@extundo.com>
11834
11835         * m4/iconvme.m4: New file.
11836
11837 2005-02-23  Jim Meyering  <jim@meyering.net>
11838
11839         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
11840         change.
11841         Thanks to Bruno Haible for catching it.
11842
11843 2005-02-22  Simon Josefsson  <jas@extundo.com>
11844
11845         * modules/iconvme: New file.
11846
11847         * MODULES.html.sh: Add iconvme.
11848
11849 2005-02-22  Simon Josefsson  <jas@extundo.com>
11850
11851         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
11852
11853 2005-02-22  Simon Josefsson  <jas@extundo.com>
11854
11855         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
11856
11857 2005-02-22  Jim Meyering  <jim@meyering.net>
11858
11859         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
11860         s/ifndef/ifdef/.
11861
11862 2005-02-20  Neil Conway  <neilc@samurai.com>
11863
11864         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
11865         returned by OSX/Darwin if the specified buffer is not large
11866         enough for the hostname.
11867
11868 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11869
11870         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
11871         pass it to _help, otherwise the latter coredumps trying to
11872         dereference state.root_argp.
11873
11874 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11875
11876         * modules/chdir-long (Depends-on): Add memrchr.
11877         * modules/memrchr (Files): Add lib/memrchr.h.
11878         (Include): "memrchr.h".
11879
11880 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11881
11882         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
11883
11884 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11885
11886         * lib/memrchr.h: New file.
11887         * lib/chdir-long.c: Include it.
11888         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
11889         Don't bother including stddef.h.
11890
11891 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
11892
11893         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
11894         inclusion.
11895         Include <sys/types.h>, for dev_t.
11896         (ME_DUMMY, ME_REMOTE): Move from here....
11897         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
11898         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
11899         Dmitry V. Levin.
11900         Include mountlist.h first, to test the interface.
11901
11902 2005-01-29  Bruno Haible  <bruno@clisp.org>
11903
11904         * lib/progname.c (program_name): Initialize.
11905         Needed when linking statically on MacOS X.
11906
11907 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
11908
11909         Sync from coreutils.
11910         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
11911         (Depends-on): Add c-strtod.
11912         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
11913
11914 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
11915
11916         Sync from coreutils.
11917         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
11918
11919         Remove files that are specific to coreutils.
11920         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
11921
11922 2005-01-28  Bruno Haible  <bruno@clisp.org>
11923
11924         * modules/javacomp: New file.
11925         * MODULES.html.sh (Java): Add javacomp.
11926
11927 2005-01-28  Bruno Haible  <bruno@clisp.org>
11928
11929         * m4/javacomp.m4: New file, from GNU gettext.
11930
11931 2005-01-28  Bruno Haible  <bruno@clisp.org>
11932
11933         * lib/javacomp.sh.in: New file, from GNU gettext.
11934         * lib/javacomp.h: New file, from GNU gettext.
11935         * lib/javacomp.c: New file, from GNU gettext.
11936
11937 2005-01-26  Simon Josefsson  <jas@extundo.com>
11938
11939         * lib/gai_strerror.c: Use GPL in header.
11940
11941 2005-01-26  Bruno Haible  <bruno@clisp.org>
11942
11943         * modules/javaexec: New file.
11944         * MODULES.html.sh (Java): Add javaexec.
11945
11946 2005-01-26  Bruno Haible  <bruno@clisp.org>
11947
11948         * m4/javaexec.m4: New file, from GNU gettext.
11949
11950 2005-01-26  Bruno Haible  <bruno@clisp.org>
11951
11952         * lib/javaexec.sh.in: New file, from GNU gettext.
11953         * lib/javaexec.h: New file, from GNU gettext.
11954         * lib/javaexec.c: New file, from GNU gettext.
11955
11956 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11957
11958         * modules/lchown (Depends-on): Remove lchown.h
11959
11960 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11961
11962         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
11963         must be defined if the header file was not found, in order
11964         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
11965
11966 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11967
11968         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
11969         initializers for struct pentry_state.
11970         (__argp_error): Check return value of __asprintf
11971         (__argp_failure): Translate error message
11972
11973         * lib/argp-parse.c: Removed braces around the expansion of N_()
11974
11975 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11976
11977         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
11978         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
11979         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
11980         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
11981         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
11982         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
11983         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
11984         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
11985         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
11986         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
11987         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
11988         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
11989         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
11990         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
11991         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
11992         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
11993         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
11994         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
11995         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
11996         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
11997         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
11998         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
11999         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
12000         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
12001         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
12002         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
12003         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
12004         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
12005         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
12006         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
12007         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
12008         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
12009         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
12010         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
12011         xstrtol.m4, xstrtoumax.m4, yesno.m4:
12012         Use an all-permissive copyright notice, recommended by RMS.
12013
12014 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
12015
12016         * modules/chdir-long (Depends-on): Remove mempcpy.
12017
12018 2005-01-21  Jim Meyering  <jim@meyering.net>
12019
12020         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
12021         same value as for Solaris 9.
12022
12023         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
12024         component length.  This included changing the parameter to be
12025         of type `char *' rather than `char const *'.
12026         * lib/chdir-long.h (chdir_long): Update prototype.
12027
12028         * lib/openat.c (fdopendir, fstatat): New functions.
12029         * lib/openat.h: Include headers required for use of DIR and struct
12030         stat.
12031         [AT_SYMLINK_NOFOLLOW]: Define.
12032         (fdopendir, fstatat): Add prototypes.
12033
12034 2005-01-21  Bruno Haible  <bruno@clisp.org>
12035
12036         * modules/classpath: New file.
12037         * MODULES.html.sh (Java): Add classpath.
12038
12039 2005-01-21  Bruno Haible  <bruno@clisp.org>
12040
12041         * lib/classpath.h: New file, from GNU gettext.
12042         * lib/classpath.c: New file, from GNU gettext.
12043
12044 2005-01-20  Simon Josefsson  <jas@extundo.com>
12045
12046         * modules/version-etc-fsf: New file.
12047
12048 2005-01-20  Simon Josefsson  <jas@extundo.com>
12049
12050         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
12051         * lib/version-etc.c: Remove version_etc_copyright.
12052         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
12053         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
12054
12055 2005-01-20  Simon Josefsson  <jas@extundo.com>
12056
12057         * lib/base64.h (isbase64): Add.
12058
12059         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
12060         using a unsigned prototype, don't inline.
12061         (base64_decode): Use it.
12062
12063 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12064
12065         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
12066         it.
12067
12068 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12069
12070         * lib/save-cwd.c (save_cwd): Remove code to support the case
12071         where fchdir is missing or flaky.
12072
12073 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12074
12075         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
12076
12077 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
12078
12079         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
12080         AC_LIBSOURCES now does this.
12081         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
12082         with new ullong_max module.
12083
12084 2005-01-19  Bruno Haible  <bruno@clisp.org>
12085
12086         * modules/sh-quote: New file.
12087         * MODULES.html.sh (Executing programs): Add sh-quote.
12088
12089 2005-01-19  Bruno Haible  <bruno@clisp.org>
12090
12091         * lib/sh-quote.h: New file, from GNU gettext.
12092         * lib/sh-quote.c: New file, from GNU gettext.
12093
12094 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12095
12096         Merge from coreutils.
12097         * m4/ullong_max.m4: New file.
12098         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
12099         (gl_MACROS): Assume localeconv exists.
12100
12101 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12102
12103         Merge changes from coreutils, as described below in several
12104         changelogs dated today.
12105
12106         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
12107         (O_DIRECTORY): Remove; not needed here, since "." must be
12108         a directory.  All uses removed.
12109         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
12110         universal on Suns, and we also need to test for IRIX.
12111         Revamp code to use 'if' rather than '#if'.
12112         Avoid unnecessary comparison of cwd->desc to 0.
12113
12114         * lib/utimens.c (futimens): Robustify the previous patch, by checking
12115         for known valid error numbers rather than observed invalid ones.
12116
12117 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12118
12119         * modules/ullong_max: New file.
12120
12121         * modules/chdir-long, modules/openat: New files.
12122         * modules/save-cwd (Depends-on): Depend on chdir-long.
12123         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
12124
12125 2005-01-18  Jim Meyering  <jim@meyering.net>
12126
12127         Merge from coreutils.
12128         * m4/chdir-long.m4, m4/openat.m4: New files.
12129         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
12130         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
12131         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
12132         is sane and DOES follow symlinks.  Besides, testing 20 different
12133         systems found no broken chown implementations.
12134         Prompted by a change in rsync's copy of this macro.
12135         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
12136
12137         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
12138
12139         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
12140         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
12141         NULL-means-set-to-current-time semantics.
12142         Remove temporary file immediately, rather than waiting
12143         for configure's at-exit trap code to do it.
12144
12145 2005-01-18  Jim Meyering  <jim@meyering.net>
12146
12147         * lib/version-etc.c (version_etc_copyright): Update copyright date.
12148
12149         * lib/utimens.c (futimens): Account for the fact that futimes
12150         can also fail with errno == ENOSYS or errno == ENOENT.
12151         Patch from Dmitry V. Levin.
12152
12153         Change the name of the robust chdir function from chdir to chdir_long.
12154         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
12155         (restore_cwd): Use chdir_long, not chdir.
12156         * lib/chdir-long.c: Renamed from chdir.c.
12157         * lib/chdir-long.h: Renamed from chdir.h.
12158         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
12159         Hurd.
12160
12161 2005-01-18  Bruno Haible  <bruno@clisp.org>
12162
12163         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
12164         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
12165         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
12166         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
12167         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
12168         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
12169         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
12170         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
12171         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
12172         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
12173         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
12174         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
12175         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
12176         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
12177         Use an all-permissive copyright notice, recommended by RMS.
12178
12179 2005-01-18  Bob Proulx  <bob@proulx.com>
12180
12181         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
12182         simplify offsetof() macro construct to avoid compile failure with
12183         native HP-UX 11.0 ANSI C compiler.
12184
12185 2005-01-17  Bruno Haible  <bruno@clisp.org>
12186
12187         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
12188         redundant because stpncpy.m4 takes care of it.
12189
12190 2005-01-17  Bruno Haible  <bruno@clisp.org>
12191
12192         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
12193
12194 2005-01-17  Bruno Haible  <bruno@clisp.org>
12195
12196         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
12197         used.
12198
12199 2005-01-17  Bruno Haible  <bruno@clisp.org>
12200
12201         * lib/fwriteerror.h (fwriteerror): Change specification to include
12202         fclose.
12203         * lib/fwriteerror.c: Include <stdbool.h>.
12204         (fwriteerror): At the end, close the file stream. Record whether
12205         stdout was already closed.
12206
12207 2005-01-17  Bruno Haible  <bruno@clisp.org>
12208
12209         * lib/execute.c (environ): Declare if needed.
12210         * lib/pipe.c (environ): Likewise.
12211         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
12212
12213 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12214
12215         * modules/argp: Depend on vsnprintf
12216
12217 2005-01-10  Jim Meyering  <jim@meyering.net>
12218
12219         * modules/closeout (Depends-on): Add atexit.
12220
12221 2005-01-06  Bruno Haible  <bruno@clisp.org>
12222
12223         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
12224
12225 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12226
12227         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
12228         definitions to be after all include files, to avoid collisions.
12229         Problem reported by Bob Proulx.
12230
12231 2005-01-04  Jim Meyering  <jim@meyering.net>
12232
12233         Changes imported from coreutils.
12234         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
12235         as the mkstemp template, use a temporary directory and an
12236         8.3-friendly template to avoid trouble on systems like DJGPP.
12237         Reported by Juan M. Guerrero via Stepan Kasal.
12238         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
12239         close. Remove the temporary directory right away, rather than waiting
12240         for configure's at-exit trap code to do it.
12241         Suggestion from Stepan Kasal.
12242
12243 2005-01-01  Simon Josefsson  <jas@extundo.com>
12244
12245         * gnulib-tool: Print #include directives when --import'ing.
12246
12247 2004-12-28  Simon Josefsson  <jas@extundo.com>
12248
12249         * tests/test-base64.c: Include required header files.  Remove
12250         unused variables.
12251
12252 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
12253
12254         * modules/error (Depends-on): Remove gettext.
12255
12256 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
12257
12258         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
12259         not needed.  This removes a dependency on the gettext module.
12260         [defined _LIBC]: Do not include <libintl.h>; not needed.
12261
12262 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
12263
12264         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
12265         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
12266
12267 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
12268
12269         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
12270         HAVE_DECL_STRTOLD.
12271
12272 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
12273
12274         * modules/getdate (Depends-on): Remove alloca-opt.
12275
12276 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
12277
12278         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
12279
12280 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
12281
12282         * lib/argp-parse.c: Include <stddef.h>.
12283         (alignof, alignto): New macros.
12284         (parser_init): Don't assume that void * is aligned sufficiently
12285         for struct option.
12286
12287         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
12288         need to extend the stack.
12289         (YYINITDEPTH): New macro, so that the initial stack isn't overly
12290         large.
12291
12292 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12293
12294         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
12295
12296 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
12297
12298         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
12299         (2004-10-24) change.  Apparently this was a false alarm.
12300
12301         * modules/getdate: Depend on alloca-opt, not alloca.
12302
12303 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
12304
12305         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
12306         Remove now-obsolete comment about AIX.
12307         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
12308         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
12309         (YYMAXDEPTH): New macro.
12310
12311 2004-12-18  Simon Josefsson  <jas@extundo.com>
12312
12313         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
12314
12315 2004-12-18  Bruno Haible  <bruno@clisp.org>
12316
12317         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
12318
12319 2004-12-18  Bruno Haible  <bruno@clisp.org>
12320
12321         * lib/fatal-signal.c (fatal_signals): Make non-const.
12322         (init_fatal_signals): New function.
12323         (uninstall_handlers, install_handlers): Ignore signals that were set to
12324         SIG_IGN.
12325         (at_fatal_signal): Call init_fatal_signals.
12326         (init_fatal_signal_set): Likewise. Ignore signals that were set to
12327         SIG_IGN.
12328         Reported by Paul Eggert.
12329
12330 2004-12-18  Bruno Haible  <bruno@clisp.org>
12331
12332         * doc/alloca.texi: New file.
12333         * doc/alloca-opt.texi: New file.
12334
12335 2004-12-17  Jim Meyering  <jim@meyering.net>
12336
12337         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
12338         Otherwise, install-sh could exit with improper exit status when
12339         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
12340
12341 2004-12-16  Simon Josefsson  <jas@extundo.com>
12342
12343         * tests/test-base64.c: Add license.
12344
12345 2004-12-15  Stepan Kasal  <address@hidden>
12346
12347         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
12348
12349 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
12350
12351         * modules/getcwd (Files): Add m4/d-ino.m4.
12352         Suggested by Mark D. Baushke.
12353
12354 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
12355
12356         * lib/getdate.y (textint): New member "negative".
12357         (time_zone_hhmm): New function.
12358         Expect 14 shift-reduce conflicts, not 13.
12359         (o_colon_minutes): New rule.
12360         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
12361         (yylex): Set the "negative" member of signed numbers.
12362
12363 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
12364
12365         * doc/getdate.texi (Time of day items, Time zone items):
12366         Describe new formats +00:00, UTC+00:00.
12367
12368 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
12369
12370         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
12371         spurious "-l"s.  Problem reported by Stepan Kasal.
12372
12373 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
12374
12375         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
12376         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
12377
12378 2004-12-04  Simon Josefsson  <jas@extundo.com>
12379
12380         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
12381         Vandoorselaere <yoann@prelude-ids.org>.
12382
12383 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
12384
12385         Changes imported from coreutils.
12386         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
12387         exist.
12388         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
12389
12390 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
12391
12392         Changes imported from coreutils.
12393         * lib/hard-locale.c: Assume <locale.h> exists.
12394         Include "strdup.h".
12395         (GLIBC_VERSION): New macro.
12396         (hard_locale): Assume setlocale exists.
12397         Rewrite to avoid #ifdef.
12398         Use strdup rather than malloc + strcpy.
12399         * lib/human.c: Assume <locale.h> exists.
12400         (human_readable): Assume localeconv exists.
12401
12402 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
12403
12404         * modules/hard-locale (Depends-on): Add strdup.
12405
12406 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
12407
12408         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
12409         convert T2, not T.  (Imported from libc.)
12410
12411 2004-11-30  Simon Josefsson  <jas@extundo.com>
12412
12413         * modules/restrict (License): Change to LGPL.
12414
12415 2004-11-30  Simon Josefsson  <jas@extundo.com>
12416
12417         * m4/restrict.m4: Add copyright and copying conditions.
12418
12419 2004-11-30  Simon Josefsson  <jas@extundo.com>
12420
12421         * m4/base64.m4: New file.
12422
12423 2004-11-30  Simon Josefsson  <jas@extundo.com>
12424
12425         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
12426         base64.
12427
12428         * tests/test-base64.c: New file.
12429
12430         * modules/base64: New file.
12431
12432 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
12433
12434         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
12435         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
12436
12437         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
12438
12439 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
12440
12441         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
12442         (__getcwd.c): Don't restore errno; glibc doesn't.
12443         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
12444         first, falling back to our code only if its results look suspicious.
12445         Ensure that the resulting buffer is only as large as necessary.
12446
12447         * lib/readutmp.c: Include readutmp.h first.
12448         Include <errno.h>, since readutmp.h no longer does that.
12449         * lib/readutmp.h: Don't include <errno.h>,
12450         <sys/param.h>, <time.h>; not needed to establish interface.
12451         (errno): Remove decl.
12452         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
12453         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
12454         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
12455
12456 2004-11-28  Simon Josefsson  <jas@extundo.com>
12457
12458         * lib/base64.h, base64.c: New file.
12459
12460 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
12461
12462         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
12463
12464 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
12465
12466         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
12467         (Depends-on): Remove pathmax, same.  Add mempcpy.
12468         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
12469         (Makefile.am): Append getcwd.h to lib_SOURCES.
12470         (Include): Add getcwd.h.
12471         (Maintainer): Change from Jim Meyering to "all, glibc",
12472         since getdate now uses intended-for-glibc code.
12473         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
12474         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
12475
12476 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12477
12478         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
12479         HP's ANSI C compiler.
12480         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
12481         Declaring int functions causes warnings on some modern systems and
12482         shouldn't be needed to compile on ancient ones.
12483         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
12484         defined.
12485
12486         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
12487         with the following changes.
12488         (__set_errno): Parenthesize properly.
12489         Include <stdbool.h>.
12490         (MIN, MAX, MATCHING_INO): New macros.
12491         (__getcwd): Define with prototype, not K&R form.
12492         Use heuristics to allocate default buffer on stack if possible.
12493         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
12494         behavior, and to avoid the PATH_MAX limit when computing
12495         ../../../../...
12496         Use MATCHING_INO to compare inode number to file.
12497         Check for arithmetic overflow in size calculations.
12498         Fix bug in reallocation of dot array that caused getcwd to fail
12499         on directories nested deeper than 75.
12500         Be more careful about saving errno on error.
12501         Do not use realloc; use only free+malloc, as this is a bit
12502         more flexible and avoids a needless copy operation.
12503         Do not inspect st_dev and st_ino for symbolic links; POSIX
12504         doesn't specify the latter.
12505         Check for closedir errors.
12506         Avoid needless casts.
12507         Use "#ifdef weak_alias" around weak_alias, to be like other
12508         glibc code.
12509         The following changes to getcwd.c have effect only when used in
12510         gnulib; they have no effect inside glibc proper.
12511         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
12512         as alloca isn't used.
12513         (alloca, __alloca): Likewise.
12514         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
12515         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
12516         unconditionally, as gnulib assumes C89 or better.
12517         Do not include <sys/param.h>.
12518         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
12519         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
12520         better.
12521         (NULL) [!defined NULL]: Remove; we assume C89 or better.
12522         Include <dirent.h> in a way that is compatible with modern Autoconf.
12523         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
12524         New macros, if not already defined.
12525         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
12526         Use "_LIBC", not "defined _LIBC", for consistency.
12527         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
12528         a mempcpy module.
12529         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
12530         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
12531         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
12532         credit only to Jim Meyering and adjust the copyright dates.
12533         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
12534         <stdlib.h>, <unistd.h>, "pathmax.h".
12535         Instead, include "xgetcwd.h" (first) and "getcwd.h".
12536         (INITIAL_BUFFER_SIZE): Remove.
12537         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
12538
12539 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12540
12541         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
12542         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
12543         Use the _ONCE methods, for efficiency.
12544         Check for fcntl.h.  In test program, include <errno.h>
12545         and <fcntl.h> if available.  Remove old K&R cruft from
12546         test program.  Check for common errors in GNU/Linux,
12547         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
12548         don't do AC_LIBOBJ, as that's getcwd.m4's job.
12549         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
12550         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
12551         name accordingly.
12552         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
12553         accommodate new getcwd.c.
12554         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
12555         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
12556         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
12557         that's all we need now.
12558
12559 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12560
12561         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
12562         argp-parse.c depends on getopt internals, that means we should
12563         always use our getopt, to be on the safe side.
12564         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
12565         order not to spoil the result of an eventual previous invocation
12566         of gl_GETOPT_SUBSTITUTE.
12567
12568 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12569
12570         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
12571         redefinition warnings. To avoid them, include the defines
12572         in `#if !defined __need_getopt ... #endif'. The only place
12573         where __getopt_argv_const is used is in definitions
12574         of getopt_long and getopt_long_only below, which are as well
12575         protected by `#ifndef __need_getopt'.
12576         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
12577         __need_getopt after including <stdio.h> and <unistd.h> These
12578         headers might have defined it.
12579
12580 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
12581
12582         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
12583
12584 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
12585
12586         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
12587         (futimens): New function, which uses futimes if available.
12588         (futimens, utimens): Support timespec==NULL, with same semantics
12589         as utime and utimens.
12590         * lib/utimens.h (futimens): New decl.
12591
12592 2004-11-23  Jim Meyering  <jim@meyering.net>
12593
12594         * lib/getopt_.h: Remove trailing blanks.
12595
12596 2004-11-23  Jim Meyering  <jim@meyering.net>
12597
12598         * lib/__fpending.c: Add comment.
12599
12600 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
12601
12602         * modules/canonicalize (Depends-on): Add xreadlink.
12603         Problem reported by James Youngman.
12604
12605 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
12606
12607         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
12608         New macros.
12609         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
12610         optopt): Use them instead of invoking ## directly; otherwise, the
12611         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
12612
12613 2004-11-19  Bruno Haible  <bruno@clisp.org>
12614
12615         * lib/strtok_r.c: Move comments from here...
12616         * lib/strtok_r.h: ... to here.
12617
12618 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
12619
12620         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
12621         implementations that mishandle size_t overflow.
12622
12623 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
12624
12625         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
12626         might fail.  Problem reported by Yoann Vandoorselaere.
12627         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
12628         implementations that mishandle size_t overflow.
12629
12630 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12631
12632         * modules/canon-host (Depends-on): Add strdup.
12633
12634 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12635
12636         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
12637
12638 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12639
12640         * lib/canon-host.c: Include "strdup.h".
12641         (canon_host): Use getaddrinfo if available, so that IPv6 works.
12642         Use strdup instead of malloc/strcpy to duplicate strings.
12643
12644         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
12645         (human_space_before_unit): New constant.
12646         * lib/human.c (human_readable): Support it.
12647
12648         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
12649         (xgetcwd): Set errno correctly when failing.
12650         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
12651         the failure is actually due to a PATH_MAX problem.
12652
12653         Further getopt changes to make it more likely that glibc will
12654         buy the changes back.
12655         * lib/getopt.c (POSIXLY_CORRECT): New constant.
12656         (getopt): Use it, so to preserve glibc semantic
12657         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
12658         when compiling for libc.
12659         * lib/getopt_.h (__getopt_argv_const): Bring it back.
12660         (getopt_long, getopt_long_only): Use it.
12661
12662         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
12663         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
12664         (getopt): Argv is now char * const *, as per standard.
12665         (_getopt_internal_r, _getopt_internal): Argv is now char **,
12666         not char *__getopt_argv_const *.
12667         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
12668         _getopt_long_only_r): Likewise.
12669         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
12670         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
12671         _getopt_long_r, _getopt_long_only_r): Likewise.
12672         * lib/getopt_.h (__getopt_argv_const): Remove.
12673         (getopt): Argv is now char * const *, as per standard.
12674
12675         * lib/getdate.y (tORDINAL): New token.
12676         (day, relunit): Allow it for relative times.
12677         (relative_time_table): Use tORDINAL for ordinals.
12678
12679 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12680
12681         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
12682         Document that "second" isn't allowed as an ordinal number.
12683
12684 2004-11-16  Jim Meyering  <jim@meyering.net>
12685
12686         * modules/closeout (Depends-on): Add fpending.
12687
12688 2004-11-15  Jim Meyering  <jim@meyering.net>
12689
12690         * lib/closeout.c: Include "__fpending.h" once again.
12691         Include <stdbool.h>.
12692         (close_stdout): Don't fail just because stdout was closed initially,
12693         since some programs don't write to stdout in the normal course of
12694         operation (other than --version and --help), and we don't want this
12695         function to make e.g. `touch file >&-' fail.
12696         But do fail if it was closed and someone has tried to write to it.
12697         E.g., `printf foo >&-' must fail.
12698
12699 2004-11-13  Jim Meyering  <jim@meyering.net>
12700
12701         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
12702
12703 2004-11-12  Simon Josefsson  <jas@extundo.com>
12704
12705         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
12706         small doc fix is still pending.
12707
12708 2004-11-11  Simon Josefsson  <jas@extundo.com>
12709
12710         * modules/strtok_r: New file.
12711
12712         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12713         strtok_r.
12714
12715 2004-11-11  Simon Josefsson  <jas@extundo.com>
12716
12717         * m4/strtok_r.m4: New file.
12718
12719         * m4/getopt.m4: Replace opterr.
12720
12721 2004-11-11  Simon Josefsson  <jas@extundo.com>
12722
12723         * lib/strtok_r.h, strtok_r.c: New file.
12724
12725 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
12726
12727         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
12728         of replacing opterr, getopt, etc.  This should handle the
12729         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
12730
12731 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
12732
12733         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
12734         we can stop lying to compilers about the constness of argv when we
12735         are compiled outside glibc.
12736         (getopt, getopt_long, getopt_long_only): Use it.
12737         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
12738         _getopt_internal, getopt): Likewise.
12739         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
12740         _getopt_long_only_r): Likewise.
12741         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
12742         _getopt_long_r, _getopt_long_only_r): Likewise.
12743
12744         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
12745         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
12746         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
12747         the other external symbols.
12748         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
12749         declaration, since the above renaming now works around collisions.
12750
12751 2004-11-11  Jim Meyering  <jim@meyering.net>
12752
12753         * lib/linebreak.c: Remove trailing blanks.
12754         * lib/alloca_.h: Likewise.
12755         * lib/acosl.c: Likewise.
12756         * lib/euidaccess.c: Likewise.
12757         * lib/allocsa.h: Likewise.
12758
12759 2004-11-10  Simon Josefsson  <jas@extundo.com>
12760
12761         * m4/getaddrinfo.m4: New file.
12762
12763 2004-11-10  Simon Josefsson  <jas@extundo.com>
12764
12765         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
12766
12767 2004-11-10  Simon Josefsson  <jas@extundo.com>
12768
12769         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12770         getaddrinfo.
12771
12772         * modules/getaddrinfo: New file.
12773
12774 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12775
12776         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
12777
12778 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12779
12780         * lib/mktime.c (SHR): New macro, which is a portable
12781         substitute for >> that should work even on Crays.
12782         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
12783         Problem reported by Mark D. Baushke in
12784         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
12785         * lib/getdate.y (SHR): Likewise.
12786         (tm_diff): Use it.
12787         * lib/strftime.c (SHR): Likewise.
12788         (tm_diff): Use it.
12789         * lib/quotearg.c (struct quoting_options): Use unsigned int for
12790         quote_these_too, so that right shifts are well defined.  All uses
12791         changed.
12792
12793 2004-11-10  Jim Meyering  <jim@meyering.net>
12794
12795         Ensure that no close failure goes unreported.
12796         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
12797         return early when it seems there's nothing to flush.
12798         Don't include __fpending.h.
12799
12800 2004-11-10  Jim Meyering  <jim@meyering.net>
12801
12802         * modules/closeout (Depends-on): Remove fpending.
12803
12804 2004-11-10  Jim Meyering  <jim@meyering.net>
12805
12806         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
12807
12808 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
12809
12810         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
12811         gl_FUNC_STRFTIME.
12812         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
12813         and AC_REQUIRE when possible, to avoid duplicate checks.
12814         Check for <wchar.h>.
12815
12816 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
12817
12818         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
12819
12820 2004-11-09  Bruno Haible  <bruno@clisp.org>
12821
12822         * m4/sockpfaf.m4: New file.
12823
12824 2004-11-05  Bruno Haible  <bruno@clisp.org>
12825
12826         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
12827         Reported by Mark D. Baushke <mdb@cvshome.org>.
12828
12829 2004-11-04  Bruno Haible  <bruno@clisp.org>
12830
12831         2004-09-11  Bruno Haible  <bruno@clisp.org>
12832                 * allocsa.valgrind: New file.
12833         2004-02-06  Bruno Haible  <bruno@clisp.org>
12834                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
12835                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
12836                 Reported by Christopher Seip <chris.seip@hp.com>.
12837
12838 2004-11-04  Bruno Haible  <bruno@clisp.org>
12839
12840         * modules/allocsa (Files): Add lib/allocsa.valgrind.
12841         (Makefile.am): Distribute it.
12842
12843 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
12844
12845         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
12846         with errno == ERANGE if the buffer is too small.
12847         Problem reported by Mark D. Baushke.
12848
12849 2004-11-03  Albert Chin <china@thewrittenword.com>
12850             Paul Eggert  <eggert@cs.ucla.edu>
12851
12852         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
12853         equivalent, substitute $ac_type for equivalent type rather than
12854         blindly using uint32_t *always* which won't work if uint32_t is not
12855         available.  Define _UINT32_T to work around typedef of uint32_t if
12856         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
12857         2.5.1.
12858
12859 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12860
12861         * m4/jm-macros.m4: Sync from coreutils.
12862         (gl_MACROS): Check for mbrlen, for pathchk.
12863         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
12864
12865 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12866
12867         * lib/xreadlink.c (MAXSIZE): New macro.
12868         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
12869         size does not exceed MAXSIZE.  Avoid cast.
12870         As suggested by Mark D. Baushke in
12871         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
12872         if readlink fails with buffer size just under MAXSIZE, try again
12873         with MAXSIZE.
12874
12875 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12876
12877         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
12878
12879 2004-11-02  Derek R. Price  <derek@ximbiot.com>
12880         and  Paul Eggert  <eggert@cs.ucla.edu>
12881
12882         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
12883         (get_date): Overparenthesize to avoid GCC warning.
12884
12885 2004-11-02  Bruno Haible  <bruno@clisp.org>
12886
12887         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
12888         returns void.
12889
12890 2004-11-02  Bruno Haible  <bruno@clisp.org>
12891
12892         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
12893         function returns void.
12894
12895 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
12896
12897         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
12898         fflush_unlocked, flockfile, funlockfile, funlockfile,
12899         fputs_unlocked, putc_unlocked.
12900
12901 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
12902
12903         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
12904         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
12905         already declared.
12906
12907 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12908
12909         * modules/getdate (Files): Add doc/getdate.texi.
12910         (Depends-on): Add setenv, xalloc.
12911
12912 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12913
12914         * lib/getdate.y: Add support for TZ="foo" within a date string.
12915         Fix some bugs near time_t boundaries.  Reject dates with
12916         out-of-range components, e.g., "Sept 31".
12917         Include <stdlib.h>, "setenv.h", "xalloc.h".
12918         (ISDIGIT_LOCALE): Remove; unused.
12919         Note that the TZ and time functions used here are not reentrant.
12920         (mktime_ok, get_tz): New functions.
12921         (TZBUFSIZE): New constant.
12922         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
12923         This requires that we sometimes generate our own TZ="XXX..." setting.
12924
12925 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12926
12927         * doc/getdate.texi: New file, from coreutils with modifications for
12928         the new TZ parsing.
12929
12930 2004-10-27  Derek R. Price  <derek@ximbiot.com>
12931
12932         * lib/mktime.c (not_equal_tm): Remove redundant check.
12933
12934 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
12935
12936         * modules/regex (lib_SOURCES): Add regex.c.
12937         Reported by James Youngman in
12938         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
12939
12940 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
12941
12942         * lib/getdate.y: Use Bison 1.875 features, and some minor
12943         code cleanups.  This change does not affect semantics.
12944         Don't include <stdlib.h>; no longer needed.
12945         Don't include unlocked-io.h; only the "#if TEST" code uses
12946         stdio, and performance isn't crucial there.
12947         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
12948         Bison 1.875 features as described below.
12949         All uses of "PC." replaced by "pc->".
12950         (YYSTYPE): Add a forward declaration.
12951         (yylex, yyerror): Use full prototypes in forward decls.
12952         Use "%pure-parser" rather than obsolescent "%pure_parser".
12953         Use %parse-param and %lex-param instead of obsolescent
12954         YYPARSE_PARAM and YYLEX_PARAM.
12955         (meridian_table, month_and_day_table, time_units_table,
12956         relative_time_table, time_zone_table, military_table,
12957         lookup_zone, lookup_word, get_date):
12958         Use NULL instead of 0 where appropriate.
12959         (to_hour): Avoid abort (), to avoid a dependency on
12960         stdlib.h.
12961         (yyerror, yylex): Now accepts parser_control * arg.
12962         (main) [TEST]: Use '\0' rather than 0 for char.
12963
12964 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
12965
12966         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
12967
12968 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
12969
12970         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
12971         It's now the caller's responsibility to handle the case where
12972         !HAVE_GETPAGESIZE && !defined getpagesize.
12973
12974         * lib/mktime.c (leapyear): Arg is long int, not int.
12975
12976 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
12977
12978         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
12979
12980 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
12981
12982         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
12983         missing.  Problem reported by James Youngman.
12984
12985 2004-10-16  Simon Josefsson  <jas@extundo.com>
12986
12987         * gnulib-tool: Fix comments.  Fix parse problem.
12988         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
12989
12990 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
12991
12992         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
12993         implementation of getopt_long.  Problem reported by Alexander Taler in:
12994         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
12995
12996 2004-10-15  Bruno Haible  <bruno@clisp.org>
12997
12998         * gnulib-tool: Untabify. Initialize supplied_libname.
12999         (func_usage): More homogenous output.
13000         (func_modules_transitive_closure, func_modules_to_filelist,
13001         func_emit_lib_Makefile_am): New functions.
13002         (func_import): New function, extracted from big case statement. Use
13003         func_get_license, func_modules_transitive_closure,
13004         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
13005         opt_lgpl. Don't use test -a, as it's not portable.
13006         (func_create_testdir): Use func_modules_transitive_closure,
13007         func_modules_to_filelist, func_emit_lib_Makefile_am.
13008
13009 2004-10-15  Bruno Haible  <bruno@clisp.org>
13010
13011         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
13012
13013 2004-10-15  Bruno Haible  <bruno@clisp.org>
13014
13015         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
13016         the portions belonging to each module.
13017         Suggested by Derek Robert Price <derek@ximbiot.com>.
13018
13019 2004-10-12  Simon Josefsson  <jas@extundo.com>
13020
13021         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
13022         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
13023         to real functions.
13024
13025 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13026
13027         * modules/vsnprintf: New file.
13028
13029 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13030
13031         * m4/vsnprintf.m4: New file.
13032
13033 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13034
13035         * lib/vsnprintf.h: New file.
13036         * lib/vsnprintf.c: New file.
13037
13038 2004-10-11  Bruno Haible  <bruno@clisp.org>
13039
13040         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
13041         vsnprintf.
13042
13043 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
13044
13045         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
13046
13047 2004-10-07  Bruno Haible  <bruno@clisp.org>
13048
13049         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
13050         fits into the provided buffer.
13051
13052 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
13053
13054         * lib/diacrit.c, diacrit.h: Add GPL notice.
13055
13056         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
13057         notice.
13058         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
13059         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
13060         This avoids a potential constant-folding bug.
13061
13062 2004-10-05  Bruno Haible  <bruno@clisp.org>
13063
13064         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
13065         for the declaration of strsep.
13066
13067 2004-10-05  Bruno Haible  <bruno@clisp.org>
13068
13069         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
13070
13071 2004-10-04  Simon Josefsson  <jas@extundo.com>
13072
13073         * modules/memmem: New file.
13074         * tests/test-memmem.c: New file.
13075         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
13076
13077 2004-10-04  Simon Josefsson  <jas@extundo.com>
13078
13079         * m4/memmem.m4: New file.
13080
13081 2004-10-04  Simon Josefsson  <jas@extundo.com>
13082
13083         * lib/memmem.h: New file.
13084         * lib/memmem.c: New file, taken from glibc.
13085
13086 2004-10-04  Simon Josefsson  <jas@extundo.com>
13087
13088         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
13089         '#ifdef USE_UNLOCKED_IO'.
13090
13091 2004-10-04  Simon Josefsson  <jas@extundo.com>
13092
13093         * config/srclist.txt: Add memmem from glibc.
13094
13095 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13096
13097         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
13098
13099         * modules/argmatch, modules/argp, modules/closeout, modules/error,
13100         modules/exclude, modules/getdate, modules/getline,
13101         modules/getndelim2, modules/getpass, modules/getpass-gnu,
13102         modules/getusershell, modules/linebuffer, modules/md5,
13103         modules/mountlist, modules/posixtm, modules/readtokens,
13104         modules/readutmp, modules/regex, modules/sha1,
13105         modules/version-etc, modules/yesno:
13106         Remove dependency on unlocked-io.
13107
13108 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13109
13110         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
13111
13112         * m4/unlocked-io.m4: Add copyright notice.
13113         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
13114
13115 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13116
13117         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
13118         * lib/xmalloc.c (xmemdup): Likewise.
13119         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
13120         XFREE): Remove these long-obsolescent macros.
13121         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
13122         * lib/xstrdup.c: Remove.
13123
13124         * lib/regex.c (re_comp): Cast gettext return value to char *,
13125         Problem reported by Martin Neitzel via Mark D. Baushke.
13126
13127 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13128
13129         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
13130         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
13131         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
13132         regex.c, sha1.c, version-etc.c, yesno.c:
13133         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
13134         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
13135         the includer's responsibility.
13136
13137         Sync from coreutils.
13138
13139         * lib/modechange.c (mode_compile): Don't decrement a pointer that
13140         points to the start of a string, as the C Standard says the
13141         resulting behavior is undefined.
13142
13143         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
13144         simple -> simple_backups, numbered_existing ->
13145         numbered_existing_backups, numbered -> numbered_backups
13146         to avoid shadowing problems.  All uses changed.
13147         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
13148         * lib/backupfile.c (check_extension, numbered_backup):
13149         Rename locals to avoid shadowing 'basename'.
13150         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
13151         once.
13152
13153         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
13154         * lib/.cvsignore: Add getopt.h.
13155
13156 2004-10-04  Bruno Haible  <bruno@clisp.org>
13157
13158         * modules/README: New file.
13159         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
13160         not a module.
13161
13162 2004-10-02  Jim Meyering  <jim@meyering.net>
13163
13164         * lib/dirfd.h, getpagesize.h: Add copyright notice.
13165
13166 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
13167
13168         * modules/strsep: New file.
13169
13170 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
13171
13172         * m4/strsep.m4: New file.
13173
13174 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
13175
13176         * lib/strsep.h: New file.
13177         * lib/strsep.c: New file.
13178
13179 2004-10-01  Simon Josefsson  <jas@extundo.com>
13180
13181         * lib/snprintf.c (snprintf): Handle size==0.
13182
13183 2004-10-01  Simon Josefsson  <jas@extundo.com>
13184             Bruno Haible  <bruno@clisp.org>
13185
13186         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
13187         (snprintf): Declare 'args'.
13188
13189 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
13190
13191         * lib/snprintf.c: Remove comments as to why each header is needed.
13192
13193 2004-10-01  Bruno Haible  <bruno@clisp.org>
13194
13195         * MODULES.html.sh: Add strsep.
13196
13197 2004-09-30  Simon Josefsson  <jas@extundo.com>
13198
13199         * modules/snprintf: New file.
13200
13201 2004-09-30  Simon Josefsson  <jas@extundo.com>
13202
13203         * m4/snprintf.m4: New file.
13204
13205 2004-09-30  Simon Josefsson  <jas@extundo.com>
13206
13207         * lib/snprintf.h, lib/snprintf.c: New files.
13208
13209 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13210
13211         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
13212         (hol_entry_help): Never translate an empty string.
13213         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
13214         * lib/argp.h (OPTION_NO_TRANS): New option.
13215
13216 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13217
13218         * modules/argp (Maintainer): Replace Simon Josefsson
13219         by Sergey Poznyakoff.
13220
13221 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13222
13223         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
13224         changes merged back into glibc.
13225
13226 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13227
13228         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
13229
13230 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
13231
13232         * lib/xvasprintf.c: Include xalloc.h.
13233         (xvasprintf): Use xalloc_die, not xmalloc_die.
13234
13235 2004-09-29  Bruno Haible  <bruno@clisp.org>
13236
13237         * modules/alloca-opt: New file, derived from modules/alloca.
13238         * modules/allocsa: Depend on alloca-opt instead of alloca.
13239         * modules/setenv: Likewise.
13240         * modules/vasnprintf: Likewise.
13241         * MODULES.html.sh: Add alloca-opt.
13242
13243 2004-09-28  Simon Josefsson  <jas@extundo.com>
13244
13245         * gnulib-tool: New parameter --lgpl, to asseert that modules are
13246         LGPL, and to replace license template from GPL to LGPL.
13247
13248 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
13249
13250         * modules/dummy: Change license to LGPL.
13251
13252 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
13253
13254         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
13255
13256 2004-09-24  Simon Josefsson  <jas@extundo.com>
13257
13258         * modules/minmax (License): Change from GPL to LGPL.
13259
13260 2004-09-23  Simon Josefsson  <jas@extundo.com>
13261
13262         * gnulib-tool (--import): Typo.
13263
13264 2004-09-23  Simon Josefsson  <jas@extundo.com>
13265
13266         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
13267
13268 2004-09-22  Bruno Haible  <bruno@clisp.org>
13269
13270         * modules/*: Add 'License' field.
13271         * gnulib-tool: Accept --extract-license option.
13272         (func_get_license): New function.
13273
13274 2004-09-21  Bruno Haible  <bruno@clisp.org>
13275
13276         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
13277         Reported by Simon Josefsson.
13278
13279 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
13280
13281         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
13282         gl_AC_TYPE_LONG_LONG.
13283
13284 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
13285
13286         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
13287
13288 2004-09-18  Simon Josefsson  <jas@extundo.com>
13289         and  Paul Eggert  <eggert@cs.ucla.edu>
13290
13291         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
13292         calls with autoreconf.  Define GL_LIB.
13293
13294 2004-09-14  Karl Berry  <karl@gnu.org>
13295
13296         * config/srclist.txt: unsync setenv.c, sigh.
13297
13298 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
13299
13300         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
13301         Problem reported by Bruno Haible in:
13302         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
13303
13304 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
13305
13306         * config/srclist.txt: Comment out argp-pvh.c.
13307
13308 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
13309
13310         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
13311         in case some system header has #define'd it.  Problem reported by
13312         Soeren D. Schulze in
13313         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
13314
13315 2004-09-09  Karl Berry  <karl@gnu.org>
13316
13317         * regex.[ch]: delete from the root.  These were supposed to be
13318                 synced with emacs cvs, but this has not happened for about
13319                 a year, and anyway nothing else uses emacs regex.[ch].
13320                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
13321                 lib/regex[.ch] is untouched.
13322
13323 2004-09-09  Bruno Haible  <bruno@clisp.org>
13324
13325         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
13326
13327 2004-09-09  Bruno Haible  <bruno@clisp.org>
13328
13329         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
13330         modifications.
13331         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
13332
13333 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
13334
13335         * modules/xvasprintf: New file.
13336         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
13337
13338 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
13339
13340         * lib/xvasprintf.h: New file.
13341         * lib/xvasprintf.c: New file.
13342         * lib/xasprintf.c: New file.
13343
13344 2004-09-08  Bruno Haible  <bruno@clisp.org>
13345
13346         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
13347
13348 2004-09-08  Bruno Haible  <bruno@clisp.org>
13349
13350         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
13351         length is > INT_MAX.
13352         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
13353         more.
13354
13355 2004-09-08  Bruno Haible  <bruno@clisp.org>
13356
13357         * lib/stdint_.h: New file, taken from GNU clisp.
13358
13359 2004-09-08  Bruno Haible  <bruno@clisp.org>
13360             Oskar Liljeblad  <oskar@osk.mine.nu>
13361
13362         * modules/stdint: New file.
13363         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
13364
13365 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13366
13367         Import from coreutils.
13368         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
13369         strings on unbounded length.  alloca's performance benefits aren't
13370         that important here.
13371         (V_STRDUP): Remove.
13372         (parse_with_separator): New function, with most of the internals
13373         of the old parse_user_spec.  Allow user to omit both user and group,
13374         for compatibility with FreeBSD.
13375         Clone only the user name, not the entire spec.
13376         Do not set *uid, *gid unless entirely successful.
13377         Avoid memory leak in some failing cases.
13378         Fix regression for USER.GROUP reported by Dmitry V. Levin in
13379         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
13380         (parse_user_spec): Rewrite to use parse_with_separator.
13381
13382 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13383
13384         * modules/userspec: Don't depend on alloca.
13385
13386 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13387
13388         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
13389
13390 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13391
13392         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
13393         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
13394         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
13395
13396 2004-08-16  Simon Josefsson  <jas@extundo.com>
13397
13398         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
13399         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
13400         Add --dry-run for --import.
13401         Let user provided command line parameters override configure.ac
13402         settings.
13403
13404 2004-08-12  Simon Josefsson  <jas@extundo.com>
13405
13406         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
13407         as discussed with Paul Eggert in threads rooted at
13408         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
13409         and
13410         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
13411         Before, the test was empty, and relied on ELIDE_CODE in source
13412         code.)
13413         (gl_PREREQ_GETOPT): New macro.
13414         (gl_GETOPT): Use them.
13415
13416 2004-08-12  Simon Josefsson  <jas@extundo.com>
13417
13418         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
13419         * lib/getopt_.h: Renamed from getopt.h.
13420
13421 2004-08-12  Simon Josefsson  <jas@extundo.com>
13422
13423         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
13424         Change default library name from libfoo to libgnu.
13425         Now, if you have a configure.ac that says:
13426                 gl_SOURCE_BASE(gl)
13427                 gl_M4_BASE(gl/m4)
13428                 gl_MODULES(error getopt etcetera)
13429                 gl_INIT
13430         you can import all you need by running:
13431                 ../gnulib/gnulib-tool --import
13432
13433         * modules/getopt (Files): Rename getopt.h to getopt_.h.
13434         (Makefile.am): Rewrite, use logic from argz.
13435         (Include): Use <getopt.h> instead of "getopt.h".
13436
13437 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13438
13439         * modules/argp (Files): Add m4/unlocked-io.m4.
13440         (Depends-on): Add extensions.
13441
13442 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13443
13444         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
13445         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
13446         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
13447         Check for program_invocation_name, program_invocation_short_name,
13448         flockfile, funlockfile, features.h, _getopt_long_only_r.
13449
13450 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13451
13452         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
13453         its complicated substitute.
13454         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
13455         and program_invocation_name.
13456         (__argp_basename) [!_LIBC]: Remove; the only use was
13457         replaced by its body.
13458         (__argp_short_program_name): Change condition from
13459         !defined __argp_short_program_name to
13460         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
13461         to match argp-namefrob.h.
13462         (__argp_failure): Don't assume strerror_r returns char *.
13463         * lib/argp-parse.c (N_): Define unconditionally.
13464         (argp_default_options): Fill out initializers with 0 to avoid
13465         gcc warnings.
13466
13467 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13468
13469         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
13470         getopt1.c.
13471
13472 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13473
13474         Merge from coreutils.
13475
13476         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
13477
13478         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
13479         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
13480
13481 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13482
13483         Merge from coreutils.
13484
13485         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
13486         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
13487         for Reliant Unix 5.43.
13488
13489         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
13490         (union fooround): Use uintmax_t, not long int.
13491         The rest is a merge from libc:
13492         [defined _LIBC]: Include <shlib-compat.h>.
13493         (_obstack) [defined _LIBC]: Remove after 2.3.4.
13494
13495         * lib/settime.c (settime): Recode to avoid warning with
13496         Sun Forte C 6U2.
13497
13498         * lib/strverscmp.c: Convert to UTF-8.
13499
13500 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13501
13502         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
13503         m4/uintmax_t.m4.
13504
13505 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13506
13507         * modules/xalloc-die: New file.
13508         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
13509
13510         * modules/md5 (Files): Add m4/uint32_t.m4.
13511         * modules/sha1: Renamed from modules/sha.
13512         (Files):
13513         Rename lib/sha.h to lib/sha1.h.
13514         Rename lib/sha.c to lib/sha1.c.
13515         Rename m4/sha.m4 to m4/sha1.m4.
13516         (lib_SOURCES): Likewise.
13517         (configure.ac): Rename gl_SHA to gl_SHA1.
13518         (Include): sha.h -> sha1.h.
13519
13520 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13521
13522         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
13523         * m4/sha1.m4: Renamed from sha.m4.
13524         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
13525
13526 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13527
13528         * lib/obstack.h (obstack_empty_p):
13529         Don't assume that chunk->contents is suitably aligned.
13530         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
13531         Likewise. Problem reported by Benno in
13532         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
13533
13534         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
13535         readable.  This could be improved further but it'd take some work.
13536
13537 2004-08-08  Simon Josefsson  <jas@extundo.com>
13538
13539         * modules/xgethostname (Depends-on): Remove exit and error (not
13540         used).
13541
13542         * modules/getpass-gnu: Add getpass.h.
13543         (Depends-on): Add stdbool.
13544         * modules/getpass: Add getpass.h.
13545
13546 2004-08-08  Simon Josefsson  <jas@extundo.com>
13547
13548         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
13549         Check getpass declaration.
13550
13551 2004-08-08  Simon Josefsson  <jas@extundo.com>
13552
13553         * lib/xgethostname.c: Don't include error.h (not used).
13554
13555         * lib/getpass.h: Add.
13556         * lib/getpass.c: Include getpass.h first.
13557
13558 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
13559
13560         * lib/xalloc-die.c: New file.
13561         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
13562         All uses removed.
13563         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
13564         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
13565         xalloc-die.c.
13566         (_, N_, xalloc_die): Move to xalloc-die.c.
13567         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
13568         so that we needn't mess with xalloc_msg_memory_exhausted.
13569
13570         * lib/sha1.h: Renamed from sha.h.
13571         (SHA1_H): Renamed from _SHA_H.
13572         (sha1_ctx): Renamed from sha_ctx.
13573         (sha1_init_ctx): Renamed from sha_init_ctx.
13574         (sha1_process_block): Renamed from sha_process_block.
13575         (sha1_process_bytes): Renamed from sha_process_bytes.
13576         (sha1_finish_ctx): Renamed from sha_finish_ctx.
13577         (sha1_read_ctx): Renamed from sha_read_ctx.
13578         (sha1_stream): Renamed from sha_stream.
13579         (sha1_buffer): Renamed from sha_buffer.
13580         * lib/sha1.c: Likewise; renamed from sha.c.
13581         Do not include <sys/types.h>.
13582         Include <stddef.h> rather than <stdlib.h>.
13583
13584 2004-08-08  Bruno Haible  <bruno@clisp.org>
13585
13586         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
13587         FILESYSTEM_PREFIX_LEN.
13588         * lib/progreloc.c: Likewise.
13589         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
13590
13591 2004-08-06  Simon Josefsson  <jas@extundo.com>
13592
13593         * modules/progname (Depends-on): Don't depend on stdbool.
13594
13595 2004-08-06  Simon Josefsson  <jas@extundo.com>
13596
13597         * modules/getsubopt: New file.
13598         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13599         getsubopt.
13600
13601 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13602
13603         More merge from coreutils.
13604
13605         * m4/utimens.m4, m4/utimecmp.m4: New files.
13606         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
13607         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
13608         prereq.m4, sha.m4: Import changes from coreutils.
13609
13610 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13611
13612         More merge from coreutils.
13613         * modules/raise, modules/readtokens0, modules/utimens:
13614         * modules/utimecmp, module/xnanosleep: New files.
13615         * modules/strftime: Add lib/strftime.h.
13616         Change include from <time.h> to "strftime.h".
13617         * modules/yesno: Add lib/yesno.h.
13618         * modules/backupfile: Remove lib/addext.c.
13619         * modules/euidaccess: Add stat-macros.h.
13620         * modules/canonicalize, modules/euidaccess,
13621         modules/filemode, modules/lchown, modules/makepath,
13622         modules/rmdir, modules/stat: Likewise.
13623
13624 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13625
13626         Merge from tar.
13627         * lib/argp-help.c (make_hol, hol_append): Don't assume that
13628         SIZE_MAX is a valid preprocessor constant.
13629         (__argp_basename): Change from "#ifndef _LIBC"
13630         to "#ifndef __argp_short_program_name", so that
13631         we don't compile these functions for tar.
13632
13633         More merges from coreutils.
13634         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
13635         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
13636         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
13637         * lib/addext.c: Remove; no longer needed.
13638         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
13639         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
13640         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
13641         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
13642         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
13643         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
13644         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
13645         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
13646         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
13647         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13648         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
13649         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
13650         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
13651         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
13652         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
13653         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
13654         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
13655         Import changes from coreutils.
13656
13657 2004-08-05  Simon Josefsson  <jas@extundo.com>
13658
13659         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
13660
13661 2004-08-05  Simon Josefsson  <jas@extundo.com>
13662
13663         * m4/getsubopt.m4: New file.
13664
13665 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13666
13667         Merge from coreutils.
13668
13669         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
13670         * m4/getcwd-path-max.m4: New files.
13671
13672         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
13673         FILESYSTEM_PREFIX_LEN ->
13674         FILE_SYSTEM_PREFIX_LEN.
13675         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
13676         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
13677         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
13678         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
13679
13680         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
13681         prerequisite modules now handle the DOS stuff.
13682         Don't check for unistd.h.
13683
13684 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13685
13686         Merge from coreutils.
13687
13688         * lib/.gdb-history: Remove; this doesn't belong here.
13689
13690         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
13691         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
13692         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
13693         * lib/getcwd.c: New files.
13694
13695         * lib/dirname.h: Include <stdbool.h>.
13696         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
13697         for consistency with POSIX terminology.  All uses changed.
13698         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
13699         (strip_trailing_slashes): Use bool for booleans.
13700         * lib/stripslash.c (strip_trailing_slashes): Likewise.
13701
13702         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
13703         sometimes returns a positive errno value even when it succeeds.
13704         (print_errno_message) [!LIBC]: Fall back on strerror if
13705         __strerror_r fails.
13706
13707         * lib/path-concat.c (mempcpy): Don't define if a system header defines
13708         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
13709         (longest_relative_suffix): New function.
13710         (path_concat): Use it.  Assume first argument is not NULL.
13711         Port to DOS.  Omit redundant separators.
13712         Report an error instead of returning NULL.
13713         Use mempcpy instead of memcpy.
13714         (xpath_concat): Remove: not declared or used.
13715
13716         * lib/same.h: Include <stdbool.h>
13717         (same_name): Return bool, not int.
13718         * lib/same.c (same_name): Likewise.
13719         (errno): Don't declare; we assume C89 or better now.
13720
13721         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
13722         if not already defined.
13723
13724         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
13725         * lib/dup-safer.c (errno): Likewise.
13726
13727 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13728
13729         Merge from coreutils.
13730         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
13731         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
13732         * modules/path-concat: Don't depend on strdup.
13733
13734 2004-08-03  Simon Josefsson  <jas@extundo.com>
13735
13736         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
13737         * lib/progname.h: Don't include stdbool.h.
13738
13739 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13740
13741         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
13742         * MODULES.html.sh (func_all_modules): Remove fatal.
13743
13744 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13745
13746         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
13747
13748 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13749
13750         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
13751         working.
13752
13753 2004-08-02  Simon Josefsson  <jas@extundo.com>
13754
13755         * lib/getsubopt.h: New file, with comments from Bruno Haible.
13756         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
13757         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
13758
13759 2004-08-01  Simon Josefsson  <jas@extundo.com>
13760
13761         * lib/xgetdomainname.c: Include stdlib.h, for free().
13762
13763 2004-07-19  Bruno Haible  <bruno@clisp.org>
13764
13765         * MODULES.html.sh (func_all_modules): Add dummy.
13766
13767 2004-07-16  Simon Josefsson  <jas@extundo.com>
13768
13769         * modules/dummy: New file.
13770
13771 2004-07-16  Simon Josefsson  <jas@extundo.com>
13772
13773         * lib/dummy.c: New file.
13774
13775 2004-07-16  Bruno Haible  <bruno@clisp.org>
13776
13777         * lib/backupfile.h: Add extern "C" for C++.
13778         * lib/closeout.h: Likewise.
13779         * lib/copy-file.h: Likewise.
13780         * lib/findprog.h: Likewise.
13781         * lib/full-write.h: Likewise.
13782         * lib/pathname.h: Likewise.
13783         * lib/progname.h: Likewise.
13784         * lib/stpcpy.h: Likewise.
13785         * lib/stpncpy.h: Likewise.
13786         * lib/strcase.h: Likewise.
13787         * lib/strstr.h: Likewise.
13788         * lib/xalloc.h: Likewise.
13789
13790         * lib/mbswidth.h: Add extern "C" for C++.
13791         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
13792
13793 2004-07-13  Robert Millan  <robertmh@gnu.org>
13794
13795         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
13796
13797 2004-07-09  Simon Josefsson  <jas@extundo.com>
13798
13799         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
13800         failed without this.)
13801
13802 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13803
13804         * modules/chown (Files): Add lib/fchown-stub.c, since
13805         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
13806
13807 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13808
13809         * lib/fchown-stub.c: New file.
13810
13811 2004-06-24  Jim Meyering  <jim@meyering.net>
13812
13813         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
13814
13815 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13816
13817         * modules/argz: Omit "#include".
13818
13819         * MODULES.html.sh (func_all_modules): Add calloc, to match
13820         2004-06-01 addition of calloc module.
13821
13822 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13823
13824         * m4/argz.m4: New file, which is autoupdated from libtool.
13825
13826 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13827
13828         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
13829         libtool.
13830
13831 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13832
13833         * config/srclist-update: Don't insist on "USA." before the
13834         close-comment, as libtool omits the period and puts the */ on a
13835         separate line.
13836         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
13837         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
13838
13839 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
13840
13841         * modules/argz: New file.
13842         * MODULES.html.sh (func_all_modules): Add argz.
13843
13844 2004-06-12  Jim Meyering  <jim@meyering.net>
13845         and  Paul Eggert  <eggert@cs.ucla.edu>
13846
13847         * modules/hash (Files): Add lib/xalloc.h.
13848         * modules/pipe (Depends-on): Add wait-process.
13849         * modules/stat (Depends-on): Add xalloc.
13850         * modules/userspec (Files): Add lib/userspec.h.
13851         * modules/xstrto
13852
13853         Upgrade from gettext-0.13.
13854         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
13855         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
13856         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
13857
13858 2004-06-10  Jim Meyering  <jim@meyering.net>
13859
13860         * lib/calloc.c: New file.
13861
13862 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
13863
13864         * lib/getdate.y (yylex): Allow space between sign and number.
13865         Problem reported by Dan Jacobson.
13866
13867 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
13868
13869         Merge from coreutils CVS.
13870
13871         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
13872         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
13873         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
13874         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
13875         xstrtol.m4: Fix copyright date and/or serial number.
13876
13877         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
13878         See if we need an fchown replacement.
13879         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
13880         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
13881         and use the replacement function if we detect either defect.
13882
13883         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
13884         gl_UTIMECMP.
13885
13886 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
13887         and  Jim Meyering  <jim@meyering.net>
13888
13889         Merge from coreutils CVS.
13890
13891         * lib/stat-macros.h: New file, with contents from file-type.h
13892         and coreutils' system.h.
13893         * lib/file-type.c: Include "stat-macros.h".
13894         * lib/file-type.h (file_type): Move all macro definitions to new file,
13895         stat-macros.h.
13896
13897         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
13898         Wrap old code with this conditional.
13899         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
13900         function that does not dereference symlinks.
13901         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
13902
13903         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
13904         dependency problems.
13905         (xreadlink): Accept new arg SIZE, for efficiency.
13906         All decls and uses changed.
13907         * lib/xreadlink.h: Include <stddef.h>, for size_t.
13908
13909         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
13910         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
13911
13912         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
13913         sysexits.h.
13914
13915 2004-06-01  Jim Meyering  <jim@meyering.net>
13916
13917         * m4/calloc.m4: New file.
13918
13919 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
13920
13921         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
13922         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
13923         Also, fix a typo in a diagnostic.
13924
13925 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
13926
13927         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
13928         or AC_FUNC_REALLOC.
13929
13930 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
13931
13932         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
13933         macros to be defined.
13934         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
13935         the allocator returns NULL because the requested size is zero.
13936
13937 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13938
13939         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
13940         var.  Add comment explaining why libc still defines it.  This
13941         merges the following patch from glibc:
13942         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
13943
13944 2004-05-20  Andreas Schwab  <schwab@suse.de>
13945
13946         * m4/free.m4: Replace free if it not known to work, not the other
13947         way round.
13948
13949 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
13950
13951         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
13952         present in glibc since revision 1.1 of this file.
13953         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
13954         obstack_alignment_mask, obstack_alloc, obstack_base,
13955         obstack_blank, obstack_blank_fast, obstack_chunk_size,
13956         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
13957         obstack_grow0, obstack_init, obstack_int_grow,
13958         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
13959         obstack_next_free, obstack_object_size, obstack_ptr_grow,
13960         obstack_ptr_grow_fast, obstack_room): Remove declarations of
13961         nonexistent functions.
13962
13963 2004-05-18  Karl Berry  <karl@gnu.org>
13964
13965         * config/srclist.txt: break link for vasnprintf.c.
13966
13967 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
13968
13969         Port obstack to the AS/400, where pointers are 16 bytes wide and
13970         you cannot cast an integer to a valid pointer.  This patch is
13971         currently waiting to be integrated into glibc; see
13972         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
13973
13974         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
13975         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
13976         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
13977         (struct obstack): temp member is now a union of a pointer and
13978         an integer, instead of an integer.  All integer uses changed.
13979         This does not affect the physical layout of struct obstack,
13980         except on hosts (like the AS/400) where the size or alignment of
13981         void * is greater than that of ptrdiff_t.
13982         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
13983         __STDC__)]: Store temporary in pointer member of union, not
13984         integer member.
13985         * lib/obstack.c: Include <stddef.h>, for offsetof.
13986         (struct fooalign): Remove; it doesn't need a name.
13987         (union fooround): Change double to long double, and add void *.
13988         (DEFAULT_ALIGNMENT): Use offsetof to compute.
13989         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
13990         not a macro.  Hence the values are always int; so remove all
13991         casts-to-int in uses.
13992
13993 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
13994
13995         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
13996         we can get this patch merged into glibc.
13997
13998 2004-05-17  Derek R. Price  <derek@ximbiot.com>
13999             Paul Eggert  <eggert@cs.ucla.edu>
14000
14001         * m4/argp: Depend on alloca.
14002
14003 2004-05-17  Derek R. Price  <derek@ximbiot.com>
14004             Paul Eggert  <eggert@cs.ucla.edu>
14005
14006         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
14007         freecoding.
14008
14009 2004-05-17  Bruno Haible  <bruno@clisp.org>
14010
14011         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
14012         precision that consists of a '.' followed by an empty digit string.
14013         Patch by Tor Lillqvist <tml@iki.fi>.
14014
14015 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14016
14017         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
14018         for backward compatibility with older code.  We need our own
14019         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
14020         it under some other name, and our alloca.h will define it.
14021
14022 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14023             Derek Price  <derek@ximbiot.com>
14024
14025         * lib/alloca.c: Include <alloca.h>, to get our interface.
14026         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
14027         include <alloca.h> first.  Use C89 prototype for alloca; this
14028         requires including <stddef.h> for size_t.  Use extern "C" if C++.
14029         Use #elif for simplicity, since we can assume C89 now.
14030         Don't try to source the system alloca.h since it will not be found
14031         and to prevent recursively including its replacement.
14032         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
14033         * lib/regex.c: Likewise.
14034
14035 2004-05-16  Derek Price  <derek@ximbiot.com>
14036             Paul Eggert  <eggert@cs.ucla.edu>
14037
14038         getline cleanup.  This changes the getndelim2 API: both order of
14039         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
14040         no delimiter).
14041
14042         * lib/getline.c: Don't include stddef.h or stdio.h, since our
14043         interface does that.
14044         (getline): Always use getdelim, so that we don't have two
14045         copies of this code.
14046         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
14047         if available.
14048         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
14049         (GETNDELIM2_MAXIMUM): New macro.
14050         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
14051         instead of the old practice of delim2==0.  All callers changed.
14052         Return -1 on overflow, instead of returning junk.
14053         Do not set *linesize unless allocation succeeds.
14054         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
14055         that we include sys/types.h.
14056         * lib/getnline.h: Likewise.
14057         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
14058         (getndelim2): Reorder arguments.
14059         * lib/getnline.c (getnline, getndelim):
14060         Don't discard the NMAX argument.
14061         (getnline): Invoke getndelim, to avoid code duplication.
14062         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
14063         of (size_t) -1 by callers of the getnline family.
14064
14065 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14066
14067         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
14068         Check for gettimeofday.
14069         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
14070         Check for settimeofday, stime.
14071
14072 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14073
14074         * lib/nanosleep.c (suspended): Change its type from int to
14075         sig_atomic_t volatile.
14076         (first_call): Make it private to rpl_nanosleep, and have it
14077         be zero initially as that's a bit faster.
14078         (my_usleep): Round up fractional times instead of truncating them,
14079         as this is the usual meaning for 'sleep'.
14080
14081         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
14082         doesn't work.
14083         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
14084         (ENOSYS): Define if not defined.
14085         (settime): Fall back on stime if it exists and settimeofday fails.
14086         But don't bother with fallbacks if a method fails with errno == EPERM.
14087
14088 2004-05-11  Jim Meyering  <jim@meyering.net>
14089
14090         Prior to this change, the save_cwd caller required read access to the
14091         current directory on most systems (ones with the fchdir function).
14092
14093         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
14094         fails, try write-only, and finally, resort to using xgetcwd.
14095
14096 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14097
14098         * lib/obstack.c, obstack.h: Import changes from libc.
14099
14100 2004-04-28  Bruno Haible  <bruno@clisp.org>
14101
14102         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
14103         also implicitly appends .exe to executables.
14104         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
14105         accepts Windows pathnames.
14106         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14107         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14108         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14109         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14110         Reported by Derek Robert Price <derek@ximbiot.com>.
14111
14112 2004-04-21  Karl Berry  <karl@gnu.org>
14113
14114         * config/srclist.txt (localcharset.c): break sync.
14115
14116 2004-04-20  Paul Eggert  <eggert@twinsun.com>
14117
14118         * m4/host-os.m4: Add a copyright notice.
14119
14120 2004-04-20  Jim Meyering  <jim@meyering.net>
14121
14122         Change UTILS_ to gl_ in AC_DEFINE'd names.
14123         Change utils_- and jm_-prefixed variables, too.
14124         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
14125         UTILS_FUNC_MKDIR_TRAILING_SLASH.
14126         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
14127
14128         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
14129         Don't emit trailing blanks.
14130         Also rename jm_-prefixed variables to have gl_ prefix.
14131
14132         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
14133         Also rename jm_-prefixed variables to have gl_ prefix.
14134
14135         * m4/jm-macros.m4: Reflect the renamings.
14136         * m4/prereq.m4: Likewise.
14137
14138 2004-04-20  Jim Meyering  <jim@meyering.net>
14139
14140         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
14141         memory.
14142
14143 2004-04-20  Jim Meyering  <jim@meyering.net>
14144             Bruno Haible  <bruno@clisp.org>
14145
14146         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
14147         memory when realloc fails.
14148
14149 2004-04-19  Jim Meyering  <jim@meyering.net>
14150
14151         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
14152         now that readutmp.c may call `free (0)'.
14153
14154 2004-04-19  Bruno Haible  <bruno@clisp.org>
14155
14156         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
14157         * m4/inttypes_h.m4: Likewise.
14158         * m4/stdint_h.m4: Likewise.
14159         * m4/intmax_t.m4: Likewise.
14160         * m4/uintmax_t.m4: Likewise.
14161
14162 2004-04-18  Jim Meyering  <jim@meyering.net>
14163
14164         * m4/prereq.m4: Don't forbid jm_ prefix.
14165
14166         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
14167         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
14168         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
14169         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
14170         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
14171         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
14172         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
14173         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
14174         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
14175         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
14176         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
14177         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
14178         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
14179         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
14180         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
14181         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
14182         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
14183         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
14184         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
14185
14186 2004-04-18  Jim Meyering  <jim@meyering.net>
14187
14188         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
14189         failure, don't leak memory and do call END_UTMP_ENT.
14190
14191 2004-04-16  Jim Meyering  <jim@meyering.net>
14192
14193         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
14194         coreutils' stat program.
14195         (gl_PREREQ): Don't require jm_PREREQ_STAT.
14196
14197 2004-04-11  Paul Eggert  <eggert@twinsun.com>
14198
14199         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
14200         C89.
14201         (CHAR_BIT): Remove, since we assume C89.
14202         Include <stdint.h> if available, as per current Autoconf CVS advice.
14203
14204 2004-03-31  Jim Meyering  <jim@meyering.net>
14205
14206         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
14207         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
14208         * m4/xalloc.m4: Likewise.
14209
14210 2004-03-30  Paul Eggert  <eggert@twinsun.com>
14211
14212         Merge from coreutils.
14213
14214         * m4/inttostr.m4: New file.
14215         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
14216         Require AM_STDBOOL_H and gl_TIMESPEC instead.
14217         Require gl_CLOCK_TIME.
14218         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
14219
14220 2004-03-30  Paul Eggert  <eggert@twinsun.com>
14221
14222         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
14223         not bool, to be more consistent with Unix conventions.
14224         Suggested by Bruno Haible.
14225
14226         Merge from coreutils.
14227
14228         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
14229         * lib/umaxtostr.c: New files.
14230
14231         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
14232         the usual <time.h> dance.
14233         (get_date): Change signature to support fractional time stamps.
14234         All callers changed.
14235         * lib/getdate.y: Include "getdate.h" first, as we can now
14236         assume C89 and don't need to worry about 'const'.
14237         Similarly, include "unlocked-io.h" near start, not in middle.
14238         Include <limits.h>.
14239         (textint.value): Use long int rather than int.
14240         (textint.digits): Use size_t rather than int.
14241         (BILLION, LOG10_BILLION): New constants.
14242         (parser_control): New member rel_ns.  Members day_ordinal,
14243         time_zone, month, day, hour, minutes, rel_year, rel_month,
14244         rel_day, rel_hour, rel_minutes, rel_seconds
14245         are now long int, not int.  Member seconds is now struct timespec,
14246         not int.  New member timespec_seen.  Members dates_seen, days_seen,
14247         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
14248         not int.
14249         (%union.intval): Now long int, not int.
14250         New member timespec.
14251         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
14252         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
14253         (spec): Now is a timespec or an item list.
14254         (timespec, items): New nonterminals.
14255         (time, rel, relunit, number, get_date):
14256         Add support for fractional seconds.
14257         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
14258         (gmtime, localtime, mktime): Remove decls; not needed with C89.
14259         (to_hour): First arg is now long int, not int.
14260         (to_year): Returns long int, not int.
14261         Don't treat year -70 like 70.
14262         (tm_diff): Returns long int, not int.
14263         (lookup_word): Use bool instead of int when appropriate.
14264         (yylex): Use size_t for count, not int.
14265         Detect overflow when parsing large integer constants.
14266         Add support for fractions.
14267         (get_date): Make pointers 'const' if possible.
14268         Use more-portable code to detect integer overflow.
14269         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
14270         Don't use ctime; it's not reliable if the year has >4 digits.
14271
14272         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
14273         This is for compatibility with BSD.
14274
14275         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
14276         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
14277         From coreutils' system.h.
14278
14279         * lib/userspec.c: Don't include "posixver.h".
14280         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
14281         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
14282         compatible extension.  Simplify code by removing a boolean int
14283         that was always nonzero if a string was nonnull.
14284
14285 2004-03-30  Jim Meyering  <jim@meyering.net>
14286
14287         Merge from coreutils.
14288
14289         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
14290         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
14291         on some systems one must include <grp.h> before it.
14292         Reported by Christian Krackowizer.
14293
14294 2004-03-30  Jim Meyering  <jim@meyering.net>
14295
14296         Merge from coreutils.
14297
14298         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
14299
14300         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
14301         an empty input stream.
14302
14303         * lib/readtokens.c: Include <stdbool.h>.
14304         (readtoken): Use `size_t' rather than int/long.
14305         All callers adjusted.
14306         Use `bool' rather than `int' where appropriate.
14307         Use memset rather than an explicit loop.
14308         Use x2nrealloc rather than xrealloc.
14309         Allow the use of `\0' as a delimiter.
14310         (readtokens): Likewise.
14311         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
14312
14313 2004-03-30  Jim Meyering  <jim@meyering.net>
14314
14315         * m4/realloc.m4: Remove file, since now it does no more than
14316         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
14317         the `configure.ac' section of module/realloc.
14318         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
14319
14320 2004-03-30  Bruno Haible  <bruno@clisp.org>
14321
14322         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
14323         nonnull.
14324
14325 2004-03-29  Paul Eggert  <eggert@twinsun.com>
14326
14327         Merge changes to getloadavg.c from coreutils and Emacs.
14328
14329         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
14330         Define to an expression, not to the empty string.
14331         Include cloexec.h and xalloc.h.
14332         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
14333         Use set_cloexec_flag rather than rolling our own.
14334         * lib/cloexec.c, lib/cloexec.h: New files.
14335
14336 2004-03-29  Paul Eggert  <eggert@twinsun.com>
14337
14338         * m4/cloexec.m4: New file.
14339
14340 2004-03-18  Paul Eggert  <eggert@twinsun.com>
14341
14342         * lib/getopt.h: Sync with libc CVS.
14343
14344 2004-03-18  Paul Eggert  <eggert@twinsun.com>
14345             Bruno Haible  <bruno@clisp.org>
14346
14347         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
14348         mbswidth.
14349
14350 2004-03-18  Paul Eggert  <eggert@twinsun.com>
14351             Bruno Haible  <bruno@clisp.org>
14352
14353         * lib/mbswidth.h: Include <wchar.h> only if
14354         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
14355         <wchar.h>.
14356         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
14357
14358 2004-03-09  Paul Eggert  <eggert@twinsun.com>
14359
14360         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
14361         Sync with libc CVS.
14362         * lib/getopt_int.h: New file, also synced from libc.
14363
14364 2004-03-09  Paul Eggert  <eggert@twinsun.com>
14365
14366         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
14367         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
14368         Bring back getopt.c, getopt.h, getopt1.c.
14369
14370 2004-03-07  Paul Eggert  <eggert@twinsun.com>
14371
14372         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
14373         All uses changed.  Check for sa_sigaction member; this fixes
14374         a bug first reported by Jason Andrade in
14375         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
14376
14377 2004-03-07  Paul Eggert  <eggert@twinsun.com>
14378
14379         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
14380         '#if' expressions.  Unlike the code it replaces, it does not
14381         depend on (defined _SC_PAGESIZE).  However, it does depend on
14382         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
14383         first reported by Jason Andrade in
14384         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
14385
14386 2004-02-25  Simon Josefsson  <jas@extundo.com>
14387
14388         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
14389
14390 2004-02-25  Simon Josefsson  <jas@extundo.com>
14391
14392         * lib/strdup.h: New file.
14393         * lib/strdup.c: Include it.
14394         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
14395         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
14396
14397 2004-02-23  Karl Berry  <karl@gnu.org>
14398
14399         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
14400         (from fencepost.gnu.org:/gd/gnuorg).
14401
14402 2004-02-23  Karl Berry  <karl@gnu.org>
14403
14404         * config/srclistvars.sh (GNUORG) [karl]: redefine.
14405         * config/srclist.txt: add maintain/standards documents.
14406
14407 2004-02-18  Bruno Haible  <bruno@clisp.org>
14408
14409         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
14410         Reported by Derek Robert Price <derek@ximbiot.com>.
14411
14412 2004-02-16  Karl Berry  <karl@gnu.org>
14413
14414         * config/mkinstalldirs, install-sh: update from automake.
14415
14416 2004-02-06  Karl Berry  <karl@gnu.org>
14417
14418         * m4/po.m4: update from gettext 0.14.1.
14419
14420 2004-02-06  Karl Berry  <karl@gnu.org>
14421
14422         * lib/config.charset: update from gettext 0.14.1.
14423
14424 2004-02-05  Paul Eggert  <eggert@twinsun.com>
14425
14426         Add comments and code, prompted by suggestions from Bruno Haible
14427         for sh-quote.
14428         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
14429         describing the enum quoting_style values.
14430         * lib/quotearg.c (quotearg_alloc): New function.
14431         (quotearg_buffer_restyled): Treat lone { and } as special.
14432         Treat = as special.  Work around bug with older shells
14433         that "see" a '\' that is really the 2nd byte of a multibyte char.
14434         Quote empty string with shell_quoting_style.
14435
14436 2004-02-03  Bruno Haible  <bruno@clisp.org>
14437
14438         * m4/pipe.m4: New file, from GNU gettext.
14439
14440 2004-02-03  Bruno Haible  <bruno@clisp.org>
14441
14442         * lib/pipe.h: New file, from GNU gettext.
14443         * lib/pipe.c: New file, from GNU gettext.
14444
14445 2004-01-27  Bruno Haible  <bruno@clisp.org>
14446
14447         * m4/execute.m4: New file, from GNU gettext.
14448
14449 2004-01-27  Bruno Haible  <bruno@clisp.org>
14450
14451         * lib/execute.h: New file, from GNU gettext.
14452         * lib/execute.c: New file, from GNU gettext.
14453         * lib/w32spawn.h: New file, from GNU gettext.
14454
14455 2004-01-24  Paul Eggert  <eggert@twinsun.com>
14456
14457         Merge from diffutils.
14458
14459         * lib/file-type.c (file_type): Add typed memory objects.
14460         * lib/file-type.h (S_TYPEISTMO): New macro.
14461
14462         * lib/c-stack.h (c_stack_action): Remove argv argument.
14463         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
14464         (die): Don't calculate message unless segv_action returns.
14465         (get_stack_location, min_address_from_argv, max_address_from_argv,
14466         volatile stack_base, volatile_stack_size): Remove.
14467         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
14468         that every segmentation violation is a stack overflow.  (Ouch!)
14469         See Debian bug 136249 (still outstanding) for more info about why
14470         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
14471
14472 2004-01-24  Paul Eggert  <eggert@twinsun.com>
14473
14474         Exit-status fix from coreutils.
14475
14476         Use exit_failure consistently in place of EXIT_FAILURE,
14477         so that program exit statuses are consistent on failure.
14478
14479         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
14480         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
14481         * lib/argmatch.h: Comment fix to match the above.
14482         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
14483         Now a macro referring to exit_failure, instead of a separate
14484         variable.  Include "exitfail.h" to get it.
14485         * lib/xstrtol.h: Include "exitfail.h".
14486         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
14487
14488         * lib/long-options.c (parse_long_options): Use prototype
14489         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
14490         for clarity.
14491
14492 2004-01-21  Jim Meyering  <jim@meyering.net>
14493
14494         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
14495         so as not to conflict with a different-sized __mktime_internal
14496         function in GNU libc.
14497         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
14498         Problem building statically-linked `ls' reported by Michael Brunnbauer.
14499
14500 2004-01-20  Karl Berry  <karl@gnu.org>
14501
14502         * config/config.guess: update from config.
14503
14504         * config/srclistvars.sh: GNUWWWLICENSES for karl.
14505
14506 2004-01-20  Bruno Haible  <bruno@clisp.org>
14507
14508         Safer stack allocation.
14509         * lib/setenv.c: Include allocsa.h.
14510         (alloca): Remove fallback definition.
14511         (freea): Remove macro.
14512         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
14513         instead of freea.
14514
14515 2004-01-20  Bruno Haible  <bruno@clisp.org>
14516
14517         * m4/eealloc.m4: New file, from GNU gettext.
14518
14519 2004-01-20  Bruno Haible  <bruno@clisp.org>
14520
14521         * m4/allocsa.m4: New file, from GNU gettext.
14522
14523 2004-01-20  Bruno Haible  <bruno@clisp.org>
14524
14525         * lib/xallocsa.h: New file, from GNU gettext.
14526         * lib/xallocsa.c: New file, from GNU gettext.
14527
14528 2004-01-20  Bruno Haible  <bruno@clisp.org>
14529
14530         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
14531
14532 2004-01-20  Bruno Haible  <bruno@clisp.org>
14533
14534         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
14535         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
14536         specially.
14537
14538 2004-01-20  Bruno Haible  <bruno@clisp.org>
14539
14540         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
14541         patch.
14542
14543 2004-01-20  Bruno Haible  <bruno@clisp.org>
14544
14545         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
14546
14547 2004-01-20  Bruno Haible  <bruno@clisp.org>
14548
14549         * lib/eealloc.h: New file.
14550
14551 2004-01-20  Bruno Haible  <bruno@clisp.org>
14552
14553         * lib/binary-io.h: Avoid warnings on Cygwin.
14554
14555 2004-01-20  Bruno Haible  <bruno@clisp.org>
14556
14557         * lib/allocsa.h: New file, from GNU gettext.
14558         * lib/allocsa.c: New file, from GNU gettext.
14559
14560 2004-01-18  Karl Berry  <karl@gnu.org>
14561
14562         * doc/gpl.texi, doc/lgpl.texi: new files.
14563
14564 2004-01-18  Karl Berry  <karl@gnu.org>
14565
14566         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
14567         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
14568
14569 2004-01-15  Paul Eggert  <eggert@twinsun.com>
14570
14571         Merge from coreutils.
14572
14573         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
14574         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
14575         (gl_DEFAULT_POSIX2_VERSION): Move
14576         the documentation from 'configure' into 'config.hin',
14577         so that 'configure --help' isn't burdened by it and
14578         we don't have to worry about its formatting there.
14579         Reword the documentation so that it's more succinct
14580         and can be run together into a single paragraph.
14581         * m4/same.m4 (gl_SAME): Check for pathconf.
14582
14583 2004-01-15  Paul Eggert  <eggert@twinsun.com>
14584
14585         Merge from coreutils.
14586
14587         * lib/posixver.c: Include posixver.h.
14588
14589         * lib/same.c: Include <stdbool.h>, <limits.h>.
14590         (_POSIX_NAME_MAX): Define if not defined.
14591         (MIN): New macro.
14592         (same_name): If file names are silently truncated, report
14593         that the file names are the same if they are the same after
14594         the silent truncation.
14595
14596         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
14597         conversion function.
14598         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
14599         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
14600         longer needed.
14601
14602 2004-01-15  Jim Meyering  <jim@meyering.net>
14603
14604         Merge from coreutils.
14605
14606         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
14607         if no library is required.
14608         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
14609         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
14610         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
14611         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
14612         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
14613         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
14614         value, $ac_cv_search_crypt, if it's "none required".
14615         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
14616         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
14617         not gl_FUNC_GETLOADAVG.
14618         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
14619         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
14620
14621 2004-01-15  Jim Meyering  <jim@meyering.net>
14622
14623         Merge from coreutils.
14624
14625         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
14626         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
14627         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
14628
14629         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
14630         optional configure-time default.
14631
14632         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14633
14634         * lib/xreadlink.c (xreadlink): Correct outdated comment.
14635
14636 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
14637
14638         Merge from coreutils.
14639
14640         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
14641         value, $ac_cv_search_nanosleep, if it's "none required".
14642
14643 2004-01-14  Paul Eggert  <eggert@twinsun.com>
14644
14645         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
14646         with like-named macro in fnmatch.c.
14647         (EXT): Use an internal constant instead.
14648
14649         Merge fnmatch patches from glibc.
14650         * lib/fnmatch.c (mbsinit): Remove define.
14651         Add libc_hidden_ver (__fnmatch, fnmatch).
14652         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
14653         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
14654
14655 2004-01-14  Karl Berry  <karl@gnu.org>
14656
14657         * config/install-sh: update from automake.
14658
14659 2004-01-13  Karl Berry  <karl@gnu.org>
14660
14661         * config/install-sh: update from automake.
14662
14663 2004-01-09  Karl Berry  <karl@gnu.org>
14664
14665         * config/install-sh: update from automake.
14666
14667 2004-01-05  Karl Berry  <karl@gnu.org>
14668
14669         * config/config.{sub,guess}: update from config.
14670
14671 2003-12-31  Karl Berry  <karl@gnu.org>
14672
14673         * config/depcomp: update from automake.
14674
14675 2003-12-14  Karl Berry  <karl@gnu.org>
14676
14677         * lib/config.charset: update from gettext-runtime.
14678
14679 2003-12-03  Paul Eggert  <eggert@twinsun.com>
14680
14681         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
14682         Bug reported by Alfred M. Szmidt.
14683
14684 2003-12-03  Bruno Haible  <bruno@clisp.org>
14685
14686         * m4/gettext.m4: Upgrade from gettext-0.13.
14687         * m4/po.m4: Upgrade from gettext-0.13.
14688         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
14689         * m4/intmax.m4: New file, from gettext-0.13.
14690         * m4/printf-posix.m4: New file, from gettext-0.13.
14691
14692 2003-11-29  Karl Berry  <karl@gnu.org>
14693
14694         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
14695
14696 2003-11-25  Paul Eggert  <eggert@twinsun.com>
14697             Bruno Haible  <bruno@clisp.org>
14698
14699         * lib/printf-parse.h: Don't include sys/types.h.
14700         (ARG_NONE): New macro.
14701         (char_directive): Change type of *arg_index fields to size_t.
14702         * lib/printf-parse.c: Don't include sys/types.h.
14703         (SSIZE_MAX): Remove macro.
14704         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
14705         Remove unnecessary overflow check.
14706         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
14707         fields.
14708
14709 2003-11-25  Bruno Haible  <bruno@clisp.org>
14710
14711         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
14712
14713 2003-11-25  Bruno Haible  <bruno@clisp.org>
14714
14715         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
14716         gt_TYPE_SSIZE_T.
14717
14718 2003-11-24  Paul Eggert  <eggert@twinsun.com>
14719
14720         * modules/alloca: Remove dependency on xalloc.
14721
14722 2003-11-24  Paul Eggert  <eggert@twinsun.com>
14723
14724         * lib/alloca.c: Remove dependency on xalloc module.
14725         (xalloc_die): Remove.
14726         (memory_full) [!defined emacs]: New macro.
14727         [!defined emacs]: Don't include xalloc.h.
14728         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
14729         address arithmetic overflows.  Change datatypes a bit to avoid
14730         unnecessary casts.
14731
14732 2003-11-22  Jim Meyering  <jim@meyering.net>
14733
14734         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
14735         s/size/size_t/.
14736
14737 2003-11-21  Karl Berry  <karl@gnu.org>
14738
14739         * config/config.{sub,guess}: update from config.
14740
14741 2003-11-18  Karl Berry  <karl@gnu.org>
14742
14743         * config/config.{sub,guess}: update from config.
14744
14745         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
14746
14747 2003-11-17  Paul Eggert  <eggert@twinsun.com>
14748
14749         * README: Mention that S+T cannot overflow if S is the size of
14750         an existing object and T is sufficiently small.
14751
14752 2003-11-17  Jim Meyering  <jim@meyering.net>
14753
14754         On systems without utime and without a utimes function capable of
14755         dealing with a NULL struct utimbuf* argument, this utime replacement
14756         could -- in unusual circumstances -- leak a file descriptor.
14757         * lib/utime.c: Include <unistd.h> and <errno.h>.
14758         (utime_null): Be sure to close `fd' and to preserve errno.
14759         Reported by Geoff Collyer via Arnold Robbins.
14760
14761 2003-11-17  Bruno Haible  <bruno@clisp.org>
14762
14763         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
14764         (Depends-on): Add xsize.
14765
14766 2003-11-17  Bruno Haible  <bruno@clisp.org>
14767
14768         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
14769
14770 2003-11-17  Bruno Haible  <bruno@clisp.org>
14771
14772         * lib/vasnprintf.c (alloca): Remove fallback definition.
14773         (freea): Remove definition.
14774         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
14775         Reported by Paul Eggert.
14776
14777 2003-11-16  Paul Eggert  <eggert@twinsun.com>
14778             Bruno Haible  <bruno@clisp.org>
14779
14780         Protect against address arithmetic overflow.
14781         * lib/printf-args.h: Include stddef.h.
14782         (arguments): Change type of field 'count' to size_t.
14783         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
14784         'unsigned int' where appropriate.
14785         * lib/printf-parse.h: Include sys/types.h.
14786         (char_directive): Change type of *arg_index fields to ssize_t.
14787         (char_directives): Change type of fields 'count', max_*_length to
14788         size_t.
14789         * lib/printf-parse.c: Include sys/types.h and xsize.h.
14790         (SSIZE_MAX): Define fallback value.
14791         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
14792         instead of 'int' where appropriate. Check a_allocated, d_allocated
14793         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
14794         * lib/vasnprintf.c: Include xsize.h.
14795         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
14796         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
14797         overflow. Avoid wraparound when converting a width or precision from
14798         decimal to binary.
14799
14800 2003-11-16  Bruno Haible  <bruno@clisp.org>
14801
14802         Update from GNU gettext.
14803         * lib/printf-parse.c: Generalize to it can be compiled for wide
14804         strings.
14805         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
14806         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
14807         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
14808         SNPRINTF): New macros.
14809         Don't include <alloca.h> if the file is used inside libintl.
14810         (local_wcslen): New function, for Solaris 2.5.1.
14811         (VASNPRINTF): Use it instead of wcslen.
14812
14813 2003-11-16  Bruno Haible  <bruno@clisp.org>
14814
14815         * lib/xsize.h (xmax): New function.
14816         (xsum, xsum3, xsum4): Declare as "pure" functions.
14817
14818 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14819
14820         * modules/xalloc (Files): Undo latest change, since xalloc.h
14821         no longer needs SIZE_MAX or PTRDIFF_MAX.
14822
14823 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14824
14825         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
14826         gl_PTRDIFF_MAX.
14827
14828 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14829
14830         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
14831         "return", to pacify some unknown compiler.  Problem reported
14832         by Joerg Schilling.
14833
14834 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14835
14836         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
14837         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
14838         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
14839         heuristic is just as accurate as far as we know, and it removes a
14840         dependency on size_max.m4 and ptrdiff_max.m4.
14841
14842 2003-11-11  Bruno Haible  <bruno@clisp.org>
14843
14844         * modules/xsize (Files): Add m4/size_max.m4.
14845         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
14846
14847 2003-11-11  Bruno Haible  <bruno@clisp.org>
14848
14849         * m4/size_max.m4: New file.
14850         * m4/ptrdiff_max.m4: New file.
14851         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
14852         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
14853         (gl_XALLOC): Invoke it.
14854
14855 2003-11-11  Bruno Haible  <bruno@clisp.org>
14856
14857         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
14858         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
14859         defined.
14860
14861 2003-11-10  Paul Eggert  <eggert@twinsun.com>
14862
14863         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
14864         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
14865         rejected some allocations of exactly SIZE_MAX - 2 bytes.
14866         From Bruno Haible.
14867         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
14868         not (size_t) -1, since it's defined here.
14869
14870 2003-11-09  Karl Berry  <karl@gnu.org>
14871
14872         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
14873
14874 2003-11-06  Paul Eggert  <eggert@twinsun.com>
14875
14876         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
14877         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
14878         Reject sizes of exactly SIZE_MAX bytes.
14879         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
14880         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
14881
14882 2003-11-05  Bruno Haible  <bruno@clisp.org>
14883
14884         * lib/xsize.h: Include limits.h, to avoid a possible collision with
14885         SIZE_MAX defined in <limits.h> on Solaris.
14886
14887 2003-11-04  Jim Meyering  <jim@meyering.net>
14888
14889         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
14890         variable names, rather than @VAR@.
14891         * modules/poll: Likewise.
14892
14893 2003-11-04  Bruno Haible  <bruno@clisp.org>
14894
14895         * modules/xsize: New file.
14896         * modules/linebreak: Depend on xsize.
14897         * MODULES.html.sh (func_all_modules): Add xsize.
14898
14899 2003-11-04  Bruno Haible  <bruno@clisp.org>
14900
14901         * m4/xsize.m4: New file.
14902
14903 2003-11-04  Bruno Haible  <bruno@clisp.org>
14904
14905         * lib/xsize.h: New file.
14906         * lib/linebreak.c: Include xsize.h.
14907         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
14908         argument for overflow.
14909         Suggested by Paul Eggert.
14910
14911 2003-11-03  Karl Berry  <karl@gnu.org>
14912
14913         * config/config.{guess,sub}: update from config.
14914
14915 2003-11-03  Jim Meyering  <jim@meyering.net>
14916
14917         * modules/userspec (lib_SOURCES): Add userspec.h.
14918         (Include): Add "userspec.h".
14919         Improve description.
14920
14921 2003-11-03  Jim Meyering  <jim@meyering.net>
14922
14923         * lib/userspec.c: Include "userspec.h".
14924         * lib/userspec.h: New file.
14925
14926 2003-11-03  Bruno Haible  <bruno@clisp.org>
14927
14928         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
14929
14930 2003-11-03  Bruno Haible  <bruno@clisp.org>
14931
14932         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
14933         available, to avoid (extremely rare) race condition.
14934         Suggested by Paul Eggert.
14935
14936 2003-11-02  Karl Berry  <karl@gnu.org>
14937
14938         * config/srclist.txt (vasprintf.c): sync broken, sigh.
14939
14940 2003-10-31  Paul Eggert  <eggert@twinsun.com>
14941
14942         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
14943         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
14944         (read_filesystem_list): Set and use me_type_malloced.
14945         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
14946         whatever the type happens to be), for brevity and consistency.
14947         Check for size calculation overflow on Alphas running OSF/1.
14948
14949 2003-10-31  Jim Meyering  <jim@meyering.net>
14950
14951         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
14952
14953         * lib/linebuffer.c: Include <string.h> for declaration of memset.
14954
14955 2003-10-30  Paul Eggert  <eggert@twinsun.com>
14956             Bruno Haible  <bruno@clisp.org>
14957
14958         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
14959         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
14960
14961 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
14962
14963         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
14964         netbsd*-gnu*.  Suggested by Robert Millan.
14965
14966 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14967
14968         * modules/group-member: Depend on stdbool.
14969
14970 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14971
14972         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
14973
14974 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14975
14976         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
14977         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
14978         after the 'gnu' in these cases.  This fixes some bugs in the
14979         previous change, and is based on suggestions by Robert Millan.
14980
14981 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14982
14983         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
14984         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
14985         no longer needed.
14986         * lib/quotearg.c (quotearg_n_options): Use it.
14987         * lib/group-member.c: Include <stdbool.h>.
14988         (free_group_info): Arg is now const *; don't free arg.
14989         (get_group_info): Now returns bool and accepts struct group_info *,
14990         rather than returning a malloc'ed struct group_info *.
14991         All uses changed.  Check for overflow in internal size calculation.
14992
14993         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
14994         rather than xmalloc/xrealloc.
14995         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
14996         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
14997         conformance bug: the old code used a pointer after freeing the
14998         storage that it addressed.
14999         * lib/hash.c (hash_initialize): Simplify the code by using
15000         xalloc_oversized rather than doing it by hand.
15001         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
15002         the buffer preserved.  Use free and xmalloc instead.
15003         * lib/quotearg.c (quotearg_n_options): Likewise.
15004         Use a simpler test for size overflow.  Don't use xalloc_oversized
15005         because unsigned int might be wider than size_t (!); this suggests
15006         that we should switch from unsigned int to size_t for slot numbers.
15007
15008 2003-10-28  Paul Eggert  <eggert@twinsun.com>
15009
15010         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
15011         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
15012         NetBSD kernels.  Requested by Richard Stallman.
15013
15014 2003-10-27  Paul Eggert  <eggert@twinsun.com>
15015
15016         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
15017         to allocate the returned structure.  Do not allocate a subarray,
15018         as x2nrealloc will do that.
15019         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
15020         instead of xnrealloc.
15021         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
15022
15023 2003-10-27  Bruno Haible  <bruno@clisp.org>
15024
15025         * lib/stdbool_.h: Better support for BeOS.
15026
15027 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15028
15029         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
15030         now uses inline.
15031
15032 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15033
15034         * lib/xalloc.h (xalloc_oversized): New static inline function, for
15035         callers that want to do their own size-overflow checking.  Include
15036         <stdbool.h>, since xalloc_oversized returns bool.
15037         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
15038         to use xalloc_oversized.
15039
15040         Add two functions x2realloc, x2nrealloc, for programs that grow
15041         arrays dynamically by doubling their sizes.
15042         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
15043         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
15044         New functions.
15045
15046         Port to C99 semantics for 'inline' of external functions.
15047         Bug reported by Bruno Haible.
15048         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
15049         with the old contents of xnmalloc.
15050         (xnmalloc, xmalloc): Use it.
15051         (xnrealloc_inline): New static inline function,
15052         with the old contents of xnrealloc.
15053         (xnrealloc, xrealloc): Use it.
15054
15055         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
15056         that.
15057
15058 2003-10-26  Karl Berry  <karl@gnu.org>
15059
15060         * config/srclist.txt (COPYING.DOC): no longer available from
15061         /gd/gnuorg; don't know where the ultimate source is.
15062
15063 2003-10-25  Paul Eggert  <eggert@twinsun.com>
15064
15065         Fix several address-calculation bugs in the hash modules,
15066         plus some minor code cleanup.
15067
15068         * lib/hash.h: Include <stdbool.h>, for bool.
15069         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
15070         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
15071         hash_get_n_entries, hash_get_max_bucket_length,
15072         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
15073         hash_rehash): Use size_t rather than unsigned.
15074         * lib/hash.c (struct hash_table, hash_get_n_buckets,
15075         hash_get_n_buckets_used, hash_get_n_entries,
15076         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
15077         hash_get_entries, hash_do_for_each, hash_string, is_prime,
15078         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
15079         Likewise.
15080         (SIZE_MAX): Define if not defined.
15081         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
15082         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
15083         hash_print):
15084         Use const * when possible.
15085         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
15086         (check_tuning): Fix bug: if tuning parameters were very close to
15087         0 or 1, rounding errors could have caused subscript violations.
15088         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
15089         (hash_initialize): Add 'fail:' label
15090         to free table and return NULL, and use it to simplify code.
15091         Use calloc rather than clearing the storage ourself.
15092         (hash_initialize, hash_rehash): Check for arithmetic overflow in
15093         buffer size calculations.
15094         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
15095         Include <stddef.h>, for size_t.
15096         * lib/hash-pjw.c (hash_pjw): Likewise.
15097         Switch to method described by Bruno Haible.
15098         Include <limits.h>, for CHAR_BIT.
15099         (SIZE_BITS): New macro.
15100
15101 2003-10-23  Paul Eggert  <eggert@twinsun.com>
15102
15103         * m4/getline.m4 (AM_FUNC_GETLINE):
15104         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
15105         hosts.  Problem reported by Derek Robert Price in
15106         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
15107         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
15108         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
15109
15110 2003-10-21  Paul Eggert  <eggert@twinsun.com>
15111
15112         * lib/getndelim2.c (getndelim2): When size calculation overflows,
15113         ceiling the allocation at NMAX bytes rather than silently
15114         discarding input bytes before NMAX is reached.  This makes
15115         a difference only if NMAX exceeds SIZE_MAX / 2.
15116
15117         * lib/obstack.c: Merge from glibc.
15118         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
15119         Add libc_hidden_def (_obstack_newchunk).
15120         (_obstack_free) [! defined _LIBC]: Remove.
15121         [defined _LIBC]: Make a strong alias from obstack_free, rather than
15122         a clone of the function body.
15123         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
15124         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
15125
15126         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
15127         glibc.
15128         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
15129         arg to memcpy.
15130
15131         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
15132         (obstack_ptr_grow_fast, obstack_int_grow_fast):
15133         Don't use lvalue casts, as GCC plans to remove support for them
15134         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
15135         was also present in the non-GCC version, indicating that this
15136         code had always been buggy and had never been widely used.
15137         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
15138         Use the fast variant of each macro, rather than copying the
15139         definiens of the fast variant; that way, we'll be more likely to
15140         catch future bugs in the fast variants.
15141
15142 2003-10-20  Bruno Haible  <bruno@clisp.org>
15143
15144         * modules/wait-process: New file.
15145         * MODULES.html.sh (func_all_modules): Add wait-process.
15146
15147 2003-10-20  Bruno Haible  <bruno@clisp.org>
15148
15149         * m4/wait-process.m4: New file.
15150
15151 2003-10-20  Bruno Haible  <bruno@clisp.org>
15152
15153         * lib/wait-process.h: New file, from GNU gettext.
15154         * lib/wait-process.c: New file, from GNU gettext.
15155
15156 2003-10-19  Jim Meyering  <jim@meyering.net>
15157
15158         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
15159         HPUX 10.20.
15160
15161 2003-10-18  Karl Berry  <karl@gnu.org>
15162
15163         * config/config.guess: update from config.
15164
15165 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15166
15167         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
15168         (getgroups): First arg is int, not size_t.
15169         Don't let 'free' mangle errno.
15170
15171 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15172
15173         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
15174
15175 2003-10-16  Karl Berry  <karl@gnu.org>
15176
15177         * config/config.{guess,sub}: update from config.
15178
15179 2003-10-16  Jim Meyering  <jim@meyering.net>
15180
15181         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
15182         memcpy.
15183
15184 2003-10-15  Paul Eggert  <eggert@twinsun.com>
15185
15186         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
15187         (SIZE_MAX): Remove.
15188         (new_exclude, add_exclude_file): Initial size no longer needs to
15189         be a power of 2.
15190         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
15191         our own address arithmetic overflow checking.
15192
15193         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
15194         (fnmatch): Do not alloca more than 2000 wide characters;
15195         instead, use malloc for large buffers.
15196         Check for address arithmetic overflow, and return -1
15197         with errno set to ENOMEM in that case.
15198         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
15199         (NEW_PATTERN): Do not alloca more than 8000 bytes;
15200         instead, return -1.  Check for address arithmetic overflow.
15201
15202 2003-10-14  Paul Eggert  <eggert@twinsun.com>
15203
15204         Handle invalid suffixes and overflow independently, so that
15205         callers can treat them independently as needed.  Fix some bugs in
15206         suffix handling, e.g., "100k@" was not diagnosed as an invalid
15207         suffix for a human-readable blocksize.  The major caller-visible
15208         change is the addition of a new
15209         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
15210         that both overflow and suffix chars were found.
15211
15212         * lib/human.c (humblock): Don't check separately for invalid suffix
15213         char; that is xstrtoumax's job (now that its bug is fixed).
15214         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
15215         INTMAX_MAX]: New macros.
15216         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
15217         TYPE_MAXIMUM): New macros.
15218         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
15219         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
15220         if overflow occurs, as it's what __strtol does and it's more useful
15221         in practice.
15222         (__xstrtol): If __strtol reports some error other than ERANGE,
15223         reflect it to the caller as LONGINT_INVALID.  If it reports
15224         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
15225         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
15226         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
15227         value.
15228         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
15229         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
15230         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
15231         [defined UINTMAX_MAX]: New macros.
15232
15233 2003-10-14  Bruno Haible  <bruno@clisp.org>
15234
15235         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
15236
15237 2003-10-14  Bruno Haible  <bruno@clisp.org>
15238
15239         * m4/sig_atomic_t: New file, from GNU gettext.
15240         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
15241
15242 2003-10-14  Bruno Haible  <bruno@clisp.org>
15243
15244         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
15245         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
15246         Also use volatile where needed.
15247
15248 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15249
15250         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
15251         Change maintainer from Bruno Haible to 'all'.
15252
15253 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15254
15255         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
15256
15257 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15258
15259         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
15260         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
15261         and define in terms of the other primitives.
15262         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
15263         (SIZE_MAX): Define if not already defined.
15264         (array_size_overflow): New function.
15265         (xalloc_die): Abort instead of exiting if 'error' returns.
15266         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
15267         (xmalloc, xrealloc): Use them.
15268         (xcalloc): Check for address arithmetic overflow.
15269         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
15270         a bit faster than strcpy.
15271
15272 2003-10-10  Simon Josefsson  <jas@extundo.com>
15273
15274         * modules/argp (Depends-on): Add restrict and strcase.
15275
15276 2003-10-10  Simon Josefsson  <jas@extundo.com>
15277
15278         * m4/argp.m4: Add AC_C_INLINE.
15279
15280 2003-10-08  Paul Eggert  <eggert@twinsun.com>
15281
15282         Merge getpass from libc, plus a few fixes.
15283
15284         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
15285         Include <stdbool.h>.
15286         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
15287         __fsetlocking to empty.
15288         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
15289         do include <bits/libc-lock.h>.
15290         Do not include <fcntl.h>; not needed.
15291         [_LIBC]: Include <wchar.h>.
15292         (NOTCANCEL_MODE): New macro.
15293         (flockfile, funlockfile) [_LIBC]: New macros.
15294         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
15295         [!_LIBC]: New macros.
15296         (call_fclose): New function.
15297         (getpass): Use it.  Save tty stream separately; this simplifies the
15298         code and makes it more reliable if stdin happens to equal stdout.
15299         Invoke __fsetlocking on tty.
15300         Handle thread cancellation if needed.
15301         Namespace cleanup (use __tcgetattr, __getline).
15302         Use bool for Booleans.
15303         [USE_IN_LIBIO]: Handle wide streams.
15304         [!_LIBC]: Unconditionally do the fseek, since we don't know what
15305         stream might go where.
15306
15307         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
15308         doesn't have to include <stdio.h> before us.
15309         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
15310         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
15311         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
15312         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
15313         if not declared, so that we can use getpass.c code from libc without
15314         rewriting it.
15315         (flockfile, ftrylockfile, funlockfile): New macros.
15316
15317 2003-10-08  Paul Eggert  <eggert@twinsun.com>
15318
15319         * modules/getpass: Depend on stdbool.
15320
15321 2003-10-08  Paul Eggert  <eggert@twinsun.com>
15322
15323         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
15324
15325 2003-10-07  Karl Berry  <karl@gnu.org>
15326
15327         * config/config.{guess,sub}: update from config.
15328
15329 2003-10-06  Jim Meyering  <jim@meyering.net>
15330             Bruno Haible  <bruno@clisp.org>
15331
15332         This lets translators provide better translations for the
15333         "Written by ..." part of --version output.
15334         * lib/version-etc.h: Include stdarg.h.
15335         (version_etc_copyright): Declare as readonly.
15336         (version_etc): Make this function variadic with a NULL-terminated list
15337         of author name strings.
15338         (version_etc_va): New declaration.
15339         * lib/version-etc.c: Include stdarg.h, stdlib.h.
15340         (version_etc_copyright): Declare as readonly.
15341         (version_etc_va): New function. Provide a different translatable string
15342         for each possible number of authors < 10. Abbreviate when there are 10
15343         authors or more.
15344         (version_etc): Make this function variadic. Call version_etc_va.
15345         Suggestion from Gary V. Vaughan.
15346
15347         * lib/long-options.h (parse_long_options): Change prototype: the
15348         authors string is moved to the end and becomes variadic.
15349         * lib/long-options.c: Include stdarg.h.
15350         (parse_long_options): Make this function variadic, too.
15351         Call version_etc_va, not version_etc.
15352
15353 2003-10-06  Bruno Haible  <bruno@clisp.org>
15354
15355         * modules/version-etc-2: Remove file.
15356         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
15357
15358 2003-10-06  Bruno Haible  <bruno@clisp.org>
15359
15360         * modules/fatal-signal: New file.
15361         * MODULES.html.sh (func_all_modules): Add fatal-signal.
15362
15363 2003-10-06  Bruno Haible  <bruno@clisp.org>
15364
15365         * m4/fatal-signal.m4: New file.
15366         * m4/signalblocking.m4: New file, from GNU gettext.
15367
15368 2003-10-06  Bruno Haible  <bruno@clisp.org>
15369
15370         * lib/version-etc-2.h: Remove file.
15371         * lib/version-etc-2.c: Remove file.
15372
15373 2003-10-06  Bruno Haible  <bruno@clisp.org>
15374
15375         * lib/fatal-signal.h: New file, from GNU gettext.
15376         * lib/fatal-signal.c: New file, from GNU gettext.
15377
15378 2003-10-05  Paul Eggert  <eggert@twinsun.com>
15379
15380         * README: Rework advice for preventing empty .o files.
15381         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
15382         not <sys/types.h>.
15383
15384 2003-10-04  Karl Berry  <karl@gnu.org>
15385
15386         * lib/argp*: update from libc.
15387
15388 2003-10-04  Karl Berry  <karl@gnu.org>
15389
15390         * config/config.{guess,sub}: update from config.
15391
15392 2003-10-02  Bruno Haible  <bruno@clisp.org>
15393
15394         * modules/lchown (Include): Add lchown.h.
15395         * modules/time_r (Include): Use "..." syntax.
15396         * modules/xgetdomainname (Include): Add xgetdomainname.h.
15397
15398 2003-10-01  Simon Josefsson  <jas@extundo.com>
15399
15400         * MODULES.html.sh (func_all_modules): Move gethostname from section
15401         'based on' to section 'lacking' POSIX:2001.
15402
15403 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
15404
15405         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
15406         to output mode on the same stream.
15407
15408 2003-09-29  Paul Eggert  <eggert@twinsun.com>
15409
15410         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
15411         Fix arg typo in previous patch.
15412
15413 2003-09-28  Jim Meyering  <jim@meyering.net>
15414
15415         * lib/error.c: Correct cpp indentation.
15416
15417 2003-09-27  Paul Eggert  <eggert@twinsun.com>
15418
15419         * modules/free: New file.
15420
15421 2003-09-27  Paul Eggert  <eggert@twinsun.com>
15422
15423         * m4/free.m4: New file.
15424
15425 2003-09-27  Paul Eggert  <eggert@twinsun.com>
15426
15427         * lib/minmax.h (MIN, MAX)
15428         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
15429         Omit the special code that used __typeof__, since we worry that
15430         it could be more trouble than it's worth.  See:
15431         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
15432         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
15433
15434         * lib/free.c: New file.
15435
15436 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
15437
15438         Trivial fixes to Makefile.am parts of module listings.
15439         * modules/strstr: Append strstr.h to lib_SOURCES.
15440         * modules/strcase: Likewise, for strcase.h.
15441
15442 2003-09-27  Karl Berry  <karl@gnu.org>
15443
15444         * config/mkinstalldirs: update from automake.
15445
15446 2003-09-26  Paul Eggert  <eggert@twinsun.com>
15447
15448         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
15449         (error_tail): Do not loop, reallocating temporary buffer, since
15450         the output cannot contain more wide characters than the input
15451         contains bytes, the size must be big enough already.  This avoids
15452         one potential size overflow calculation.  Check for size overflow
15453         when calculating temporary buffer size.  Free temporary buffer
15454         when done, if it was allocated with malloc; this plugs a memory
15455         leak.  Remove casts from void * to pointers, that are no longer
15456         needed now that we're assuming C89 or better.
15457
15458         Merge error changes from glibc.
15459
15460         * lib/error.c, error.h: Update copyright notice header to match glibc.
15461         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
15462         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
15463         Disable cancellation while printing error.
15464         * lib/error.h: Prepend __ to parameter names.
15465
15466 2003-09-26  Jim Meyering  <jim@meyering.net>
15467
15468         * lib/error.c (error_tail): Move some declarations
15469         into inner scope where the local variables are used.
15470
15471 2003-09-26  Bruno Haible  <bruno@clisp.org>
15472
15473         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
15474         stpncpy().
15475         Don't define stpncpy through config.h; it's now done through stpncpy.h.
15476
15477 2003-09-26  Bruno Haible  <bruno@clisp.org>
15478
15479         * lib/stpncpy.h (gnu_stpncpy): New declaration.
15480         (stpncpy): Define as alias for gnu_stpncpy.
15481         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
15482
15483 2003-09-25  Simon Josefsson  <jas@extundo.com>
15484
15485         * lib/xgetdomainname.h: New file.
15486         * lib/xgetdomainname.c: New file.
15487
15488 2003-09-25  Simon Josefsson  <jas@extundo.com>
15489             Bruno Haible  <bruno@clisp.org>
15490
15491         * modules/getdomainname: New file.
15492         * modules/xgetdomainname: New file.
15493         * MODULES.html.sh (func_all_modules): Add getdomainname,
15494         xgetdomainname.
15495
15496 2003-09-25  Simon Josefsson  <jas@extundo.com>
15497             Bruno Haible  <bruno@clisp.org>
15498
15499         * m4/getdomainname.m4: New file.
15500
15501 2003-09-25  Simon Josefsson  <jas@extundo.com>
15502             Bruno Haible  <bruno@clisp.org>
15503
15504         * lib/getdomainname.h: New file.
15505         * lib/getdomainname.c: New file.
15506
15507 2003-09-25  Karl Berry  <karl@gnu.org>
15508
15509         * lib/argp-fmtstream.c, argp-help.c: update from libc.
15510
15511 2003-09-25  Karl Berry  <karl@gnu.org>
15512
15513         * config/install-sh: update from automake.
15514
15515 2003-09-25  Bruno Haible  <bruno@clisp.org>
15516
15517         * modules/version-etc-2: New file, from modules/version-etc with
15518         modifications.
15519         * MODULES.html.sh (func_all_modules): Add version-etc-2.
15520
15521 2003-09-25  Bruno Haible  <bruno@clisp.org>
15522
15523         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
15524         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
15525
15526 2003-09-24  Simon Josefsson  <jas@extundo.com>
15527
15528         * modules/xgethostname: Add xgethostname.h.
15529
15530 2003-09-24  Paul Eggert  <eggert@twinsun.com>
15531
15532         * lib/linebuffer.c (freebuffer): Don't free the argument, just
15533         the buffer associated with the argument.  Bug reported by
15534         Simon Josefsson.
15535
15536 2003-09-24  Paul Eggert  <eggert@twinsun.com>
15537
15538         * README: Document assumptions that 'int' is at least 32 bits
15539         wide, that integer arithmetic is 2's complement without overflow,
15540         that there are no holes in integer values, that adding sizes of
15541         two nonoverlapping objects can't overflow, and that all-bits-zero
15542         yields scalar zero.  Fix spelling and capitalization typos.
15543
15544 2003-09-19  Karl Berry  <karl@gnu.org>
15545
15546         * lib/argp.h: update from libc.
15547
15548 2003-09-17  Paul Eggert  <eggert@twinsun.com>
15549
15550         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
15551         to avoid spurious warnings like "AC_RUN_IFELSE was called before
15552         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
15553
15554 2003-09-17  Paul Eggert  <eggert@twinsun.com>
15555
15556         * gnulib-tool: Use "test -h", not "test -L", for portability
15557         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
15558         (tags_regexp): Remove, since \| doesn't conform to POSIX.
15559         (sed_extract_prog): Issue s commands one-by-one, rather than
15560         using \| in one s command.
15561
15562 2003-09-16  Paul Eggert  <eggert@twinsun.com>
15563
15564         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
15565         input error, instead of returning NULL the next time we are called
15566         (and therefore losing track of errno).
15567
15568 2003-09-16  Bruno Haible  <bruno@clisp.org>
15569
15570         * gnulib-tool (func_create_testdir): Warn about duplicated
15571         dependencies.
15572
15573 2003-09-15  Paul Eggert  <eggert@twinsun.com>
15574
15575         * modules/argmatch, modules/fatal, modules/obstack,
15576         modules/xalloc, modules/xgethostname: Sort dependencies by
15577         importance, not alphabetically.
15578
15579 2003-09-15  Paul Eggert  <eggert@twinsun.com>
15580
15581         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
15582         fails, so that the caller gets the proper errno.
15583
15584         * lib/readutmp.c (read_utmp): Likewise.
15585         Check for fstat error.  Close stream and free storage
15586         when failing.
15587
15588 2003-09-14  Karl Berry  <karl@gnu.org>
15589
15590         * config/srclist.txt (strdup.c): disable for c89 changes.
15591
15592 2003-09-14  Jim Meyering  <jim@meyering.net>
15593
15594         * lib/getloadavg.c: Correct cpp indentation.
15595         * lib/strdup.c: Likewise.
15596         * lib/vasnprintf.c: Likewise.
15597
15598 2003-09-14  Bruno Haible  <bruno@clisp.org>
15599
15600         * modules/fwriteerror: New file.
15601         * MODULES.html.sh (func_all_modules): Add fwriteerror.
15602
15603 2003-09-14  Bruno Haible  <bruno@clisp.org>
15604
15605         * lib/fwriteerror.h: New file.
15606         * lib/fwriteerror.c: New file.
15607
15608 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15609
15610         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
15611         modules/xgethostname, modules/xalloc: Depend on exit.
15612
15613 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15614
15615         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
15616
15617         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
15618         and AC_MINIX, too, so that their extensions are available.
15619
15620         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
15621         This macro has been superseded by gl_BACKUPFILE.
15622
15623         More patches to assume C89 or better.
15624
15625         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
15626
15627         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
15628         unconditionally.
15629         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
15630         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
15631         Include <string.h>, <stdlib.h> unconditionally.
15632         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
15633         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
15634         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
15635         headers or for string.h.
15636         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
15637         or strtoul.
15638
15639         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
15640         headers.
15641         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
15642         * m4/userspec.m4 (gl_USERSPEC): Likewise.
15643         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
15644         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
15645         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
15646         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
15647         memcpy, memset.
15648         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
15649         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
15650         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
15651         strtol.
15652         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
15653         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
15654         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
15655         strtoul.
15656
15657 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15658
15659         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
15660         * lib/obstack.c [!defined _LIBC]: Likewise.
15661         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
15662         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
15663         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
15664
15665         More changes to assume C89 or better.
15666
15667         * lib/error.c (error_tail): Assume vprintf.
15668
15669         * lib/argmatch.c (getenv): Remove decl.
15670         * lib/progreloc.c (get_full_program_name): Define via prototype.
15671         * lib/setenv.c (clearenv): Likewise.
15672         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
15673         needed.
15674         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
15675         (malloc, memcpy): Remove decls.
15676         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
15677         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
15678         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
15679         (memcpy): Remove macro.
15680         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
15681         (__P): Remove.  All uses removed.
15682         (PTR): Remove.  All uses changed to void *.
15683         (CHAR_BIT, NULL): Remove.
15684         (spaces, zeros, memset_space, memset_zero)
15685         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
15686         Remove.
15687         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
15688         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
15689         Define with prototype.
15690         Remove now-unnecessary prototype decl.
15691         (extra_args_spec): Assume ANSI C.  All uses changed.
15692         (extra_args_spec_iso): Remove.
15693         (my_strftime, emacs_strftimeu): Define via prototype.
15694         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
15695         unconditionally.
15696         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
15697         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
15698         (strtoul, strtol): Remove decls.
15699         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
15700         LONG_MAX): Remove.
15701         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
15702         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
15703         (LOCALE_PARAM_PROTO): New macro.
15704         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
15705         (INTERNAL (strtol), strtol): Define with a prototype.
15706         (PARAMS): Remove.  All uses removed.
15707         * lib/tempname.c: Include <string.h> unconditionally.
15708         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
15709         * lib/xgethostname.c (main): Define with a prototype.
15710         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
15711         Include <stdlib.h> unconditionally.
15712         (calloc, malloc, realloc, free): Remove decls.
15713         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
15714         Include <stdlib.h> unconditionally.  Sort include file names.
15715         (strtod): Remove.
15716         (xstrtod): Define with a prototype.
15717         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
15718         (strtol, strtoul): Remove decls.
15719
15720 2003-09-11  Paul Eggert  <eggert@twinsun.com>
15721
15722         More patches to assume C89 or better.
15723         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
15724         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
15725         string.h, memchr, STDC_HEADERS.
15726
15727 2003-09-11  Paul Eggert  <eggert@twinsun.com>
15728
15729         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
15730         Include <stdlib.h>, <string.h> unconditionally.
15731         Remove now-unnecessary cast to char *.
15732         * lib/strnlen.c: Include <string.h> unconditionally.
15733         * lib/yesno.c (yesno): Define with a prototype.
15734
15735 2003-09-11  Bruno Haible  <bruno@clisp.org>
15736
15737         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
15738
15739 2003-09-10  Jim Meyering  <jim@meyering.net>
15740
15741         * lib/error.c: Correct indentation of cpp directives.
15742
15743 2003-09-10  Bruno Haible  <bruno@clisp.org>
15744
15745         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
15746         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
15747         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
15748         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
15749         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
15750         <stdlib.h> and <string.h> checks.
15751         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
15752         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
15753
15754 2003-09-10  Bruno Haible  <bruno@clisp.org>
15755
15756         * lib/strcspn.c: Include <string.h> unconditionally.
15757         * lib/strpbrk.c: Include <string.h> unconditionally.
15758         * lib/strstr.c: Include <string.h> unconditionally.
15759         * lib/unicodeio.c: Include <string.h> unconditionally.
15760         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
15761         * lib/unsetenv.c: Likewise.
15762         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
15763         * lib/yesno.c: Include <stdlib.h> unconditionally.
15764         (rpmatch): Add prototype.
15765
15766 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15767
15768         More patches to assume C89 or better.
15769         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
15770         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
15771         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
15772         or for string.h.
15773         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
15774         stdlib.h.
15775         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
15776         C headers.
15777         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
15778         string.h.
15779         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
15780         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
15781         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
15782         or for string.h.
15783         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
15784         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
15785         C headers.
15786         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
15787         memcpy.
15788         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
15789         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
15790         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
15791         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
15792         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
15793         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
15794         string.h, free.
15795         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
15796         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
15797         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
15798         C headers, or for string.h.
15799         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
15800         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
15801         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
15802         headers, memory.h, stdlib.h, string.h, strings.h.
15803         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
15804         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
15805         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
15806         strchr.
15807         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
15808         headers, memory.h, string.h.
15809         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
15810         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
15811         free.
15812         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
15813         headers.
15814         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
15815         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
15816         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
15817         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
15818         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
15819
15820 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15821
15822         More K&R removal.
15823
15824         * lib/acosl.c (main): Use a prototype.
15825         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
15826         tanl.c: Likewise.
15827
15828         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
15829
15830         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
15831         (getopt, etopt_long, getopt_long_only, _getopt_internal)
15832         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
15833         with a prototype.
15834         * lib/getopt.c (const): Remove macro.
15835         Include <string.h> unconditionally.
15836         (my_index): Remove; all uses changed to strchr.
15837         (strlen): Remove decl.
15838         (exchange): Remove forward decl; no longer needed.
15839         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
15840         Define with prototype.
15841         * lib/getopt1.c (const): Remove macro.
15842         (getopt_long, getopt_long_only, main): Define with prototype.
15843
15844         * lib/getugroups.c: Include <string.h> unconditionally.
15845
15846         * lib/getusershell.c: Include <stdlib.h> unconditionally.
15847         (getusershell, setusershell, endusershell, readname, main):
15848         Define with prototypes.
15849
15850         * lib/group-member.c: Include group-member.h first.
15851         Include <stdlib.h> unconditionally.
15852
15853         * lib/hard-locale.c: Include hard-locale.h first.
15854         Include <stdlib.h>, <string.h> unconditionally.
15855
15856         * lib/hash.c (free, malloc): Remove decls.
15857         Include <stdlib.h> unconditionally.
15858
15859         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
15860         (getenv): Do not declare.
15861
15862         * lib/idcache.c: Include <string.h> unconditionally.
15863
15864         * lib/long-options.c: Include long-options.h first, to test interface.
15865         Include <stdlib.h> unconditionally.
15866
15867         * lib/makepath.c: Include makepath.h first, to test interface.
15868         Include <stdlib.h> and <string.h> unconditionally.
15869
15870         * lib/linebuffer.c: Include <stdlib.h>.
15871         (free): Remove decl.
15872
15873         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
15874         stddef.h. rpl_malloc returns void *, not char *.
15875         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
15876         prototype.
15877
15878         * lib/md5.h: Include <limits.h> unconditionally.
15879         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
15880         (__P): Remove; all uses removed.
15881         * lib/md5.c: Include "md5.h" first.
15882         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
15883         md5_buffer, md5_process_bytes, md5_process_block):
15884         Define with prototypes.
15885         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
15886         * lib/sha.c: Include "sha.h" first.
15887         Include <stdlib.h>, <string.h> unconditionally.
15888
15889         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
15890         * lib/memcmp.c (__ptr_t): Likewise.
15891         * lib/memrchr.c (__ptr_t): Likewise.
15892         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
15893         Include <string.h> unconditionally.
15894         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
15895         * lib/memchr.c: Include <stdlib.h> unconditionally.
15896         * lib/memchr.c (LONG_MAX): Remove.
15897         * lib/memrchr.c (LONG_MAX): Likewise.
15898         * lib/memchr.c (__memchr): Define via a prototype.
15899         * lib/memrchr.c (__memrchr): Likewise.
15900         * lib/memcmp.c (__P): Remove, and remove all uses.
15901         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
15902         Remove forward decls; no longer needed.
15903         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
15904         Use types required by C89 in prototype.
15905
15906         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
15907         * lib/savedir.c: Likewise.
15908         * lib/mkdir.c (free): Remove decl.
15909         * lib/rmdir.c (rmdir): Define with a prototype.
15910         * lib/savedir.c: Include savedir.h first, to test interface.
15911
15912         * lib/mktime.c (STDC_HEADERS): Remove.
15913         Include <stdlib.h>, <string.h> unconditionally.
15914
15915         * lib/modechange.c: Include <stdlib.h> unconditionally.
15916         (malloc): Remove decl.
15917
15918         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
15919         (free): Remove decl.
15920
15921         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
15922         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
15923         (This type really should be intptr_t, but that's a C99ism.)
15924         (_obstack_memcpy): Remove: all uses changed to memcpy.
15925         Include <string.h> unconditionally.
15926         (struct obstack): Assume __STDC__ for types of members
15927         chunkfun, freefun, extra_arg.
15928         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
15929         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
15930         obstack_begin, obstack_specify_allocation,
15931         obstack_specify_allocation_with_arg, obstack_chunkfun,
15932         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
15933         Remove unprototyped decls and the macros that use them.
15934         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
15935         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
15936         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
15937         (defined __STDC__ && __STDC__)]:
15938         Remove nonprototyped code.
15939         Include <stdlib.h> unconditionally.
15940         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
15941         _obstack_allocated_p, _obstack_free, obstack_free,
15942         _obstack_memory_used, print_and_abort):
15943         Define using prototypes.
15944         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
15945         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
15946         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
15947         obstack_next_free, obstack_object_size, obstack_room) [0]:
15948         Remove unused, unprototyped code.
15949
15950         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
15951
15952         * lib/physmem.c (physmem_total, physmem_available, main): Define
15953         with prototypes.
15954
15955         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
15956         (main): Define with a prototype.
15957
15958         * lib/posixver.c (getenv): Remove decl.
15959
15960         * lib/putenv.c (malloc): Returns void *, not char *.
15961         Include <string.h> unconditionally.
15962         (strchr, memcpy, NULL): Do not define.
15963
15964         * lib/readtokens.c: Include readtokens.h first, to test interface.
15965         Include <stdlib.h>, <string.h> unconditionally.
15966         (init_tokenbuffer): Define with a prototype.
15967
15968         * lib/regex.c (PARAMS): Remove.  All uses removed.
15969         All uses of _RE_ARGS removed, too.
15970         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15971         unconditionally.
15972         (bzero): Assume memset exists.
15973         (memcmp, memcpy, NULL): Remove.
15974         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
15975         char, or assignments to local vars of type signed char.
15976         (init_syntax_once, PREFIX(extract_number_and_incr),
15977         PREFIX(print_partial_compiled_pattern),
15978         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
15979         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
15980         PREFIX(regex_grow_registers), PREFIX(regex_compile),
15981         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
15982         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
15983         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
15984         wcs_compile_range, byte_compile_range, truncate_wchar,
15985         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
15986         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
15987         count_mbs_length, wcs_re_match_2_internal,
15988         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
15989         PREFIX(alt_match_null_string_p),
15990         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
15991         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
15992         regfree, PREFIX(extract_number)): Define with prototype.  Remove
15993         now-unnecessary declaration, if any.
15994         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
15995         regcomp, regexec):
15996         Remove now-unnecessary casts among pointer types.
15997         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
15998
15999         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
16000         (free): Remove decl.
16001
16002         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
16003
16004         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
16005         (free): Remove decl.
16006
16007         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
16008         * lib/xgetcwd.c: Likewise.
16009
16010         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
16011         (free): Remove decl.
16012
16013         * lib/strchrnul.c (strchrnul): Define with a prototype.
16014         Fix bug: c_in was not converted to char before searching.
16015
16016         The following changes are not K&R related:
16017
16018         * lib/group-member.h: Include <sys/types.h>, so that this file is
16019         self-contained.
16020         * lib/makepath.h: Likewise.
16021
16022         * lib/getusershell.c (readname, default_index, line_size, readname):
16023         Use size_t, not int, for sizes.
16024         (readname): If the size overflows, report an error instead of
16025         looping forever.
16026
16027 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16028
16029         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
16030         libc.
16031
16032 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16033
16034         * README: New section: portability guidelines.
16035
16036 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16037
16038         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
16039         C89 spec.
16040
16041 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16042
16043         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
16044
16045 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16046
16047         Assume C89 or better; remove K&R cruft.
16048         A few of these changes were first proposed by Derek Robert Price
16049         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
16050
16051         * lib/addext.c: Include <string.h> unconditionally.
16052         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
16053         Don't declare getenv or malloc.
16054
16055         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
16056         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
16057         (NULL): Remove.
16058         (find_stack_direction, alloca): Use prototypes.
16059
16060         * lib/atexit.c (atexit): Define using a prototype.
16061
16062         * lib/basename.c, dirname.c, stripslash.c:
16063         Include <string.h> unconditionally.
16064
16065         * lib/bcopy.c: Include <stddef.h>.
16066         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
16067
16068         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
16069
16070         * lib/error.h (error, error_at_line, error_print_progname)
16071         [! (defined (__STDC__) && __STDC__)]: Remove decls.
16072         * lib/error.c: Include error.h first, to check interface.
16073         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16074         (VA_START): Remove; all uses changeed to va_start.
16075         (exit, strerror): Remove decls.
16076         (error_print_progname): Prototype uncondionally.
16077         Don't include <errno.h>; no longer needed.
16078         (private_strerror): Remove.
16079         (error_tail): Always define.
16080         (error, error_at_line): Assume C89 or better; always use prototypes.
16081         * lib/fatal.c: Include "fatal.h" first, to test interface.
16082         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16083         (VA_START): Remove; all uses changed to va_start.
16084         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
16085         this case.
16086         (exit): Remove decl.
16087         (fatal): Prototype unconditionally.  Assume va_start works.
16088         Abort at end, to pacify gcc.
16089
16090         * lib/euidaccess.c (main): Define with a prototype.
16091
16092         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
16093
16094         * lib/exitfail.c: Include <stdlib.h> unconditionally.
16095
16096         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
16097         prototypes.
16098         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
16099         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
16100         (getenv): Remove decl.
16101         (fnmatch): Define using a prototype.
16102         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
16103         (FCT): Define using a prototype.
16104
16105         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
16106
16107         * lib/gethostname.c: Include <stddef.h>.
16108         (gethostname): Define with prototype.  Length is size_t, not int.
16109
16110 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16111
16112         Assume C89 or better; remove K&R cruft.
16113         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
16114         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
16115         string.h, getenv, malloc.
16116         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
16117         headers.
16118         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
16119         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
16120         do not check for strerror.
16121         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
16122         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
16123         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
16124         do not check for doprnt or vprintf.
16125         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
16126         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
16127
16128 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16129
16130         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
16131         getversion.c should have been removed then, but was accidentally
16132         preserved.
16133
16134         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
16135         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
16136
16137 2003-09-08  Karl Berry  <karl@gnu.org>
16138
16139         * config/config.sub, config.guess, srclistvars.sh: update from savannah
16140                 config, forget about prep.
16141
16142         * config/depcomp, missing: update from automake.
16143
16144 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16145
16146         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
16147         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16148
16149 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16150
16151         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
16152         copy_tm_result.  Bug reported by Simon Josefsson in
16153         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16154
16155 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16156
16157         * m4/time_r.m4: New file.
16158         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
16159         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
16160         is. Check for timegm declaration.
16161         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
16162         Do not check for gmtime_r.
16163         Replace mktime if __mktime_internal does not exist and if mktime
16164         hasn't been replaced already.
16165
16166 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16167
16168         * lib/time_r.c, lib/time_r.h: New files.
16169
16170         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
16171         __localtime_r.
16172         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
16173         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
16174
16175         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
16176         __gmtime_r.
16177         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
16178         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
16179         Include <time_r.h>.
16180
16181         * lib/timegm.c: Switch to glibc implementation, with the following
16182         changes:
16183         [defined HAVE_CONFIG_H]: Include <config.h>.
16184         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
16185         (__mktime_internal) [!defined _LIBC]: New decl.
16186         (__gmtime_r) [!defined _LIBC]: New macro and function.
16187         (timegm): Use a prototype, since gnulib assumes C89.
16188         Do not bother declaring tmp to be const, as it's not really usefu.
16189         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
16190         (timegm): Declare only if HAVE_DECL_TIMEGM.
16191
16192 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16193
16194         * MODULES.html.sh (func_all_modules): Add time_r.
16195         * modules/time_r: New file.
16196         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
16197         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
16198
16199 2003-09-03  Paul Eggert  <eggert@twinsun.com>
16200
16201         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
16202         Bug reported by Lute Kamstra in
16203         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
16204
16205         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
16206         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
16207         course with correspondingly smaller numbers for tomorrow and
16208         yesterday.  From Tadayoshi Funaba.  Originally installed into
16209         sh-utils on 1999-08-07, but the patch got lost (I guess during the
16210         coreutils merge?).
16211
16212 2003-08-31  Simon Josefsson  <jas@extundo.com>
16213
16214         * modules/timegm: New file.
16215         * MODULES.html.sh (func_all_modules): Add timegm.
16216
16217 2003-08-31  Simon Josefsson  <jas@extundo.com>
16218
16219         * m4/timegm.m4: New file.
16220
16221 2003-08-31  Simon Josefsson  <jas@extundo.com>
16222
16223         * lib/timegm.h: New file.
16224         * lib/timegm.c: New file.  Based on
16225         wget-1.8.2/src/http.c:mktime_from_utc.
16226
16227 2003-08-31  Karl Berry  <karl@gnu.org>
16228
16229         * lib/argp.h: update from libc.
16230
16231 2003-08-28  Bruno Haible  <bruno@clisp.org>
16232
16233         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
16234         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
16235         followed by '#define fnmatch fnmatch_posix' gives an error.
16236
16237 2003-08-28  Bruno Haible  <bruno@clisp.org>
16238
16239         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
16240         warning on QNX, which defines O_BINARY to 000000.
16241
16242 2003-08-27  Jim Meyering  <jim@meyering.net>
16243
16244         * m4/mkstemp.m4: Require that the system mkstemp be able to create
16245         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
16246         would fail after 32.  Reported by Danny Levinson.  Details here:
16247         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
16248
16249 2003-08-24  Bruno Haible  <bruno@clisp.org>
16250
16251         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
16252         MSVC7 <stdio.h> is included later.
16253
16254 2003-08-22  Simon Josefsson  <jas@extundo.com>
16255
16256         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
16257
16258 2003-08-20  Karl Berry  <karl@gnu.org>
16259
16260         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
16261
16262 2003-08-20  Bruno Haible  <bruno@clisp.org>
16263
16264         * modules/progname: New file.
16265         * MODULES.html.sh (func_all_modules): Add progname.
16266
16267 2003-08-20  Bruno Haible  <bruno@clisp.org>
16268
16269         * lib/progname.h: New file, from GNU gettext.
16270         * lib/progname.c: New file, from GNU gettext.
16271         * lib/progreloc.c: New file, from GNU gettext.
16272
16273 2003-08-19  Jim Meyering  <jim@meyering.net>
16274
16275         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
16276         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
16277
16278 2003-08-19  Bruno Haible  <bruno@clisp.org>
16279
16280         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
16281         more.
16282
16283 2003-08-19  Bruno Haible  <bruno@clisp.org>
16284
16285         * lib/xstrdup.c: Assume <string.h> exists.
16286
16287 2003-08-18  Paul Eggert  <eggert@twinsun.com>
16288
16289         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
16290         in makefile rules.
16291
16292 2003-08-18  Jim Meyering  <jim@meyering.net>
16293
16294         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
16295         * m4/lib-ld.m4: Likewise.
16296
16297 2003-08-18  Jim Meyering  <jim@meyering.net>
16298
16299         * lib/setenv.h: Indent nested cpp directive.
16300         * lib/vasnprintf.c: Remove trailing blanks.
16301
16302 2003-08-17  Simon Josefsson  <jas@extundo.com>
16303
16304         * modules/xstrndup: New file.
16305         * MODULES.html.sh (func_all_modules): Add xstrndup.
16306
16307 2003-08-17  Simon Josefsson  <jas@extundo.com>
16308
16309         * modules/argp: Fix autoconf macro name. Add more dependencies.
16310
16311 2003-08-17  Simon Josefsson  <jas@extundo.com>
16312
16313         * m4/xstrndup.m4: New file.
16314
16315 2003-08-17  Simon Josefsson  <jas@extundo.com>
16316
16317         * m4/argp.m4: New file.
16318
16319 2003-08-17  Simon Josefsson  <jas@extundo.com>
16320             Bruno Haible  <bruno@clisp.org>
16321
16322         * lib/xstrndup.h: New file.
16323         * lib/xstrndup.c: New file.
16324
16325 2003-08-17  Bruno Haible  <bruno@clisp.org>
16326
16327         * modules/strndup (Files, Include): Add lib/strndup.h.
16328
16329 2003-08-17  Bruno Haible  <bruno@clisp.org>
16330
16331         * modules/euidaccess (Files): Add lib/euidaccess.h.
16332
16333 2003-08-17  Bruno Haible  <bruno@clisp.org>
16334
16335         * lib/strndup.h: New file.
16336
16337 2003-08-17  Bruno Haible  <bruno@clisp.org>
16338
16339         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
16340         like AC_GNU_SOURCE.
16341         * modules/extensions (configure.ac): Comment out the invocation of
16342         gl_USE_SYSTEM_EXTENSIONS.
16343
16344 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16345
16346         Merges from coreutils, etc.
16347         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
16348         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
16349         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
16350         fixing a typo.
16351         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
16352         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
16353
16354 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16355
16356         Document merge from coreutils.
16357         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
16358         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
16359         * modules/utime: Add m4/utimes-null.m4.
16360
16361 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16362
16363         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
16364         space, undoing this 2003-08-12 change:
16365         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
16366
16367 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16368
16369         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
16370         strtoul.c from libc, undoing this 2003-08-12 change:
16371         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
16372
16373 2003-08-16  Jim Meyering  <jim@meyering.net>
16374
16375         Merges from coreutils.
16376         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
16377         prefix.  Adjust cache variables similarly.  Create 500 rather than
16378         just 300 files, to exercise bug on Darwin6.5, too.
16379         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
16380         $missing_dir.
16381         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
16382         AM_SYS_POSIX_TERMIOS.
16383         Reported by mkc@mathdogs.com.
16384         Also change use of $am_cv_sys_posix_termios
16385         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
16386         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
16387         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
16388         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
16389         in /proc/mounts until it finds one with matching device number.  This
16390         is unnecessary when the FILE argument *is* a mount point.  No stat call
16391         is necessary in that case.  So, disable the statvfs-testing code on
16392         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
16393         as RedHat bug# 84846.
16394         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
16395         to 1MB, so as not to render systems with no stack size limit (e.g.,
16396         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
16397         Include <unistd.h>.  On some systems,
16398         it is required for the definition of _SC_PAGESIZE.
16399
16400 2003-08-16  Jim Meyering  <jim@meyering.net>
16401
16402         Merge from coreutils.
16403         * lib/xstrtoimax.c: #else #if -> #elif.
16404         * lib/xstrtoumax.c: Likewise.
16405
16406 2003-08-16  Jim Meyering  <jim@meyering.net>
16407
16408         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
16409         * m4/utimes.m4: Removed.
16410         * m4/utimes-null.m4: Renamed from utimes.m4.
16411
16412         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
16413         to 1MB, so as not to render systems with no stack size limit (e.g.,
16414         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
16415         Include <unistd.h>.  On some systems,
16416         it is required for the definition of _SC_PAGESIZE.
16417
16418 2003-08-16  Jim Meyering  <jim@meyering.net>
16419         and Paul Eggert  <eggert@cs.ucla.edu>
16420
16421         Merges from coreutils, etc.
16422
16423         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
16424         using the latest version from cvs.  This avoids problems with #line
16425         directives using a vendor (Sun) compiler.
16426         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
16427         Don't set GETGROUPS_LIB here; now it's
16428         done via getgroups.m4's wrapper function.
16429         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
16430         rather than just in sh-util/configure.in, so that the
16431         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
16432         same.
16433         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
16434         AC_FUNC_GETLOADAVG where to find getloadavg.c.
16435         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
16436         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
16437         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
16438         Remove code that is now done by the newly-required macros.
16439         Append $(EXEEXT) to DF_PROG.
16440         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
16441         Do not invoke or require the following here,
16442         since prereq.m4 or some gnulib .m4 now does this for us:
16443         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
16444         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
16445         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
16446         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
16447         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
16448         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
16449         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
16450         AC_FUNC_OBSTACK.
16451         Do not replace the following functions, as this is now the job
16452         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
16453         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
16454         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
16455         atexit getpass, strdup, getpagesize.
16456         Replace 'raise'.
16457         Do not check for the following functions, as this is now the job
16458         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
16459         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
16460         setregid.
16461         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
16462         Check for sys/sysctl.h.
16463         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
16464         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
16465         of checking for ssize_t ourselves.
16466
16467         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
16468         Require every macro that gnulib/modules/* suggests for us.
16469         (jm_PREREQ_ADDEXT): New macro.
16470         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
16471         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
16472
16473         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
16474         (gl_PHYSMEM): Use it.
16475         Also check for `table' function.
16476         Check for new headers and functions.
16477         Add check for sys/sysmp.h.
16478         With suggestions from Kaveh Ghazi.
16479         Ignore headers that are present but cannot be compiled.  This
16480         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
16481         C 5.4.
16482
16483 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16484
16485         Document merge from coreutils.
16486         * modules/userspec: Depend on posixver.
16487         * modules/strftime: Depend on tzset.
16488
16489 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16490
16491         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
16492         rather than tab, after '#' in shell-script copyright notices.
16493         Suggested by Bruno Haible.
16494
16495 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16496
16497         * config/srclist-update: Use three spaces, rather than tab, after '#'
16498         in shell-script copyright notices.  Suggested by Bruno Haible.
16499         Remove unnecessary parenthesization in regular expression.
16500
16501 2003-08-15  Jim Meyering  <jim@meyering.net>
16502
16503         Merge from coreutils.
16504         * lib/xgethostname.c: Include <stdlib.h>.
16505         (xghostname): Don't exit for anything other than memory-related
16506         failure; just return NULL.
16507         * lib/userspec.c: Include "posixver.h".
16508         (parse_user_spec): Accept `.' as a separator only
16509         in pre-POSIX-200112 mode.
16510         * lib/strtoimax.c: Use #elif rather than #else #if.
16511         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
16512         Remove function, now that we can rely on a working tzset function.
16513         [!_LIBC]: Ensure that the required autoconf test has been run.
16514         [!defined _NL_CURRENT && HAVE_STRFTIME]:
16515         Use underlying_strftime for %r.
16516         * lib/sha.c: Merge in some clean-up and optimization changes from
16517         glibc.
16518         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
16519         Ensure that it is a multiple of 64.
16520         Rearrange loop exit tests so as to avoid performing an
16521         additional fread after encountering an error or EOF.
16522         * lib/realloc.c: Update copyright date.
16523
16524 2003-08-15  Jim Meyering  <jim@meyering.net>
16525         and Paul Eggert  <eggert@twinsun.com>
16526
16527         Merge from coreutils.
16528         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
16529         member but strut utmpx does not.  Needed for AIX 4.3.3.
16530         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
16531
16532 2003-08-15  Jim Meyering  <jim@meyering.net>
16533         and Paul Eggert  <eggert@cs.ucla.edu>
16534
16535         Merges from coreutils, etc.
16536         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
16537         Require gl_FUNC_TZSET_CLOBBER.
16538         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
16539         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
16540         members.
16541
16542 2003-08-14  Paul Eggert  <eggert@twinsun.com>
16543
16544         Help the merge from coreutils.
16545         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
16546         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
16547         * m4/tzset.m4: Use it too.
16548
16549 2003-08-14  Paul Eggert  <eggert@twinsun.com>
16550
16551         * modules/tzset: New file.
16552
16553 2003-08-14  Jim Meyering  <jim@meyering.net>
16554
16555         Merges from coreutils.
16556         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
16557         variable names, rather than @FNMATCH_H@.
16558         * modules/alloca: Likewise for $(ALLOCA_H).
16559
16560         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
16561         the three copies of the literal target, `fnmatch.h'.
16562         * modules/alloca (alloca.h): Likewise.
16563
16564 2003-08-14  Jim Meyering  <jim@meyering.net>
16565
16566         Merge from coreutils.
16567         * m4/tzset.m4: New file.
16568         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
16569         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
16570         otherwise, AIX 5.1 systems would end up using the latter.
16571         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
16572         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
16573         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
16574         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
16575
16576 2003-08-14  Jim Meyering  <jim@meyering.net>
16577
16578         Merge from coreutils.
16579         * lib/obstack.h: Whitespace changes.
16580         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
16581         and xcalloc return values.
16582         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
16583         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
16584         hang on OSF/1 5.1 for DIR on both local and remote file systems.
16585         Reported by (and fix confirmed by) Nelson H. F. Beebe.
16586         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
16587         error from mntctl.
16588         Use mntctl's return value to drive the entry-processing loop, since
16589         we can't rely on the value of the vmt_length member in the last
16590         entry.  On some systems doing so could result in exhausting
16591         virtual memory.  Based in part on a patch from Mike Jetzer.
16592
16593 2003-08-14  Jim Meyering  <jim@meyering.net>
16594         and Paul Eggert  <eggert@twinsun.com>
16595
16596         Merges from coreutils, plus other fixes.
16597         * lib/physmem.c: Merge in portability changes from gcc/libiberty
16598         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
16599         for credits and details.  Thanks to Kaveh Ghazi for helping
16600         to keep these files in sync.
16601         (ARRAY_SIZE): Define it.
16602         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
16603         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
16604         (memcasecmp): Don't assume size_t fits in unsigned int.
16605         Remove casts and duplicate code.
16606         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
16607         (memcpy): Remove definition.
16608         Merge in some clean-up and optimization changes from glibc.
16609         [BLOCKSIZE]: Move definition to top of file.
16610         Ensure that it is a multiple of 64.
16611         Rearrange loop exit tests so as to avoid performing an
16612         additional fread after encountering an error or EOF.
16613         * lib/md5.h (md5_uintptr): Define.
16614         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
16615         return to the initial working directory.  Preserve errno
16616         for caller.
16617         * lib/idcache.c: Include "xalloc.h".
16618         (xmalloc, xrealloc): Remove decls.
16619         (getuser): Remove casts no longer required in C89.
16620         * lib/human.c: Include stdio.h, for sprintf.
16621         * lib/group-member.c: Include "xalloc.h".
16622         (xmalloc, xrealloc): Remove decls.
16623         (get_group_info): Remove casts no longer required in C89.
16624         * lib/getusershell.c (readname): Remove casts no longer required in
16625         C89.
16626         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
16627         * lib/getline.c: Whitespace fix, from coreutils.
16628
16629 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16630
16631         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
16632         Check for isascii.
16633
16634         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
16635         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
16636         Undo previous (whitespace-only) change.
16637
16638 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16639
16640         * lib/exclude.c: Include <ctype.h>
16641         (IN_CTYPE_DOMAIN): New macro.
16642         (is_space): New fn.
16643         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
16644         and empty lines.
16645
16646         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
16647         Undo previous (whitespace-only) change.
16648
16649 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16650
16651         * config/srclist-update: Change update back to the old behavior,
16652         leaving whitespace alone.  Use one 'sed' command rather than a
16653         pipeline.
16654         (fixlicense): Now a variable, not a function.
16655         (remove_trailing_blanks): Remove.
16656         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
16657         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
16658         Undo previous (whitespace-only) change.
16659
16660 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16661
16662         Merge from coreutils.
16663         * modules/euidaccess: Add lib_SOURCES, include for new
16664         file euidaccess.h
16665
16666 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16667
16668         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
16669         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
16670         Normalize leading white space and remove trailing white space.
16671
16672         Merge from coreutils
16673         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
16674
16675         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
16676         0.12.1.  These files are now being upgraded automatically by
16677         ../config/srclist-update.
16678
16679 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16680
16681         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
16682         Normalize leading white space and remove trailing white space.
16683         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
16684         notice, as per ../config/srclist-update.
16685
16686         Merge from coreutils.
16687         * lib/euidaccess.h: New file.
16688         * lib/euidaccess.c: Include it.
16689         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
16690         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
16691         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
16692
16693 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16694
16695         * config/srclist-update: Add copyright notice.
16696         (remove_id_lines, remove_trailing_blanks): New constants.
16697         (fixfile): Use them to normalize spacing a bit in copied files.
16698         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
16699         Normalize leading white space and remove trailing white space.
16700
16701         * config/texinfo.tex: Sync with texinfo.
16702
16703         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
16704         strtoul.c from libc, to merge coreutils whitespace changes.
16705
16706         * config/srclist.txt: Get the following m4 files from gettext:
16707         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
16708         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
16709         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
16710         wint_t.m4.
16711
16712 2003-08-12  Karl Berry  <karl@gnu.org>
16713
16714         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
16715         been made.
16716
16717 2003-08-11  Paul Eggert  <eggert@twinsun.com>
16718
16719         * modules/gnu-source, m4/gnu-source.m4:
16720         Remove; we're assuming Autoconf 2.54 or later now.
16721         Suggested by Bruno Haible.
16722         * MODULES.html.sh (func_all_modules): Remove gnu-source.
16723
16724 2003-08-11  Bruno Haible  <bruno@clisp.org>
16725
16726         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
16727
16728 2003-08-11  Bruno Haible  <bruno@clisp.org>
16729
16730         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
16731         (vasnprintf): Use it instead of wcslen.
16732
16733 2003-08-11  Bruno Haible  <bruno@clisp.org>
16734
16735         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
16736         value to ensure that _Bool promotes to int. Use #define for _Bool when
16737         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
16738
16739 2003-08-10  Karl Berry  <karl@gnu.org>
16740
16741         * lib/regex.h: update from libc (whitespace fix).
16742
16743 2003-08-09  Paul Eggert  <eggert@twinsun.com>
16744
16745         Merge some files from coreutils.  These changes were
16746         originally made by Jim Meyering.
16747         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
16748         many older Unixes require this.
16749         * lib/alloca.c (alloca): Remove cast to argument of free;
16750         no longer needed in C89.
16751         * lib/alloca_.h, regex.h: Fix white space to match
16752         what GNU indent does.
16753
16754 2003-08-09  Paul Eggert  <eggert@twinsun.com>
16755
16756         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
16757         apparently Emacs's Unicode mode got confused before my 2003-08-05
16758         checkin.
16759
16760 2003-08-08  Paul Eggert  <eggert@twinsun.com>
16761
16762         * m4/extensions.m4: New file.
16763         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
16764         Require gl_USE_SYSTEM_EXTENSIONS.
16765         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
16766         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
16767
16768 2003-08-08  Paul Eggert  <eggert@twinsun.com>
16769
16770         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
16771         * modules/extensions, modules/gnu-source: New files.
16772         * modules/timespec, modules/unlocked-io: Depend on extensions.
16773
16774 2003-08-07 Paul Eggert  <eggert@twinsun.com>
16775
16776         * modules/restrict: New file.
16777         * MODULES.html.sh (func_all_modules): Add restrict.
16778         * modules/regex: Depend on restrict.
16779
16780 2003-08-07  Paul Eggert  <eggert@twinsun.com>
16781
16782         * m4/restrict.m4: New file.
16783         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
16784
16785 2003-08-07  Bruno Haible  <bruno@clisp.org>
16786
16787         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
16788         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
16789
16790 2003-08-07  Bruno Haible  <bruno@clisp.org>
16791
16792         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
16793         makes the module 'getndelim2' compatible with the module 'getline'.
16794
16795 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16796
16797         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
16798         byte with "\201" to avoid glitches when editing that source file
16799         with multi-gnome-terminal.
16800
16801 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16802
16803         * lib/bumpalloc.h: Remove.
16804
16805 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16806
16807         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
16808         * modules/bumpalloc: Remove.
16809
16810 2003-08-04  Paul Eggert  <eggert@twinsun.com>
16811
16812         * lib/getloadavg.c: Change copyright notice and spacing to conform to
16813         GNU coding style.
16814
16815         Merge from coreutils.
16816         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
16817         1. From glibc.
16818         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
16819         from Karl Berry, implemented by Jim Meyering.
16820         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
16821         from Dmitry V. Levin.
16822         Remove anachronistic cast of xrealloc.
16823         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
16824         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
16825         type. Otherwise, it wouldn't compile with at least /bin/cc on
16826         ymp-cray-unicos9.0.2.X.
16827         Combine two mostly-identical uses of alloca into one.
16828         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
16829
16830 2003-08-04  Dave Love <d.love@dl.ac.uk>
16831
16832         [From Emacs.]
16833
16834         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
16835         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
16836         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
16837         obsolete NLIST_NAME_UNION.
16838         [__GNU__]: Undef BSD and FSCALE.
16839         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
16840
16841 2003-08-03  Paul Eggert  <eggert@twinsun.com>
16842
16843         * lib/stdbool_.h (_Bool): Make it signed char, instead of
16844         an enum type, so that it's guaranteed to promote to int.  See:
16845         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
16846
16847 2003-08-03  Karl Berry  <karl@gnu.org>
16848
16849         * config/depcomp: update from automake.
16850
16851 2003-07-31  Paul Eggert  <eggert@twinsun.com>
16852
16853         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
16854         (strerror): Don't assume that a printable int fits in 14 bytes.
16855
16856 2003-07-31  Bruno Haible  <bruno@clisp.org>
16857
16858         * modules/getpass-gnu: New file.
16859         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
16860
16861 2003-07-31  Bruno Haible  <bruno@clisp.org>
16862
16863         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
16864
16865 2003-07-24  Karl Berry  <karl@gnu.org>
16866
16867         * config/missing: update from automake.
16868
16869 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
16870             Bruno Haible  <bruno@clisp.org>
16871
16872         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
16873         * lib/getline.c (getline, getdelim): Likewise.
16874         Remove _GNU_SOURCE define; now it's defined in config.h through
16875         m4/getline.m4.
16876
16877 2003-07-23  Karl Berry  <karl@gnu.org>
16878
16879         * config/config.sub: update from prep.
16880
16881 2003-07-22  Paul Eggert  <eggert@twinsun.com>
16882
16883         * modules/xalloc (Depends-on): Add exitfail.
16884         * modules/xmemcoll: Likewise.
16885
16886 2003-07-22  Paul Eggert  <eggert@twinsun.com>
16887
16888         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
16889         over-parenthesization in macros.
16890
16891         Sync with coreutils.
16892
16893         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
16894         required by C99.
16895
16896         Use `exit_failure' for xalloc and xmemcoll instead of their own
16897         private exit-failure variables.
16898         * lib/xalloc.h (xalloc_exit_failure): Remove.
16899         * lib/xmalloc.c: Likewise.  Include exitfail.h.
16900         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
16901         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
16902         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
16903         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
16904
16905 2003-07-20  Jim Meyering  <jim@meyering.net>
16906
16907         * modules/closeout (Depends-on): Add exitfail.
16908         Suggestion from Bruno Haible.
16909
16910 2003-07-19  Karl Berry  <karl@gnu.org>
16911
16912         * config/config.sub: update from prep.
16913
16914 2003-07-18  Paul Eggert  <eggert@twinsun.com>
16915
16916         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
16917         Remove.
16918         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
16919         to test that it can stand by itself.  Include "exitfail.h".
16920         Clients should set exit_failure instead.
16921         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
16922
16923 2003-07-18  Bruno Haible  <bruno@clisp.org>
16924
16925         * modules/getndelim2: New file.
16926         * modules/getline: Share files with module getndelim2.
16927         * modules/getnline: Depend on getndelim2 instead of sharing files with
16928         it. Add getnline.c to lib_SOURCES.
16929         * MODULES.html.sh (func_all_modules): Add getndelim2.
16930
16931 2003-07-18  Bruno Haible  <bruno@clisp.org>
16932
16933         * m4/getndelim2.m4: New file.
16934         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
16935         invoke gl_PREREQ_GETNDELIM2.
16936         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
16937         gl_PREREQ_GETNDELIM2.
16938         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
16939         gl_GETNDELIM2.
16940
16941 2003-07-18  Bruno Haible  <bruno@clisp.org>
16942
16943         * lib/getndelim2.h: New file.
16944         * lib/getndelim2.c: Make into a module of its own. Include config.h,
16945         getndelim2.h.
16946         (getndelim2): Make non-static. Change return type to ssize_t.
16947         * lib/getline.h: Change argument names.
16948         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
16949         * lib/getnline.c: Include getndelim2.h.
16950
16951 2003-07-18  Andreas Schwab  <schwab@suse.de>
16952
16953         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
16954
16955 2003-07-17  Karl Berry  <karl@gnu.org>
16956
16957         * config/config.sub: update from prep.
16958
16959 2003-07-17  Bruno Haible  <bruno@clisp.org>
16960
16961         * modules/getnline: New file.
16962         * modules/getline: Add lib/getndelim2.c to source file list.
16963         * MODULES.html.sh (func_all_modules): Add getnline.
16964
16965 2003-07-17  Bruno Haible  <bruno@clisp.org>
16966
16967         * m4/getnline.m4: New file.
16968
16969 2003-07-17  Bruno Haible  <bruno@clisp.org>
16970
16971         * m4/Makefile.am.in: Remove file.
16972         * m4/Makefile.am: Remove file.
16973         * m4/Makefile.in: Remove file.
16974
16975 2003-07-17  Bruno Haible  <bruno@clisp.org>
16976
16977         * lib/getnline.h: New file.
16978         * lib/getnline.c: New file.
16979         * lib/getndelim2.c: New file, extracted from getline.c.
16980         (getndelim2): Renamed from getdelim2, with added nmax argument.
16981         * lib/getline.c: Include getndelim2.c.
16982         (getdelim2): Moved out to getndelim2.c.
16983         (getline, getdelim): Update.
16984
16985 2003-07-17  Bruno Haible  <bruno@clisp.org>
16986
16987         * lib/Makefile.am: Remove file.
16988         * lib/Makefile.in: Remove file.
16989
16990 2003-07-17  Bruno Haible  <bruno@clisp.org>
16991
16992         * configure.in: Remove file.
16993         * Makefile.in: Remove file.
16994
16995 2003-07-17  Bruno Haible  <bruno@clisp.org>
16996
16997         * MODULES.html.sh: Put the </BODY> right before </HTML>.
16998
16999 2003-07-16  Karl Berry  <karl@gnu.org>
17000
17001         * config/srclist-update: was running fixlicense twice, which caused
17002                 texinfo.tex to be nullified for some reason.  Simplify,
17003                 $gplsrc is no longer needed as far as I can see?
17004
17005 2003-07-16  Jim Meyering  <jim@meyering.net>
17006
17007         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
17008
17009 2003-07-15  Paul Eggert  <eggert@twinsun.com>
17010
17011         * config/srclist.txt: Get the following files from gettext-runtime/intl
17012         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
17013         ref-del.sin.  From Bruno Haible.
17014         * config/srclist-update (fixfile): Change grep pattern again, since the
17015         previous fix didn't work (there was another trailing $).  Use
17016         '[$]' to escape the $s.
17017
17018 2003-07-15  Karl Berry  <karl@gnu.org>
17019
17020         * lib/vasnprintf.c: update from gettext.
17021
17022 2003-07-15  Karl Berry  <karl@gnu.org>
17023
17024         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
17025         gets expanded when surrounded by '$'.
17026
17027 2003-07-15  Jim Meyering  <jim@meyering.net>
17028
17029         * modules/save-cwd: Don't depend on error.  From Derek Price.
17030
17031 2003-07-15  Jim Meyering  <jim@meyering.net>
17032
17033         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
17034
17035 2003-07-14  Simon Josefsson  <jas@extundo.com>
17036
17037         * modules/mempcpy: New file.
17038         * MODULES.html.sh (func_all_modules): Add mempcpy.
17039
17040 2003-07-14  Simon Josefsson  <jas@extundo.com>
17041
17042         * m4/mempcpy.m4: New file.
17043
17044 2003-07-14  Simon Josefsson  <jas@extundo.com>
17045
17046         * lib/mempcpy.h: New file.
17047         * lib/mempcpy.c: New file.
17048
17049 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17050
17051         * modules/getdate, modules/posixtm: Depend on mktime.
17052
17053 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17054
17055         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
17056         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
17057         unicodeio.c, unicodeio.h, unlocked-io.h:
17058         Switch from LGPL to GPL.
17059
17060 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17061
17062         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
17063         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
17064         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
17065         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
17066         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
17067         updated automatically by ../config/srclist-update.  This changes
17068         their license from LPGL to GPL.
17069
17070 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17071
17072         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
17073         assumed to refer to the root of the most recent stable gettext version.
17074         * config/srclistvars.sh: Add defaults for eggert.
17075         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
17076         Match "This program" as well as "The program".  This is needed
17077         for gettext.
17078
17079 2003-07-14  Jim Meyering  <jim@meyering.net>
17080
17081         Don't emit diagnostics.  Let callers do that.
17082         * lib/save-cwd.c: Don't include "error.h".
17083         (save_cwd): Don't call error.  Ensure that errno is valid
17084         when returning nonzero.
17085
17086         * lib/save-cwd.h (restore_cwd): Update prototype.
17087         * lib/save-cwd.c (restore_cwd): Remove two parameters.
17088         Simplify.  Don't call error upon failure.  Let callers do that.
17089         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
17090         when auditing is enabled.  But don't bother updating the #if.
17091
17092 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
17093
17094         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
17095         it breaks C++ compilation.
17096         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
17097
17098 2003-07-10  Simon Josefsson  <jas@extundo.com>
17099
17100         * modules/strchrnul (Makefile.am): Add strchrnul.h.
17101
17102 2003-07-10  Jim Meyering  <jim@meyering.net>
17103
17104         * m4/clock_time.m4: Remove trailing blank.
17105         * m4/intmax_t.m4: Likewise.
17106
17107 2003-07-10  Jim Meyering  <jim@meyering.net>
17108
17109         * lib/vasnprintf.c: Remove trailing blanks.
17110         Make cpp indentation consistent.
17111
17112 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17113
17114         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
17115         posixver.c, strftime.c, strnlen.c, strverscmp.c:
17116         Switch from LGPL to GPL.
17117
17118 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17119
17120         * config/srclist.txt: Sort sublists.  Add
17121         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
17122         that differ from gnulib for one reason or another; we'd like this list
17123         to be smaller but for now let's document what we have.
17124
17125 2003-07-08  Paul Eggert  <eggert@twinsun.com>
17126
17127         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
17128         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
17129         and sweeter "eval x=$x".
17130         * config/srclist.txt: Get lib/argp* from glibc.
17131
17132 2003-07-07  Paul Eggert  <eggert@twinsun.com>
17133
17134         * lib/mktime.c: Fix some boundary cases and remove need for floating
17135         point.
17136
17137         Issue a compile-time diagnostic if time_t is floating point, or if
17138         two's complement arithmetic is not in effect, or if arithmetic
17139         right shift does not propagate the sign.  These assumptions were
17140         all in the original code but they weren't checked.
17141
17142         (TIME_T_MIDPOINT, verify): New macros.
17143         (__isleap): Remove; it has integer overflow problems.
17144         (leapyear): New function, without those problems.
17145         (ydhms_tm_diff): Remove; splitting into two parts.
17146         (ydhms_diff): New function, containing the arithmetic part of
17147         the old ydhms_tm_diff function.  Issue a compile-time
17148         diagnostic if we are not using C99 integer division.
17149         Avoid casts when possible.
17150         (guess_time_tm): New function, containing the checking part of
17151         the old ydhms_tm_diff function.  Return the new value, rather than
17152         the difference between it and the old.  Accept a new argument T
17153         so that *T specifies the old value.  Check for overflow in the result.
17154
17155         (__mktime_internal): Use a time_t offset, not a long int offset.
17156         This undoes the 2003-06-04 change, which is no longer needed now
17157         that we have better overflow checking.
17158         (localtime_offset): Likewise.
17159
17160         (__mktime_internal): Avoid harmful overflow on hosts where time_t
17161         and long are 64-bit but int is only 32-bit.
17162         (ydhms_diff): Use long int to store year1 and yday1.
17163         Issue a compile-time diagnostic if long int is not wide enough.
17164
17165         (__mktime_internal): Use long int to store adjusted year and yday.
17166         Use plain C rather than preprocessor commands, if that doesn't
17167         affect efficiency.
17168         Check for overflow (and try to repair) after each probe
17169         rather than checking only at the very end.  This avoids some bugs
17170         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
17171         does not equal GMT offset at maximum time).
17172         Use integer to check for overflow rather than floating point; this
17173         is more portable to non-IEEE hosts, and is a tad faster.
17174         When we detect that we are oscillating between two values,
17175         don't check whether tm_isdst has the requested value, since
17176         we already know the answer.  When tm_isdst has the wrong value,
17177         use a different heuristic to find the right one, based on the
17178         extreme values actually observed in practice in tz2003a,
17179         rather than the (overly optimistic) "previous 3 calendar quarters".
17180
17181         (not_equal_tm, print_tm, check_result): Use "const T" rather than
17182         "T const" to accommodate glibc style.
17183         (check_result): Use less-confusing report format.  "long" -> "long int.
17184         (main): Likewise.
17185         Don't loop if the iteration overflows time_t.
17186         Allow a negative step in the iteration.
17187
17188 2003-07-06  Karl Berry  <karl@gnu.org>
17189
17190         * config/depcomp: update from automake.
17191         * config/config.sub: update from prep.
17192
17193 2003-07-03  Karl Berry  <karl@gnu.org>
17194
17195         * config/config.guess: update from prep.
17196
17197 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17198
17199         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
17200         xreadlink.c now includes it unconditionally.
17201
17202 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17203
17204         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
17205         having it depend on HAVE_SYS_TYPES_H.
17206
17207 2003-07-01  Bruno Haible  <bruno@clisp.org>
17208
17209         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
17210         <sys/types.h> should be sufficient.
17211         Reported by Paul Eggert.
17212
17213 2003-06-26  Karl Berry  <karl@gnu.org>
17214
17215         * config/depcomp: update from automake.
17216
17217 2003-06-26  Bruno Haible  <bruno@clisp.org>
17218
17219         * modules/human: Depend on module stdbool.
17220
17221 2003-06-25  Bruno Haible  <bruno@clisp.org>
17222
17223         * modules/readlink: New file.
17224         * modules/xreadlink: Depend on it.
17225         * MODULES.html.sh (func_all_modules): Add readlink.
17226
17227 2003-06-25  Bruno Haible  <bruno@clisp.org>
17228
17229         * m4/readlink.m4: New file.
17230
17231 2003-06-25  Bruno Haible  <bruno@clisp.org>
17232
17233         * lib/readlink.c: New file.
17234
17235 2003-06-22  Karl Berry  <karl@gnu.org>
17236
17237         * config/srclist.txt: update mkinstalldirs from automake.
17238         * config/mkinstalldirs: update.
17239
17240 2003-06-22  Bruno Haible  <bruno@clisp.org>
17241
17242         Portability to mingw32.
17243         * m4/ssize_t.m4: New file, from GNU gettext.
17244         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
17245         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
17246
17247 2003-06-22  Bruno Haible  <bruno@clisp.org>
17248
17249         * modules/safe-read: Add m4/ssize_t.m4.
17250         * modules/xreadlink: Add m4/ssize_t.m4.
17251
17252 2003-06-20  Bruno Haible  <bruno@clisp.org>
17253
17254         Assume C89, so PARAMS isn't needed.
17255         * lib/unicodeio.h (PARAMS): Remove.
17256         * lib/unicodeio.c: Don't use PARAMS.
17257
17258 2003-06-18  Karl Berry  <karl@gnu.org>
17259
17260         * config/config.{guess,sub}: update from prep.
17261
17262 2003-06-18  Jim Meyering  <jim@meyering.net>
17263
17264         Merge changes from coreutils.
17265         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
17266         Remove explicit declarations of xmalloc and realloc.
17267         Include xalloc.h.
17268         (read_utmp): Remove anachronistic cast of xmalloc.
17269
17270 2003-06-17  Paul Eggert  <eggert@twinsun.com>
17271
17272         Assume C89, so PARAMS isn't needed.
17273         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
17274         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
17275         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
17276         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
17277         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
17278         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
17279         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
17280         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
17281         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
17282         lib/xstrtod.h, lib/xstrtol.h: Likewise.
17283         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
17284         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
17285         no longer needed. Anyway, config.h should always be included before any
17286         other file.
17287
17288 2003-06-11  Simon Josefsson  <jas@extundo.com>
17289
17290         * modules/sysexits: New file.
17291         * MODULES.html.sh (func_all_modules): Add sysexits.
17292
17293 2003-06-11  Simon Josefsson  <jas@extundo.com>
17294
17295         * lib/sysexit_.h: New file.
17296
17297 2003-06-11  Derek Price  <derek@ximbiot.com>
17298
17299         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
17300         necessary.
17301
17302 2003-06-11  Bruno Haible  <bruno@clisp.org>
17303
17304         * m4/sysexits.m4: New file.
17305
17306 2003-06-10  Simon Josefsson <jas@extundo.com>
17307
17308         * lib/argp.h: New file, from glibc.
17309         * lib/argp-ba.c: New file, from glibc.
17310         * lib/argp-eexst.c: New file, from glibc.
17311         * lib/argp-fmtstream.c: New file, from glibc.
17312         * lib/argp-fmtstream.h: New file, from glibc.
17313         * lib/argp-fs-xinl.c: New file, from glibc.
17314         * lib/argp-help.c: New file, from glibc.
17315         * lib/argp-namefrob.h: New file, from glibc.
17316         * lib/argp-parse.c: New file, from glibc.
17317         * lib/argp-pv.c: New file, from glibc.
17318         * lib/argp-pvh.c: New file, from glibc.
17319         * lib/argp-xinl.c: New file, from glibc.
17320
17321 2003-06-10  Simon Josefsson  <jas@extundo.com>
17322
17323         * modules/strchrnul: New file.
17324
17325 2003-06-10  Simon Josefsson  <jas@extundo.com>
17326
17327         * modules/argp: New file.
17328
17329 2003-06-10  Simon Josefsson  <jas@extundo.com>
17330
17331         * m4/strchrnul.m4: New file.
17332
17333 2003-06-10  Simon Josefsson  <jas@extundo.com>
17334
17335         * lib/strchrnul.h: New file.
17336         * lib/strchrnul.c: New file.
17337
17338 2003-06-10  Bruno Haible  <bruno@clisp.org>
17339
17340         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
17341
17342 2003-06-07  Karl Berry  <karl@gnu.org>
17343
17344         * config/config.{guess,sub}: update from prep.
17345
17346 2003-06-07  Jim Meyering  <jim@meyering.net>
17347
17348         * modules/strtod: Use $(...) notation, not @...@ for
17349         AC_REPLACE'd variables.
17350         * modules/localcharset: Likewise.
17351
17352 2003-06-07  Jim Meyering  <jim@meyering.net>
17353
17354         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
17355         in place of my name in the copyright comment.
17356         Remove definition and uses of __P.
17357
17358         From coreutils.
17359         * lib/stat.c: Don't declare xmalloc explicitly.
17360         Instead, include "xalloc.h".
17361         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
17362         xrealloc, and xcalloc return values.
17363         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
17364         Improve comment.
17365         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
17366
17367 2003-06-07  Bruno Haible  <bruno@clisp.org>
17368
17369         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
17370         avoid AC_CONFIG_LINKS.
17371         * modules/fnmatch (Makefile.am): Use explicit creation rule for
17372         fnmatch.h, to avoid AC_CONFIG_LINKS.
17373         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
17374
17375 2003-06-07  Bruno Haible  <bruno@clisp.org>
17376
17377         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
17378         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
17379         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
17380         directory.
17381         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
17382         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
17383         directory.
17384
17385 2003-06-06  Jim Meyering  <jim@meyering.net>
17386
17387         Merge from coreutils.
17388         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
17389         Consolidate declarations and initializations of *_base* locals.
17390
17391         Merge from coreutils.
17392         This avoids a core dump on systems without GNU putenv,
17393         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
17394         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
17395         (unsetenv): New static function, from GNU libc.
17396         (rpl_putenv): Use it.
17397
17398         * lib/modechange.c: Remove trailing blanks.
17399
17400         Merge from coreutils.
17401         * lib/fsusage.c: Remove declaration of statfs.
17402         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
17403
17404         * lib/posixtm.c: Include <stdbool.h> unconditionally.
17405
17406 2003-06-06  Jim Meyering  <jim@meyering.net>
17407
17408         * lib/stdbool_.h: Renamed from stdbool.h.in.
17409
17410 2003-06-06  Jim Meyering  <jim@meyering.net>
17411             Bruno Haible  <bruno@clisp.org>
17412
17413         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
17414         Adjust Makefile.am snippet not to redirect directly to target.
17415         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
17416
17417 2003-06-05  Paul Eggert  <eggert@twinsun.com>
17418
17419         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
17420         mismatch, look in future quarters as well as past.  This fixes a
17421         bug when processing fall-backwards gaps immediately after a long
17422         period of daylight-saving time.
17423
17424         * lib/mktime.c: Assume freestanding C89 or better.
17425         (HAVE_LIMITS_H): Remove.  Assume it's 1.
17426         (__P): Remove; not used.
17427         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
17428         (mktime, not_equal_tm, print_tm, check_result,
17429         main): Use prototypes.  Use const * where appropriate.
17430         (main): Fix typo in testing code that uncovered by above changes.
17431         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
17432
17433 2003-06-04  Paul Eggert  <eggert@twinsun.com>
17434
17435         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
17436         locale.h, localeconv.  This merges changes from coreutils.
17437
17438         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
17439         It can be removed after the next Autoconf is released.
17440         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
17441         needed.
17442
17443 2003-06-04  Paul Eggert  <eggert@twinsun.com>
17444
17445         * lib/mktime.c: Fix Debian bug 177940
17446         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
17447         (localtime_offset): Now long int, not time_t, because we want it
17448         to be guaranteed to be signed.  All uses changed.
17449         (__mktime_internal): If overflow would occur when adding offset,
17450         don't add it.
17451
17452         Merge 'human' changes from coreutils.  Rewrite to support
17453         locale-specific notations like thousands separators.
17454         * lib/human.c: Simplify authorship notice.
17455         Include human.h immediately after config.h.
17456         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
17457         <limits.h>: Do not include, since human.h does.
17458         (SIZE_MAX, UINTMAX_MAX): New macros.
17459         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
17460         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
17461         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
17462         (power_letter): Renamed from suffixes.
17463         (generate_suffix_backwards): Remove.
17464         (adjust_value): Now takes int style (because of human.h changes)
17465         and long double value (for greater precision on some platforms).
17466         (group_number): New function.
17467         (human_readable): Use it.  Use integer options, not enum.
17468         Put the options before the sizes in the arg list.
17469         Support all the new options.
17470         The old human_readable function has been removed;
17471         use inttostr.h instead.
17472         (human_readable, default_block_size, humblock):
17473         Use uintmax_t, not int, for block sizes.
17474         (human_readable_inexact, block_size_types): Remove.
17475         (block_size_opts): New constant.
17476         (human_options): Renamed from human_block_size, with new signature
17477         that allows block sizes up to UINTMAX_MAX.  All callers changed.
17478         * lib/human.h: Add copyright and authorship notice.
17479         Include <limits.h> and <stdbool.h> unconditionally.
17480         (PARAMS): Remove.  All uses removed.
17481         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
17482         (enum human_inexact_style): Remove tag; now a nameless enum.
17483         (human_floor, human_ceiling, human_round_to_even): Now have
17484         values 2, 0, 1 rather than -1, 1, 0.
17485         (human_group_digits, human_suppress_point_zero, human_autoscale,
17486         human_base_1024, human_SI, human_B): New constants.
17487         (human_readable_inexact, human_block_size): Remove.
17488         (human_readable): Size args are now uintmax_t, not int.
17489         (human_options): New decl.
17490
17491         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
17492         unnecessary now that we assume C89 or better.  This change
17493         imported from coreutils.
17494
17495         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
17496         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
17497         in the 2003-05-30 sync from glibc.
17498
17499         .h files should stand alone, but we shouldn't include <sys/types.h>
17500         if we can get away with just <stddef.h>.
17501
17502         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
17503         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
17504         rather than <sys/types.h>, as we merely need size_t.
17505         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
17506         to get size_t.
17507         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
17508         Include <stdio.h>, to get FILE.
17509         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
17510         memcasecmp.h has included <stddef.h> and all we need is size_t.
17511         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
17512         our interface, instead of including <sys/types.h>
17513
17514 2003-06-04  Paul Eggert  <eggert@twinsun.com>
17515
17516         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
17517         now, as glibc mktime is buggy on non-glibc systems.
17518
17519 2003-06-03  Karl Berry  <karl@gnu.org>
17520
17521         * config/config.sub: update from prep.
17522
17523 2003-06-02  Paul Eggert  <eggert@twinsun.com>
17524
17525         [from coreutils]
17526         Fix some minor time-related bugs with POSIX time arguments.
17527         Some valid time stamps were being rejected (notably -1, and
17528         time stamps before 1900 on 64-bit hosts).  And some invalid
17529         time stamps were being accepted, e.g. September 31.
17530
17531         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
17532         that we can return (time_t) -1 successfully.
17533         * lib/posixtm.c: Likewise.
17534         [HAVE_STDBOOL_H]: Include <stdbool.h>.
17535         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
17536         (t): Remove static var.
17537         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
17538         of static var.  All uses changed.
17539         (year): Do not reject years before 1900; they can occur with
17540         64-bit time_t.
17541         (posix_time_parse): Do not check for out-of-range components;
17542         that is now the caller's responsibility, since our checks were
17543         only approximations.
17544         (posixtime): Use mktime to check for out-of-range components,
17545         since it knows them exactly.
17546         If mktime returns (time_t) -1, check whether an error actually occurred
17547         by invoking localtime on -1.
17548         (main) [TEST_POSIXTIME]: Check for input data errors, and report
17549         posixtime failures better.
17550         Improve the test data (in comments only).
17551
17552 2003-06-02  Karl Berry  <karl@gnu.org>
17553
17554         * config/mkinstalldirs (version): new variable.
17555         (--version): new option.
17556         (usage): improve message.
17557
17558 2003-05-30  Karl Berry  <karl@gnu.org>
17559
17560         * lib/mktime.c: update from libc.
17561
17562 2003-05-30  Bruno Haible  <bruno@clisp.org>
17563
17564         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
17565         * config/config.rpath: Upgrade to gettext-0.12.1.
17566
17567 2003-05-30  Bruno Haible  <bruno@clisp.org>
17568
17569         * m4/gettext.m4: Upgrade to gettext-0.12.1.
17570         * m4/nls.m4: New file, from gettext-0.12.1.
17571         * m4/po.m4: New file, from gettext-0.12.1.
17572         * m4/progtest.m4: Upgrade to gettext-0.12.1.
17573
17574 2003-05-30  Bruno Haible  <bruno@clisp.org>
17575
17576         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
17577         * lib/localcharset.h: Likewise.
17578         * lib/localcharset.c: Likewise.
17579
17580 2003-05-29  Karl Berry  <karl@gnu.org>
17581
17582         * config/config.rpath: update from gettext.
17583
17584 2003-05-28  Paul Eggert  <eggert@twinsun.com>
17585
17586         Assume the headers required for C89 freestanding compilers.
17587         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
17588         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
17589         * m4/human.m4 (gl_HUMAN): Likewise.
17590         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
17591         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
17592         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17593         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
17594         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17595         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
17596
17597 2003-05-28  Paul Eggert  <eggert@twinsun.com>
17598
17599         Assume the headers required for C89 freestanding compilers.
17600         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
17601         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
17602         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
17603         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
17604         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
17605         define, since <limits.h> is guaranteed to do that.
17606         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
17607         * lib/exclude.c: Include <stdbool.h> unconditionally.
17608         * lib/tempname.c: Include <stddef.h> unconditionally.
17609         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
17610         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
17611         <stddef.h> does that.
17612         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
17613         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
17614         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
17615         needed.
17616         * lib/xstrtol.c: Likewise.
17617         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
17618         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
17619
17620         * lib/addext.c (addext): Use assignment rather than cast, to avoid
17621         warnings on some platforms.
17622
17623         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
17624         arbitrarily.
17625
17626 2003-05-26  Jim Meyering  <jim@meyering.net>
17627
17628         Merge in a change from coreutils:
17629         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
17630         that is guaranteed to be `no'.  Use `no_such_member' to indicate
17631         that condition, rather than `-1' which is slightly misleading.
17632         Change the name of the cache variable to have the gl_ prefix.
17633         Prompted by a patch from Richard Dawe for DJGPP.
17634
17635 2003-05-24  Karl Berry  <karl@gnu.org>
17636
17637         * config/config.guess: update from prep.
17638
17639 2003-05-22  Karl Berry  <karl@gnu.org>
17640
17641         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
17642
17643 2003-05-20  Karl Berry  <karl@gnu.org>
17644
17645         * config/config.guess: update from prep.
17646
17647 2003-05-18  Karl Berry  <karl@gnu.org>
17648
17649         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
17650         might actually be set by the user.
17651
17652         * config/depcomp, install-sh, mdate-sh: update from automake.
17653
17654 2003-05-17  Bruno Haible  <bruno@clisp.org>
17655
17656         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
17657         invalid expansion for AC_EGREP_CPP.
17658         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
17659         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
17660         Suggested by Akim Demaille <akim@epita.fr> in
17661         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
17662
17663 2003-05-12  Jim Meyering  <jim@meyering.net>
17664
17665         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
17666         the space-padded-by-default conversion specifiers, %e, %k, %l.
17667
17668 2003-05-12  Bruno Haible  <bruno@clisp.org>
17669
17670         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
17671         the string is longer than 4 KB.
17672
17673 2003-05-11  Karl Berry  <karl@gnu.org>
17674
17675         * config/config.{guess,sub}: update from prep.
17676
17677 2003-05-09  Bruno Haible  <bruno@clisp.org>
17678
17679         * modules/error: Add m4/strerror_r.m4 to file list.
17680
17681 2003-05-03  Bruno Haible  <bruno@clisp.org>
17682
17683         Upgrade to Unicode-4.0.
17684         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
17685         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
17686         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
17687         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
17688         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
17689         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
17690         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
17691         Change width of U+E0100..U+E01EF from 1 to 0.
17692
17693 2003-04-25  Jim Meyering  <jim@meyering.net>
17694
17695         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
17696         of type size_t, not int.
17697
17698 2003-04-25  Bruno Haible  <bruno@clisp.org>
17699
17700         * lib/copy-file.c: Include <stddef.h>, for size_t.
17701
17702 2003-04-21  Paul Eggert  <eggert@twinsun.com>
17703
17704         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
17705         code which expansion is under static control.  Patch imported from
17706         Akim Demaille's patch to Bison; see
17707         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
17708
17709 2003-04-14  Bruno Haible  <bruno@clisp.org>
17710
17711         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
17712
17713 2003-04-11  Jim Meyering  <jim@meyering.net>
17714
17715         Merge changes from Coreutils.
17716
17717         2003-03-22  Jim Meyering  <jim@meyering.net>
17718
17719         * lib/strftime.c (widen): Cast alloca return value to proper type.
17720
17721         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
17722
17723         From GNU libc.
17724         * lib/strftime.c (my_strftime): Handle very large width
17725         specifications for numeric values correctly.  Improve checks for
17726         overflow.
17727
17728         2003-01-19  Jim Meyering  <jim@meyering.net>
17729
17730         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
17731         definitions.
17732         (nl_get_alt_digit) [! defined my_strftime]: Define.
17733         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
17734         _nl_get_alt_digit and _nl_get_walt_digit.
17735
17736         * lib/strftime.c (my_strftime): Merge in locale-related changes from
17737         libc. These changes have no effect outside of _LIBC.
17738
17739 2003-04-10  Bruno Haible  <bruno@clisp.org>
17740
17741         * modules/findprog: New file.
17742         * MODULES.html.sh (func_all_modules): Add it.
17743
17744 2003-04-10  Bruno Haible  <bruno@clisp.org>
17745
17746         * m4/findprog.m4: New file.
17747         * m4/eaccess.m4: New file.
17748
17749 2003-04-10  Bruno Haible  <bruno@clisp.org>
17750
17751         * lib/findprog.h: New file, from GNU gettext.
17752         * lib/findprog.c: New file, from GNU gettext.
17753
17754 2003-04-05  Jim Meyering  <jim@meyering.net>
17755
17756         Merge changes from Coreutils.
17757
17758         * lib/exclude.h (PARAMS): Remove definition and uses.
17759         * lib/exclude.c: Remove uses of `PARAMS'.
17760
17761         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
17762         Add test-cases for DOS filenames. Declare program_name.
17763         (main): Set up program_name.  Patch by Rich Dawe.
17764
17765         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
17766         error from mntctl.
17767         Use mntctl's return value to drive the entry-processing loop, since
17768         we can't rely on the value of the vmt_length member in the last
17769         entry.  On some systems doing so could result in exhausting
17770         virtual memory.  Based in part on a patch from Mike Jetzer.
17771
17772 2003-04-04  Bruno Haible  <bruno@clisp.org>
17773
17774         * modules/linebreak: New file.
17775         * MODULES.html.sh (func_all_modules): Add it.
17776
17777 2003-04-04  Bruno Haible  <bruno@clisp.org>
17778
17779         * m4/linebreak.m4: New file.
17780
17781 2003-04-04  Bruno Haible  <bruno@clisp.org>
17782
17783         * lib/linebreak.h: New file, from GNU gettext.
17784         * lib/linebreak.c: New file, from GNU gettext with slight
17785         modifications.
17786         * lib/lbrkprop.h: New file, from GNU gettext.
17787
17788 2003-04-03  Bruno Haible  <bruno@clisp.org>
17789
17790         * modules/utf8-ucs4: New file.
17791         * modules/utf16-ucs4: New file.
17792         * modules/ucs4-utf8: New file.
17793         * modules/ucs4-utf16: New file.
17794         * MODULES.html.sh (func_all_modules): Add them.
17795
17796 2003-04-03  Bruno Haible  <bruno@clisp.org>
17797
17798         * m4/utf-ucs4.m4: New file.
17799         * m4/ucs4-utf.m4: New file.
17800
17801 2003-04-03  Bruno Haible  <bruno@clisp.org>
17802
17803         * lib/utf8-ucs4.h: New file, from GNU gettext.
17804         * lib/utf16-ucs4.h: New file, from GNU gettext.
17805         * lib/ucs4-utf8.h: New file, from GNU gettext.
17806         * lib/ucs4-utf16.h: New file, from GNU gettext.
17807
17808 2003-04-02  Bruno Haible  <bruno@clisp.org>
17809
17810         * modules/binary-io: New file.
17811         * MODULES.html.sh (func_all_modules): Add it.
17812
17813 2003-04-02  Bruno Haible  <bruno@clisp.org>
17814
17815         * lib/binary-io.h: New file, from GNU gettext.
17816
17817 2003-04-01  Bruno Haible  <bruno@clisp.org>
17818
17819         * modules/pathname: New file.
17820         * MODULES.html.sh (func_all_modules): Add it.
17821
17822 2003-04-01  Bruno Haible  <bruno@clisp.org>
17823
17824         * lib/pathname.h: New file, from GNU gettext.
17825         * lib/concatpath.c: New file, from GNU gettext.
17826
17827 2003-03-30  Bruno Haible  <bruno@clisp.org>
17828
17829         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
17830
17831 2003-03-30  Bruno Haible  <bruno@clisp.org>
17832
17833         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
17834         function chown() doesn't exist.
17835
17836 2003-03-28  Bruno Haible  <bruno@clisp.org>
17837
17838         * modules/copy-file: New file.
17839         * MODULES.html.sh (func_all_modules): Add it.
17840
17841 2003-03-28  Bruno Haible  <bruno@clisp.org>
17842
17843         * m4/copy-file.m4: New file.
17844
17845 2003-03-28  Bruno Haible  <bruno@clisp.org>
17846
17847         * lib/copy-file.h: New file, from GNU gettext.
17848         * lib/copy-file.c: New file, from GNU gettext.
17849
17850 2003-03-18  Jim Meyering  <jim@meyering.net>
17851
17852         * lib/quote.c (quote_n): Fix typo in comment.
17853
17854 2003-03-18  Bruno Haible  <bruno@clisp.org>
17855
17856         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
17857         checking.
17858         * m4/onceonly_2_57.m4: Likewise.
17859
17860 2003-03-17  Bruno Haible  <bruno@clisp.org>
17861
17862         * m4/onceonly.m4: Require autoconf 2.54 or newer.
17863         (m4_quote): Remove macro.
17864         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
17865
17866 2003-03-14  Jim Meyering  <jim@meyering.net>
17867
17868         Merge changes from Coreutils.
17869         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
17870         to be const, in order to avoid warnings.
17871         (obstack_room): Likewise.
17872         (obstack_empty_p): Likewise.
17873
17874 2003-03-14  Bruno Haible  <bruno@clisp.org>
17875
17876         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
17877         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
17878
17879 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17880
17881         Merge changes from Bison.
17882         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
17883         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
17884         when compiling Bison 1.875's `bitset bset = obstack_alloc
17885         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
17886         * lib/hash.c: Include <stdbool.h> unconditionally.
17887
17888 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17889
17890         * m4/onceonly.m4 (m4_quote): New macro.
17891         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
17892         Quote AC_FOREACH variable-expansions properly.
17893
17894 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17895
17896         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
17897
17898 2003-03-09  Paul Eggert  <eggert@twinsun.com>
17899
17900         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
17901         Reported by Bruce Becker; see:
17902         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
17903
17904 2003-03-03  Paul Eggert  <eggert@twinsun.com>
17905             Bruno Haible  <bruno@clisp.org>
17906
17907         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
17908         Reported by John Hughes, see
17909         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
17910
17911 2003-02-20  Bruno Haible  <bruno@clisp.org>
17912
17913         * MODULES.html.sh (func_all_modules): Add poll.
17914
17915 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17916
17917         * modules/poll: New file.
17918
17919 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17920
17921         * lib/poll_.h: New file.
17922         * lib/poll.c: New file.
17923
17924 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17925
17926         * m4/poll.m4: New file.
17927
17928 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17929
17930         * modules/mathl: New file.
17931
17932 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17933
17934         * lib/mathl.h: New file.
17935         * lib/acosl.c: New file.
17936         * lib/asinl.c: New file.
17937         * lib/atanl.c: New file.
17938         * lib/ceill.c: New file.
17939         * lib/cosl.c: New file.
17940         * lib/expl.c: New file.
17941         * lib/floorl.c: New file.
17942         * lib/frexpl.c: New file.
17943         * lib/ldexpl.c: New file.
17944         * lib/logl.c: New file.
17945         * lib/sincosl.c: New file.
17946         * lib/sinl.c: New file.
17947         * lib/sqrtl.c: New file.
17948         * lib/tanl.c: New file.
17949         * lib/trigl.c: New file.
17950         * lib/trigl.h: New file.
17951
17952 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17953
17954         * m4/mathl.m4: New file.
17955
17956 2003-02-18  Bruno Haible  <bruno@clisp.org>
17957
17958         * MODULES.html.sh (func_all_modules): Add mathl.
17959
17960 2003-02-17  Bruno Haible  <bruno@clisp.org>
17961
17962         * modules/mkdtemp: New module.
17963         * MODULES.html.sh (func_all_modules): Add it.
17964
17965 2003-02-17  Bruno Haible  <bruno@clisp.org>
17966
17967         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
17968
17969 2003-02-17  Bruno Haible  <bruno@clisp.org>
17970
17971         * lib/mkdtemp.h: New file, from GNU gettext.
17972         * lib/mkdtemp.c: New file, from GNU gettext.
17973
17974 2003-02-02  Jim Meyering  <jim@meyering.net>
17975
17976         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
17977         e.g. glibc-2.2.93.
17978
17979 2003-01-31  Bruno Haible  <bruno@clisp.org>
17980
17981         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
17982         'rpl_rename'.
17983         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
17984         'rpl_strnlen'.
17985         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
17986         'rpl_strtod'.
17987         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
17988         'rpl_utime'.
17989
17990 2003-01-31  Bruno Haible  <bruno@clisp.org>
17991
17992         * lib/rename.c: #undef rename before defining rpl_rename.
17993         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
17994
17995 2003-01-30  Bruno Haible  <bruno@clisp.org>
17996
17997         * modules/vasnprintf, modules/vasprintf: New modules.
17998         * MODULES.html.sh (func_all_modules): Add them.
17999
18000 2003-01-30  Bruno Haible  <bruno@clisp.org>
18001
18002         * m4/signed.m4: New file, from GNU gettext.
18003         * m4/longdouble.m4: New file, from GNU gettext.
18004         * m4/wchar_t.m4: New file, from GNU gettext.
18005         * m4/wint_t.m4: New file, from GNU gettext.
18006         * m4/vasnprintf.m4: New file.
18007         * m4/vasprintf.m4: New file.
18008
18009 2003-01-30  Bruno Haible  <bruno@clisp.org>
18010
18011         * lib/printf-args.h: New file, from GNU gettext.
18012         * lib/printf-args.c: New file, from GNU gettext.
18013         * lib/printf-parse.h: New file, from GNU gettext.
18014         * lib/printf-parse.c: New file, from GNU gettext.
18015         * lib/vasnprintf.h: New file, from GNU gettext.
18016         * lib/vasnprintf.c: New file, from GNU gettext.
18017         * lib/asnprintf.c: New file, from GNU gettext.
18018         * lib/vasprintf.h: New file, from GNU gettext with modifications.
18019         * lib/vasprintf.c: New file, from GNU gettext.
18020         * lib/asprintf.c: New file, from GNU gettext.
18021
18022 2003-01-29  Bruno Haible  <bruno@clisp.org>
18023
18024         * modules/stpncpy: New module.
18025         * MODULES.html.sh (func_all_modules): Add it.
18026
18027 2003-01-29  Bruno Haible  <bruno@clisp.org>
18028
18029         * m4/stpncpy.m4: New file.
18030
18031 2003-01-29  Bruno Haible  <bruno@clisp.org>
18032
18033         * lib/stpncpy.h: New file, from GNU gettext with modifications.
18034         * lib/stpncpy.c: New file, from GNU gettext with modifications.
18035
18036 2003-01-28  Bruno Haible  <bruno@clisp.org>
18037
18038         * modules/c-ctype: New module.
18039         * MODULES.html.sh (func_all_modules): Add it.
18040
18041 2003-01-28  Bruno Haible  <bruno@clisp.org>
18042
18043         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
18044         Paul Eggert.
18045         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
18046         Paul Eggert.
18047
18048 2003-01-27  Bruno Haible  <bruno@clisp.org>
18049
18050         * modules/xsetenv: New module.
18051         * MODULES.html.sh (func_all_modules): Add it.
18052
18053 2003-01-27  Bruno Haible  <bruno@clisp.org>
18054
18055         * lib/xsetenv.h: New file, from GNU gettext.
18056         * lib/xsetenv.c: New file, from GNU gettext.
18057
18058 2003-01-23  Jim Meyering  <jim@meyering.net>
18059
18060         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
18061         from working on systems without dirfd (at least Irix and OSF1/Tru64).
18062
18063 2003-01-23  Bruno Haible  <bruno@clisp.org>
18064
18065         * modules/minmax: New module.
18066         * MODULES.html.sh (func_all_modules): Add it.
18067
18068 2003-01-23  Bruno Haible  <bruno@clisp.org>
18069
18070         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
18071         Eggert.
18072
18073 2003-01-22  Bruno Haible  <bruno@clisp.org>
18074
18075         * modules/exit: New module.
18076         * MODULES.html.sh (func_all_modules): Add it.
18077
18078 2003-01-22  Bruno Haible  <bruno@clisp.org>
18079
18080         * lib/exit.h: New file, from GNU gettext.
18081
18082 2003-01-19  Bruno Haible  <bruno@clisp.org>
18083
18084         * gnulib-tool: Recognize option --extract-maintainer.
18085         (func_get_maintainer): New function.
18086         * modules/*: Add Maintainer entry.
18087
18088 2003-01-16  Jim Meyering  <jim@meyering.net>
18089
18090         * m4/regex.m4: The `regex' struct is both input and output.
18091         Initialize it before each use.  Patch by Tim Waugh.
18092
18093 2003-01-16  Bruno Haible  <bruno@clisp.org>
18094
18095         * MODULES.html.sh: Add a table of contents. Add the module name as
18096         leftmost column. Add hyperlinks.
18097
18098 2003-01-15  Bruno Haible  <bruno@clisp.org>
18099
18100         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
18101
18102 2003-01-15  Bruno Haible  <bruno@clisp.org>
18103
18104         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
18105         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
18106         suffix.
18107
18108 2003-01-15  Bruno Haible  <bruno@clisp.org>
18109
18110         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
18111
18112 2003-01-15  Bruno Haible  <bruno@clisp.org>
18113
18114         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
18115         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
18116
18117 2003-01-14  Jim Meyering  <jim@meyering.net>
18118
18119         * lib/same.c (same_name): Tweak a comment.
18120
18121 2003-01-14  Bruno Haible  <bruno@clisp.org>
18122
18123         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
18124         when a string comparison is sufficient.
18125
18126 2003-01-14  Bruno Haible  <bruno@clisp.org>
18127
18128         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
18129         'unsigned int'.
18130
18131 2003-01-14  Bruno Haible  <bruno@clisp.org>
18132
18133         * lib/hash-pjw.c: Add comment about low quality of this function.
18134
18135 2003-01-13  Bruno Haible  <bruno@clisp.org>
18136
18137         * modules/stpcpy: Distribute lib/stpcpy.h.
18138         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
18139
18140 2003-01-13  Bruno Haible  <bruno@clisp.org>
18141
18142         * modules/*: Add a description.
18143         * modules/strpbrk: Fix Makefile.am snippet.
18144         * modules/strtoimax: Fix dependencies.
18145         * modules/strtoumax: Likewise.
18146
18147 2003-01-13  Bruno Haible  <bruno@clisp.org>
18148
18149         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
18150         * modules/alloca (Makefile.am): All object files depend on alloca.h.
18151         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
18152
18153 2003-01-13  Bruno Haible  <bruno@clisp.org>
18154
18155         * gnulib-tool (func_create_testdir): Store config/* files in the main
18156         directory.
18157         * config.rpath: Move to ...
18158         * config/config.rpath: ... here.
18159         * modules/gettext: Contains config/config.rpath, not config.rpath.
18160         * modules/iconv: Likewise.
18161
18162 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18163
18164         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18165         to avoid collisions with libcurses and libreadline.
18166
18167         * m4/getstr.m4: Remove.
18168         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
18169
18170 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18171
18172         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18173         to avoid collisions with libcurses and libreadline.
18174
18175         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
18176         * lib/getstr.h, getstr.c: Remove.
18177         * lib/getline.c: Include "getline.h", to check interface.
18178         Move body of old getstr.c here: this defines MIN_CHUNK and
18179         declares getdelim2, which is renamed from getstr.
18180         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
18181
18182         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
18183         All uses changed.
18184         * lib/linebuffer.h: Likewise.
18185         (readline): Remove backward-compatibility macro.
18186
18187 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18188
18189         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18190         to avoid collisions with libcurses and libreadline.
18191         * getstr: Remove.
18192         * MODULES.html.sh: Remove getstr.
18193         * modules/getline: Depend on unlocked-io, not getstr.
18194
18195 2003-01-12  Jim Meyering  <jim@meyering.net>
18196
18197         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
18198
18199 2003-01-10  Bruno Haible  <bruno@clisp.org>
18200
18201         * modules/alloca: Change Makefile.am requirements. Simplify Include
18202         requirements. Add lib/alloca_.h to file list.
18203
18204 2003-01-10  Bruno Haible  <bruno@clisp.org>
18205
18206         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
18207
18208 2003-01-10  Bruno Haible  <bruno@clisp.org>
18209
18210         * lib/alloca_.h: New file.
18211         * lib/getdate.y: Unconditionally include alloca.h.
18212         * lib/makepath.c: Likewise.
18213         * lib/setenv.c: Likewise.
18214         * lib/userspec.c: Likewise.
18215
18216 2003-01-09  Karl Berry  <karl@gnu.org>
18217
18218         * MODULES.html.sh: include `dirname $0` in PATH, to find
18219         gnulib-tool.
18220
18221 2003-01-09  Bruno Haible  <bruno@clisp.org>
18222
18223         * modules/stdbool: Change configure.ac, Makefile.am requirements.
18224         Simplify Include requirements. Add lib/stdbool.h.in to file list.
18225
18226 2003-01-09  Bruno Haible  <bruno@clisp.org>
18227
18228         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
18229
18230 2003-01-09  Bruno Haible  <bruno@clisp.org>
18231
18232         * lib/stdbool.h.in: New file.
18233
18234 2003-01-09  Bruno Haible  <bruno@clisp.org>
18235
18236         * gnulib-tool (func_all_modules): Ignore files ending in ~.
18237         * MODULES.html.sh: Likewise.
18238
18239 2003-01-08  Jim Meyering  <jim@meyering.net>
18240
18241         * lib/full-write.c: Undefine and define-away `const' after inclusion
18242         of errno.h, not before.  Suggestion from Bruno Haible.
18243
18244 2003-01-08  Bruno Haible  <bruno@clisp.org>
18245
18246         * modules/full-read: Depend on full-write.
18247
18248 2003-01-08  Bruno Haible  <bruno@clisp.org>
18249
18250         * lib/safe-read.c: Include specification header first, to ensure its
18251         selfcontainedness.
18252         * lib/full-write.c: Likewise.
18253
18254 2003-01-07  Jim Meyering  <jim@meyering.net>
18255
18256         * lib/full-write.c: Rework so that it may serve to define full_read,
18257         too.
18258         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
18259
18260 2003-01-07  Bruno Haible  <bruno@clisp.org>
18261
18262         * lib/strtoimax.c: Include <stdint.h> as an alternative to
18263         <inttypes.h>.
18264         * lib/xstrtol.h: Likewise.
18265         * lib/xstrtoimax.c: Likewise.
18266         * lib/xstrtoumax.c: Likewise.
18267         * lib/human.h: Likewise.
18268
18269         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
18270         on systems that have <inttypes.h> but not <stdint.h>.
18271
18272 2003-01-07  Bruno Haible  <bruno@clisp.org>
18273
18274         * MODULES.html.sh: Add copyright notice.
18275         (missed_files): Omit CVS directory entries.
18276         (func_module): Make it work with sed-3.02.
18277         * MODULES.txt: Remove file.
18278
18279 2003-01-06  Jim Meyering  <jim@meyering.net>
18280
18281         * lib/version-etc.c: Update year in translatable copyright string.
18282
18283 2003-01-03  Karl Berry  <karl@gnu.org>
18284
18285         * config/config.{guess,sub}: update from prep.
18286
18287 2003-01-02  Karl Berry  <karl@gnu.org>
18288
18289         * doc/COPYING.DOC: belatedly updated to 1.2.
18290
18291 2003-01-01  Karl Berry  <karl@gnu.org>
18292
18293         * gnulib-tool (func_verify_module): report module name $module in
18294         error message, not $1.
18295         * gnulib-tool (create-testdir): don't complain if destdir couldn't
18296         be created, only if it doesn't exist.
18297         * gnulib-tool (last_checkin_date): don't expand the $Date here.
18298
18299 2002-12-31  Paul Eggert  <eggert@twinsun.com>
18300
18301         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
18302
18303 2002-12-31  Paul Eggert  <eggert@twinsun.com>
18304
18305         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
18306         memcmp if strcoll doesn't work.
18307
18308 2002-12-31  Bruno Haible  <bruno@clisp.org>
18309
18310         * lib/utime.c (utime_null): No need to call ftruncate if the file was
18311         nonempty.
18312
18313 2002-12-31  Bruno Haible  <bruno@clisp.org>
18314
18315         * lib/memcoll.c (STRCOLL): New macro.
18316         (memcoll): Use it.
18317
18318 2002-12-31  Bruno Haible  <bruno@clisp.org>
18319
18320         * lib/localcharset.h: New file.
18321         * lib/localcharset.c: Include it.
18322         * lib/unicodeio.c: Likewise.
18323
18324 2002-12-31  Bruno Haible  <bruno@clisp.org>
18325
18326         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
18327         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
18328
18329 2002-12-31  Bruno Haible  <bruno@clisp.org>
18330
18331         * lib/getline.h: Include <stddef.h>, for size_t.
18332
18333         * lib/unicodeio.h: Include <stddef.h>, for size_t.
18334         * lib/unicodeio.c: Don't include <stddef.h>.
18335
18336 2002-12-31  Bruno Haible  <bruno@clisp.org>
18337
18338         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
18339         HAVE_TM_ZONE.
18340
18341 2002-12-24  Karl Berry  <karl@gnu.org>
18342
18343         * config/config.guess: update from prep.
18344
18345 2002-12-24  Bruno Haible  <bruno@clisp.org>
18346
18347         General infrasructure.
18348         * m4/README: Rewritten.
18349         * m4/onceonly.m4: New file.
18350         * m4/onceonly_2_57.m4: New file.
18351
18352         Module atexit.
18353         * m4/atexit.m4: New file.
18354
18355         Module strtod.
18356         * m4/strtod.m4: New file.
18357
18358         Module strtol.
18359         * m4/strtol.m4: New file.
18360
18361         Module strtoul.
18362         * m4/strtoul.m4: New file.
18363
18364         Module memchr.
18365         * m4/memchr.m4: New file.
18366
18367         Module memcmp.
18368         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
18369         (jm_FUNC_MEMCMP): Invoke it.
18370
18371         Module memcpy.
18372         * m4/memcpy.m4: New file.
18373
18374         Module memmove.
18375         * m4/memmove.m4: New file.
18376
18377         Module memset.
18378         * m4/memset.m4: New file.
18379
18380         Module strcspn.
18381         * m4/strcspn.m4: New file.
18382
18383         Module strpbrk.
18384         * m4/strpbrk.m4: New file.
18385
18386         Module strstr.
18387         * m4/strstr.m4: New file.
18388
18389         Module strerror.
18390         * m4/strerror.m4: New file.
18391
18392         Module mktime.
18393         * m4/mktime.m4: Renamed from jm-mktime.m4.
18394         (gl_PREREQ_MKTIME): New macro.
18395         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
18396
18397         Module malloc.
18398         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
18399         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
18400         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
18401
18402         Module realloc.
18403         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
18404         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
18405         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
18406
18407         Module strftime.
18408         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
18409         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
18410         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
18411         gl_TM_GMTOFF.
18412         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
18413
18414         Module xalloc.
18415         * m4/xalloc.m4: New file.
18416
18417         Module alloca.
18418         * m4/alloca.m4: New file.
18419
18420         Module putenv.
18421         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
18422         (jm_FUNC_PUTENV): Invoke it.
18423
18424         Module setenv.
18425         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
18426         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
18427         when invoked twice.
18428         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
18429         gt_FUNC_SETENV.
18430
18431         Module memrchr.
18432         * m4/memrchr.m4: New file.
18433
18434         Module stpcpy.
18435         * m4/stpcpy.m4: New file.
18436
18437         Module strcase.
18438         * m4/strcase.m4: New file.
18439
18440         Module strdup.
18441         * m4/strdup.m4: New file.
18442
18443         Module strnlen.
18444         * m4/strnlen.m4: New file.
18445
18446         Module strndup.
18447         * m4/strndup.m4: New file.
18448
18449         Module xstrtod.
18450         * m4/xstrtod.m4: New file.
18451
18452         Module xstrtol.
18453         * m4/xstrtol.m4: New file.
18454
18455         Module getdate.
18456         * m4/getdate.m4: New file.
18457
18458         Module unlocked-io.
18459         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
18460         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
18461         * m4/jm-glibc-io.m4n: Remove file.
18462
18463         Module long-options.
18464         * m4/long-options.m4: New file.
18465
18466         Module md5.
18467         * m4/md5.m4: New file.
18468
18469         Module sha.
18470         * m4/sha.m4: New file.
18471
18472         Module getstr.
18473         * m4/getstr.m4: New file.
18474
18475         Module getline.
18476         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
18477         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
18478         <sys/types.h>, for size_t. Use the function name gnu_getline, not
18479         simply getline. Infoke gl_PREREQ_GETLINE.
18480
18481         Module obstack.
18482         * m4/obstack.m4: New file.
18483
18484         Module hash.
18485         * m4/hash.m4: New file.
18486
18487         Module readtokens.
18488         * m4/readtokens.m4: New file.
18489
18490         Module strverscmp.
18491         * m4/strverscmp.m4: New file.
18492
18493         Module stdbool.
18494         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
18495         OSF/1.
18496
18497         Module strtoll.
18498         * m4/strtoll.m4: New file.
18499
18500         Module strtoull.
18501         * m4/strtoull.m4: New file.
18502
18503         Module strtoimax.
18504         * m4/strtoimax.m4: New file.
18505
18506         Module strtoumax.
18507         * m4/strtoumax.m4: New file.
18508
18509         Module xstrtoimax.
18510         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
18511         jm_AC_PREREQ_XSTRTOIMAX.
18512         Moved the strtol prerequisites to strtol.m4.
18513         Moved the strtoll prerequisites to strtoll.m4.
18514         Moved the strtoimax prerequisites to strtoimax.m4.
18515
18516         Module xstrtoumax.
18517         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
18518         jm_AC_PREREQ_XSTRTOUMAX.
18519         Moved the strtoul prerequisites to strtoul.m4.
18520         Moved the strtoull prerequisites to strtoull.m4.
18521         Moved the strtoumax prerequisites to strtoumax.m4.
18522
18523         Module chown.
18524         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
18525         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
18526
18527         Module dup2.
18528         * m4/dup2.m4: New file.
18529
18530         Module ftruncate.
18531         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
18532         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
18533
18534         Module getgroups.
18535         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
18536         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
18537
18538         Module gettimeofday.
18539         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
18540         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
18541         gl_PREREQ_GETTIMEOFDAY.
18542
18543         Module mkdir.
18544         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
18545         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
18546
18547         Module mkstemp.
18548         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
18549         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
18550         jm_AC_TYPE_UINTMAX_T.
18551         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
18552
18553         Module stat.
18554         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
18555         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
18556
18557         Module lstat.
18558         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
18559         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
18560
18561         Module timespec.
18562         * m4/timespec.m4 (gl_TIMESPEC): New macro.
18563         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
18564         * m4/st_mtim.m4: Indentation.
18565
18566         Module nanosleep.
18567         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
18568         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
18569         gl_PREREQ_NANOSLEEP.
18570
18571         Module regex.
18572         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
18573         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
18574         (gl_REGEX): New macro.
18575
18576         Module rename.
18577         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
18578         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
18579
18580         Module rmdir.
18581         * m4/rmdir.m4: New file.
18582
18583         Module utime.
18584         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
18585         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
18586         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
18587
18588         Module dirname.
18589         * m4/dirname.m4: New file.
18590
18591         Module getopt.
18592         * m4/getopt.m4: New file.
18593
18594         Module unistd-safer.
18595         * m4/unistd-safer.m4: New file.
18596
18597         Module fnmatch.
18598         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
18599         declaration.
18600         (gl_PREREQ_FNMATCH_EXTRA): New macro.
18601         (gl_FUNC_FNMATCH_POSIX): New macro.
18602         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
18603         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
18604         simply fnmatch.
18605
18606         Module exclude.
18607         * m4/exclude.m4: New file.
18608
18609         Module human.
18610         * m4/human.m4: New file.
18611
18612         Module acl.
18613         * m4/acl.m4: Nop.
18614
18615         Module backupfile.
18616         * m4/backupfile.m4: New file.
18617         * m4/d-ino.m4: Indentation.
18618
18619         Module fsusage.
18620         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
18621         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
18622         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
18623
18624         Module dirfd.
18625         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
18626         requirements.
18627
18628         Module euidaccess.
18629         * m4/euidaccess.m4: New file.
18630
18631         Module file-type.
18632         * m4/file-type.m4: New file.
18633
18634         Module fileblocks.
18635         * m4/fileblocks.m4: New file.
18636
18637         Module filemode.
18638         * m4/filemode.m4: New file.
18639
18640         Module isdir.
18641         * m4/isdir.m4: New file.
18642
18643         Module lchown.
18644         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
18645         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
18646
18647         Module makepath.
18648         * m4/makepath.m4: New file.
18649
18650         Module modechange.
18651         * m4/modechange.m4: New file.
18652
18653         Module mountlist.
18654         * m4/mountlist.m4: New file.
18655         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
18656         Indentation.
18657
18658         Module path-concat.
18659         * m4/path-concat.m4: New file.
18660
18661         Module pathmax.
18662         * m4/pathmax.m4: New file.
18663
18664         Module same.
18665         * m4/same.m4: New file.
18666
18667         Module save-cwd.
18668         * m4/save-cwd.m4: New file.
18669
18670         Module savedir.
18671         * m4/savedir.m4: New file.
18672
18673         Module xgetcwd.
18674         * m4/xgetcwd.m4: New file.
18675         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
18676
18677         Module xreadlink.
18678         * m4/xreadlink.m4: New file.
18679
18680         Module safe-read.
18681         * m4/safe-read.m4: New file.
18682
18683         Module safe-write.
18684         * m4/safe-write.m4: New file.
18685
18686         Module closeout.
18687         * m4/closeout.m4: New file.
18688
18689         Module stdio-safer.
18690         * m4/stdio-safer.m4: New file.
18691
18692         Module getpass.
18693         * m4/getpass.m4: New file.
18694
18695         Module getugroups.
18696         * m4/getugroups.m4: New file.
18697
18698         Module group-member.
18699         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
18700         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
18701
18702         Module idcache.
18703         * m4/idcache.m4: New file.
18704
18705         Module userspec.
18706         * m4/userspec.m4: New file.
18707
18708         Module gettime.
18709         * m4/clock_time.m4: New file.
18710         * m4/gettime.m4: New file.
18711
18712         Module settime.
18713         * m4/settime.m4: New file.
18714
18715         Module posixtm.
18716         * m4/posixtm.m4: New file.
18717
18718         Module gethostname.
18719         * m4/gethostname.m4: New file.
18720
18721         Module canon-host.
18722         * m4/canon-host.m4: New file.
18723
18724         Module gettext.
18725         * m4/codeset.m4: New file, from gettext-0.11.5.
18726         * m4/gettext.m4: New file, from gettext-0.11.5.
18727         * m4/glibc21.m4: New file, from gettext-0.11.5.
18728         * m4/iconv.m4: New file, from gettext-0.11.5.
18729         * m4/intdiv0.m4: New file, from gettext-0.11.5.
18730         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
18731         * m4/inttypes.m4: New file, from gettext-0.11.5.
18732         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
18733         * m4/isc-posix.m4: New file, from gettext-0.11.5.
18734         * m4/lcmessage.m4: New file, from gettext-0.11.5.
18735         * m4/lib-ld.m4: New file, from gettext-0.11.5.
18736         * m4/lib-link.m4: New file, from gettext-0.11.5.
18737         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
18738         * m4/progtest.m4: New file, from gettext-0.11.5.
18739         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
18740         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
18741         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
18742
18743         Module localcharset.
18744         * m4/localcharset.m4: New file.
18745
18746         Module hard-locale.
18747         * m4/hard-locale.m4: New file.
18748
18749         Module mbswidth.
18750         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
18751         onceonly macros.
18752         * m4/mbrtowc.m4: Add comment.
18753
18754         Module memcasecmp.
18755         * m4/memcasecmp.m4: New file.
18756
18757         Module memcoll.
18758         * m4/memcoll.m4: New file.
18759
18760         Module unicodeio.
18761         * m4/unicodeio.m4: New file.
18762
18763         Module rpmatch.
18764         * m4/rpmatch.m4: New file.
18765
18766         Module yesno.
18767         * m4/yesno.m4: New file.
18768
18769         Module exitfail.
18770         * m4/exitfail.m4: New file.
18771
18772         Module c-stack.
18773         * m4/c-stack.m4 (gl_C_STACK): New macro.
18774         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
18775
18776         Module error.
18777         * m4/error.m4 (gl_ERROR): New macro.
18778         (jm_PREREQ_ERROR): Use onceonly macros.
18779
18780         Module fatal.
18781         * m4/fatal.m4: New file.
18782
18783         Module getloadavg.
18784         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
18785         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
18786
18787         Module getpagesize.
18788         * m4/getpagesize.m4: New file.
18789
18790         Module getusershell.
18791         * m4/getusershell.m4: New file.
18792
18793         Module physmem.
18794         * m4/physmem.m4: New file.
18795
18796         Module posixver.
18797         * m4/posixver.m4: New file.
18798
18799         Module quotearg.
18800         * m4/quotearg.m4: New file.
18801
18802         Module quote.
18803         * m4/quote.m4: New file.
18804
18805         Module readutmp.
18806         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
18807
18808         Module sig2str.
18809         * m4/sig2str.m4: New file.
18810
18811         Other.
18812         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
18813         ulonglong.m4.
18814         * m4/intmax_t.m4: New file.
18815         * m4/d-type.m4: Indentation.
18816         * m4/jm-macros.m4: Update.
18817         * m4/prereq.m4 (jm_PREREQ): Update.
18818         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
18819         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
18820         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
18821         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
18822         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
18823         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
18824         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
18825         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
18826         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
18827         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
18828         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
18829         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
18830         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
18831         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
18832         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
18833         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
18834         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
18835         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
18836         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
18837
18838 2002-12-24  Bruno Haible  <bruno@clisp.org>
18839
18840         * MODULES.txt: Update according to m4/ changes.
18841
18842         Module gettext.
18843         * config.rpath: New file, from gettext-0.11.5.
18844
18845         * modules/*: New module descriptions.
18846         * gnulib-tool: New file.
18847         * MODULES.html.sh: New file.
18848
18849 2002-12-21  Karl Berry  <karl@gnu.org>
18850
18851         * doc/fdl.texi: update to version 1.2.
18852
18853 2002-12-19  Karl Berry  <karl@gnu.org>
18854
18855         * config/config.guess: update from prep.
18856
18857 2002-12-18  Bruno Haible  <bruno@clisp.org>
18858
18859         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
18860         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
18861
18862 2002-12-17  Bruno Haible  <bruno@clisp.org>
18863
18864         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
18865         stdlib.h, string.h.
18866
18867 2002-12-17  Bruno Haible  <bruno@clisp.org>
18868
18869         * lib/canon-host.c (strdup): Remove unused declaration.
18870
18871         * lib/fsusage.c: Include full_read.h.
18872         (get_fs_usage): Use full_read instead of safe_read.
18873
18874         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
18875
18876 2002-12-12  Karl Berry  <karl@gnu.org>
18877
18878         * config/config.guess: update from prep.
18879
18880 2002-12-11  Bruno Haible  <bruno@clisp.org>
18881
18882         * m4/setenv.m4: New file, from gettext-0.11.5.
18883
18884 2002-12-11  Bruno Haible  <bruno@clisp.org>
18885
18886         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
18887         not unsetenv().
18888         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
18889         modifications:
18890
18891         2002-12-11  Bruno Haible  <bruno@clisp.org>
18892
18893                 * setenv.c (alloca): Fall back to malloc.
18894                 (freea): New macro.
18895                 (setenv): Use freea() to free memory allocated with alloca().
18896
18897         2002-11-13  Bruno Haible  <bruno@clisp.org>
18898
18899                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
18900                 function declarations.
18901                 * unsetenv.c (unsetenv): Likewise.
18902
18903         2002-03-04  Bruno Haible  <bruno@clisp.org>
18904
18905                 Portability to AIX 4.3.3.
18906                 * unsetenv.c: New file, extracted from setenv.c.
18907                 * setenv.c: Move the unsetenv() function to unsetenv.c.
18908
18909         2001-12-20  Bruno Haible  <bruno@clisp.org>
18910
18911                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
18912                 use malloc instead. For SunOS 4.
18913
18914         2001-12-11  Bruno Haible  <bruno@clisp.org>
18915
18916                 * setenv.c: Declare alloca.
18917                 (compar_fn_t): New typedef.
18918                 (KNOWN_VALUE, STORE_VALUE): Use it.
18919
18920         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
18921         setenv.h.
18922
18923 2002-12-10  Paul Eggert  <eggert@twinsun.com>
18924
18925         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
18926         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
18927         Choose values that are less likely to collide with system fnmatch
18928         options.
18929         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
18930         defined (e.g., a pure POSIX system).
18931         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
18932         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
18933
18934 2002-12-06  Paul Eggert  <eggert@twinsun.com>
18935
18936         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
18937         a pain in practice to deal with generated m4 files.  This change
18938         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
18939
18940         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
18941         and jm-glibc-io.m4, as they are no longer a special case.
18942         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
18943         kludge and the auto-generation stuff.  Check only whether the
18944         functions are declared, not whether they exist, since older hosts
18945         that don't declare the functions can't use the optimization anyway.
18946
18947 2002-12-06  Jim Meyering  <jim@meyering.net>
18948
18949         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
18950
18951         Merge in changes from libc's misc/error.c, in preparation
18952         for the merge of gnulib's changes back into libc.
18953
18954         * lib/error.c (_): Define only if not already defined.
18955         Move definition to follow all #include directives.
18956         Include unlocked-io.h only if !_LIBC.
18957         [_LIBC]: Include <libio/libioP.h>.
18958         [USE_IN_LIBIO]: Include <libio/iolibio.h>
18959         (fflush): Tweak definition to use INTUSE.
18960         (putc): Define.
18961
18962 2002-12-05  Paul Eggert  <eggert@twinsun.com>
18963
18964         * lib/alloca.c [defined emacs]: Include "lisp.h".
18965         (xalloc_die) [defined emacs]: New macro.
18966         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
18967         [! defined emacs]: Include <xalloc.h>.
18968         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
18969         (pointer): Typedef to POINTER_TYPE *.
18970         (malloc): Remove decl; we now always use xmalloc.
18971         (alloca): Use old-style definition, since Emacs needs this.
18972         Check for arithmetic overflow when computing combined size.
18973
18974 2002-12-04  Paul Eggert  <eggert@twinsun.com>
18975
18976         Do not generate unlocked-io.h automatically, since it's easier to
18977         maintain it by hand.
18978
18979         * lib/unlocked-io.h: New file, from GNU diffutils,
18980         but with proper copyright notice and attribution.
18981         * lib/gen-uio: Remove.
18982         * lib/Makefile.am: Add copyright notice.
18983         (libfetish_a_SOURCES): Add unlocked-io.h.
18984         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
18985         (DISTCLEANFILES, io_functions): Remove macros.
18986         (EXTRA_DIST): Remove gen_uio.
18987         (unlocked-io.h): Remove rule.
18988
18989 2002-12-04  Jim Meyering  <jim@meyering.net>
18990
18991         Reflect the fact that stat.c and lstat.c are no longer generated.
18992         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
18993         (DISTCLEANFILES): Likewise.
18994         (EXTRA_DIST): Likewise.
18995         (all_local): Don't depend on stat.c or lstat.c.
18996         (stat.c, lstat.c): Remove rules.
18997         (EXTRA_DIST): Remove xstat.in.
18998
18999         * lib/xstat.in: Remove file.  Contents moved into stat.c.
19000         * lib/stat.c: New file.  Contents mostly from xstat.in.
19001         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
19002         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
19003
19004         * lib/safe-read.c: Rework so that it may serve to define safe_write,
19005         too.
19006         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
19007
19008 2002-12-03  Jim Meyering  <jim@meyering.net>
19009
19010         * lib/safe-read.c, safe-write.c: Change variable names and comments,
19011         but not semantics, to minimize the differences between these two files.
19012         (safe_read): Change comment to mention SAFE_READ_ERROR.
19013
19014         * lib/safe-read.c (IS_EINTR): Define.
19015         (safe_read): Use IS_EINTR in place of in-function cpp directives.
19016
19017 2002-12-02  Jim Meyering  <jim@meyering.net>
19018
19019         * lib/safe-read.c (EINTR): Define.
19020         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
19021         (INT_MAX): Provide fallback.
19022         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
19023
19024         * lib/safe-read.h (SAFE_READ_ERROR): Define.
19025
19026 2002-12-02  Bruno Haible  <bruno@clisp.org>
19027
19028         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
19029         Define, taken from safe-read.c.
19030         (INT_MAX): Provide fallback.
19031         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
19032         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
19033
19034         * lib/safe-read.c (EINTR): Remove definition.
19035         (safe_read): Don't use EINTR if it is absent.
19036
19037 2002-12-01  Jim Meyering  <jim@meyering.net>
19038
19039         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
19040         zero.
19041         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
19042
19043 2002-11-27  Paul Eggert  <eggert@twinsun.com>
19044
19045         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
19046         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
19047         with `if (! (value < limit)) abort ();', for readability.
19048
19049 2002-11-26  Karl Berry  <karl@gnu.org>
19050
19051         * lib/strdup.c: copy from libc again, with jim's ok.
19052         * lib/.cppi-disable: re-add strdup.c
19053
19054 2002-11-25  Karl Berry  <karl@gnu.org>
19055
19056         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
19057         instead of "strtol.c".
19058
19059 2002-11-25  Karl Berry  <karl@gnu.org>
19060
19061         * config/install-sh: update from automake for variable quoting, $0 in
19062         error msgs, etc.
19063
19064         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
19065         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
19066         entry.
19067
19068 2002-11-25  Jim Meyering  <jim@meyering.net>
19069
19070         * lib/mktime.c: Sync from libc, now that it has the latest fix.
19071
19072 2002-11-24  Karl Berry  <karl@gnu.org>
19073
19074         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
19075         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
19076
19077 2002-11-24  Jim Meyering  <jim@meyering.net>
19078
19079         Update from coreutils:
19080
19081         * lib/mktime.c: Merge in changes from libc.
19082
19083         Avoid a link-time failure on some Linux systems.
19084         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
19085         (otherwise).
19086         (__mon_yday): Declare with the STATIC attribute.
19087         (__mktime_internal): Likewise.
19088         Based on a report from Greg Schafer.
19089
19090 2002-11-23  Jim Meyering  <jim@meyering.net>
19091
19092         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
19093         Use `unsigned', not `int', as type of index.
19094
19095         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
19096
19097         * lib/fsusage.c: Remove unneeded parentheses around operands of
19098         `defined'.
19099
19100 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19101
19102         * lib/quotearg.h: Allow multiple inclusion by surrounding with
19103         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
19104         so that we can be included first.
19105         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
19106         * lib/quotearg.c: Include quotearg.h immediately after config.h.
19107         No need to include stddef.h or sys/types.h any more.
19108         Surround local include files with "", not "<>".
19109         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
19110         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
19111         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
19112         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19113         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19114         (ISPRINT): Remove; no longer needed now that we assume C89.
19115
19116         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
19117         Preserve errno.
19118
19119         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
19120         quotearg_char): Use SIZE_MAX rather than
19121         (size_t) -1 when we are talking about "infinity".
19122
19123         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
19124
19125 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19126
19127         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
19128         hint that one should use `if (! x) abort ();' rather than `assert
19129         (x);', and anyway it's one less thing to worry about configuring.
19130         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
19131         hash_rehash, hash_insert): Use abort rather than assert.
19132
19133 2002-11-22  Bruno Haible  <bruno@clisp.org>
19134
19135         * lib/safe-read.h: Assume C89. Add comments.
19136         (safe_read): Change return type to size_t.
19137         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
19138         byte counts > SSIZE_MAX correctly.
19139         * lib/safe-write.h: New file.
19140         * lib/safe-write.c: New file.
19141         * lib/full-read.h: New file.
19142         * lib/full-read.c: New file.
19143         * lib/full-write.h: Assume C89. Add comments.
19144         * lib/full-write.c: Include safe-write.h.
19145         (full_write): Rewritten to use safe_write.
19146         Suggested by Jim Meyering and Paul Eggert.
19147
19148 2002-11-21  Jim Meyering  <jim@meyering.net>
19149
19150         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
19151
19152         Merge in changes from the coreutils.
19153
19154         2002-09-25  Paul Eggert  <eggert@twinsun.com>
19155         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
19156         <stdint.h>.
19157         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
19158         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
19159         int.  Work more efficiently if X is the same width as uintmax_t.
19160         Do not compare X to -1, to avoid bogus compiler warning.
19161         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
19162         Don't assume that f_frsize and f_bsize are the same type.
19163
19164         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
19165         warning on FreeBSD.
19166
19167         * lib/makepath.c (make_path): Restore umask *before* creating the final
19168         component.
19169         (make_path): Minor reformatting.
19170
19171         * lib/xmalloc.c: Adjust to work with new autoconf macros,
19172         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
19173         HAVE_MALLOC/HAVE_REALLOC.
19174
19175         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
19176         dummy ones.  At least on GNU/Linux systems, `auto' means something
19177         else.
19178         From Michael Stone.
19179
19180 2002-11-21  Bruno Haible  <bruno@clisp.org>
19181
19182         Remove case insensitive option matching.
19183         * lib/argmatch.h (argcasematch): Remove declaration.
19184         (ARGCASEMATCH): Remove macro.
19185         (__xargmatch_internal): Remove case_sensitive argument.
19186         (XARGMATCH): Update.
19187         (XARGCASEMATCH): Remove macro.
19188         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
19189         case_sensitive argument.
19190         (argcasematch): Remove function.
19191         (__xargmatch_internal): Remove case_sensitive argument.
19192         (main): Use XARGMATCH instead of XARGCASEMATCH.
19193
19194         * lib/xmalloc.c: Change compile-time error message. Add comment about
19195         required autoconf version.
19196
19197 2002-11-20  Paul Eggert  <eggert@twinsun.com>
19198
19199         Merge argmatch cleanups from Bison.  Assume C89.
19200
19201         * lib/argmatch.c: Include config.h here, not in argmatch.h.
19202         Include stdlib.h, for EXIT_FAILURE.
19203         Always include <string.h>, since we assume C89.
19204         (EXIT_FAILURE): Remove pre-C89 bug workaround.
19205         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
19206         Include <stddef.h> instead, since it's all we need for size_t.
19207         (PARAMS): Remove.  All uses removed.
19208         (ARRAY_CARDINALITY): Do not bother to #undef.
19209         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
19210         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19211         Remove unnecessary parentheses.
19212         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19213         Insert necessary parentheses.
19214         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
19215         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
19216
19217 2002-11-19  Bruno Haible  <bruno@clisp.org>
19218
19219         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
19220         * lib/mbswidth.h: Include <stddef.h>, for size_t.
19221
19222         * lib/mbswidth.h (PARAMS): Remove macro.
19223         (mbswidth, mbsnwidth): Use ANSI C function declarations.
19224         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
19225
19226         * lib/gcd.h (PARAMS): Remove macro.
19227         (gcd): Use ANSI C function declarations.
19228         * lib/gcd.c (gcd): Likewise.
19229
19230 2002-11-15  Bruno Haible  <bruno@clisp.org>
19231
19232         * lib/strcspn.c: Include <stddef.h>.
19233         (strcspn): Use ANSI C function declaration. Change return type to
19234         size_t. Use NULL.
19235         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
19236         (strpbrk): Use NULL.
19237         * lib/strpbrk.h (PARAMS): Remove macro.
19238         (strpbrk): Use ANSI C function declaration.
19239         * lib/strstr.c: Don't include <sys/types.h>.
19240         * lib/strstr.h (PARAMS): Remove macro.
19241         (strstr): Use ANSI C function declarations.
19242
19243 2002-11-14  Karl Berry  <karl@gnu.org>
19244
19245         * config/mkinstalldirs: `do' on separate line, instead of
19246         `for var; do'.
19247
19248 2002-11-06  Bruno Haible  <bruno@clisp.org>
19249
19250         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
19251         * lib/gcd.c (gcd): Likewise.
19252
19253 2002-11-05  Bruno Haible  <bruno@clisp.org>
19254
19255         * lib/gcd.h: New file, from gettext-0.11.5.
19256         * lib/gcd.c: New file, from gettext-0.11.5.
19257
19258 2002-11-05  Bruno Haible  <bruno@clisp.org>
19259
19260         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19261         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19262         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19263         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19264
19265         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
19266         <libintl.h>.
19267         * lib/makepath.c: Include gettext.h instead of <locale.h> and
19268         <libintl.h>.
19269
19270         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
19271         * lib/human.c: Include gettext.h instead of <libintl.h>.
19272         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
19273         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
19274         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
19275         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
19276         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
19277         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
19278         (textdomain): Remove definition.
19279         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
19280
19281         * lib/long-options.c: Remove include of <libintl.h> and definition of
19282         _.
19283         * lib/same.c: Remove include of <libintl.h> and definition of _.
19284
19285 2002-11-04  Owen Taylor  <otaylor@redhat.com>
19286
19287         * lib/config.charset: A few additions for Solaris.
19288
19289 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
19290
19291         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
19292         * lib/localcharset.c (locale_charset): Declare as extern "C".
19293
19294 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
19295
19296         * lib/config.charset: msdos in uk_UA uses CP1125.
19297
19298 2002-11-04  Bruno Haible  <bruno@clisp.org>
19299
19300         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
19301         * lib/strcase.h: New file, from GNU gettext-0.11.5.
19302         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
19303         * lib/strstr.h: New file, from GNU gettext-0.11.5.
19304         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
19305
19306 2002-11-04  Bruno Haible  <bruno@clisp.org>
19307
19308         * lib/localcharset.c (locale_charset): Don't return an empty string.
19309
19310 2002-11-04  Bruno Haible  <bruno@clisp.org>
19311
19312         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
19313         aliases.
19314
19315 2002-11-04  Bruno Haible  <bruno@clisp.org>
19316
19317         * lib/config.charset: Update for newest glibc. Add canonical names
19318         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
19319
19320 2002-11-04  Bruno Haible  <bruno@clisp.org>
19321
19322         * lib/config.charset: Add support for NetBSD.
19323
19324 2002-11-04  Bruno Haible  <bruno@clisp.org>
19325
19326         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
19327
19328 2002-11-01  Bruno Haible  <bruno@clisp.org>
19329
19330         * configure.in: Add AC_CONFIG_AUX_DIR call.
19331         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
19332         test/Makefile.
19333         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
19334
19335 2002-09-28  Karl Berry  <karl@gnu.org>
19336
19337         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
19338         installed automake until the next release, since changes have been
19339         made.
19340
19341 2002-09-25  Karl Berry  <karl@gnu.org>
19342
19343         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
19344         * lib/getopt*: copy from libc/posix.
19345         * lib/gettext.h: copy from gettext.
19346         * lib/.cppi-disable: add strdup.c, gettext.h.
19347
19348 2002-09-25  Karl Berry  <karl@gnu.org>
19349
19350         * config/srclist.txt: enable gettext.h check.
19351         * config/config.{guess,sub}: update from prep.
19352         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
19353                 from automake 1.6.3.
19354         See srclist*.
19355
19356 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
19357
19358         * regex.c (PATFETCH): Remove the translating fetch.
19359         (PATFETCH_RAW): Rename to PATFETCH.
19360         (set_image_of_range): New fun.
19361         (SET_RANGE_TABLE_WORK_AREA): Use it.
19362         (regex_compile): Don't translate the pattern chars so eagerly.
19363         Only do it when inserting an `exactn' bytecode or when handling
19364         a char-range.
19365         (mutually_exclusive_p): Avoid empty statement.
19366
19367 2002-07-06  Jim Meyering  <meyering@lucent.com>
19368
19369         * m4/README: Don't mention Makefile.am.in.
19370         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
19371
19372 2002-07-01  Jim Meyering  <meyering@lucent.com>
19373
19374         * lib/c-stack.c: Include sys/time.h.
19375         From Volker Borchert.
19376
19377 2002-06-26  Paul Eggert  <eggert@twinsun.com>
19378
19379         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
19380
19381 2002-06-26  Paul Eggert  <eggert@twinsun.com>
19382
19383         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
19384         New macro.  Use it uniformly instead of
19385         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
19386         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
19387         reported by Vin Shelton.
19388
19389 2002-06-22  Paul Eggert  <eggert@twinsun.com>
19390
19391         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
19392         Do not assume SA_SIGINFO behavior.
19393         Bug reported by Jim Meyering on NetBSD 1.5.2.
19394
19395 2002-06-22  Jim Meyering  <meyering@lucent.com>
19396
19397         * m4/c-stack.m4: New file, from diffutils-2.8.2.
19398         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
19399
19400         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
19401         now that configure.ac uses AC_GNU_SOURCE.
19402         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
19403         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
19404
19405         Update to latest tools.  Suggestions from Paul Eggert.
19406         * m4/stdbool.m4: New file, from diffutils-2.8.2.
19407         * m4/gnu-source.m4: Update from diffutils-2.8.2.
19408         * m4/fnmatch.m4: Likewise.
19409         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
19410         to AC_HEADER_STDBOOL
19411
19412 2002-06-22  Jim Meyering  <meyering@lucent.com>
19413
19414         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
19415         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
19416
19417 2002-06-22  Jim Meyering  <meyering@lucent.com>
19418
19419         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
19420
19421         * lib/exitfail.c, exitfail.h: Likewise.
19422         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
19423
19424         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
19425         of fnmatch.h.
19426         (EXTRA_DIST): Add fnmatch_loop.c.
19427         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
19428
19429         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
19430         * lib/fnmatch.c: Update from diffutils-2.8.2.
19431         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
19432         * lib/fnmatch.h: Remove file.
19433
19434 2002-06-21  Jim Meyering  <meyering@lucent.com>
19435
19436         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
19437         * m4/mbrtowc.m4: Likewise.
19438
19439         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
19440         * m4/mbswidth.m4: Reflect name change:
19441         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
19442         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
19443
19444         * m4/lib-link.m4: Update from gettext-0.11.2.
19445         * m4/gettext.m4: Likewise.
19446
19447         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
19448         From Alfred M. Szmidt.
19449
19450 2002-06-18  Paul Eggert  <eggert@twinsun.com>
19451
19452         * lib/file-type.h: Report an error if neither S_ISREG nor
19453         S_IFREG is defined, instead of using a test specific to glibc
19454         2.2.  This should be safe, since POSIX requires S_ISREG and
19455         Unix Version 7 had S_IFREG.  We don't need to check for
19456         <sys/types.h> since we don't use any symbols that it defines.
19457
19458 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
19459
19460         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
19461         $@-t, so that each temporary file name is unique and valid in the first
19462         8 characters, for operation under DOS.
19463
19464 2002-06-15  Paul Eggert  <eggert@twinsun.com>
19465
19466         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
19467
19468 2002-06-15  Jim Meyering  <meyering@lucent.com>
19469
19470         Work even with DJGPP 2.03, which lacks support for symlinks.
19471         From Richard Dawe.
19472         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
19473         is defined.
19474         * lib/lchown.c (S_ISLNK): Likewise.
19475
19476 2002-06-15  Jim Meyering  <meyering@lucent.com>
19477
19478         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
19479         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
19480         have been included before this file.
19481
19482 2002-06-14  Jim Meyering  <meyering@lucent.com>
19483
19484         * lib/file-type.h: Use the version from diffutils-2.8.2.
19485         * lib/file-type.c: Likewise.
19486
19487 2002-06-07  Jim Meyering  <meyering@lucent.com>
19488
19489         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
19490         They're needed at least for NetBSD 1.5.2.
19491         ($statxfs_includes): Include those same headers.
19492         ($statxfs_includes): Include sys/vfs.h if available.
19493         ($statxfs_includes): Likewise for sys/statvfs.h.
19494         Check for the following members in both structs statfs and statvfs:
19495         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
19496
19497 2002-06-01  Jim Meyering  <meyering@lucent.com>
19498
19499         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
19500         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
19501
19502 2002-05-28  Jim Meyering  <meyering@lucent.com>
19503
19504         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
19505         Reported by Volker Borchert.
19506
19507 2002-05-27  Jim Meyering  <meyering@lucent.com>
19508
19509         Fix a problem seen only on nonconforming systems whereby ls.c's
19510         use of localtime, and then of gettimeofday would cause trouble:
19511         the localtime call used to initialize rpl_gettimeofday's save
19512         mechanism would clobber ls's current local time information so
19513         that in any long listing the first file would always be listed
19514         with date 1970-01-01.  Analysis by Volker Borchert.
19515
19516         * lib/gettimeofday.c (localtime): Undefine.
19517         (rpl_localtime): New function.
19518
19519 2002-05-27  Jim Meyering  <meyering@lucent.com>
19520
19521         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
19522         localtime.
19523
19524         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
19525         use the replacement function; it wouldn't resolve at link time.
19526         Reported by Volker Borchert.
19527
19528 2002-05-22  Jim Meyering  <meyering@lucent.com>
19529
19530         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
19531         file-type.h.
19532         * lib/file-type.h: New file.
19533         * lib/file-type.c (file_type): New file/function.  Extracted from
19534         diffutils.
19535
19536 2002-04-30  Jim Meyering  <meyering@lucent.com>
19537
19538         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
19539
19540 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19541
19542         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
19543
19544 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19545
19546         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
19547         Do not check for alloca.h (no longer used) or stdbool.h (was never
19548         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
19549
19550 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19551
19552         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
19553
19554 2002-04-29  Jim Meyering  <meyering@lucent.com>
19555
19556         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
19557         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
19558         Use AC_FUNC_STRNLEN here instead.
19559
19560         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
19561         With autoconf-2.53a, it's part of AC_PROG_CC.
19562
19563 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19564
19565         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
19566         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
19567
19568 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19569
19570         * lib/sig2str.h, lib/sig2str.c: New files.
19571         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
19572
19573 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19574
19575         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
19576         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
19577         of 127, since 64 is the largest conceivable number for ancient
19578         nonstandard hosts.
19579         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
19580
19581 2002-04-28  Jim Meyering  <meyering@lucent.com>
19582
19583         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
19584
19585 2002-04-24  Jim Meyering  <meyering@lucent.com>
19586
19587         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
19588         (jm_PREREQ): Use it.
19589
19590         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
19591         mach/mach.h fcntl.h.
19592         Check for this function: setlocale.
19593
19594 2002-04-24  Jim Meyering  <meyering@lucent.com>
19595
19596         * lib/gettext.h: New file, from Gettext.
19597         * lib/Makefile.am (INCLUDES): Remove -I../intl.
19598         (libfetish_a_SOURCES): Add gettext.h.
19599
19600 2002-04-16  Jim Meyering  <meyering@lucent.com>
19601
19602         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
19603         ut_pid, ut_id, ut_exit.
19604
19605 2002-04-16  Jim Meyering  <meyering@lucent.com>
19606
19607         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
19608         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
19609         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
19610
19611 2002-04-12  Jim Meyering  <meyering@lucent.com>
19612
19613         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
19614         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
19615         existence of the getmntinfo function.  Needed for Darwin 5.3.
19616
19617         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
19618         This is necessary at least on Darwin 5.3.
19619
19620         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
19621         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
19622         strnlen.o in the library, and that makes some versions of ranlib
19623         object.
19624
19625 2002-04-12  Jim Meyering  <meyering@lucent.com>
19626
19627         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
19628
19629 2002-04-09  Jim Meyering  <meyering@lucent.com>
19630
19631         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
19632         to be more precise.  Rather than saying we're checking whether the
19633         function `works', say what we're testing.
19634         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
19635         Reported by Bruno Haible.
19636
19637 2002-03-10  Jim Meyering  <meyering@lucent.com>
19638
19639         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
19640         Suggestion from Santiago Vila.
19641
19642 2002-03-08  Jim Meyering  <meyering@lucent.com>
19643
19644         * lib/rename.c: Mention that this wrapper is needed also on
19645         mips-dec-ultrix4.4 systems.
19646
19647 2002-03-02  Jim Meyering  <meyering@lucent.com>
19648
19649         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
19650         not HAVE_CLOCK_SETTIME.
19651
19652 2002-02-27  Paul Eggert  <eggert@twinsun.com>
19653
19654         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
19655         Check for clock_settime.
19656
19657 2002-02-27  Paul Eggert  <eggert@twinsun.com>
19658
19659         * lib/nanosleep.h: Rename to....
19660         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
19661
19662         * lib/gettime.c: New file.
19663         * lib/settime.c: New file.
19664         * lib/stime.c: Remove.
19665
19666         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
19667         timespec.h.  Remove nanosleep.h.
19668
19669 2002-02-25  Paul Eggert  <eggert@twinsun.com>
19670
19671         * m4/acl.m4: New file.
19672         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
19673         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
19674
19675 2002-02-25  Paul Eggert  <eggert@twinsun.com>
19676
19677         * lib/acl.c, lib/acl.h: New files.
19678         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
19679
19680 2002-02-24  Jim Meyering  <meyering@lucent.com>
19681
19682         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
19683         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
19684         cause trouble.  Reported by Nelson Beebe.
19685
19686 2002-02-23  Paul Eggert  <eggert@twinsun.com>
19687
19688         * lib/path-concat.c (xpath_concat): Reorder code to pacify
19689         compilers that don't know that xalloc_die never returns.
19690
19691 2002-02-20  Jim Meyering  <meyering@lucent.com>
19692
19693         * lib/getdate.c: Regenerate using bison-1.33.
19694
19695 2002-02-17  Jim Meyering  <meyering@lucent.com>
19696
19697         * config/config.guess (main): Don't use `head -1'; it's no longer
19698         portable. Use `sed 1q' instead.
19699
19700 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
19701
19702         * m4/codeset.m4: Upgrade to gettext-0.11.
19703         * m4/gettext.m4: Upgrade to gettext-0.11.
19704         * m4/glibc21.m4: Upgrade to gettext-0.11.
19705         * m4/iconv.m4: Upgrade to gettext-0.11.
19706         * m4/isc-posix.m4: Upgrade to gettext-0.11.
19707         * m4/lcmessage.m4: Upgrade to gettext-0.11.
19708         * m4/lib-ld.m4: New file, from gettext-0.11.
19709         * m4/lib-link.m4: New file, from gettext-0.11.
19710         * m4/lib-prefix.m4: New file, from gettext-0.11.
19711         * m4/progtest.m4: Upgrade to gettext-0.11.
19712
19713 2002-02-15  Paul Eggert  <eggert@twinsun.com>
19714
19715         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
19716         (jm_PREREQ): Use it.
19717
19718 2002-02-15  Paul Eggert  <eggert@twinsun.com>
19719
19720         * lib/posixver.c, lib/posixver.h: New files.
19721         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
19722
19723 2002-02-02  Paul Eggert  <eggert@twinsun.com>
19724             Bruno Haible  <bruno@clisp.org>
19725
19726         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
19727         (fwrite_success_callback): New declaration.
19728         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
19729         print_unicode_char. Call failure callback instead of error.
19730         (fwrite_success_callback): New function.
19731         (exit_failure_callback): New function.
19732         (fallback_failure_callback): New function.
19733         (print_unicode_char): Call unicode_to_mb.
19734
19735 2002-01-26  Jim Meyering  <meyering@lucent.com>
19736
19737         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
19738         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
19739
19740 2002-01-26  Jim Meyering  <meyering@lucent.com>
19741
19742         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
19743
19744 2002-01-22  Paul Eggert  <eggert@twinsun.com>
19745
19746         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
19747
19748 2002-01-22  Jim Meyering  <meyering@lucent.com>
19749
19750         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
19751         Otherwise, some versions of automake would omit the rule that makes
19752         Makefile from Makefile.in.
19753
19754 2002-01-21  Paul Eggert  <eggert@twinsun.com>
19755
19756         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
19757         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
19758         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
19759         (memcoll): Set errno to zero if there is no error.
19760
19761         * lib/quotearg.c (quotearg_buffer_restyled):
19762         Fix bug with quoting buffers containing NUL when backslashing escapes.
19763         This bug was exposed by the other changes in this patch.
19764         (quotearg_n_options): New arg ARGSIZE.
19765         All callers changed.
19766         (quoting_options_from_style): New function.
19767         (quotearg_n_style): Use it.
19768         (quotearg_n_style_mem): New function.
19769
19770         * lib/quotearg.h (quotearg_n_style_mem): New function.
19771
19772 2002-01-19  Jim Meyering  <meyering@lucent.com>
19773
19774         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
19775         Remove useless quotes: DF_PROG="df".
19776         * m4/strnlen.m4: New file.
19777
19778 2002-01-16  Paul Eggert  <eggert@twinsun.com>
19779
19780         * lib/backupfile.c (ISDIGIT): Comment fix.
19781         * lib/getdate.y (ISDIGIT): Likewise.
19782         * lib/posixtm.c (ISDIGIT, year): Likewise.
19783         * lib/strverscmp.c (ISDIGIT): Likewise.
19784         * lib/userspec.c (ISDIGIT): Likewise.
19785
19786 2002-01-16  Jim Meyering  <meyering@lucent.com>
19787
19788         * lib/getdate.y: Add three semicolons, each just before a closing
19789         brace. Bison (as of version 1.31) no longer papers over that mistake.
19790
19791 2002-01-05  Jim Meyering  <meyering@lucent.com>
19792
19793         * lib/version-etc.c (version_etc_copyright): Update copyright year.
19794
19795 2001-12-19  Paul Eggert  <eggert@twinsun.com>
19796
19797         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
19798         not silently exit merely because the output buffer happens to
19799         have nothing pending.
19800
19801 2001-12-18  Paul Eggert  <eggert@twinsun.com>
19802
19803         See the big note in ../ChangeLog.
19804         * lib/human.c (suffixes): Prefer K to k for 1024.
19805         (generate_suffix_backwards): New function.
19806         (human_readable_inexact): Use it.
19807         * lib/xstrtol.c (__xstrtol): If there is no number but there
19808         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
19809         Accept 'K' as well as 'k'.
19810
19811 2001-12-15  Jim Meyering  <meyering@lucent.com>
19812
19813         * lib/regex.h (__restrict_arr): Update from libc.
19814
19815         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
19816         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
19817         (STREQ): Define.
19818
19819 2001-12-14  Jim Meyering  <meyering@lucent.com>
19820
19821         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
19822         Suggestion from Bruno Haible.
19823
19824 2001-12-10  Jim Meyering  <meyering@lucent.com>
19825
19826         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
19827         xrealloc, Instead, include "xalloc.h".
19828         (initbuffer): Don't cast xmalloc return value to char*.
19829         (readline): Reword comment.
19830         Don't cast xrealloc return value to char*
19831         Return NULL, not 0.
19832
19833 2001-12-09  Jim Meyering  <meyering@lucent.com>
19834
19835         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
19836         about `signed and unsigned type in conditional expression'.
19837         * lib/posixtm.c (posix_time_parse): Likewise.
19838
19839         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
19840
19841         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
19842         to avoid a pedantic warning.
19843
19844         * lib/getstr.c: Don't include assert.h.
19845         (getstr): Remove warning-evoking assertions.
19846         Return -1 if offset parameter is out of bounds.
19847         Change the type of a local from int to size_t.
19848
19849         * lib/strftime.c (my_strftime_localtime_r): Include this function
19850         definition in the `#if ! HAVE_TM_GMTOFF' block.
19851
19852         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
19853         Include xalloc.h instead.
19854
19855 2001-12-02  Jim Meyering  <meyering@lucent.com>
19856
19857         * lib/tempname.c: Don't declare getenv, thus reverting the change of
19858         2001-11-18.  It's no longer necessary, now that stdlib.h is always
19859         included.
19860
19861         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
19862         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
19863
19864 2001-11-30  Akim Demaille  <akim@epita.fr>
19865
19866         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
19867         before being defined.
19868
19869 2001-11-27  Paul Eggert  <eggert@twinsun.com>
19870
19871         * lib/quotearg.h (quotearg_n, quotearg_n_style):
19872         First arg is int, not unsigned.
19873         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19874         (SIZE_MAX, UINT_MAX): New macros.
19875         (quotearg_n_options): Abort if N is negative.
19876         Avoid overflow check on hosts where size_t is 64 bits and int
19877         is 32 bits, as overflow is impossible there.
19878         Fix off-by-one typo that caused unnecessary reallocation.
19879
19880 2001-11-27  Jim Meyering  <meyering@lucent.com>
19881
19882         * lib/tempname.c: Merge with version from libc.
19883         * lib/regex.c: Likewise.
19884
19885         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
19886         systems for which STDC_HEADERS is 0, it was not included, resulting in
19887         a warning about an integer-to-pointer conversion problem with getenv.
19888         Reported by Volker Borchert.
19889
19890 2001-11-26  Jim Meyering  <meyering@lucent.com>
19891
19892         * lib/gtod.h: Remove file.
19893         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
19894         * lib/gettimeofday.c: Don't include gtod.h.
19895         (GTOD_init): Remove function.
19896         (rpl_gettimeofday): Do its job here instead, rather than aborting.
19897         Suggestion from Volker Borchert.
19898
19899 2001-11-23  Jim Meyering  <meyering@lucent.com>
19900
19901         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
19902         it.
19903         * lib/hash.c (struct hash_table): Define it here instead.
19904
19905 2001-11-22  Jim Meyering  <meyering@lucent.com>
19906
19907         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
19908
19909 2001-11-20  Jim Meyering  <meyering@lucent.com>
19910
19911         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
19912         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
19913
19914 2001-11-19  Jim Meyering  <meyering@lucent.com>
19915
19916         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
19917         directory.  Use "conftestXXXXXX" as the template.
19918         Suggestion from Paul Eggert.
19919
19920         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
19921         immediately, so the test doesn't mistakenly hit the max-open-files
19922         limit.
19923
19924 2001-11-18  Paul Eggert  <eggert@twinsun.com>
19925
19926         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
19927         (TEMPORARIES): New macro.
19928         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
19929         removes an artificial limitation (e.g. HP-UX 10.20, where
19930         TMP_MAX is 17576).
19931
19932 2001-11-18  Jim Meyering  <meyering@lucent.com>
19933
19934         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
19935
19936 2001-11-18  Jim Meyering  <meyering@lucent.com>
19937
19938         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
19939         on SunOS 4.
19940
19941         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
19942         files will be created before anything else.
19943
19944 2001-11-17 Paul Eggert  <eggert@twinsun.com>
19945
19946         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
19947         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
19948
19949 2001-11-17  Jim Meyering  <meyering@lucent.com>
19950
19951         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
19952         Prompted by a report from Bob Proulx.
19953
19954         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
19955         Instead, require UTILS_FUNC_MKSTEMP.
19956
19957 2001-11-17  Jim Meyering  <meyering@lucent.com>
19958
19959         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
19960         Now, that's done as part of AC_FUNC_STRTOD.
19961
19962 2001-11-17  Jim Meyering  <meyering@lucent.com>
19963
19964         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
19965         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
19966         rather than group writable.  Patch by Juan F. Codagnone.
19967
19968         * lib/readtokens.c: Remove explicit declarations of xmalloc and
19969         xrealloc, Instead, include "xalloc.h".
19970
19971         * lib/mountlist.c: Include unlocked-io.h after all system headers.
19972         Remove explicit declarations of xmalloc, xrealloc,
19973         and xstrdup.  Instead, include "xalloc.h".
19974
19975         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
19976         unlocked-io.h.
19977         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
19978         Likewise.
19979         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
19980
19981         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
19982         Reported by Padraig Brady.
19983
19984         * lib/mkstemp.c: #undef mkstemp.
19985         Include config.h.
19986         (rpl_mkstemp): Rename from mkstemp.
19987         Protoize.
19988
19989 2001-11-16  Jim Meyering  <meyering@lucent.com>
19990
19991         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
19992         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
19993         determine the amount of total physical memory, use pstat_getstatic.
19994         HPUX-11 doesn't define _SC_PHYS_PAGES.
19995         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
19996         If sysconf couldn't be used to determine the amount of available
19997         physical memory, use both pstat_getstatic and pstat_getdynamic.
19998         Based on a patch from Bob Proulx.
19999
20000 2001-11-10  Jim Meyering  <meyering@lucent.com>
20001
20002         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
20003         (jm_PREREQ): Use it.
20004
20005 2001-11-09  Jim Meyering  <meyering@lucent.com>
20006
20007         * m4/jm-macros.m4: Require autoconf-2.52f.
20008         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
20009         Use these AC_-prefixed names, not the AM_-prefixed ones.
20010
20011         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
20012
20013 2001-11-05  Jim Meyering  <meyering@lucent.com>
20014
20015         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
20016
20017 2001-11-04  Jim Meyering  <meyering@lucent.com>
20018
20019         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
20020         $DEFS.
20021
20022 2001-11-03  Jim Meyering  <meyering@lucent.com>
20023
20024         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
20025         of AC_DEFUN.
20026
20027         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
20028         know the name of the variable in the macro definition.
20029
20030 2001-11-03  Jim Meyering  <meyering@lucent.com>
20031
20032         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
20033         in argmatch_to_argument call.
20034
20035         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
20036         argument.
20037
20038         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
20039         e.g., a fault due to an attempt to free a NULL pointer.
20040
20041 2001-11-01  Jim Meyering  <meyering@lucent.com>
20042
20043         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
20044         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
20045
20046 2001-11-01  Jim Meyering  <meyering@lucent.com>
20047
20048         * lib/dirfd.c, lib/dirfd.h: New files.
20049         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
20050
20051         * lib/hash.c (hash_print) [TESTING]: Clean up.
20052
20053 2001-10-22  Paul Eggert  <eggert@twinsun.com>
20054
20055         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
20056         to avoid a warning if -Wall.
20057
20058 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
20059
20060         * README: New file
20061         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
20062         (per RMS's instructions, this is now the canonical source)
20063         * lgpl/, gpl/: New directories.
20064
20065 2001-10-21  Paul Eggert  <eggert@twinsun.com>
20066
20067         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
20068
20069 2001-10-21  Jim Meyering  <meyering@lucent.com>
20070
20071         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
20072         this code would end up calling gettext even in packages built
20073         with --disable-nls.
20074         * lib/getopt.c (_): Likewise.
20075         * lib/regex.c (_): Likewise.
20076
20077 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20078
20079         * m4/error.m4 (jm_PREREQ_ERROR):
20080         Do not invoke AC_CHECK_FUNCS with strerror_r, as
20081         AC_FUNC_STRERROR_R does that.
20082         Check for strerror declaration.
20083
20084         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
20085         are supposed to have them these days.
20086         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
20087         Merge changes from latest Autoconf CVS.
20088         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
20089         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
20090         POSIX decided to standardize on the int flavor of strerror_r.
20091
20092 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20093
20094         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
20095         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
20096         Use strerror_r that is only a macro, even if it is not a function.
20097         (strerror): Check for HAVE_DECL_STRERROR before declaring.
20098         (private_strerror): Use prototypes, not old-style function definition.
20099         (print_errno_message): New function.
20100         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
20101         char*-flavored one.
20102         (error_tail, error, error_at_line): Use it.
20103
20104 2001-10-11  Jim Meyering  <meyering@lucent.com>
20105
20106         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
20107         and quote_n (1, ... to avoid clobbering a buffer.
20108
20109 2001-10-05  Jim Meyering  <meyering@lucent.com>
20110
20111         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
20112         hash-pjw.h.
20113         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
20114         * lib/hash-pjw.h: New file.
20115
20116 2001-09-30  Jim Meyering  <meyering@lucent.com>
20117
20118         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
20119         `struct fsstat' has the `f_fstypename' member.
20120         Use that to define FS_TYPE, which is now used to make
20121         the getfsstat link test tighter.
20122
20123 2001-09-30  Jim Meyering  <meyering@lucent.com>
20124
20125         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
20126         Include <sys/ucred.h>, for Apple Darwin.
20127         Include sys/mount.h and sys/fs_types.h only if available.
20128         (FS_TYPE): Define.
20129         (read_filesystem_list): Use FS_TYPE.
20130
20131 2001-09-29  Paul Eggert  <eggert@twinsun.com>
20132
20133         * lib/exclude.c (excluded_filename): 0 -> false, since it's
20134         a boolean context.
20135
20136 2001-09-29  Jim Meyering  <meyering@lucent.com>
20137
20138         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20139         [one-argument getmntent function]): Include stdio.h before mntent.h.
20140         SunOS 4.1.x needs it for the declaration of `FILE'.
20141         Patch by Volker Borchert.
20142
20143         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20144         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
20145         sys/fs_types.h, and make the link-test for getfsstat guard #include
20146         directives with appropriate #if HAVE_*_H tests so that we can
20147         detect getfsstat on Apple Darwin1.3.7 systems.
20148         Reported by Nelson Beebe.
20149         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
20150
20151 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20152
20153         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20154         #defines strtoimax.  Also treat the other strto* functions
20155         like strtoimax.
20156
20157         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20158         Check for strtoul and strtoumax,
20159         as those declarations are made even in the signed case.
20160         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
20161         Likewise, for strtol and strtoimax.
20162
20163 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20164
20165         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20166         #defines strtoimax.  Also treat the other strto* functions
20167         like strtoimax.
20168
20169         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
20170         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
20171         (strtoimax, strtoumax): Do not declare if already defined as a macro.
20172
20173 2001-09-26  Jim Meyering  <meyering@lucent.com>
20174
20175         Most macros in unlocked-io.h had the wrong number of arguments.
20176         * lib/gen-uio: New script.
20177         (USE_UNLOCKED_IO): Define to 1 if not already defined.
20178         * lib/unlocked-io.hin: Remove file.
20179         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
20180         rather than trying to embed it here.
20181         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
20182         Reported by Padraig Brady.
20183
20184 2001-09-25  Volker Borchert  <bt@teknon.de>
20185
20186         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
20187         `result'.
20188
20189 2001-09-24  Jim Meyering  <meyering@lucent.com>
20190
20191         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
20192
20193 2001-09-23  Jim Meyering  <meyering@lucent.com>
20194
20195         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
20196         instead of the mere test for existence of mntent.h.  The latter
20197         would get a false-positive on AIX 3.4 systems.
20198         In the outer getmntent if-block, don't die if neither of the getmntent
20199         tests succeeds.  Instead, just fall through and continue with the
20200         remaining tests.
20201
20202 2001-09-23  Jim Meyering  <meyering@lucent.com>
20203
20204         * lib/mountlist.c: Remove useless parentheses in #if directives.
20205         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
20206         the deprecated MOUNTED symbol is no longer defined in mntent.h.
20207
20208 2001-09-22  Jim Meyering  <meyering@lucent.com>
20209
20210         * m4/gettext.m4: New file.  From gettext.
20211         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
20212         * m4/progtest.m4: Likewise
20213         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
20214         * m4/glibc21.m4: Likewise.
20215
20216         * m4/libintl.m4: Remove.  No longer used.
20217
20218 2001-09-22  Jim Meyering  <meyering@lucent.com>
20219
20220         * lib/localcharset.c: Update from latest gettext.
20221         * lib/config.charset: Likewise.
20222
20223 2001-09-20  Jim Meyering  <meyering@lucent.com>
20224
20225         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
20226         strtoimax.
20227         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
20228         strtoumax.
20229
20230 2001-09-20  Jim Meyering  <meyering@lucent.com>
20231
20232         * lib/xstrtol.c (strtoimax): Guard declaration with
20233         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
20234         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
20235         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
20236         (strtoumax): Likewise, for completeness (it wasn't necessary).
20237
20238 2001-09-17  Paul Eggert  <eggert@twinsun.com>
20239
20240         * lib/strtoimax.c (HAVE_LONG_LONG):
20241         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
20242         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
20243         to work around bug in IBM C compiler.
20244
20245 2001-09-17  Jim Meyering  <meyering@lucent.com>
20246
20247         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
20248         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
20249         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
20250         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
20251         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
20252         whenever the right hand side need not be expanded by the shell.
20253
20254 2001-09-16  Paul Eggert  <eggert@twinsun.com>
20255
20256         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
20257         library.  It's not correct, as some older glibcs are buggy.
20258         fnmatch wasn't fixed until glibc 2.2.
20259
20260         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
20261         special shell magic here.
20262
20263 2001-09-16  Jim Meyering  <meyering@lucent.com>
20264
20265         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
20266         * m4/jm-macros.m4: Require it.
20267
20268 2001-09-16  Jim Meyering  <meyering@lucent.com>
20269
20270         * lib/mkdir.c: New file.
20271
20272 2001-09-15  Jim Meyering  <meyering@lucent.com>
20273
20274         * m4/jm-macros.m4: Check for help2man.
20275
20276 2001-09-11  Jim Meyering  <meyering@lucent.com>
20277
20278         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
20279         The body, by Paul Eggert, was moved here from configure.in.
20280         * m4/jm-macros.m4: Require UTILS_HOST_OS.
20281
20282 2001-09-04  Paul Eggert  <eggert@twinsun.com>
20283
20284         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
20285         (jm_PREREQ): Use it.
20286
20287 2001-09-04  Paul Eggert  <eggert@twinsun.com>
20288
20289         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
20290         Use ssize_t, not int, to store result of readlink.
20291         Check for ssize_t overflow as well as size_t overflow,
20292         as POSIX says the result of readlink is implementation-defined
20293         when ssize_t overflows.
20294         Remove unnecessary cast to char*.
20295         Use free+malloc instead of realloc, as the storage doesn't need
20296         to be preserved and it's clearer and can be more efficient that way.
20297         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
20298         * lib/xreadlink.h (xreadlink): Update prototype.
20299
20300 2001-09-04  Paul Eggert  <eggert@twinsun.com>
20301
20302         * lib/xgetcwd.c: Revert some of the previous change; intead,
20303         fix the HAVE_GETCWD_NULL code to behave more like the
20304         !HAVE_GETCWD_NULL code used to.
20305
20306         Include "xalloc.h".
20307         (xgetcwd): Do not return NULL when memory is exhausted; instead,
20308         invoke xalloc_die.
20309
20310 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20311
20312         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
20313         sys/param.h, as pathmax.h includes them.
20314
20315 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20316
20317         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
20318         (jm_PREREQ_XGETCWD): New macro.
20319
20320         * m4/getcwd.m4: New file.
20321
20322 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20323
20324         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
20325         like the HAVE_GETCWD_NULL code.
20326         Include pathmax.h if not HAVE_GETCWD.
20327         Do not include xalloc.h.
20328         (INITIAL_BUFFER_SIZE): New symbol.
20329         Do not use xmalloc / xrealloc, since the caller is responsible for
20330         handling errors.  Preserve errno around `free' during failure.
20331         Do not overrun buffer when using getwd.
20332
20333 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20334
20335         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
20336         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
20337         getcwd (NULL, 0).
20338
20339 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20340
20341         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
20342         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
20343         spotted by Jim Meyering.
20344
20345 2001-09-03  Jim Meyering  <meyering@lucent.com>
20346
20347         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
20348         failure.
20349
20350 2001-09-02  Jim Meyering  <meyering@lucent.com>
20351
20352         * lib/error.c: Update from GNU libc.
20353
20354 2001-09-01  Jim Meyering  <meyering@lucent.com>
20355
20356         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
20357         Used by df.
20358
20359 2001-09-01  Jim Meyering  <meyering@lucent.com>
20360
20361         * lib/xreadlink.c: New file.
20362         * lib/xreadlink.h: New file.
20363         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
20364         xreadlink.h.
20365
20366         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
20367         doesn't conflict with sparc Solaris 7's definition in
20368         /usr/include/sys/int_types.h.
20369
20370         * lib/exclude.c: Use `""', not `<>' to #include non-system header
20371         files.
20372         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
20373         and strncasecmp as r-values.  Unixware didn't have declarations.
20374
20375 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20376
20377         * lib/xstrtol.h: Add copyright notice.
20378         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
20379         LONGINT_INVALID_SUFFIX_CHAR.
20380
20381 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20382
20383         * lib/xstrtol.c (strtoimax): New decl.
20384
20385 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20386
20387         * lib/xgetcwd.c: Don't include pathmax.h.
20388         Include stdlib.h and unistd.h if available.
20389         Include xalloc.h.
20390         (xmalloc, xstrdup, free): Remove decls.
20391         (xgetcwd): Don't assume sizes fit in unsigned.
20392         Check for overflow when computing sizes.
20393         Simplify reallocation code.
20394
20395 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20396
20397         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
20398         a directory's st_size can have an arbitrary value, so the old
20399         usage could waste an arbitrary amount of memory.  All uses
20400         changed.
20401         * lib/savedir.h: Update prototype.
20402
20403 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20404
20405         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
20406
20407         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
20408         old strtoimax.c.
20409
20410         Also, make the following further changes to make this file's
20411         configuration more similar to that of strtol.c:
20412         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
20413         (strtoumax, uintmax_t, strtoull, strtol): Remove.
20414         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
20415         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
20416         changed to signed values.
20417
20418         And make the following changes as well:
20419         Fix copyright notice, as 1999 was missing.
20420         (verify): New macro.
20421         (strtoimax): Check sizes at compile-time, not run-time.
20422         Prefer strtol to strtoll if both work.
20423         (main): Remove; it was not that useful and was a pain to maintain.
20424
20425         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
20426
20427 2001-08-31  Jim Meyering  <meyering@lucent.com>
20428
20429         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
20430         Use an initial, malloc'd, buffer of length 128 rather than
20431         a statically allocated one of length 1024.
20432
20433 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20434
20435         Simplify code, partly by assuming autoconf 2.52 semantics.
20436
20437         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
20438
20439         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
20440         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
20441         All uses removed.
20442         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
20443         Move AC_REQUIRE to next-to-top level, to avoid confusion.
20444         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
20445         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
20446         jm_AC_HEADER_INTTYPES_H.
20447         * m4/jm-macros.m4 (jm_MACROS): Likewise.
20448
20449         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
20450
20451         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20452         Quote first arg of AC_DEFUN.
20453         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
20454         since they are needed to parse the include file even if we need
20455         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
20456         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
20457         but with opposite signedness.
20458
20459 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20460
20461         Merge 'exclude' changes from tar 1.13.22.
20462         This fixes one or two unlikely storage allocation overflow bugs,
20463         but doesn't change user-visible behavior otherwise.
20464
20465 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20466
20467         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
20468         (jm_PREREQ_EXCLUDE): New macro.
20469
20470 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20471
20472         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20473         tm to be declared.
20474
20475 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20476
20477         * lib/hash.c: Remove '2001' from copyright notice.
20478
20479 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20480
20481         * lib/full-write.h: New file.
20482         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
20483         * lib/full-write.c: Correct credits, as cccp.c no longer
20484         exists and anyway it was so heavily changed from the old cccp
20485         code as to be unrecognizable.  Include full-write.h.
20486         (full_write) Return size_t, with short writes meaning failure.
20487         All callers changed.  This fixes a bug with large buffers
20488         on 64-bit hosts.
20489         * lib/utime.c: Include full-write.h.
20490
20491 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20492
20493         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
20494         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
20495         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
20496         Include if available.
20497         (<xalloc.h>): Include
20498         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
20499         (verify): New macro.  Use it to verify that EXCLUDE macros do not
20500         collide with FNM macros.
20501         (struct patopts): New struct.
20502         (struct exclude): Use it, as exclude patterns now come with options.
20503         (new_exclude): Support above changes.
20504         (new_exclude, add_exclude_file):
20505         Initial size must now be a power of two to simplify overflow checking.
20506         (free_exclude, fnmatch_no_wildcards): New function.
20507         (excluded_filename): No longer requires options arg, as the options
20508         are determined by add_exclude.  Now returns bool, not int.
20509         (excluded_filename, add_exclude):
20510         Add support for the fancy new exclusion options.
20511         (add_exclude, add_exclude_file): Now takes int options arg.
20512         Check for arithmetic overflow when computing sizes.
20513         (add_exclude_file): xrealloc might modify errno, so don't
20514         realloc until after errno might be used.
20515
20516         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
20517         New macros.
20518         (free_exclude): New decl.
20519         (add_exclude, add_exclude_file): Now takes int options arg.
20520         (excluded_filename): No longer requires options arg, as the options
20521         are determined by add_exclude.  Now returns bool, not int.
20522
20523 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20524
20525         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
20526
20527 2001-08-27  Jim Meyering  <meyering@lucent.com>
20528
20529         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
20530
20531         * lib/version-etc.c (N_): Remove definition.
20532         Revert most of last change.
20533         Instead, simply don't mark the `Copyright...' string for translation.
20534         Based on advice from Paul Eggert.
20535
20536         * lib/strtoxmax.c: Tweak comment.
20537
20538 2001-08-26  Jim Meyering  <meyering@lucent.com>
20539
20540         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
20541
20542         * m4/xstrtoimax.m4: New file.
20543         * m4/xstrtoumax.m4: Add comments explaining why we
20544         AC_REPLACE_FUNCS(strtol).
20545
20546 2001-08-26  Jim Meyering  <meyering@lucent.com>
20547
20548         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
20549         of copyright with `%s' so translators don't get an untranslated
20550         message in 2002.
20551         (COPYRIGHT_YEAR): Define.
20552         (version_etc): Use fprintf rather than fputs.
20553         Suggestion from Ulrich Drepper.
20554
20555         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
20556
20557         * lib/strtoll.c: New file, from GNU libc.
20558         * lib/xstrtoimax.c: New file.
20559
20560         * lib/xstrtol.h: Add xstrtoimax.
20561         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
20562         * lib/strtoimax.c: New file.  Likewise, but first define
20563         STRTOUXMAX_SIGNED.
20564
20565         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
20566         ...
20567         * lib/strtoxmax.c: ... then renamed to this.
20568
20569 2001-08-18  Paul Eggert  <eggert@twinsun.com>
20570
20571         * m4/inttypes.m4: Add AC_PREREQ(2.13).
20572         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
20573         (jm_AC_TYPE_INTMAX_T): New macro.
20574         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
20575
20576         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
20577
20578         * m4/longlong.m4: Renamed from ulonglong.m4.
20579         * m4/inttypes.m4: Renamed from inttypes_h.m4.
20580         * m4/uintmax_t.m4: Removed.
20581
20582 2001-08-13  Paul Eggert  <eggert@twinsun.com>
20583
20584         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
20585         Port to Solaris 8, where 'sed' requires a space after the 'r'
20586         command, and where sh dislikes "$/".  Clean up the spacing a bit.
20587         Redirect output to $tmp just once.
20588
20589 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
20590
20591         * lib/addext.c (<errno.h>): Include.
20592         (errno): Declare if not defined.
20593         (addext): Work correctly when pathconf returns -1 and leaves
20594         errno alone because there is no limit.  Also, work even if
20595         pathconf returns a value greater than SIZE_MAX.
20596
20597 2001-08-12  Jim Meyering  <meyering@lucent.com>
20598
20599         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
20600         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
20601         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
20602         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
20603         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
20604         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
20605         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
20606         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
20607         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
20608         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
20609         utime.m4, utimes.m4, xstrtoumax.m4:
20610         Quote the first argument in each use of AC_DEFUN.
20611
20612 2001-08-12  Jim Meyering  <meyering@lucent.com>
20613
20614         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
20615         Simply `return getcwd (NULL, 0);'.
20616         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
20617         Use 1300 as initial value for length, not PATH_MAX.
20618
20619         * lib/pathmax.h: Clean up cpp syntax.
20620
20621 2001-08-12  Jim Meyering  <meyering@lucent.com>
20622
20623         * lib/gettimeofday.c: New file.
20624         * lib/gtod.h: New file.
20625         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
20626
20627 2001-08-05  Jim Meyering  <meyering@lucent.com>
20628
20629         * m4/jm-macros.m4: Require autoconf-2.52.
20630
20631 2001-08-04  Jim Meyering  <meyering@lucent.com>
20632
20633         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
20634         stmt, to get in sync with glibc.
20635
20636 2001-08-03  Paul Eggert  <eggert@twinsun.com>
20637
20638         The following changes are from gettext 0.10.39 as maintained by
20639         Bruno Haible.
20640
20641         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
20642         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
20643         with inverted sense.  All uses changed.
20644
20645         * lib/mbswidth.c: Don't include <limits.h>.
20646         Include <stdlib.h> and <string.h> unconditionally.
20647         (iswcntrl, mbsinit, ISCNTRL): New macros.
20648         (mbsnwidth): Use K&R style function declarations.
20649         Don't bother checking for MB_LEN_MAX == 1, since the compiler
20650         can optimize it when MB_CUR_MAX == 1.
20651         The width of control characters is zero, not 1.
20652
20653 2001-08-03  Paul Eggert  <eggert@twinsun.com>
20654
20655         The following changes are from gettext 0.10.39 as maintained by
20656         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
20657
20658         * m4/codeset.m4: Upgrade to serial AM1.
20659         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
20660         all uses changed.  Quote first arg of AC_DEFUN.
20661         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
20662
20663         * m4/iconv.m4: Upgrade to serial AM2.
20664         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
20665         Add --with-libconv-prefix.
20666         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
20667         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
20668         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
20669         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
20670         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
20671
20672         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
20673         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
20674         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
20675         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
20676         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
20677         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
20678         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
20679         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
20680         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
20681
20682         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
20683         string.h any more.
20684
20685         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
20686         not the default value.
20687
20688         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
20689         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
20690         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
20691         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
20692         Also check for iswcntrl, used for wcwidth fallback.
20693         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
20694         to Autoconf 2.13.
20695
20696 2001-08-03  Jim Meyering  <meyering@lucent.com>
20697
20698         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
20699         as it was in the original.  Reported by Paul Eggert.
20700
20701 2001-07-16  Jim Meyering  <meyering@lucent.com>
20702
20703         * m4/gettimeofday.m4: New file.
20704         Prompted by a report from Bernhard Baehr.
20705
20706 2001-07-15  Jim Meyering  <meyering@lucent.com>
20707
20708         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
20709         stuff. Now it's in ../Makefile.cfg.
20710
20711 2001-07-15  Jim Meyering  <meyering@lucent.com>
20712
20713         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
20714         (BUILT_SOURCES): Add unlocked-io.h.
20715         (io_functions): Define.
20716         (unlocked-io.h): New rule.
20717         (DISTCLEANFILES): Add unlocked-io.h.
20718         (all-local): Depend on unlocked-io.h, to ensure it is created.
20719
20720         * lib/unlocked-io.hin: New file
20721
20722         * lib/regex.c: Update from glibc.
20723
20724 2001-07-05  Jim Meyering  <meyering@lucent.com>
20725
20726         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
20727         recommendation.
20728         (libfetish_a_SOURCES): Put all .h files here instead.
20729         Remove a thus-exposed (better checks in automake) duplicate and
20730         two unnecessary .h files.
20731
20732 2001-07-04  Jim Meyering  <meyering@lucent.com>
20733
20734         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
20735         that generates jm-glibc-io.m4 so that it doesn't trigger any make
20736         distcheck failure.
20737
20738 2001-07-02  Jim Meyering  <meyering@lucent.com>
20739
20740         The following changes were prompted by suggestions from Bruno Haible.
20741
20742         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
20743         is now generated.
20744         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
20745         definition of EXTRA_DIST.
20746         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
20747         ensure that the generated file is created/updated whenever the list
20748         of $(unlocked_functions) is changed.
20749         (jm-glibc-io.m4): New rule.
20750         (unlocked-io.h): New rule -- currently unused.
20751
20752 2001-06-24  Jim Meyering  <meyering@lucent.com>
20753
20754         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
20755         unmatched right bracket, rather than kludging it with an extra,
20756         falsely-matching quote in a comment.  Patch by Akim Demaille.
20757
20758 2001-06-11  Jim Meyering  <meyering@lucent.com>
20759
20760         * lib/regex.c: Update from GNU libc.
20761
20762 2001-05-27  Jim Meyering  <meyering@lucent.com>
20763
20764         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
20765         Check for ut_type in struct utmp.
20766
20767 2001-05-27  Jim Meyering  <meyering@lucent.com>
20768
20769         * lib/readutmp.h (UT_TYPE): Define.
20770
20771 2001-05-24  Jim Meyering  <meyering@lucent.com>
20772
20773         * lib/argmatch.c: Include "quote.h".
20774         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
20775         quote function.  Reported by Göran Uddeborg.
20776
20777 2001-05-22  Jim Meyering  <meyering@lucent.com>
20778
20779         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
20780         now that we use the package-supplied version unconditionally.
20781         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
20782
20783 2001-05-21  Jim Meyering  <meyering@lucent.com>
20784
20785         * m4/regex.m4: Change a couple backticks to single quotes to avoid
20786         shell syntax errors.
20787
20788 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
20789
20790         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
20791
20792 2001-05-20  Paul Eggert  <eggert@twinsun.com>
20793
20794         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
20795         Don't bother to check library strftime, since
20796         we'll be using our own my_strftime function anyway.
20797         Define my_strftime instead of strftime.
20798
20799 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
20800
20801         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
20802         which is not yet declared.
20803
20804 2001-05-15  Jim Meyering  <meyering@lucent.com>
20805
20806         * m4/regex.m4: Use proper quoting so brackets appear in the test
20807         program.
20808         Reported by, and with help from, Bruno Haible.
20809
20810 2001-05-13  Jim Meyering  <meyering@lucent.com>
20811
20812         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
20813         undefined.
20814
20815 2001-05-11  Paul Eggert  <eggert@twinsun.com>
20816
20817         dirname code cleanup.  base_name now behaves more compatibly
20818         with POSIX basename when given file names that have trailing
20819         slashes, and similarly for dir_name.  Add new primitives
20820         base_len and dir_len.  Put the directory-name-related decls
20821         into dirname.h.
20822
20823         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
20824         * lib/backupfile.c (base_name): Likewise.
20825         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
20826         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
20827         * lib/makepath.c (strip_trailing_slashes): Likewise.
20828         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
20829         ISSLASH): Likewise.
20830         * lib/rename.c (strip_trailing_slashes): Likewise.
20831         * lib/same.c (base_name): Likewise.
20832         * lib/stripslash.c (ISSLASH): Likewise.
20833
20834         * lib/addext.c: Include <dirname.h> after size_t is defined.
20835         * lib/backupfile.c: Likewise.
20836
20837         * lib/addext.c (addext): Use base_len to trim redundant
20838         trailing slashes instead of doing it ourselves.
20839         But do not trim the last slash if it is not redundant.
20840
20841         * lib/backupfile.c (find_backup_file_name,
20842         max_backup_version): Use base_len instead of rolling it ourselves.
20843         Handle the case of "" and (on DOS) "C:" correctly.
20844
20845         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
20846         needed. Include <string.h>, <dirname.h>.
20847         (base_name): Allow file names ending in slashes, other than names
20848         that are all slashes.  In this case, return the basename followed
20849         by the slashes.  This is more general, and can be used in places
20850         where the original base_name purposely had an assertion failure.
20851         (base_len): New function.
20852
20853         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
20854         Do not include <assert.h>; no longer needed.
20855         Include xalloc.h.
20856         (memrchr): Remove decl.
20857         (dir_name_r): Remove.
20858         (dir_len): Renamed from dirlen.  All callers changed.
20859         Rewrite in terms of base_name, for simplicity and consistency.
20860         (dir_name): Never return NULL.  All callers changed.
20861         Do not include <stdlib.h> in test program; no longer needed.
20862         return 0; is fine for test program.
20863
20864         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
20865         New macros.
20866         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
20867
20868         * lib/path-concat.c (path_concat): Use base_len to compute
20869         base length, not strlen; this means we cannot rely on memcpy
20870         to null-terminate.
20871
20872         * lib/same.c (STREQ): Remove.
20873         (same_name): Handle the case where the basename ends in trailing '/'.
20874
20875         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
20876         a slash was stripped.  Do not strip the last slash after a
20877         file system prefix.
20878
20879 2001-05-11  Paul Eggert  <eggert@twinsun.com>
20880
20881         * lib/Makefile.am (libfetish_a_SOURCES):
20882         Add strftime.c, since we now compile it on all hosts.
20883
20884         * lib/strftime.c (my_strftime):
20885         Define to nstrftime if emacs, but only if my_strftime is not defined.
20886         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
20887         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
20888         Add one more extra argument: a nanoseconds value.
20889         All uses changed.
20890         (ns): New macro.
20891         (my_strftime function): Add %N format.
20892         (emacs_strftimeu): Renamed from emacs_strftime,
20893         with extra ut argument.
20894
20895 2001-05-09  Paul Eggert  <eggert@twinsun.com>
20896
20897         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
20898
20899 2001-04-21  Jim Meyering  <meyering@lucent.com>
20900
20901         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
20902         doesn't interfere.
20903
20904 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
20905
20906         * m4/ftruncate.m4: Check for chsize.
20907         Link with ftruncate.o unconditionally if ftruncate is missing.
20908         This was required when cross-compiling to i586-mingw32msvc.
20909
20910 2001-04-08  Jim Meyering  <meyering@lucent.com>
20911
20912         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
20913         recomputed; that's necessary when the offset spans a DST transition.
20914         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
20915
20916 2001-04-02  Jim Meyering  <meyering@lucent.com>
20917
20918         * lib/regex.h, regex.c: Update from GNU libc.
20919
20920 2001-03-24  Jim Meyering  <meyering@lucent.com>
20921
20922         * m4/jm-macros.m4: Require autoconf-2.49d.
20923
20924 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
20925
20926         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
20927
20928 2001-03-19  Paul Eggert  <eggert@twinsun.com>
20929
20930         * lib/version-etc.c (version_etc_copyright): Update to 2001.
20931
20932 2001-03-17  Jim Meyering  <meyering@lucent.com>
20933
20934         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
20935         now that the version in autoconf is equivalent.
20936         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
20937
20938         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
20939         Suggestion from Akim Demaille.
20940
20941         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
20942         (jm_PREREQ_TEMPNAME): New function.
20943
20944 2001-03-16  Paul Eggert  <eggert@twinsun.com>
20945
20946         * lib/tempname.c (uint64_t): Define to uintmax_t if
20947         not defined, and if UINT64_MAX is not defined.
20948         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
20949         Reported by John David Anglin.
20950
20951 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
20952
20953         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
20954         resolve alias if codeset is empty.
20955         * lib/config.charset (BeOS): Use wildcard syntax.
20956
20957 2001-03-13  Jim Meyering  <meyering@lucent.com>
20958
20959         * lib/path-concat.c (path_concat)
20960         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
20961         concatenating e.g., `C:' and `foo'.
20962         From Bruno Haible.
20963
20964 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
20965
20966         * lib/localcharset.c (locale_charset): Don't use
20967         setlocale(LC_CTYPE,NULL). Don't return NULL.
20968         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
20969
20970 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
20971
20972         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
20973         support for DOS/DJGPP.
20974
20975 2001-03-01  Paul Eggert  <eggert@twinsun.com>
20976
20977         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
20978         lacks mkstemp.  Compile our own tempname.c if we compile our own
20979         mkstemp.c, as mkstemp relies on tempname.
20980
20981 2001-03-01  Jim Meyering  <meyering@lucent.com>
20982
20983         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
20984         AH_VERBATIM really does output its argument verbatim.
20985
20986 2001-02-28  Paul Eggert  <eggert@twinsun.com>
20987
20988         * lib/Makefile.am (libfetish_a_SOURCES):
20989         Add dup-safer.c, fopen-safer.c.
20990         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
20991
20992         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
20993         * lib/unistd-safer.h: New files.
20994
20995 2001-02-25  Paul Eggert  <eggert@twinsun.com>
20996
20997         The mkstemp replacement is taken from glibc 2.2.2, with some
20998         portability fixes for use outside glibc, as follows:
20999
21000         * lib/tempname.c (struct_stat64): New macro.
21001         (direxists, __gen_tempname): Use it.
21002         This avoids a portability problem with Solaris 8.
21003
21004         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
21005         (<stddef.h>, <stdint.h>, <string.h>):
21006         Include only if STDC_HEADERS || _LIBC.
21007         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
21008         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
21009         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
21010         (__set_errno): Define this macro if <errno.h> doesn't.
21011         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
21012         Define these macros if <stdio.h> doesn't.
21013         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
21014         Define these macros if <sys/stat.h>
21015         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
21016         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
21017         __xstat64): Define if not _LIBC.
21018         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
21019         (__gen_tempname): Invoke gettimeofday only if
21020         HAVE_GETTIMEOFDAY || _LIBC;
21021         otherwise, fall back on plain "time".
21022         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
21023
21024         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
21025
21026         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
21027
21028 2001-02-18  Paul Eggert  <eggert@twinsun.com>
21029
21030         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
21031
21032 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21033
21034         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
21035         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
21036         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
21037         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21038
21039 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21040
21041         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
21042         Remove workaround macros for hosts that have mbrtowc but not
21043         mbstate_t, as we now insist on proper declarations for both
21044         before using mbrtowc.
21045
21046 2001-02-17  Jim Meyering  <meyering@lucent.com>
21047
21048         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
21049         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
21050         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
21051         UnixWare 7.1.1.
21052
21053         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
21054         rather than AC_CACHE_VAL.
21055
21056 2001-02-17  Jim Meyering  <meyering@lucent.com>
21057
21058         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
21059         around included file name.
21060
21061         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
21062
21063         * lib/strftime.c: Update from GNU libc (the only changes were to
21064         comments).
21065
21066 2001-02-17  Jim Meyering  <meyering@lucent.com>
21067
21068         * lib/regex.c: Update from libc.
21069
21070 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
21071
21072         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
21073         clash.
21074
21075 2001-02-16  Paul Eggert  <eggert@twinsun.com>
21076
21077         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
21078         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
21079         Reported by Mark Hounschell via Paul Eggert.
21080
21081 2001-02-07  Jim Meyering  <meyering@lucent.com>
21082
21083         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
21084
21085 2001-02-05  Jim Meyering  <meyering@lucent.com>
21086
21087         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
21088         it includes the patch required for `large file' support with at least
21089         HP-UX's 10.20 /bin/cc.
21090
21091 2001-02-03  Jim Meyering  <meyering@lucent.com>
21092
21093         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
21094         AS_IF, now that it works once again (mysteriously).
21095         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21096
21097 2001-01-30  Jim Meyering  <meyering@lucent.com>
21098
21099         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
21100         * m4/chown.m4: Rename conftestchown to conftest.chown.
21101         * m4/rename.m4: s/conftestdir/conftest.d1/ and
21102         s/conftestdir2/conftest.d2/.
21103         * m4/utimes.m4: s/conftestdata/conftest.data/
21104         Inspired by Pavel Roskin's change in autoconf.
21105
21106 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
21107
21108         * lib/config.charset: Update for FreeBSD 4.2.
21109
21110 2001-01-27  Jim Meyering  <meyering@lucent.com>
21111
21112         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
21113         a use of AS_IF.
21114         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21115
21116 2001-01-26  Jim Meyering  <meyering@lucent.com>
21117
21118         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
21119         quotearg.c includes it.
21120
21121 2001-01-26  Jim Meyering  <meyering@lucent.com>
21122
21123         * lib/quotearg.c: Include stddef.h.
21124         * lib/quote.c: Include stddef.h.
21125         Reported by Axel Kittenberger.
21126
21127         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
21128         line in double quotes so that it evokes a better diagnostic.
21129         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
21130         Reported by Axel Kittenberger.
21131
21132 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
21133
21134         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
21135         as if it was a `charset'.
21136
21137 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21138
21139         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
21140         has const.
21141
21142 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21143
21144         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
21145         to avoid a warning.  Add back 'const' to inptr.
21146
21147 2001-01-20  Jim Meyering  <meyering@lucent.com>
21148
21149         Be sure that headers are checked before used in code compiled
21150         for the type checks.
21151         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
21152         In place of that, invoke jm_CHECK_ALL_TYPES.
21153         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
21154         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
21155         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
21156         The check for ssize_t was mistakenly run before the test for unistd.h.
21157
21158         The configure-time check for stdbool.h was missing.
21159         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
21160         (jm_PREREQ_HASH): New function.
21161
21162 2001-01-17  Jim Meyering  <meyering@lucent.com>
21163
21164         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
21165         for autoconf-2.49c.
21166         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
21167
21168 2001-01-16  Jim Meyering  <meyering@lucent.com>
21169
21170         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
21171         From Bruno Haible.
21172
21173 2001-01-14  Jim Meyering  <meyering@lucent.com>
21174
21175         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
21176         foo and bar.  Create conftestdir/ in the script, not in the C code.
21177         Remove directories in the script, not in the C code.
21178         Remove conftestdir{,2} before trying to create the directory.
21179         Make the entire configure script fail if the mkdir fails.
21180
21181 2001-01-14  Jim Meyering  <meyering@lucent.com>
21182
21183         * lib/rename.c: New file.  From Volker Borchert.
21184         Include stdlib.h, string.h or strings.h, and xalloc.h.
21185         Use strip_trailing_slashes rather than open-coding it.
21186
21187 2001-01-03  Paul Eggert  <eggert@twinsun.com>
21188
21189         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
21190
21191 2001-01-03  Jim Meyering  <meyering@lucent.com>
21192
21193         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
21194         of local `inptr' to avoid warning with some system declarations of
21195         iconv.
21196
21197 2001-01-02  Volker Borchert  <bt@teknon.de>
21198
21199         * m4/rename.m4: New file.
21200         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
21201
21202 2001-01-01  Jim Meyering  <meyering@lucent.com>
21203
21204         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
21205         even on systems with utmpx.h.  It's necessary for the declaration of
21206         utmp's ut_user member.  Reported by Andreas Jaeger.
21207
21208         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
21209         available. They are required for the declarations of getgrgid and
21210         getpwuid resp.
21211         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
21212         Reported by Andreas Jaeger.
21213
21214 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
21215
21216         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
21217         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
21218         so `make install' also works in VPATH builds.
21219
21220 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
21221
21222         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
21223         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
21224         can be used in subdirectories.
21225
21226 2000-12-29  Paul Eggert  <eggert@twinsun.com>
21227
21228         * lib/modechange.c: Do not assume that mode_t uses the
21229         traditional octal encoding.  E.g. "chmod 1 FOO" should set
21230         the other-execute bit of FOO even if S_IXOTH != 1.
21231
21232         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
21233         WOTH, XOTH, ALLM): New macros.
21234         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
21235          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
21236         Use them.
21237         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
21238         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
21239         (mode_compile):
21240         No need to use uintmax_t; unsigned long is long enough.
21241         Don't bother to get suffix since we don't use it.
21242
21243 2000-12-26  Jim Meyering  <meyering@lucent.com>
21244
21245         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
21246         better with autoheader.
21247
21248 2000-12-24  Jim Meyering  <meyering@lucent.com>
21249
21250         * lib/hash.c (is_prime): Return explicit boolean values.
21251         (hash_get_first): Return NULL to appease Irix5.6's 89.
21252         Reported by Nelson Beebe.
21253
21254 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
21255
21256         * lib/localcharset.c (locale_charset): Add support for Win32.
21257
21258 2000-12-18  Paul Eggert  <eggert@twinsun.com>
21259
21260         * lib/physmem.h, lib/physmem.c: New files.
21261
21262         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
21263         (noinst_HEADERS): Add physmem.h.
21264
21265         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
21266         't' for compatibility with Solaris 8 sort.
21267
21268 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
21269
21270         * lib/config.charset: Add support for BeOS.
21271
21272 2000-12-17  Jim Meyering  <meyering@lucent.com>
21273
21274         * m4/dos.m4 (jm_AC_DOS): New file and macro.
21275         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
21276
21277 2000-12-16  Jim Meyering  <meyering@lucent.com>
21278
21279         This bug had a serious impact on chown: `chown N:M FILE' (for integer
21280         N and M) would have treated it like `chown N:N FILE'.
21281
21282         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
21283
21284 2000-12-16  Jim Meyering  <meyering@lucent.com>
21285
21286         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
21287         SHELLS_FILE to a file name that's useful on djgpp systems.
21288         Include stdlib.h.
21289         (ADDITIONAL_DEFAULT_SHELLS): Define.
21290         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
21291         Based mostly on a patch from Prashant TR.
21292
21293 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
21294
21295         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
21296         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
21297         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
21298
21299 2000-12-08  Andreas Schwab  <schwab@suse.de>
21300
21301         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
21302         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
21303
21304 2000-12-07  Jim Meyering  <meyering@lucent.com>
21305
21306         * lib/stripslash.c (ISSLASH): Define.
21307         (strip_trailing_slashes): Use ISSLASH rather than comparing against
21308         `/'.
21309         From Prashant TR.
21310
21311         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
21312         (dir_name_r): Declare this function as static.
21313         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
21314         manifest itself on a name containing a mix of slashes and
21315         backslashes.
21316         Make this function work with names starting with a DOS-style
21317         drive letter and colon prefix.
21318         (dir_name): Append `.' if necessary.
21319         Based mostly on patches from Prashant TR and Eli Zaretskii.
21320
21321         * lib/dirname.h (dir_name_r): Remove prototype.
21322
21323 2000-12-06  Paul Eggert  <eggert@twinsun.com>
21324
21325         * m4/off_t-format.m4: Remove this file.
21326         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
21327
21328 2000-12-06  Jim Meyering  <meyering@lucent.com>
21329
21330         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
21331         replacement strtoull, we may well need the replacement strtoul, too.
21332         Check for declarations of strtoul and strtoull.
21333         Check for strtol.  Mainly as a cue to cause automake to include
21334         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
21335         Check for limits.h -- strtol.c needs it.
21336
21337 2000-12-05  Jim Meyering  <meyering@lucent.com>
21338
21339         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
21340
21341 2000-12-04  Jim Meyering  <meyering@lucent.com>
21342
21343         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
21344         Also include memory.h, stdlib.h, unistd.h if appropriate.
21345         Reported by Andreas Jaeger (conflicting declaration of malloc).
21346
21347 2000-12-02  Jim Meyering  <meyering@lucent.com>
21348
21349         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
21350         * m4/jm-macros.m4 (jm_MACROS): require it.
21351
21352 2000-12-02  Jim Meyering  <meyering@lucent.com>
21353
21354         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
21355
21356 2000-12-01  Paul Eggert  <eggert@twinsun.com>
21357
21358         * lib/memrchr.c: Include <config.h> before any system include file.
21359
21360 2000-11-30  Jim Meyering  <meyering@lucent.com>
21361
21362         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
21363
21364 2000-11-30  Jim Meyering  <meyering@lucent.com>
21365
21366         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
21367
21368 2000-11-29  Paul Eggert  <eggert@twinsun.com>
21369
21370         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
21371
21372 2000-11-26  Jim Meyering  <meyering@lucent.com>
21373
21374         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
21375
21376 2000-11-22  Paul Eggert  <eggert@twinsun.com>
21377
21378         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
21379         size of (size_t) -1; it's not portable.
21380
21381 2000-11-17  Jim Meyering  <meyering@lucent.com>
21382
21383         * lib/strstr.c: Update from GNU libc.
21384
21385 2000-11-17  Akim Demaille  <akim@epita.fr>
21386
21387         * lib/obstack.h: Formatting changes.
21388         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
21389         prevent type checking.
21390         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21391         cast the value to (void *): assigning a `foo *' to a `void *'
21392         variable is valid.
21393         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21394
21395 2000-11-16  Jim Meyering  <meyering@lucent.com>
21396
21397         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
21398
21399 2000-11-11  Jim Meyering  <meyering@lucent.com>
21400
21401         * lib/error.c: Add a couple #includes, merging from GNU libc version.
21402
21403 2000-11-10  Jim Meyering  <meyering@lucent.com>
21404
21405         * lib/obstack.h: Update from GNU libc.
21406         * lib/obstack.c: Likewise.
21407
21408 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
21409
21410         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
21411
21412 2000-11-06  Paul Eggert  <eggert@twinsun.com>
21413
21414         * lib/getusershell.c (setusershell): Use rewind rather than
21415         fseek/fseeko, to avoid configuration hassles with fseeko.
21416         Don't bother opening SHELLS_FILE if shellstream is NULL;
21417         it's not necessary.
21418
21419 2000-11-05  Jim Meyering  <meyering@lucent.com>
21420
21421         * lib/makepath.h (make_dir): Declare.
21422         * lib/makepath.c (make_dir): Remove `static' attribute.
21423         Tweak a comment.
21424
21425 2000-11-04  Jim Meyering  <meyering@lucent.com>
21426
21427         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
21428
21429 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
21430
21431         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
21432         last one in a bucket, advance to the next bucket.
21433
21434 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
21435
21436         * lib/fnmatch.c: Do not comment out all the code if we are using
21437         the GNU C library, because in some cases we are replacing buggy
21438         code in the GNU C library itself.
21439
21440 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
21441
21442         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
21443         (regex_compile): Catch bogus \(\1\).
21444
21445 2000-10-30  Paul Eggert  <eggert@twinsun.com>
21446
21447         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
21448         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
21449         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
21450
21451 2000-10-30  Paul Eggert  <eggert@twinsun.com>
21452
21453         * lib/error.h, getline.h, modechange.h:
21454         Remove "2000" from Copyright line, as the file hasn't been
21455         changed this year other than in the copyright notice.
21456
21457         * lib/xalloc.h: Add "2000" to Copyright line, as this file
21458         was changed this year.
21459
21460 2000-10-29  Jim Meyering  <meyering@lucent.com>
21461
21462         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
21463         renaming.
21464         * m4/ls-mntd-fs.m4: Likewise
21465
21466 2000-10-29  Jim Meyering  <meyering@lucent.com>
21467
21468         * lib/xstat.in: Fix grammar in comment.
21469
21470 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
21471
21472         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
21473         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
21474         doesn't define __restrict_arr.
21475
21476 2000-10-28  Jim Meyering  <meyering@lucent.com>
21477
21478         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
21479         (jm_PREREQ_MEMCHR): New function.
21480
21481 2000-10-28  Jim Meyering  <meyering@lucent.com>
21482
21483         * lib/memchr.c: Update from libc.
21484         Adjust for portability:
21485         [HAVE_STDLIB_H]: Include stdlib.h.
21486         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
21487         Undef __memchr, too.
21488         [!weak_alias]: Define __memchr to memchr.
21489
21490         * lib/regex.c: Update from libc.
21491         * lib/regex.h: Likewise.
21492         * lib/getopt1.c: Likewise.
21493         * lib/memcmp.c: Likewise.
21494
21495         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
21496         Avoid using fseek, when possible -- it's broken by design.
21497         Patch by Ulrich Drepper.
21498
21499 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
21500
21501         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
21502         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
21503         Giving in to popular pressure to shut up the compiler with casts.
21504
21505 2000-10-26  Jim Meyering  <meyering@lucent.com>
21506
21507         * lib/strftime.c: Update from libc.
21508
21509 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
21510
21511         * regex.c: More `unsigned char' -> `re_char' changes.
21512         Also change several `int' into `re_wchar_t'.
21513         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
21514         (PUSH_FAILURE_POINTER): Don't cast any more.
21515         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
21516         We want GCC to complain, since this piece of code makes
21517         re_match non-reentrant, which *should* be fixed.
21518         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
21519         (EXTEND_BUFFER): Use RETALLOC.
21520         (SET_LIST_BIT): Don't cast.
21521         (re_wchar_t): New type.
21522         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
21523         that those two functions will always properly return.
21524         (IMMEDIATE_QUIT_CHECK): Cast to void.
21525         (analyse_first): Use recursion rather than an explicit stack.
21526         (re_compile_fastmap): Can't fail anymore.
21527         (re_search_2): Don't check re_compile_fastmap for failure.
21528         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
21529         Now also sets the new value (passed in a new argument).
21530         (re_match_2_internal): Use it.
21531         Also, use a new var `reg' of type size_t when looping through regs
21532         rather than reuse the inappropriate `mcnt'.
21533
21534 2000-10-25  Jim Meyering  <meyering@lucent.com>
21535
21536         * lib/obstack.c: Update from libc.
21537
21538 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
21539
21540         * regex.c (regex_compile): Change the way of handling a range from
21541         a char less than 256 to a char not less than 256.
21542
21543 2000-10-24  Andrew Innes  <andrewi@gnu.org>
21544
21545         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
21546         NT-Emacs only.
21547         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
21548         so that re_search functions only quit when callers expect them to.
21549
21550 2000-10-23  Jim Meyering  <meyering@lucent.com>
21551
21552         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
21553         wrong.  That set_locale call must not have any side effects.
21554         From Paul Eggert.
21555
21556 2000-10-22  Jim Meyering  <meyering@lucent.com>
21557
21558         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
21559         [CYCLIC]: Remove now-unused definition.
21560
21561         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
21562         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
21563         Suggestion from Ulrich Drepper.
21564
21565 2000-10-21  Jim Meyering  <meyering@lucent.com>
21566
21567         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
21568         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
21569         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
21570
21571 2000-10-21  Jim Meyering  <meyering@lucent.com>
21572
21573         * lib/dirname.c (memrchr): Declare if necessary.
21574         (dir_name): Remove the restriction that there be no
21575         trailing slashes.  Now, this code skips past them, effectively
21576         ignoring them.
21577         [TEST_DIRNAME] (main): New unit tests.
21578
21579         * lib/memrchr.c: New file from GNU libc.
21580         Undef __memrchr, too.
21581         [!weak_alias]: Define __memrchr to memrchr.
21582         Guard weak_alias use with `#ifdef weak_alias'.
21583
21584 2000-10-21  Jim Meyering  <meyering@lucent.com>
21585
21586         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
21587         (dir_name): Use dir_name_r.
21588         * lib/dirname.h (dir_name_r): Declare it.
21589
21590 2000-10-17  Jim Meyering  <meyering@lucent.com>
21591
21592         * lib/quote.h (PARAMS): Define and use.
21593         Reported by Akim Demaille.
21594
21595         * lib/getopt.c: Update from libc.
21596
21597 2000-10-16  Jim Meyering  <meyering@lucent.com>
21598
21599         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
21600         setlocale.
21601         From Jan Fedak.
21602
21603 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
21604
21605         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
21606
21607 2000-09-25  Jim Meyering  <meyering@lucent.com>
21608
21609         * lib/md5.h (rol): Define (from GnuPG).
21610
21611         * lib/sha.c: Give credit (GnuPG) where due.
21612         (M): Use rol rather than open-coding it.
21613         Add a FIXME comment.
21614
21615 2000-09-21  Jim Meyering  <meyering@lucent.com>
21616
21617         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
21618         Reported by Michael Stone.
21619
21620 2000-09-20  Jim Meyering  <meyering@lucent.com>
21621
21622         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
21623         (noinst_HEADERS): Add sha.h.
21624         Based on code from Scott G. Miller and from GnuPG.
21625
21626 2000-09-18  Jim Meyering  <meyering@lucent.com>
21627
21628         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
21629         LIBS. Otherwise, everyone ends up linking with -lelf for some
21630         configurations.
21631         Reported by Mike Stone.
21632
21633 2000-09-15  Jim Meyering  <meyering@lucent.com>
21634
21635         * lib/regex.c: Update from libc.
21636
21637 2000-09-10  Jim Meyering  <meyering@lucent.com>
21638
21639         * lib/getopt.c (_getopt_internal): Update from glibc.
21640
21641 2000-09-09  Jim Meyering  <meyering@lucent.com>
21642
21643         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
21644         think it should be used as a general replacement for isascii.
21645         * lib/fnmatch.c: Likewise.
21646         * lib/mbswidth.c: Likewise
21647         * lib/regex.c: Likewise.
21648
21649         Don't use atoi.
21650         * lib/userspec.c: Include sys/param.h and limits.h.
21651         Include xstrtol.h.
21652         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21653         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
21654         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
21655         UID, GID.  Check range.
21656
21657 2000-09-06  Jim Meyering  <meyering@lucent.com>
21658
21659         * lib/getopt.c (_getopt_internal): Update from glibc.
21660
21661 2000-08-30  Jim Meyering  <meyering@lucent.com>
21662
21663         * lib/strftime.c: Merge in changes from GNU libc.
21664
21665 2000-08-26  Jim Meyering  <meyering@lucent.com>
21666
21667         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
21668         * m4/fpending.m4: New file.
21669
21670 2000-08-26  Jim Meyering  <meyering@lucent.com>
21671
21672         * lib/closeout.c: Include "__fpending.h".
21673         (close_stdout_status): Return right away if there's nothing to flush.
21674
21675         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
21676         * lib/__fpending.c: New file.
21677         * lib/__fpending.h: New file.
21678
21679 2000-08-20  Jim Meyering  <meyering@lucent.com>
21680
21681         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
21682         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
21683         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
21684
21685 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
21686
21687         Improve fileutils installation on systems where running
21688         programs (like install) can't be unlinked.
21689         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
21690         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
21691
21692 2000-08-07  Paul Eggert  <eggert@twinsun.com>
21693
21694         Standardize on "memory exhausted" instead of "Memory exhausted"
21695         or "virtual memory exhausted".
21696         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
21697         "virtual memory exhausted".
21698         * lib/same.c (same_name): Invoke xalloc_die instead of printing
21699         our own message.
21700         * lib/userspec.c (parse_user_spec): Likewise.
21701         * lib/bumpalloc.h: comment fix
21702         * lib/same.c, userspec.c: Include xalloc.h.
21703
21704         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
21705         not char *const and pointing to a constant array.
21706         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
21707         (xrealloc): Comment fix.
21708
21709         * lib/userspec.c (parse_user_spec):
21710         Don't translate a message until just before returning,
21711         to avoid unnecessary translation.
21712
21713 2000-08-07  Jim Meyering  <meyering@lucent.com>
21714
21715         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
21716         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
21717         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
21718         getgroups.c, gethostname.c, getopt.h, group-member.c,
21719         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
21720         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
21721         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
21722         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
21723         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
21724         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
21725         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
21726         yesno.c: Back out Copyright date changes for each file with no change
21727         this year.  This eases coordination with other programs using the same
21728         source code modules.  From Paul Eggert.
21729
21730 2000-08-06  Paul Eggert  <eggert@twinsun.com>
21731
21732         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
21733         not char, for compatibility with glibc 2.1.3 strftime.c.
21734
21735 2000-08-03  Greg McGary  <greg@mcgary.org>
21736
21737         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
21738         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
21739         (EXTEND_BUFFER): Use them.
21740
21741 2000-08-01  Jim Meyering  <meyering@lucent.com>
21742
21743         * lib/dirname.c (ISSLASH): Define.
21744         (BACKSLASH_IS_PATH_SEPARATOR): Define.
21745         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
21746         both `\' and `/' may be use as path separators.
21747         Based on a patch from Prashant TR.
21748
21749 2000-07-31  Paul Eggert  <eggert@twinsun.com>
21750
21751         * lib/quotearg.c (quotearg_n_options): Don't make the initial
21752         slot vector a constant, since it might get modified.
21753
21754 2000-07-31  Jim Meyering  <meyering@lucent.com>
21755
21756         * lib/xmalloc.c: Use `virtual memory exhausted', not
21757         `Memory exhausted'.
21758         * lib/obstack.c (print_and_abort): Likewise.
21759
21760 2000-07-30  Paul Eggert  <eggert@twinsun.com>
21761
21762         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
21763         buffer, so that the caller can always quote one small
21764         component of a "memory exhausted" message in slot 0.
21765         From a suggestion by Jim Meyering.
21766
21767 2000-07-30  Jim Meyering  <meyering@lucent.com>
21768
21769         * lib/makepath.c (make_path): Quote the other instance, too.
21770
21771         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
21772         (STATIC_BUF_SIZE): Define.
21773         (quotearg_n_options): Use only statically allocated storage when
21774         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
21775         than STATIC_BUF_SIZE.
21776
21777 2000-07-29  Jim Meyering  <meyering@lucent.com>
21778
21779         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
21780         * lib/dirname.c (dir_name): Likewise.
21781
21782         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
21783         `/'.
21784
21785         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
21786         (dir_name): Assert that there are no trailing slashes.
21787
21788 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
21789
21790         * lib/mbswidth.h (mbswidth): Add a flags argument.
21791         (mbswidth): New declaration.
21792         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
21793         * lib/mbswidth.c (mbswidth): Add a flags argument.
21794         (mbsnwidth): New function.
21795
21796 2000-07-24  Jim Meyering  <meyering@lucent.com>
21797
21798         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
21799
21800 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21801
21802         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
21803
21804 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21805
21806         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
21807         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
21808         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
21809         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
21810         invoke multibyte primitives.
21811
21812 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21813
21814         * lib/quotearg.c:
21815         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
21816         so that mbstate_t is always defined.
21817
21818         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
21819         be 1 in at least one GCC installation, and this configuration
21820         error is likely to be common.  Ignoring MB_LEN_MAX hurts
21821         performance on hosts that have mbrtowc but have only unibyte
21822         locales, but I assume these hosts are rare.
21823
21824 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21825
21826         * lib/mbswidth.c (_XOPEN_SOURCE):
21827         Don't define; this causes problems on Solaris 7.
21828         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
21829
21830 2000-07-23  Jim Meyering  <meyering@lucent.com>
21831
21832         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
21833         too: getgrgid, getpwuid, getuid.
21834
21835 2000-07-23  Jim Meyering  <meyering@lucent.com>
21836
21837         * lib/basename.c (base_name): Add an assertion.
21838
21839 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
21840
21841         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
21842         shadow its mbsinit function.
21843
21844 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
21845
21846         * lib/mbswidth.h: New file.
21847         * lib/mbswidth.c: New file.
21848         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
21849         (noinst_HEADERS): Add mbswidth.h.
21850
21851 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
21852
21853         * lib/config.charset: Add support for FreeBSD. Improve support for
21854         HP-UX and IRIX 6.
21855
21856 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
21857
21858         * m4/mbswidth.m4: New file.
21859         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
21860
21861 2000-07-15  Jim Meyering  <meyering@lucent.com>
21862
21863         * lib/makepath.c: Include quote.h.
21864         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
21865         corresponding argument in a `quote (...)' call.
21866         Give better diagnostics.
21867
21868         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
21869         (noinst_HEADERS): Add quote.h.
21870
21871         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
21872         from tar's src/misc.c.
21873         * lib/quote.h: New file.  Prototypes for same.
21874
21875 2000-07-14  Paul Eggert  <eggert@twinsun.com>
21876
21877         From a suggestion by Bruno Haible.
21878         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
21879         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
21880         to decide whether to define the BeOS workaround macro;
21881         this adjusts to the change to AC_MBSTATE_T.
21882
21883 2000-07-14  Jim Meyering  <meyering@lucent.com>
21884
21885         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
21886         jm_AC_TYPE_UINTMAX_T.
21887
21888 2000-07-13  Paul Eggert  <eggert@twinsun.com>
21889
21890         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
21891
21892         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
21893         quotearg_buffer_restyled): Add support for
21894         clocale_quoting_style.  Undo previous change to
21895         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
21896         and "{RIGHT QUOTATION MARK}" msgids.
21897
21898 2000-07-10  Paul Eggert  <eggert@twinsun.com>
21899
21900         From a suggestion by Bruno Haible.
21901         * m4/mbstate_t.m4 (AC_MBSTATE_T):
21902         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
21903         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
21904         and mbstate_t, to a single-part test that simply defines mbstate_t.
21905         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
21906         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
21907
21908 2000-07-10  Jim Meyering  <meyering@lucent.com>
21909
21910         * m4/strerror_r.m4: Mirror the correction made in autoconf.
21911
21912         * m4/gnu-source.m4: Output to confdefs.h directly.
21913         Suggestion from Akim Demaille.
21914
21915 2000-07-09  Paul Eggert  <eggert@twinsun.com>
21916
21917         The old behavior of quoting `like this' doesn't look good with
21918         newer, ISO-style fonts.  See:
21919         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
21920
21921         Instead, quote "like this" by default.  Let the translator
21922         tailor the locale-specific quoting behavior by providing
21923         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
21924
21925         * lib/quotearg.c (N_): New macro.
21926         (gettext_default): New function.
21927         (quotearg_buffer_restyled): Use
21928         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
21929         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
21930
21931 2000-07-09  Jim Meyering  <meyering@lucent.com>
21932
21933         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
21934         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
21935
21936         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
21937         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
21938
21939 2000-07-09  Jim Meyering  <meyering@lucent.com>
21940
21941         * lib/Most files: Update copyright dates to include 2000.
21942
21943 2000-07-08  Jim Meyering  <meyering@lucent.com>
21944
21945         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
21946         if not defined.
21947         (xgethostname): Remove now-unnecessary #ifdef.
21948         Move declaration of `err' into loop where it's used.
21949
21950 2000-07-05  Paul Eggert  <eggert@twinsun.com>
21951         and Bruno Haible  <haible@clisp.cons.org>
21952
21953         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
21954         only if the test for an object-type mbstate_t fails.  This
21955         prevents us from mistakenly reporting that mbstate_t is a
21956         system object type after we "#define mbstate_t int" to work
21957         around its lack.
21958
21959 2000-07-05  Paul Eggert  <eggert@twinsun.com>
21960         and Bruno Haible  <haible@clisp.cons.org>
21961
21962         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
21963
21964 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21965
21966         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
21967         to strerror_r.
21968         Include <ctype.h> for use of isalpha.
21969
21970 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21971
21972         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
21973         by allocating a larger buffer. Test the gethostname return value for
21974         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
21975         returns an error and ENAMETOOLONG isn't defined.
21976
21977 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21978
21979         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
21980         dimension.
21981
21982 2000-07-04  Jim Meyering  <meyering@lucent.com>
21983
21984         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
21985         of the deprecated AC_CHECKING.
21986
21987 2000-07-04  Jim Meyering  <meyering@lucent.com>
21988
21989         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
21990         Reported by Bruno Haible.
21991
21992 2000-07-04  Jim Meyering  <meyering@lucent.com>
21993
21994         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
21995         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
21996         lacks mbrtowc.
21997
21998 2000-07-03  Paul Eggert  <eggert@twinsun.com>
21999
22000         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
22001         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
22002
22003 2000-07-03  Paul Eggert  <eggert@twinsun.com>
22004         and Bruno Haible  <haible@clisp.cons.org>
22005
22006         * lib/quotearg.c (mbrtowc):
22007         Assign to *pwc, and return 1 only if result is nonzero.
22008         (iswprint): Use ISPRINT when substituting our own mbrtowc.
22009
22010 2000-07-03  Jim Meyering  <meyering@lucent.com>
22011
22012         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
22013
22014 2000-07-03  Jim Meyering  <meyering@lucent.com>
22015
22016         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
22017         This is necessary to get a definition of e.g., UTMP_FILE on
22018         HP-UX 10.20.
22019         From Bob Proulx.
22020
22021 2000-07-02  Jim Meyering  <meyering@lucent.com>
22022
22023         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
22024
22025         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
22026         AC_LIBOBJ(function_name).
22027         * m4/chown.m4: Likewise.
22028         * m4/fnmatch.m4: Likewise.
22029         * m4/ftruncate.m4: Likewise.
22030         * m4/getgroups.m4: Likewise.
22031         * m4/getline.m4: Likewise.
22032         * m4/group-member.m4: Likewise.
22033         * m4/jm-macros.m4: Likewise.
22034         * m4/lstat.m4: Likewise.
22035         * m4/malloc.m4: Likewise.
22036         * m4/memcmp.m4: Likewise.
22037         * m4/nanosleep.m4: Likewise.
22038         * m4/putenv.m4: Likewise.
22039         * m4/realloc.m4: Likewise.
22040         * m4/regex.m4: Likewise.
22041         * m4/stat.m4: Likewise.
22042         * m4/strftime.m4: Likewise.
22043
22044 2000-07-02  Jim Meyering  <meyering@lucent.com>
22045
22046         * lib/quotearg.c (mbstate_t): Don't define here.
22047
22048 2000-07-02  Jim Meyering  <meyering@lucent.com>
22049
22050         * lib/nanosleep.c (SIGCONT): Define if not already defined.
22051
22052 2000-07-01  Jim Meyering  <meyering@lucent.com>
22053
22054         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
22055
22056 2000-07-01  Jim Meyering  <meyering@lucent.com>
22057
22058         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
22059         problem.
22060
22061 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22062
22063         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
22064         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
22065
22066 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22067
22068         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
22069         per change in ../m4/ls-mntd-fs.m4.
22070         (read_filesystem_list): Ignore symbolic links.
22071
22072 2000-06-29  Jim Meyering  <meyering@lucent.com>
22073
22074         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
22075         for declaration of strcmp.
22076
22077         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
22078
22079         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
22080         Avoid warning by casting result to `char *' to remove `const'.
22081
22082 2000-06-28  Jim Meyering  <meyering@lucent.com>
22083
22084         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
22085         included by quotearg.c, for which we perform this test.  From
22086         Bruno Haible.
22087
22088 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22089
22090         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
22091         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
22092         <utmpx.h> exists, put readutmp.o into LIBOBJS.
22093
22094 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22095
22096         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
22097
22098 2000-06-26  Paul Eggert  <eggert@twinsun.com>
22099
22100         savedir now sets errno on failure and invokes xmalloc to get memory.
22101         Fix a couple of other minor bugs while we're at it.
22102
22103         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
22104         (NAMLEN): Remove macro.
22105         (malloc, realloc): Remove decls.
22106         (stpcpy): Likewise.
22107         ("xalloc.h"): Include.
22108         (NAME_SIZE_DEFAULT): New macro.
22109         (savedir): Use xmalloc / xrealloc to allocate memory.
22110         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
22111         Skip "" directory entries.
22112         Use strlen to calculate directory entry length, since the old method
22113         is rarely used these days and isn't worth supporting.
22114         Don't use a pointer after freeing it.
22115         Check for integer overflow when calculating allocation size.
22116         Use memcpy to copy entries, instead of stpcpy.
22117         Set errno properly when returning NULL.
22118         Check for readdir error.
22119
22120 2000-06-26  Jim Meyering  <meyering@lucent.com>
22121
22122         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
22123
22124 2000-06-25  Jim Meyering  <meyering@lucent.com>
22125
22126         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
22127         Linux header bug when _XOPEN_SOURCE is defined to 500.
22128
22129 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22130
22131         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
22132         deficiency.
22133
22134 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22135
22136         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
22137         Include xalloc.h.
22138         Don't include <stdlib.h>.  Don't declare malloc, realloc.
22139
22140 2000-06-24  Jim Meyering  <meyering@lucent.com>
22141
22142         * m4/strerror_r.m4: Revive this file -- to try out an experimental
22143         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
22144         for which strerror does return char*, but which lacks a conveniently
22145         accessible declaration of the function.  If the compile-test says
22146         strerror_r doesn't work, then resort to a `run'-test that works on
22147         BeOS and segfaults on DEC Unix.
22148
22149 2000-06-24  Jim Meyering  <meyering@lucent.com>
22150
22151         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
22152
22153 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22154
22155         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
22156         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
22157
22158 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22159
22160         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
22161         (mbrtowc, mbstate_t): Define substitutes if
22162         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
22163         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
22164         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
22165
22166 2000-06-23  Jim Meyering  <meyering@lucent.com>
22167
22168         * m4/afs.m4: Add missing AC_MSG_RESULT.
22169         Reported by Bruno Haible.
22170
22171         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
22172         Suggestion from Bruno Haible.
22173
22174 2000-06-23  Jim Meyering  <meyering@lucent.com>
22175
22176         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
22177
22178 2000-06-21  Jim Meyering  <meyering@lucent.com>
22179
22180         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
22181
22182 2000-06-21  Jim Meyering  <meyering@lucent.com>
22183
22184         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
22185         (noinst_HEADERS): Add getstr.h.
22186
22187         * lib/getline.c (getstr): Move into a separate file.
22188         * lib/getstr.c (getstr): New file, extracted from getline.c, with
22189         the following changes: new parameter, delim2; both delim[12]
22190         parameters have type `int', not `char'.  The latter would lose
22191         with 8-bit delimiters.
22192         * lib/getstr.h: New file.
22193
22194 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22195
22196         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
22197         than 1024, return a memory chunk of least possible size, instead
22198         of size PATH_MAX + 2. In the loop, increment the size proportionally.
22199         Use free/xmalloc instead of xrealloc to avoid copying for very long
22200         paths.
22201
22202 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22203
22204         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
22205         the empty string.
22206
22207 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22208
22209         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
22210         address, not strdup.  Include <stdlib.h> and don't declare free().
22211
22212 2000-06-19  Jim Meyering  <meyering@lucent.com>
22213
22214         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
22215
22216 2000-06-18  Jim Meyering  <meyering@lucent.com>
22217
22218         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
22219
22220         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
22221         `checking whether...' message to be consistent with that of the
22222         lstat test.
22223
22224 2000-06-18  Jim Meyering  <meyering@lucent.com>
22225
22226         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
22227         Besides, these days every porting target provides a mkdir function.
22228
22229         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
22230         needed. (this snippet comes from src/system.h).
22231
22232 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
22233
22234         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
22235
22236 2000-06-15  Paul Eggert  <eggert@twinsun.com>
22237
22238         * lib/human.c (adjust_value): New function.
22239         (human_readable_inexact): Apply rounding style even when
22240         printing approximate values.
22241
22242 2000-06-14  Paul Eggert  <eggert@twinsun.com>
22243
22244         * lib/human.c (human_readable_inexact): Allow an input block
22245         size that is not a multiple of the output block size, and vice versa.
22246         Reported by Piergiorgio Sartor.
22247
22248 2000-06-14  Paul Eggert  <eggert@twinsun.com>
22249
22250         * lib/getdate.y (get_date): Apply relative times after time
22251         zone indicator, not before.  Reported by Todd A. Jacobs.
22252
22253 2000-06-13  Jim Meyering  <meyering@lucent.com>
22254
22255         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
22256
22257         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
22258
22259 2000-06-12  Paul Eggert  <eggert@twinsun.com>
22260
22261         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
22262
22263 2000-06-12  Jim Meyering  <meyering@lucent.com>
22264
22265         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
22266         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
22267         optional argument.
22268         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
22269         the optional argument, `lib'.
22270
22271 2000-06-08  Jim Meyering  <meyering@lucent.com>
22272
22273         * m4/largefile.m4: Remove file (now that it's part of autoconf).
22274
22275 2000-06-04  Paul Eggert  <eggert@twinsun.com>
22276
22277         Rewrite largefile configuration so that we don't need to run
22278         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
22279         AC_CANONICAL_HOST in configure.in -- jmm]
22280
22281         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
22282         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
22283         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
22284         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
22285         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
22286         All uses changed.
22287         Instead of inspecting the output of getconf, try to compile the
22288         test program without and with the macro definition.
22289         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
22290         for getconf.  Instead, check for the needed flags by compiling
22291         test programs.
22292
22293 2000-06-04  Paul Eggert  <eggert@twinsun.com>
22294
22295         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
22296
22297 2000-06-04  Jim Meyering  <meyering@lucent.com>
22298
22299         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
22300         SunOS 4.1.4 for which gid_t is an unsigned type.
22301
22302 2000-06-03  Jim Meyering  <meyering@lucent.com>
22303
22304         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
22305         now that autoconf requires that.
22306
22307         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
22308         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
22309         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
22310
22311 2000-06-03  Jim Meyering  <meyering@lucent.com>
22312
22313         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
22314
22315 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
22316
22317         * m4/glibc21.m4: New file.
22318         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
22319
22320 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
22321
22322         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
22323         newer, don't install charset.alias.
22324         * lib/config.charset: Change the Linux/glibc rules so they become empty
22325         on glibc-2.1 or newer.
22326
22327 2000-06-02  Jim Meyering  <meyering@lucent.com>
22328
22329         * lib/mountlist.c: Back out last change.  Instead, do this...
22330         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
22331         me_dummy member using the same `ignore'-testing code.
22332         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
22333         fs_type strings.
22334         From Mark D. Roth.
22335
22336 2000-05-29  Jim Meyering  <meyering@lucent.com>
22337
22338         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
22339         mounts with the `ignore' attribute.  Based on a patch from
22340         Mark D. Roth.
22341
22342 2000-05-28  Jim Meyering  <meyering@lucent.com>
22343
22344         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
22345         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
22346         * m4/stat.m4: Likewise.
22347         * m4/lstat.m4: Likewise.
22348         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
22349
22350         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
22351         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
22352
22353 2000-05-26  Jim Meyering  <meyering@lucent.com>
22354
22355         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
22356
22357 2000-05-24  Jim Meyering  <meyering@lucent.com>
22358
22359         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
22360         autoconf requires that.
22361         * m4/lib-check.m4: Likewise.
22362         * m4/jm-macros.m4: Likewise.
22363         * m4/strftime.m4: Likewise.
22364
22365         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
22366         AC_CHECK_DECLS, now that autoconf requires that.
22367
22368 2000-05-22  Jim Meyering  <meyering@lucent.com>
22369
22370         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
22371         * m4/lstat.m4: Likewise.
22372
22373 2000-05-22  Jim Meyering  <meyering@lucent.com>
22374
22375         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
22376
22377 2000-05-20  Jim Meyering  <meyering@lucent.com>
22378
22379         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
22380         (jm_PREREQ): Use it.
22381
22382 2000-05-18  Jim Meyering  <meyering@lucent.com>
22383
22384         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
22385         back, too, since it may have been modified by allocate_entry.
22386         (hash_delete): Rewrite to use neither the assignment operator
22387         nor the comma operator in an if-expression.
22388
22389 2000-05-15  Paul Eggert  <eggert@twinsun.com>
22390
22391         * lib/closeout.c:
22392         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
22393         Remove; no longer needed.
22394         "quotearg.h": Add include.
22395         (file_name): Do not bother to explicitly initialize to NULL; it's less
22396         efficient on some hosts.
22397         (close_stdout_status): Remove test as to whether stdout was already
22398         closed; it breaks for the case "echo x | sort >&-".
22399         Quote file name colons.
22400         Do not assume that _("write error") lacks format strings.
22401
22402 2000-05-15  Jim Meyering  <meyering@lucent.com>
22403
22404         * lib/version-etc.c (version_etc_copyright): Update the copyright
22405         string used in all --version output.
22406
22407 2000-05-14  Jim Meyering  <meyering@lucent.com>
22408
22409         * lib/closeout.c (close_stdout_set_file_name): New function.
22410         (close_stdout_status): Use new file-scoped global.
22411         Return right away if fstat says the stdout file descriptor is invalid.
22412         * lib/closeout.h (close_stdout_set_file_name): Declare.
22413
22414 2000-05-10  Jim Meyering  <meyering@lucent.com>
22415
22416         * lib/closeout.c [default_exit_status]: New file-scoped variable.
22417         (close_stdout_set_status): New function.
22418         * lib/closeout.h (close_stdout_set_status): Declare.
22419
22420 2000-05-09  Jim Meyering  <meyering@lucent.com>
22421
22422         * m4/gettext.m4: Rename this...
22423         * m4/libintl.m4: ...to this.
22424
22425 2000-05-08  Jim Meyering  <meyering@lucent.com>
22426
22427         * lib/long-options.c: Don't include closeout.h.
22428         (parse_long_options): Don't call close_stdout for --version.
22429
22430 2000-05-06  Paul Eggert  <eggert@twinsun.com>
22431
22432         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
22433         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
22434         2.1.3 bug.  This avoids a clash when files like regex.c define
22435         _GNU_SOURCE.
22436
22437 2000-05-06  Jim Meyering  <meyering@lucent.com>
22438
22439         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
22440         (AC_REPLACE_FUNCS): Add strnlen.
22441
22442         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
22443         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
22444
22445         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
22446         AC_SEARCH_LIBS call for nanosleep.
22447         (LIB_NANOSLEEP): Set and AC_SUBST.
22448
22449 2000-05-06  Jim Meyering  <meyering@lucent.com>
22450
22451         * lib/strnlen.c: Undefine __strnlen and strnlen.
22452         [!weak_alias]: Define __strnlen to strnlen.
22453
22454         * lib/atexit.c: New file, from libiberty.
22455
22456 2000-05-06  Jim Meyering  <meyering@lucent.com>
22457
22458         * lib/closeout.c (close_stdout_status): Also check for errors on the
22459         stderr stream.
22460
22461 2000-05-05  Jim Meyering  <meyering@lucent.com>
22462
22463         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
22464         AC_SEARCH_LIBS call for clock_gettime.
22465         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
22466
22467         * m4/search-libs.m4: Update from autoconf.
22468
22469         su doesn't work on Solaris 2.6.
22470         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
22471         <shadow.h>.  Reported by Dragos Harabor.
22472
22473 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
22474
22475         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
22476         memcpy instead of xmalloc, xrealloc, path_concat.
22477         (locale_charset): Treat empty environment variables as absent.
22478         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
22479
22480 2000-05-04  Jim Meyering  <meyering@lucent.com>
22481
22482         * lib/getopt.c: Update from glibc.
22483         * lib/obstack.c: Likewise.
22484         * lib/obstack.h: Likewise.
22485         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
22486         file
22487
22488         * lib/regex.h: Likewise.
22489         * lib/strndup.c: Likewise.
22490         * lib/strnlen.c: New file, from glibc.
22491
22492 2000-05-03  Jim Meyering  <meyering@lucent.com>
22493
22494         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
22495
22496 2000-05-02  Paul Eggert  <eggert@twinsun.com>
22497
22498         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
22499         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
22500         compile-time test, rather than inspecting host and OS, to
22501         decide whether to define _LARGEFILE_SOURCE.
22502
22503 2000-05-01  Jim Meyering  <meyering@lucent.com>
22504
22505         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
22506
22507         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
22508         Based on a patch from Bruno Haible.
22509
22510 2000-05-01  Jim Meyering  <meyering@lucent.com>
22511
22512         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
22513
22514 2000-04-29  Jim Meyering  <meyering@lucent.com>
22515
22516         * lib/path-concat.c: Declare strdup only if it's not defined.
22517         * lib/canon-host.c: Likewise.
22518
22519 2000-04-28  Jim Meyering  <meyering@lucent.com>
22520
22521         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
22522         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
22523         is included first, then limits.h is included by locale.h by libintl.h.
22524         From John David Anglin.
22525
22526 2000-04-25  Jim Meyering  <meyering@lucent.com>
22527
22528         * lib/makepath.c (S_IRWXUGO): Define.
22529         (make_path): Always perform explicit chmod if MODE specifies any
22530         of the `special' permission bits.  Prompted by a bug report against
22531         install from Mate Wierdl and Joost van Baal.
22532
22533 2000-04-18  Jim Meyering  <meyering@lucent.com>
22534
22535         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
22536         (jm_PREREQ): Use it.
22537
22538 2000-04-18  Jim Meyering  <meyering@lucent.com>
22539
22540         * lib/README: New file.
22541
22542         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
22543         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
22544
22545 2000-04-17  Jim Meyering  <meyering@lucent.com>
22546
22547         Get it right :-)
22548         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
22549         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
22550         Suggestion from Akim Demaille.
22551
22552 2000-04-17  Jim Meyering  <meyering@lucent.com>
22553
22554         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
22555         the definition of it to rpl_strftime also defined-away the system's
22556         declaration.
22557
22558 2000-04-15  Jim Meyering  <meyering@lucent.com>
22559
22560         Use `C' to denote so-called `contiguous' files, the same way
22561         that tar does.
22562         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
22563         (ftypelet): Use S_ISCTG.
22564         From Michael Deutschmann.
22565
22566 2000-04-14  Jim Meyering  <meyering@lucent.com>
22567
22568         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
22569         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
22570         clobbered.
22571
22572 2000-04-14  Jim Meyering  <meyering@lucent.com>
22573
22574         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
22575
22576 2000-04-13  Jim Meyering  <meyering@lucent.com>
22577
22578         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
22579         AH_VERBATIM to insert required #ifndef into config.h.in.
22580         Suggestion from Akim Demaille.
22581
22582 2000-04-12  Jim Meyering  <meyering@lucent.com>
22583
22584         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
22585         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
22586         Christian Krackowizer.
22587
22588         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
22589         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
22590         (AC_SYS_LARGEFILE): Require.
22591         (AM_C_PROTOTYPES): Require.
22592
22593 2000-04-08  Jim Meyering  <meyering@lucent.com>
22594
22595         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
22596         names don't conflict.  Reported by Eli Zaretskii.
22597
22598 2000-04-07  Jim Meyering  <meyering@lucent.com>
22599
22600         * lib/putenv.c: Move inclusion of errno.h so it follows that of
22601         sys/types.h, to work around system header problems on AIX 3.2.5.
22602         From Bruno Haible.
22603
22604 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
22605
22606         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
22607         bug.  Deal with the different error behavior of Irix iconv.
22608
22609 2000-04-05  Paul Eggert  <eggert@twinsun.com>
22610
22611         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
22612         IRIX if the installer said otherwise.
22613
22614 2000-04-05  Jim Meyering  <meyering@lucent.com>
22615
22616         Portability tweaks required for ultrix4.3.
22617         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
22618         (jm_CHECK_DECLS): Add getutent to the list of functions.
22619         (_jm_DECL_HEADERS): Add utmpx.h.
22620         From John David Anglin.
22621
22622         * m4/strftime.m4: Back out the 2000-04-02 change.
22623         Instead of that change, simply undefine putenv in the test program.
22624
22625 2000-04-05  Jim Meyering  <meyering@lucent.com>
22626
22627         Portability tweaks required for ultrix4.3.
22628         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
22629         getutent.
22630         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
22631         * lib/canon-host.c: Declare strdup.
22632         * lib/path-concat.c: Likewise.
22633         From John David Anglin.
22634
22635 2000-04-04  Jim Meyering  <meyering@lucent.com>
22636
22637         Be more DOS 8.3-friendly.
22638         * lib/ref-add.sin: Renamed from ref-add.sed.in.
22639         * lib/ref-del.sin: Renamed from ref-del.sed.in.
22640         * lib/Makefile.am: Reflect renaming.
22641         Reported by Eli Zaretskii.
22642
22643         Use a temporary file name that won't clash with `charset.alias'
22644         in the DOS 8.3 name space.
22645         * lib/Makefile.am (charset_tmp): Define.
22646         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
22647         (uninstall-local): Likewise.
22648         Reported by Eli Zaretskii.
22649
22650 2000-04-03  Jim Meyering  <meyering@lucent.com>
22651
22652         * m4/gettext.m4: Fix typo in comment.
22653
22654         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
22655         textutils/configure.in).  Suggestion from Paul Eggert.
22656         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
22657
22658 2000-04-02  Paul Eggert  <eggert@twinsun.com>
22659
22660         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
22661         variable in the shell rather than using putenv, which isn't
22662         portable.  This avoids the configure-time inter-test dependency
22663         on the potentially-renamed putenv function.
22664
22665 2000-03-30  Paul Eggert  <eggert@twinsun.com>
22666
22667         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
22668         before checking struct stat.st_blksize, so that
22669         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
22670
22671 2000-03-29  Paul Eggert  <eggert@twinsun.com>
22672
22673         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
22674         since strftime.c uses HAVE_STRFTIME to decide whether to use
22675         the underlying strftime.
22676
22677 2000-03-29  Paul Eggert  <eggert@twinsun.com>
22678
22679         * lib/time/strftime.c (my_strftime): Make sure we call the system
22680         strftime, not ourselves, when invoking the underlying strftime.
22681
22682 2000-03-24  Jim Meyering  <meyering@lucent.com>
22683
22684         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
22685         (charset_alias): Define.
22686         (install-exec-local): Factor out common code.
22687         (uninstall-local): Split lines longer than 80.
22688         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
22689         (SUFFIXES): Define.
22690         (.sed.in.sed): New rule.  Don't redirect directly to $@.
22691         (CLEANFILES): Add ref-add.sed and ref-del.sed.
22692
22693 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
22694
22695         * lib/config.charset: Output a line containing "Packages using this
22696         file".
22697         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
22698         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
22699         ref-del.sed): New rules.
22700
22701 2000-03-17  Jim Meyering  <meyering@lucent.com>
22702
22703         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
22704         Otherwise, include <strings.h>
22705
22706 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
22707
22708         * lib/unicodeio.c (utf8_wctomb): New function.
22709         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
22710         format instead of in UCS-4 with platform dependent endianness.
22711
22712 2000-03-10  Jim Meyering  <meyering@lucent.com>
22713
22714         * m4/lib-check.m4: Look for getspnam in -lgen, too.
22715         From Marco Franzen.
22716
22717 2000-03-07  Paul Eggert  <eggert@twinsun.com>
22718
22719         * lib/savedir.c (savedir): Work even if directory size is
22720         negative; this can happen with some screwy NFS configurations.
22721
22722 2000-03-06  Jim Meyering  <meyering@lucent.com>
22723
22724         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
22725         if it's NULL (because we ran out of memory).  From Bruno Haible.
22726
22727 2000-03-05  Jim Meyering  <meyering@lucent.com>
22728
22729         * lib/localcharset.c ("path-concat.h"): Include.
22730         (get_charset_aliases): Use path_concat instead of ANSI string
22731         concatenation.
22732
22733         * lib/unicodeio.h (PARAMS): Define.
22734         Use it to guard prototype.
22735
22736 2000-03-04  Jim Meyering  <meyering@lucent.com>
22737
22738         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
22739         for lib/localcharset.c.
22740
22741 2000-03-04  Jim Meyering  <meyering@lucent.com>
22742
22743         * lib/Makefile.am (install-exec-local): Create $(libdir) before
22744         installing into it.
22745         (uninstall-local): Uncomment this rule so `make distcheck' works
22746         once again.
22747
22748         * lib/unicodeio.c (<errno.h>): Include it.
22749         (errno): Declare if not defined.
22750
22751         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
22752
22753         * lib/config.charset: New version, incorporating remarks from a linux
22754         i18n mailing list.  From Bruno Haible.
22755
22756 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
22757
22758         * m4/codeset.m4: New file.
22759         * m4/iconv.m4: New file.
22760         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
22761
22762 2000-03-03  Jim Meyering  <meyering@lucent.com>
22763
22764         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
22765
22766 2000-03-02  Jim Meyering  <meyering@lucent.com>
22767
22768         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
22769         the messages come out on separate lines.
22770
22771         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
22772         rather than jm_CHECK_DECLARATIONS.
22773         * m4/decl.m4: Remove now-unused file.
22774
22775         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
22776         geteuid.
22777
22778 2000-03-02  Jim Meyering  <meyering@lucent.com>
22779
22780         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
22781
22782 2000-03-01  Jim Meyering  <meyering@lucent.com>
22783
22784         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
22785         * lib/unicodeio.c: Likewise.
22786
22787 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
22788
22789         * lib/config.charset: New file.
22790         * lib/localcharset.c: New file.
22791         * lib/unicodeio.h, lib/unicodeio.c: New files.
22792         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
22793         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
22794         (noinst_HEADERS): Add unicodeio.h.
22795         (all-local, install-exec-local, charset.alias): New targets.
22796
22797 2000-02-28  Paul Eggert  <eggert@twinsun.com>
22798
22799         * lib/quotearg.c (ALERT_CHAR): New macro.
22800         (quotearg_buffer_restyled): Use it.
22801
22802 2000-02-27  Jim Meyering  <meyering@lucent.com>
22803
22804         * m4/check-decl.m4: Add getenv to the list.
22805
22806 2000-02-27  Jim Meyering  <meyering@lucent.com>
22807
22808         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
22809         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
22810
22811         * lib/backupfile.c: Guard inclusion of stdlib.h with
22812         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
22813         Declare malloc if needed.
22814
22815         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
22816         `#ifndef HAVE_DECL..'
22817         now that autoconf always defines the HAVE_DECL_ symbols.
22818         * lib/human.c: Likewise.
22819         * lib/same.c: Likewise.
22820         * lib/strtoumax.c: Likewise.
22821
22822         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
22823         declaration check was not run.
22824         * lib/hash.c: Likewise.
22825         * lib/human.c: Likewise.
22826         * lib/same.c: Likewise.
22827         * lib/strtoumax.c: Likewise.
22828
22829         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
22830         `.', then first look up the entire `.'-containing string as a login
22831         name.
22832
22833 2000-02-23  Jim Meyering  <meyering@lucent.com>
22834
22835         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
22836         in place of my hack.
22837
22838 2000-02-18  Paul Eggert  <eggert@twinsun.com>
22839
22840         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
22841         (textint): New typedef.
22842         (parser_control): Member year changed from int to textint.
22843         All uses changed.
22844         (YYSTYPE): Removed; replaced by %union with int and textint members.
22845         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
22846         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
22847         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
22848         (tSNUMBER, tUNUMBER): Now of type <textintval>.
22849         (date, number, to_year): Use width of number in digits, not its value,
22850         to determine whether it's a 2-digit year, or a 2-digit time.
22851         (yylex): Store number of digits of numeric tokens.
22852         Reported by John Kendall.
22853
22854         (parser_control): Changed from struct parser_control to typedef (for
22855         consistency).  All uses changed.
22856
22857         (tID): Removed; not used.
22858         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
22859
22860 2000-02-14  Paul Eggert  <eggert@twinsun.com>
22861
22862         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
22863         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
22864
22865 2000-02-12  Jim Meyering  <meyering@lucent.com>
22866
22867         * lib/userspec.c (ISDIGIT): Define it.
22868         (isdigit): Remove definition.
22869         (is_number): Use ISDIGIT, not isdigit.
22870         <libintl.h>: Include.
22871         (_ and N_): Define.
22872         (parse_user_spec): Mark translatable strings.
22873
22874 2000-02-10  Jim Meyering  <meyering@lucent.com>
22875
22876         With these changes, nanosleep.[ch] are finally enough like the other
22877         lib/* replacement files to compile on a few more losing systems.
22878
22879         * lib/nanosleep.h: Don't include config.h.
22880         Remove prototype from declaration of nanosleep.
22881         (PARAMS): Remove now-unneeded definition.
22882         * lib/nanosleep.c: #undef nanosleep.
22883         (rpl_nanosleep): Rename from nanosleep.
22884
22885 2000-02-10  Jim Meyering  <meyering@lucent.com>
22886
22887         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
22888         gnu_nanosleep to rpl_nanosleep.
22889
22890 2000-02-09  Jim Meyering  <meyering@lucent.com>
22891
22892         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
22893         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
22894
22895 2000-02-08  Akim Demaille  <akim@epita.fr>
22896
22897         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
22898         `[' and `]' and remove uses of `changequote'.
22899         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
22900         (AC_SYS_LARGEFILE): Likewise.
22901         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
22902         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
22903         of changequote.
22904         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
22905         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
22906         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
22907         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
22908
22909 2000-02-05  Jim Meyering  <meyering@lucent.com>
22910
22911         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
22912         Remove explicit use of AC_HEADER_TIME.  It is required by
22913         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
22914         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
22915         in autoconf whereby the expansion of the latter ended up preceding
22916         the expansion of its prerequisite, AC_HEADER_TIME.
22917         Reported by Volker Borchert.
22918
22919 2000-02-03  Jim Meyering  <meyering@lucent.com>
22920
22921         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
22922
22923 2000-02-03  Jim Meyering  <meyering@lucent.com>
22924
22925         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
22926         rather than with `#if HAVE_UTMPNAME'.
22927
22928 2000-02-02  Jim Meyering  <meyering@lucent.com>
22929
22930         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
22931         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
22932         Reported by Eli Zaretskii.
22933
22934 2000-02-01  Jim Meyering  <meyering@lucent.com>
22935
22936         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
22937
22938 2000-01-31  Jim Meyering  <meyering@lucent.com>
22939
22940         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
22941         functions.  Add the time.h and sys/time.h headers along with the
22942         AC_REQUIRE'ment of AC_HEADER_TIME.
22943
22944 2000-01-31  Jim Meyering  <meyering@lucent.com>
22945
22946         * lib/nanosleep.h (nanosleep): Guard declaration with
22947         `#if ! HAVE_DECL_NANOSLEEP'.
22948         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
22949         the declaration in that vendor's sys/timers.h.
22950         Reported by Christian Krackowizer.
22951
22952         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
22953         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
22954         (ISPRINT): Likewise.
22955         Reported by Tom Tromey.
22956
22957 2000-01-30  Jim Meyering  <meyering@lucent.com>
22958
22959         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
22960
22961         * m4/prereq.m4 (utmp_includes): Define.
22962         Check for ut_user and ut_name members in both struct utmpx
22963         and struct utmp.
22964
22965 2000-01-30  Jim Meyering  <meyering@lucent.com>
22966
22967         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
22968         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
22969         header files where only utmpx.ut_user is declared.
22970
22971         * lib/readutmp.h (UT_USER): Define.
22972
22973 2000-01-29  Jim Meyering  <meyering@lucent.com>
22974
22975         * m4/lib-check.m4: New file containing library-related checks from
22976         fileutils and sh-utils (textutils had none).
22977
22978 2000-01-28  Jim Meyering  <meyering@lucent.com>
22979
22980         * m4/perl.m4: Change format of warning message to look more like that
22981         from the missing script.  Suggestion from François Pinard.
22982
22983 2000-01-25  Jim Meyering  <meyering@lucent.com>
22984
22985         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
22986         well as time.h in the compile check.
22987         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
22988         Fix typo in cross-compiling case: s/yes/no/.
22989
22990 2000-01-23  Jim Meyering  <meyering@lucent.com>
22991
22992         * m4/jm-macros.m4: Move df-related tests here from
22993         fileutils/configure.in
22994
22995         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
22996         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
22997
22998         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
22999         s/space/ac_fsusage_space/.
23000         (jm_FILE_SYSTEM_USAGE): Take two parameters.
23001
23002         * m4/ftruncate.m4: New file (derived from part of
23003         fileutils/configure.in).
23004         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
23005         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
23006
23007         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
23008         AC_SUBST these here, rather than just in sh-util/configure.in, so
23009         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
23010         all the same.
23011         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
23012         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
23013         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
23014         (AC_SUBST(POW_LIBM)): Likewise.
23015         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
23016
23017 2000-01-23  Jim Meyering  <meyering@lucent.com>
23018
23019         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
23020         obstack.c.
23021
23022 2000-01-22  Jim Meyering  <meyering@lucent.com>
23023
23024         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
23025
23026         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
23027
23028         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
23029         configure.in
23030         (AC_CHECK_HEADERS): Likewise for sh-utils.
23031         (AC_CHECK_HEADERS): Likewise for textutils.
23032         Merge the three lists of headers.
23033
23034         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
23035         from fileutils' configure.in.
23036
23037         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
23038         code. Moved tests into their own function (_jm_DECL_HEADERS) in
23039         check-decl.m4.
23040
23041         * m4/check-decl.m4: Use #if rather than #ifdef.
23042         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
23043         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
23044         (_jm_DECL_HEADERS): Define new function.
23045         (jm_CHECK_DECLARATIONS): Require it.
23046
23047 2000-01-22  Jim Meyering  <meyering@lucent.com>
23048
23049         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
23050         [! HAVE_DECL_STRTOULL]: Declare strtoull.
23051         Required for some AIX systems.  Reported by Christian Krackowizer.
23052         [TESTING] (main): New function.
23053
23054         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
23055         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
23056         letters.
23057
23058         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
23059         iswprint.
23060
23061         * lib/strverscmp.c (ISDIGIT): Define.
23062         (strverscmp): Use ISDIGIT, not isdigit.
23063
23064 2000-01-19  Jim Meyering  <meyering@lucent.com>
23065
23066         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
23067         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
23068         defines `struct timespec' in <sys/time.h>
23069
23070         * m4/c-bs-a.m4: Remove uses of changequote altogether.
23071         Thanks to Akim for explaining.
23072
23073 2000-01-17  Paul Eggert  <eggert@twinsun.com>
23074
23075         * lib/nanosleep.c (nanosleep):
23076         Don't use SA_INTERRUPT to decide whether to call sigaction, as
23077         POSIX.1 doesn't require SA_INTERRUPT and some systems
23078         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
23079         it's been part of POSIX.1 since day 1 (in 1988).
23080
23081 2000-01-17  Jim Meyering  <meyering@lucent.com>
23082
23083         * lib/interlock: Remove unused file.  Reported by François Pinard.
23084
23085 2000-01-16  Paul Eggert  <eggert@twinsun.com>
23086
23087         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
23088         alert, backslash, formfeed, and vertical tab unnecessarily in
23089         shell quoting style.
23090
23091 2000-01-16  Jim Meyering  <meyering@lucent.com>
23092
23093         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
23094         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
23095         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
23096         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
23097
23098 2000-01-16  Jim Meyering  <meyering@lucent.com>
23099
23100         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
23101         because the latter didn't work.
23102
23103 2000-01-15  Jim Meyering  <meyering@lucent.com>
23104
23105         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
23106         (AC_REPLACE_FUNCS): Add memcpy and memset.
23107         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
23108         Add strpbrk.
23109         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
23110
23111 2000-01-12  Jim Meyering  <meyering@lucent.com>
23112
23113         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
23114         (jm_PREREQ): Use it.
23115         (jm_PREREQ_READUTMP): New macro.
23116         (jm_PREREQ): Use it.
23117
23118 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23119
23120         Quote multibyte characters correctly.
23121         * m4/c-bs-a.m4: New file.
23122         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
23123         (jm_PREREQ): Use it.
23124
23125 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23126
23127         * m4/uintmax_t.m4: Port to autoconf 2.13.
23128
23129 2000-01-08  Jim Meyering  <meyering@ascend.com>
23130
23131         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
23132         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
23133
23134 2000-01-04  Jim Meyering  <meyering@ascend.com>
23135
23136         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
23137         jm_STRUCT_DIRENT_D_TYPE.
23138         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
23139         jm_STRUCT_DIRENT_D_INO.
23140         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
23141         jm_STRUCT_UTIMBUF.
23142         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
23143         renamings.
23144         * m4/utime.m4: Likewise.
23145
23146         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
23147         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
23148
23149 2000-01-03  Paul Eggert  <eggert@twinsun.com>
23150
23151         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
23152         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
23153
23154 2000-01-02  Jim Meyering  <meyering@ascend.com>
23155
23156         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
23157         remember if this is necessary.
23158
23159 1999-12-26  Jim Meyering  <meyering@ascend.com>
23160
23161         * m4/jm-macros.m4: Use it here.
23162         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
23163
23164 1999-12-23  Jim Meyering  <meyering@ascend.com>
23165
23166         * m4/jm-macros.m4: Check for clock_gettime (moved from
23167         fileutils/configure.in)
23168         Check for gettimeofday.
23169
23170 1999-12-20  Jim Meyering  <meyering@ascend.com>
23171
23172         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
23173         autoconf-2.14a-1999-12-20.
23174
23175 1999-12-19  Jim Meyering  <meyering@ascend.com>
23176
23177         * m4/lstat-slash.m4: New file.
23178         * m4/jm-macros.m4: Use the new macro:
23179         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23180
23181 1999-12-07  Jim Meyering  <meyering@ascend.com>
23182
23183         * m4/perl.m4: Require that File::Compare be available, too.
23184         Too many systems seem to lack it.
23185
23186         * m4/strftime.m4: Add checks for most of the cpp macros tested in
23187         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
23188
23189 1999-11-18  Paul Eggert  <eggert@twinsun.com>
23190
23191         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
23192         problem with the QNX 4.25 shell, which doesn't propagate exit
23193         status of failed commands inside shell assignments.
23194
23195 1999-11-17  Jim Meyering  <meyering@ascend.com>
23196
23197         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
23198
23199 1999-11-07  Jim Meyering  <meyering@ascend.com>
23200
23201         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
23202
23203 1999-11-06  Jim Meyering  <meyering@ascend.com>
23204
23205         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
23206         * m4/jm-macros.m4 (jm_MACROS): Use it here.
23207
23208 1999-11-05  Jim Meyering  <meyering@ascend.com>
23209
23210         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
23211         configure.in of textutils, fileutils, and sh-utils into this one
23212         (shared between those packages) file.
23213         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
23214         AC_STRUCT_ST_BLKSIZE.
23215
23216 1999-11-03  Jim Meyering  <meyering@ascend.com>
23217
23218         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
23219         of AC_CHECK_TYPE checks includes unistd.h.
23220         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
23221         Suggestion from Akim Demaille.
23222
23223 1999-10-30  Jim Meyering  <meyering@ascend.com>
23224
23225         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
23226         m4-quoted string.
23227         * m4/ls-mntd-fs.m4: Likewise.
23228         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
23229         * m4/jm-winsz1.m4: Likewise.
23230
23231         * m4/const.m4: Remove file, since the fix made it into the experimental
23232         version of autoconf.
23233         * m4/mktime.m4: Likewise.
23234
23235         * m4/check-type.m4: Remove file, now that the latest version of
23236         AC_CHECK_TYPE takes a third arg to specify additional #includes.
23237
23238         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
23239         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
23240         AC_CHECK_TYPE.
23241
23242 1999-10-04  Jim Meyering  <meyering@ascend.com>
23243
23244         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
23245
23246 1999-09-22  Paul Eggert  <eggert@twinsun.com>
23247
23248         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
23249         2.95.1 bug with HP-UX 10.20.
23250
23251 1999-09-17  Jim Meyering  <meyering@ascend.com>
23252
23253         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
23254         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
23255         due to missing strdup (against sh-utils-2.0).
23256
23257 1999-08-29  Jim Meyering  <meyering@ascend.com>
23258
23259         * m4/jm-macros.m4: Require jm_BISON.
23260         * m4/bison.m4: New file.
23261
23262 1999-08-17  Paul Eggert  <eggert@twinsun.com>
23263
23264         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
23265         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
23266
23267 1999-08-05  Jim Meyering  <meyering@ascend.com>
23268
23269         * m4/getline.m4: Rename test file from conftestdata to conftest.data
23270         to avoid conflicts with `conftest' on 8+3 filesystems.
23271         Suggestion from Eli Zaretskii.
23272
23273 1999-08-04  Jim Meyering  <meyering@ascend.com>
23274
23275         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
23276         fileutils and sh-utils (textutils's getline test was inadequate).
23277         (AM_FUNC_GETLINE): Run this test.
23278         (AC_CHECK_FUNCS): Check for getdelim.
23279         Reported by Bob Proulx.
23280
23281 1999-08-02  Jim Meyering  <meyering@ascend.com>
23282
23283         * m4/jm-macros.m4: Add a comment.
23284
23285 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23286
23287         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
23288         <inttypes.h> defines strtoumax as a macro (and not as a
23289         function).
23290
23291 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23292
23293         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
23294         that we can shift, multiply and divide unsigned long long
23295         values; Ultrix cc can't do it.
23296
23297 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23298
23299         * m4/mktime.m4: New file, which is a preview of what should appear
23300         in the next public autoconf release.
23301
23302 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23303
23304         * m4/lfs.m4: Remove this file.
23305         * m4/largefile.m4: New file.  It contains the old contents of
23306         lfs.m4, except that all names with prefix AC_LFS have been
23307         changed to use the prefix AC_SYS_LARGEFILE instead, to be
23308         compatible with future autoconf versions.  Also, some minor m4
23309         quoting problems have been fixed.
23310
23311 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23312
23313         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
23314         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
23315         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
23316         and simplify the shell code.
23317
23318 1999-08-01  Jim Meyering  <meyering@ascend.com>
23319
23320         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
23321         m4.
23322
23323 1999-07-20  Jim Meyering  <meyering@ascend.com>
23324
23325         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
23326
23327 1999-07-15  Jim Meyering  <meyering@ascend.com>
23328
23329         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
23330
23331 1999-05-22  Jim Meyering  <meyering@ascend.com>
23332
23333         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
23334
23335 1999-05-20  Jim Meyering  <meyering@ascend.com>
23336
23337         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
23338         Add a colon after each `then' in case $4 is empty.
23339
23340 1999-05-16  Jim Meyering  <meyering@ascend.com>
23341
23342         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
23343
23344 1999-05-10  Jim Meyering  <meyering@ascend.com>
23345
23346         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
23347
23348         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
23349         AC_FUNC_MKTIME.
23350
23351 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
23352
23353         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
23354
23355 1999-05-04  Paul Eggert  <eggert@twinsun.com>
23356
23357         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
23358         not CPPFLAGS, so that linking works correctly in IRIX.
23359
23360 1999-04-30  Paul Eggert  <eggert@twinsun.com>
23361
23362         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
23363
23364 1999-04-20  Paul Eggert  <eggert@twinsun.com>
23365
23366         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
23367         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
23368         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
23369         jm_AC_TYPE_UNSIGNED_LONG_LONG.
23370         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
23371
23372         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
23373
23374 1999-04-20  Jim Meyering  <meyering@ascend.com>
23375
23376         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
23377         AC_REPLACE xstroull if necessary.  From Paul Eggert.
23378         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
23379
23380 1999-04-18  Jim Meyering  <meyering@ascend.com>
23381
23382         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
23383         * m4/jm-macros.m4: Use it.
23384
23385 1999-04-06  Jim Meyering  <meyering@ascend.com>
23386
23387         * m4/strftime.m4: Remove test for %f.
23388
23389 1999-03-29  Jim Meyering  <meyering@ascend.com>
23390
23391         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
23392         superset of the AC_TYPE_* checks in the textutils, fileutils,
23393         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
23394         AC_TYPE_PID_T.
23395
23396 1999-03-28  Jim Meyering  <meyering@ascend.com>
23397
23398         * m4/jm-macros.m4: Define GNU_PACKAGE here.
23399         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
23400         replaced e.g., in the *.sh files of the sh-utils.
23401
23402 1999-03-20  Jim Meyering  <meyering@ascend.com>
23403
23404         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
23405         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
23406         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
23407
23408 1999-03-19  Jim Meyering  <meyering@ascend.com>
23409
23410         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
23411
23412 1999-03-12  Jim Meyering  <meyering@ascend.com>
23413
23414         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
23415
23416 1999-03-07  Jim Meyering  <meyering@ascend.com>
23417
23418         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
23419         declared.
23420
23421 1999-02-17  Jim Meyering  <meyering@ascend.com>
23422
23423         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
23424         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
23425
23426 1999-02-07  Jim Meyering  <meyering@ascend.com>
23427
23428         * m4/group-member.m4: New file -- extracted from sh-utils'
23429         configure.in.
23430
23431         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
23432         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
23433
23434 1999-02-06  Jim Meyering  <meyering@ascend.com>
23435
23436         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
23437         * m4/fnmatch.m4: Likewise.
23438         * m4/getgroups.m4: Likewise.
23439         * m4/lstat.m4: Likewise.
23440         * m4/malloc.m4: Likewise.
23441         * m4/putenv.m4: Likewise.
23442         * m4/realloc.m4: Likewise.
23443         * m4/regex.m4: Likewise.
23444         * m4/stat.m4: Likewise.
23445         * m4/strftime.m4: Likewise.
23446         Suggestion from Alain Magloire.
23447
23448         * m4/chown.m4: Use `.$ac_objext', not `.o'.
23449         * m4/fnmatch.m4: Likewise.
23450         * m4/getgroups.m4: Likewise.
23451         * m4/getline.m4: Likewise.
23452         * m4/lstat.m4: Likewise.
23453         * m4/malloc.m4: Likewise.
23454         * m4/memcmp.m4: Likewise.
23455         * m4/putenv.m4: Likewise.
23456         * m4/realloc.m4: Likewise.
23457         * m4/regex.m4: Likewise.
23458         * m4/stat.m4: Likewise.
23459         * m4/strftime.m4: Likewise.
23460         Suggestion from Alain Magloire.
23461
23462         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
23463         an argument.
23464
23465         * m4/regex.m4: Add a run-time Test for proper operation of
23466         re_compile_pattern.
23467
23468 1999-01-31  Jim Meyering  <meyering@ascend.com>
23469
23470         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
23471
23472 1999-01-30  Jim Meyering  <meyering@ascend.com>
23473
23474         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
23475
23476         * m4/jm-mktime.m4: Make this a wrapper around the official
23477         AM_FUNC_MKTIME rather than my private copy, now that the official one
23478         is up to date.
23479         * m4/mktime.m4: Remove file.
23480
23481         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
23482         * m4/uptime.m4: Likewise.
23483         * m4/uintmax_t.m4: Likewise.
23484
23485 1999-01-28  Jim Meyering  <meyering@ascend.com>
23486
23487         * m4/jm-macros.m4: Use jm_AFS.
23488         * m4/afs.m4: New file (from fileutils' configure.in).
23489
23490         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
23491         * m4/chown.m4: Likewise.
23492         * m4/d-ino.m4: Likewise.
23493         * m4/d-type.m4: Likewise.
23494         * m4/fnmatch.m4: Likewise.
23495         * m4/getgroups.m4: Likewise.
23496         * m4/gettext.m4: Likewise.
23497         * m4/jm-mktime.m4: Likewise.
23498         * m4/jm-winsz2.m4: Likewise.
23499         * m4/lcmessage.m4: Likewise.
23500         * m4/ls-mntd-fs.m4: Likewise.
23501         * m4/malloc.m4: Likewise.
23502         * m4/memcmp.m4: Likewise.
23503         * m4/putenv.m4: Likewise.
23504         * m4/realloc.m4: Likewise.
23505         * m4/st_mtim.m4: Likewise.
23506         * m4/strftime.m4: Likewise.
23507
23508 1999-01-16  Jim Meyering  <meyering@ascend.com>
23509
23510         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
23511         (ARGMATCH_DIE_DECL): Define.
23512
23513 1999-01-12  Jim Meyering  <meyering@ascend.com>
23514
23515         * m4/Makefile.am.in: Rewrite to avoid using fmt.
23516         Reported by Lars Hecking.
23517
23518 1999-01-10  Jim Meyering  <meyering@ascend.com>
23519
23520         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
23521         gross kludge.
23522         * m4/inttypes_h.m4: Likewise.
23523         * m4/lstat.m4: Likewise.
23524         * m4/malloc.m4: Likewise.
23525         * m4/readdir.m4: Likewise.
23526         * m4/realloc.m4: Likewise.
23527         * m4/st_dm_mode.m4: Likewise.
23528         * m4/stat.m4: Likewise.
23529         * m4/utimbuf.m4: Likewise.
23530         * m4/utimes.m4: Likewise.
23531
23532         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
23533         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
23534         comments in config.h.in are meaningful.
23535
23536         * m4/jm-macros.m4: Require autoconf-2.13 here.
23537
23538         * m4/regex.m4: By default, don't use the included regex.c on systems
23539         with glibc 2.  Suggestion from Uli Drepper.
23540
23541 1999-01-02  Jim Meyering  <meyering@ascend.com>
23542
23543         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
23544
23545 1998-12-18  Jim Meyering  <meyering@ascend.com>
23546
23547         * m4/Makefile.am.in (Makefile.am): Simplify rule.
23548         Based on a suggestion from Lars Hecking.
23549
23550 1998-11-16  Paul Eggert  <eggert@twinsun.com>
23551
23552         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
23553
23554 1998-11-16  Jim Meyering  <meyering@ascend.com>
23555
23556         * m4/lfs.m4: Double-quote the `uname...` expression.
23557
23558 1998-11-14  Jim Meyering  <meyering@ascend.com>
23559
23560         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
23561         * m4/stat.m4: Likewise.
23562
23563 1998-11-03  Jim Meyering  <meyering@ascend.com>
23564
23565         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
23566         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
23567
23568 1998-10-18  Jim Meyering  <meyering@ascend.com>
23569
23570         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
23571
23572 1998-10-17  Jim Meyering  <meyering@ascend.com>
23573
23574         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
23575         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
23576         calls for those previously hard-coded headers.  Instead, take a new
23577         parameter.
23578         (jm_CHECK_DECLARATIONS): Reflect interface change.
23579         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
23580         (jm_CHECK_DECL_LOCALTIME_R): New macro.
23581
23582         * m4/mktime.m4: Test for spring-forward gap before long-running test.
23583
23584 1998-10-14  Jim Meyering  <meyering@ascend.com>
23585
23586         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
23587         instead of "TZ=America/Vancouver".  From Paul Eggert.
23588
23589 1998-10-11  Jim Meyering  <meyering@ascend.com>
23590
23591         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
23592         This adds a test for a recently added compatibility fix for mktime.c.
23593         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
23594
23595 1998-09-27  Jim Meyering  <meyering@ascend.com>
23596
23597         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
23598
23599         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
23600         ../configure.in, including a change from Gordon Matzigkeit to allow
23601         cross-compiling for the Hurd.
23602
23603         * m4/glibc.m4: New file/macro to test for the GNU C Library
23604         versions 1 and 2.  From Gordon Matzigkeit.
23605         Indent.
23606
23607 1998-09-21  Jim Meyering  <meyering@ascend.com>
23608
23609         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
23610
23611 1998-08-18  Paul Eggert  <eggert@twinsun.com>
23612
23613         Port nanosecond-resolution times to UnixWare 2.1.2 and
23614         pedantic Solaris 2.6.
23615
23616         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
23617         AC_STRUCT_ST_MTIM.
23618         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
23619         Generate name of ns member, instead of just 1 or undef.
23620         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
23621
23622 1998-08-15  Jim Meyering  <meyering@ascend.com>
23623
23624         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
23625         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
23626         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
23627         instead of jm_TYPE_SSIZE_T.
23628
23629 1998-08-12  Jim Meyering  <meyering@ascend.com>
23630
23631         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
23632
23633 1998-08-02  Jim Meyering  <meyering@ascend.com>
23634
23635         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
23636         in acconfig.h manually.
23637
23638 1998-07-31  Paul Eggert  <eggert@twinsun.com>
23639
23640         * m4/st_mtim.m4: New file.
23641
23642 1998-07-28  Jim Meyering  <meyering@ascend.com>
23643
23644         * m4/utimes.m4: Undef stat.
23645
23646 1998-07-25  Jim Meyering  <meyering@ascend.com>
23647
23648         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
23649         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
23650
23651 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
23652
23653         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
23654         uid and gid actually remain unchanged.
23655
23656 1998-07-07  Jim Meyering  <meyering@ascend.com>
23657
23658         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
23659
23660 1998-07-04  Jim Meyering  <meyering@ascend.com>
23661
23662         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
23663         to prove that this macro can be used in packages without regex.c.
23664
23665 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
23666
23667         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
23668         is to be used.
23669
23670 1998-07-03  Jim Meyering  <meyering@ascend.com>
23671
23672         * m4/gettext.m4: Add -lintl if it's found to be necessary.
23673
23674         * m4/gettext.m4: New file -- from gettext-0.10.35.
23675         * m4/lcmessage.m4: Likewise.
23676         * m4/progtest.m4: Likewise.
23677
23678         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
23679         * m4/jm-macros.m4: Require the new macro.
23680
23681 1998-06-29  Jim Meyering  <meyering@ascend.com>
23682
23683         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
23684         for the definition of NGROUPS (used in a system header included
23685         by sys/mount.h).
23686
23687 1998-06-28  Jim Meyering  <meyering@ascend.com>
23688
23689         * m4/ls-mntd-fs.m4: New file.
23690         * m4/fstypename.m4: New file.
23691
23692         * m4/jm-macros.m4: Require the new macro.
23693         * m4/jm-glibc-io.m4: New file.
23694
23695 1998-05-19  Jim Meyering  <meyering@ascend.com>
23696
23697         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
23698         * m4/lchown.m4: New file.
23699
23700         * m4/Makefile.am.in: New file.
23701         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
23702
23703 1998-05-14  Jim Meyering  <meyering@ascend.com>
23704
23705         * m4/Makefile.am (EXTRA_DIST): Add them.
23706         * m4/jm-macros.m4: New file.
23707         * m4/utimbuf.m4: New file.
23708
23709 1998-05-12  Jim Meyering  <meyering@ascend.com>
23710
23711         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
23712
23713 1998-05-11  Jim Meyering  <meyering@ascend.com>
23714
23715         * m4/isc-posix.m4: New file.
23716
23717 1998-05-10  Jim Meyering  <meyering@ascend.com>
23718
23719         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
23720
23721 1998-05-09  Jim Meyering  <meyering@ascend.com>
23722
23723         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
23724         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
23725         with automake.
23726
23727         * m4/ssize_t.m4: New file.
23728         * m4/mktime.m4: Remove file -- the new automake has this now.
23729
23730 1998-04-26  Jim Meyering  <meyering@ascend.com>
23731
23732         * m4/assert.m4: New file.
23733         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
23734
23735 1998-04-05  Jim Meyering  <meyering@ascend.com>
23736
23737         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
23738         (jm_PREREQ): Use it here.
23739
23740 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
23741
23742         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
23743         in acconfig.h.
23744
23745 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
23746
23747         * m4/prereq.m4: New file.
23748         * m4/error.m4: New file.
23749         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
23750
23751 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
23752
23753         * m4/getline.m4: Don't set am_cv_func_working_getline before the
23754         cache-check for the same variable -- that defeated the purpose of
23755         the test; the test program was never run.  This was a problem only
23756         on systems with losing getline functions -- HP-UX 10.20 is one.
23757         Reported by Bjorn Helgaas.
23758
23759 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
23760
23761         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
23762
23763 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
23764
23765         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
23766
23767         * m4/const.m4: New file.  Use an initializer in this declaration
23768         typedef int charset[2]; const charset x;
23769         Reported by Bob Glickstein.
23770
23771 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
23772
23773         * m4/chown.m4: Fix reversed types on -1 args to chown.
23774         From Kaveh Ghazi.
23775
23776 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
23777
23778         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
23779         Add lseek and memchr.
23780
23781         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
23782         T.E.Dickey <dickey@clark.net> said that some older preprocessors
23783         have a 20-character limit on names.
23784
23785 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
23786
23787         * m4/inttypes_h.m4: New file.
23788         * m4/uintmax_t.m4: New file.
23789         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
23790
23791 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
23792   Free Software Foundation, Inc.
23793 Copying and distribution of this file, with or without modification,
23794 are permitted provided the copyright notice and this notice are preserved.