9d3520261b4bec58dbd9b4ce9a7aed4462bc8a2a
[pspp] / ChangeLog
1 2007-08-23  Jim Meyering  <jim@meyering.net>
2
3         Getdelim touchup.
4         * lib/getdelim.c (getdelim): Don't bother to save/restore errno
5         around the funlockfile call, since funlockfile never sets errno.
6         Don't set errno upon failed realloc.
7
8 2007-08-22  Eric Blake  <ebb9@byu.net>
9
10         Getline touchups.
11         * lib/getdelim.c (getdelim): Revert regression that required *n to
12         be 0 when *lineptr is NULL.  Preserve errno across funlockfile.
13         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of
14         getdelim, rather than whether implementation is missing.
15         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline.
16         * lib/stdio_.h (getline): Also declare if replacement is
17         required.
18         * doc/functions/getdelim.texi: New file.
19         * doc/functions/getline.texi: Likewise.
20         * doc/gnulib.texi (Function Substitutes): Add new files.
21         Reported by Bruno Haible.
22
23 2007-08-22  Ludovic Courtès  <ludo@gnu.org>
24
25         * users.txt: Add Guile.
26
27 2007-08-22  Eric Blake  <ebb9@byu.net>
28
29         * tests/test-getdelim.c (main): Use remove, not unlink.
30         * tests/test-getline.c (main): Likewise.
31
32         Move getline and getdelim into stdio.h, per POSIX 200x.
33         * modules/getline (Files): Remove getline.h.
34         (Depends-on): Add stdio.
35         (configure.ac): Add module indicator.
36         * modules/getdelim (Files): Remove getdelim.h.
37         (Depends-on): Add stdio.
38         (configure.ac): Add module indicator.
39         * modules/stdio (Makefile.am): Work with new indicators.
40         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
41         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs.
42         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
43         * lib/getdelim.h: Delete.
44         * lib/getline.h: Delete.
45         * lib/stdio_.h (getdelim, getline): Declare.
46         * modules/getdelim-tests: New module.
47         * modules/getline-tests: Likewise.
48         * tests/test-getdelim.c: New file.
49         * tests/test-getline.c: Likewise.
50         * NEWS: Document the change.
51         * lib/getline.c: Update choice of header.
52         * lib/csharpcomp.c: Likewise.
53         * lib/getpass.c: Likewise.
54         * lib/javacomp.c: Likewise.
55         * lib/javaversion.c: Likewise.
56         * lib/yesno.c: Likewise.
57         * lib/getdelim.c: Likewise.
58         (getdelim): Set errno on failure, and avoid memory leak.
59
60 2007-08-19  Bruno Haible  <bruno@clisp.org>
61
62         * modules/closein (Depends-on): Add freadahead.
63         * lib/closein.c: Include freadahead.h.
64         (close_stdin): Skip the fseeko and fflush calls if freadahead(stdin)
65         is zero.
66
67 2007-08-19  Bruno Haible  <bruno@clisp.org>
68
69         * modules/freadahead-tests: New file.
70         * tests/test-freadahead.sh: New file.
71         * tests/test-freadahead.c: New file.
72
73         * modules/freadahead: New file.
74         * lib/freadahead.h: New file.
75         * lib/freadahead.c: New file.
76         * MODULES.html.sh (File stream based Input/Output): Add freadahead,
77         fbufmode, fpurge, freadable, fwritable.
78
79 2007-08-19  Eric Blake  <ebb9@byu.net>
80
81         Test yesno in combination with closein.
82         * lib/yesno.c (yesno): Document use of stdin.
83         * modules/yesno-tests (Files): New module.
84         * tests/test-yesno.c (main): New file.
85         * tests/test-yesno.sh: Likewise.
86
87 2007-08-19  Bruno Haible  <bruno@clisp.org>
88
89         * lib/fbufmode.c (fbufmode): Add tentative support for Solaris/AMD64.
90         * lib/fseeko.c (rpl_fseeko): Likewise.
91         * lib/fseterr.c (fseterr): Likewise.
92
93 2007-08-19  Bruno Haible  <bruno@clisp.org>
94
95         * tests/test-lseek.c (main): Disable a test for BeOS.
96         * doc/functions/lseek.texi: Document the BeOS bug.
97
98 2007-08-19  Bruno Haible  <bruno@clisp.org>
99             Eric Blake  <ebb9@byu.net>
100
101         * lib/lseek.c: Include <sys/stat.h>.
102         (rpl_lseek): Add workaround code also for Unix platforms.
103         Needed for BeOS.
104         * m4/lseek.m4 (gl_FUNC_LSEEK): When cross-compiling, fail on BeOS.
105         * doc/functions/lseek.texi: Document BeOS definiency.
106
107 2007-08-18  Bruno Haible  <bruno@clisp.org>
108
109         * modules/fstrcmp-tests: New file.
110         * tests/test-fstrcmp.c: New file.
111
112 2007-08-18  Bruno Haible  <bruno@clisp.org>
113
114         * modules/fstrcmp: New file, from GNU gettext with modifications.
115         * lib/fstrcmp.h: New file, from GNU gettext.
116         * lib/fstrcmp.c: New file, from GNU gettext.
117         * MODULES.html.sh (String handling): Add fstrcmp.
118
119 2007-08-18  Bruno Haible  <bruno@clisp.org>
120
121         * lib/diffseq.h (struct context): Change type of 'heuristic' field to
122         'bool'.
123         (diag, compareseq): Remove const from the ctxt argument.
124         (USE_HEURISTIC): Undefine at the end.
125
126 2007-08-18  Jim Meyering  <jim@meyering.net>
127
128         New file: lib/idcache.h
129         * NEWS: Mention the addition.
130         * modules/idcache (Files): Add lib/idcache.h
131         * lib/idcache.c: Include "idcache.h".
132         Don't include <sys/types.h>.
133         Add a FIXME comment.
134         Move file-scoped "static" declarations to the top.
135         * lib/idcache.h: New file.  Include <sys/types.h> here, instead.
136
137 2007-08-17  Bruno Haible  <bruno@clisp.org>
138         and Paul Eggert  <eggert@cs.ucla.edu>
139
140         * MODULES.html.sh: Add diffseq.
141         * modules/diffseq: New file.
142         * lib/diffseq.h: New file, from GNU gettext with a few minor changes,
143         extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
144
145 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
146
147         Import changes from coreutils for bootstrap script.
148
149         2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
150
151         * build-aux/bootstrap (slurp): Work even in environments where
152         "ls" defaults to "ls -A".  Put in a FIXME, though, since the
153         current code does not slurp files whose names start with ".", and
154         this looks like it might be a troublesome area.
155
156         2007-07-11  Jim Meyering  <jim@meyering.net>
157
158         If there's a GPL vN copyright comment, require that N == 3.
159
160         2007-07-08  Jim Meyering  <jim@meyering.net>
161
162         Run the coreutils-specific code only if tests/Makefile.am.in exists.
163         * build-aux/bootstrap (mam_template): Move definition out of loop.
164
165         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
166
167         * build-aux/bootstrap (symlink_to_dir): Rename function from
168         symlink_to_gnulib.  Add a directory parameter.  Update all
169         callers.
170         (cp_mark_as_generated): Also check for -- and link to -- files in
171         gl/.
172
173         2007-07-08  Jim Meyering  <jim@meyering.net>
174
175         Adapt to deeper hierarchy in gnulib.
176         * build-aux/bootstrap (symlink_to_dir): If the destination
177         directory doesn't exist, create it. This is required at least for
178         "lib/uniwidth/cjk.h".
179
180         2007-05-15  Jim Meyering  <jim@meyering.net>
181
182         * build-aux/bootstrap: Now that generated Makefile.am files
183         are no longer under version control, they must be created at
184         bootstrap time.
185
186 2007-08-14  Ben Pfaff  <blp@gnu.org>
187
188         * lib/count-one-bits.h: Add comments.  From Bruno Haible.
189
190 2007-08-14  Paul Eggert  <eggert@cs.ucla.edu>
191
192         * lib/count-one-bits.h: Don't include <limits.h>; no longer needed
193         given the changes below.
194         (COUNT_ONE_BITS): Use 'verify' rather than 'verify_true'.  Work
195         even on hosts that have padding bits beyond the supported 64.
196
197 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
198
199         * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.
200         * lib/xstrtol.h: Don't include exitfail.h; that's now internal to
201         xstrtol.c.  Include getopt.h, since xstrtol_fatal's signature
202         depends on it.
203         (xstrtol_error): Remove.
204         (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error
205         but with a different signature.
206         (ATTRIBUTE_NORETURN, __attribute__): New macros.
207         * lib/xstrtol-error.c: Include exitfail.h.
208         (xstrtol_fatal): New function, with a different signature from the
209         old xstrtol_error, so that the caller need not worry about passing
210         in an exit status, or about storage management of the option argument.
211         (xstrtol_error): Now a static function.  Redo signature to
212         implement xstrtol_fatal.  Output the correct number of hyphens in
213         front of the option so that the caller need not worry about
214         storage management.
215         (N_): New macro.
216         (_): Remove; not used now.
217         * modules/xstrtol: Depend on getopt.
218         * tests/test-xstrtol.c (main): Use new xstrtol_error function instead
219         of old STRTOL_FATAL_ERROR macro.
220         * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior
221         of test program.
222         * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise.
223         * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.
224
225 2007-08-08  Eric Blake  <ebb9@byu.net>
226
227         * lib/xstrtol-error.c: Add missing include.
228
229         Move xstrtol messages into gnulib domain, when --pobase is used.
230         * lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro...
231         * lib/xstrtol-error.c (xstrtol_error): ...into new file.
232         * modules/xstrtol (Files): Distribute new file.
233         * m4/xstrtol.m4 (gl_XSTRTOL): Build new file.
234         * lib/xstrtol.c (TESTING_XSTRTO): Move tests...
235         * tests/test-xstrtol.c: ...into new file.
236         * tests/test-xstrtoul.c: Also test xstrtoul.
237         * tests/test-xstrtoimax.c: Also test xstrtoimax.
238         * tests/test-xstrtoumax.c: Also test xstrtoumax.
239         * tests/test-xstrtol.sh: Drive the tests.
240         * tests/test-xstrtoimax.sh: Likewise.
241         * tests/test-xstrtoumax.sh: Likewise.
242         * modules/xstrtol-tests: New module.
243         * modules/xstrtoimax-tests: Likewise.
244         * modules/xstrtoumax-tests: Likewise.
245
246 2007-08-08  Jim Meyering  <jim@meyering.net>
247
248         New function: mfile_name_concat.
249         * lib/filenamecat.c (mfile_name_concat): New function, just like
250         file_name_concat, but return NULL upon failure rather than exiting
251         with a diagnostic.
252         * lib/filenamecat.h: Declare it.
253
254 2007-08-07  Bruno Haible  <bruno@clisp.org>
255
256         * m4/inttypes.m4 (gl_INTTYPES_H): Use GL_TRIGGER_STDC_LIMIT_MACROS
257         instead of __STDC_LIMIT_MACROS_TRIGGER. This avoids a redefinition
258         warning from gcc.
259         Reported by Eric Blake.
260
261 2007-08-07  Simon Josefsson  <simon@josefsson.org>
262
263         * modules/crypto/arctwo (License): Use the synonymous term "LGPLv2+".
264         * modules/crypto/arcfour (License): Likewise.
265         * modules/crypto/des-tests (License): Likewise.
266         * modules/crypto/gc-arctwo-tests (License): Likewise.
267         * modules/crypto/gc-des-tests (License): Likewise.
268         * modules/crypto/gc-hmac-md5-tests (License): Likewise.
269         * modules/crypto/gc-hmac-sha1-tests (License): Likewise.
270         * modules/crypto/gc-md2-tests (License): Likewise.
271         * modules/crypto/gc-md4-tests (License): Likewise.
272         * modules/crypto/gc-md5-tests (License): Likewise.
273         * modules/crypto/gc-pbkdf2-sha1-tests (License): Likewise.
274         * modules/crypto/gc-rijndael-tests (License): Likewise.
275         * modules/crypto/gc-sha1-tests (License): Likewise.
276         * modules/crypto/gc-tests (License): Likewise.
277         * modules/crypto/hmac-md5 (License): Likewise.
278         * modules/crypto/hmac-sha1 (License): Likewise.
279         * modules/crypto/md2-tests (License): Likewise.
280         * modules/crypto/md4-tests (License): Likewise.
281         * modules/crypto/md5 (License): Likewise.
282         * modules/crypto/rijndael (License): Likewise.
283         * modules/crypto/sha1 (License): Likewise.
284         * modules/memxor (License): Likewise.
285
286 2007-08-06  Paul Eggert  <eggert@cs.ucla.edu>
287         and Bruno Haible  <bruno@clisp.org>
288
289         * NEWS: Describe interface changes to human, xstrtol.
290         * lib/human.h: Include <xstrtol.h>.
291         (human_options): Return enum strtol_error, not int.  Remove
292         bool arg; take int * instead.
293         * lib/human.c: Don't include "gettext.h".
294         (_): Remove; no longer used.
295         Don't include <xstrtol.h>, since human.h does it.
296         (human_options): Adjust to abovementioned interface changes.
297         Do not report error to stderr; that's now the caller's
298         responsibility.
299         * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
300         interface change.
301         * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
302         Str, Argument_type_string.  All uses changed.  Put " argument"
303         in diagnostics to make them clearer.  Change wording of suffix
304         message for clarity.
305         (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
306         Argument_type_string.
307         (STRTOL_FATAL_WARN): Remove; no longer used.
308         * modules/human (Depends-on): Remove gettext-h.
309
310 2007-08-06  Simon Josefsson  <simon@josefsson.org>
311
312         * build-aux/maint.mk, build-aux/GNUmakefile: Relicense to GPLv3+.
313
314 2007-07-31  Bruno Haible  <bruno@clisp.org>
315
316         * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX
317         are defined by <stdint.h> (as opposed to <wchar.h>, as on Dragonfly).
318         Reported by Joerg Sonnenberger <joerg@britannica.bec.de>.
319
320 2007-07-31  Bruno Haible  <bruno@clisp.org>
321
322         * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag.
323         Suggested by Joerg Sonnenberger <joerg@britannica.bec.de>.
324
325 2007-07-30  Bruno Haible  <bruno@clisp.org>
326
327         * modules/base64 (License): Use the synonymous term "LGPLv2+".
328         * modules/c-ctype (License): Likewise.
329         * modules/c-strcase (License): Likewise.
330         * modules/check-version (License): Likewise.
331         * modules/iconv (License): Likewise.
332         * modules/iconv_open (License): Likewise.
333         * modules/read-file (License): Likewise.
334         * modules/striconv (License): Likewise.
335         * modules/strverscmp (License): Likewise.
336         * modules/vasprintf (License): Likewise.
337         * modules/crypto/des (License): Likewise.
338         * modules/crypto/gc (License): Likewise.
339         * modules/crypto/gc-arcfour (License): Likewise.
340         * modules/crypto/gc-arctwo (License): Likewise.
341         * modules/crypto/gc-des (License): Likewise.
342         * modules/crypto/gc-hmac-md5 (License): Likewise.
343         * modules/crypto/gc-hmac-sha1 (License): Likewise.
344         * modules/crypto/gc-md2 (License): Likewise.
345         * modules/crypto/gc-md4 (License): Likewise.
346         * modules/crypto/gc-md5 (License): Likewise.
347         * modules/crypto/gc-pbkdf2-sha1 (License): Likewise.
348         * modules/crypto/gc-random (License): Likewise.
349         * modules/crypto/gc-rijndael (License): Likewise.
350         * modules/crypto/gc-sha1 (License): Likewise.
351         * modules/crypto/md2 (License): Likewise.
352         * modules/crypto/md4 (License): Likewise.
353
354 2007-07-30  Jim Meyering  <jim@meyering.net>
355
356         * lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
357         set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
358         it has valid stat data.  This bug would cause du not to count the
359         sizes of inaccessible directories.
360         Patch by Bryan Mason <bmason@redhat.com>, via Jose Maria Plans
361         in <http://bugzilla.redhat.com/250077>.
362
363 2007-07-25  Peter O'Gorman  <peter@pogma.com>
364             Bruno Haible  <bruno@clisp.org>
365
366         * m4/include_next.m4 (gl_INCLUDE_NEXT): Test whether #include_next
367         really works. Needed because AIX 4.3 "xlc -E" doesn't understand
368         #include_next, gives a diagnostic about it, but reports no error in
369         the exit code.
370         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
371
372 2007-07-24  Ben Pfaff  <blp@gnu.org>
373
374         Improve name: "count-one-bits" is better than "popcount".
375         * MODULES.html.sh: Update name.
376         * lib/popcount.h: Renamed lib/count-one-bits.h.
377         (popcount): Renamed count_one_bits.
378         (popcountl): Renamed count_one_bits_l.
379         (popcountll): Renamed count_one_bits_ll.
380         * m4/popcount.m4: Renamed m4/count-one-bits.m4.
381         * modules/popcount: Renamed module/count-one-bits.
382         * modules/popcount-tests: Renamed module/count-one-bits-tests.
383         * tests/test-popcount.c: Renamed tests/test-count-one-bits.c.
384
385 2007-07-23  Ben Pfaff  <blp@gnu.org>
386
387         * lib/popcount.h (popcount32): Reduce size of constants, to allow
388         better code generation, and add U to large constants to avoid
389         warnings, in non-GCC case.
390         Suggested by Bruno Haible.
391
392 2007-07-23  Ben Pfaff  <blp@gnu.org>
393
394         * lib/popcount.h: Use verify_true instead of if...abort.
395         * modules/popcount: Depend on verify module.
396         Suggested by Jim Meyering.
397
398 2007-07-23  Bruno Haible  <bruno@clisp.org>
399
400         * gnulib-tool (func_import): Create a .cvsignore file also when the
401         directory is not yet in CVS but the toplevel directory is. When
402         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
403         Reported by Karl Berry.
404
405 2007-07-22  Ben Pfaff  <blp@gnu.org>
406
407         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
408         case.
409         Suggested by Eric Blake.
410
411 2007-07-22  Ben Pfaff  <blp@gnu.org>
412
413         New module: popcount.
414         * MODULES.html.sh: Add popcount.
415         * modules/popcount: New file.
416         * modules/popcount-tests: New file.
417         * tests/test-popcount.c: New file.
418         * lib/popcount.h: New file.
419         * m4/popcount.m4: New file.
420
421 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
422
423         * build-aux/announce-gen: Update to GPLv3.
424
425         * build-aux/config.guess: Update from config.
426
427 2007-07-21  Bruno Haible  <bruno@clisp.org>
428
429         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
430         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
431
432 2007-07-20  Jim Meyering  <jim@meyering.net>
433
434         * check-module: Diagnose a self-dependency.
435
436 2007-07-19  Bruno Haible  <bruno@clisp.org>
437
438         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
439         empty.
440         Reported by Eric Blake.
441
442 2007-07-18  Bruno Haible  <bruno@clisp.org>
443
444         * gnulib-tool: New options --po-base, --po-domain.
445         (func_usage): Document them.
446         (pobase, po_domain): New variables.
447         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
448         DEFAULT_TEXT_DOMAIN.
449         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
450         (func_import): Consider pobase and po_domain. Create a po/ directory.
451         (func_create_testdir): Set pobase and po_domain to empty.
452         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
453         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
454
455 2007-07-18  Bruno Haible  <bruno@clisp.org>
456
457         * gnulib-tool (func_get_automake_snippet): Synthesize also an
458         EXTRA_DIST augmentation for files in build-aux/.
459
460 2007-07-16  Bruno Haible  <bruno@clisp.org>
461
462         * modules/lseek (License): Use the synonymous term "LGPLv2+".
463         * modules/getdelim (License): Likewise.
464
465 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
466
467         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
468         * modules/d-type (License): Likewise.
469         * modules/extensions (License): Likewise.
470         * modules/fnmatch (License): Likewise.
471         * modules/fseeko (License): Likewise.
472         * modules/getaddrinfo (License): Likewise.
473         * modules/getline (License): Likewise.
474         * modules/getlogin_r (License): Likewise.
475         * modules/getpass (License): Likewise.
476         * modules/gettimeofday (License): Likewise.
477         * modules/glob (License): Likewise.
478         * modules/inet_ntop (License): Likewise.
479         * modules/malloc (License): Likewise.
480         * modules/malloca (License): Likewise.
481         * modules/memmem (License): Likewise.
482         * modules/mempcpy (License): Likewise.
483         * modules/memset (License): Likewise.
484         * modules/minmax (License): Likewise.
485         * modules/mktime (License): Likewise.
486         * modules/netinet_in (License): Likewise.
487         * modules/pathmax (License): Likewise.
488         * modules/poll (License): Likewise.
489         * modules/regex (License): Likewise.
490         * modules/snprintf (License): Likewise.
491         * modules/stdbool (License): Likewise.
492         * modules/stdint (License): Likewise.
493         * modules/stdio (License): Likewise.
494         * modules/strcase (License): Likewise.
495         * modules/strcasestr (License): Likewise.
496         * modules/strdup (License): Likewise.
497         * modules/string (License): Likewise.
498         * modules/strndup (License): Likewise.
499         * modules/strnlen (License): Likewise.
500         * modules/strpbrk (License): Likewise.
501         * modules/strptime (License): Likewise.
502         * modules/strsep (License): Likewise.
503         * modules/sys_select (License): Likewise.
504         * modules/sys_socket (License): Likewise.
505         * modules/sys_stat (License): Likewise.
506         * modules/sys_time (License): Likewise.
507         * modules/time (License): Likewise.
508         * modules/time_r (License): Likewise.
509         * modules/timegm (License): Likewise.
510         * modules/unistd (License): Likewise.
511         * modules/vsnprintf (License): Likewise.
512         * modules/wctype (License): Likewise.
513
514 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
515
516         * modules/argz (License): LGPLv2+.
517
518 2007-07-15  Karl Berry  <karl@gnu.org>
519
520         * doc/gnulib.texi: revise node structure per new fdl.texi.
521
522 2007-07-14  Bruno Haible  <bruno@clisp.org>
523
524         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
525         the output file.
526         * lib/uniname/uninames.h: Regenerated.
527
528 2007-07-14  Karl Berry  <karl@gnu.org>
529
530         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
531         omitting sectioning and index commands.
532
533 2007-07-13  Bruno Haible  <bruno@clisp.org>
534
535         New gnulib-tool option --more-symlinks.
536         * gnulib-tool (func_usage): Document --more-symlinks.
537         (do_copyrights): New variable.
538         Recognize option --more-symlinks.
539         (func_import): Don't add a copyright notice transform to
540         sed_transform_lib_file if do_copyrights is empty.
541
542 2007-07-13  Bruno Haible  <bruno@clisp.org>
543
544         * lib/vasnprintf.c (decimal_point_char): Define also if
545         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
546         && !NEED_PRINTF_DIRECTIVE_A.
547         Reported by Clemens Koller <clemens.koller@anagramm.de> via
548         Gary V. Vaughan <gary@gnu.org>.
549
550 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
551
552         * lib/inttypes_.h: Undo previous change, since it was fixed
553         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
554
555 2007-07-13  Bruno Haible  <bruno@clisp.org>
556
557         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
558         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
559
560 2007-07-13  Jim Meyering  <jim@meyering.net>
561
562         df: Don't fail for Tru64's "file-on-file mount".
563         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
564         so we fall through and use statfs instead.  Details here:
565         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
566         Reported by Albert Chin.
567
568 2007-07-13  Bruno Haible  <bruno@clisp.org>
569
570         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
571         * modules/configmake (License): Likewise.
572         * modules/gettext (License): Likewise.
573         * modules/gettext-h (License): Likewise.
574         * modules/include_next (License): Likewise.
575         * modules/link-warning (License): Likewise.
576         * modules/localcharset (License): Likewise.
577         * modules/localename (License): Likewise.
578         * modules/lock (License): Likewise.
579         * modules/relocatable-lib-lgpl (License): Likewise.
580         * modules/size_max (License): Likewise.
581         * modules/vasnprintf (License): Likewise.
582         * modules/wchar (License): Likewise.
583         * modules/xsize (License): Likewise.
584
585 2007-07-13  Bruno Haible  <bruno@clisp.org>
586
587         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
588         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
589
590 2007-07-12  Bruno Haible  <bruno@clisp.org>
591
592         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
593         in the modules files.
594
595 2007-07-11  Karl Berry  <karl@gnu.org>
596
597         * MODULES.html.sh (func_module): use
598          sed -e '\|^'"${includefile}"'$|d'
599          instead of /.../d, to avoid errors on $includefile's containing /.
600
601 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
602
603         * gnulib-tool (func_import): Avoid duplication of --avoid
604         statements
605         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
606         names to `_' in variable names.
607
608 2007-07-10  Eric Blake  <ebb9@byu.net>
609
610         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
611         * NEWS: Document this change.
612
613 2007-07-08  Bruno Haible  <bruno@clisp.org>
614
615         Update to Unicode 5.0.
616         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
617         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
618         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
619         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
620         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
621         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
622         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
623         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
624         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
625         U+10A3F, U+1D242..U+1D244.
626         (nonspacing_table_ind): Update.
627         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
628         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
629
630 2007-07-08  Bruno Haible  <bruno@clisp.org>
631
632         Update to Unicode 5.0.
633         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
634         code transform. Extend the name index field of unicode_name_to_code and
635         unicode_code_to_name from 16 to 24 bits.
636         * lib/uniname/uniname.c (unicode_character_name,
637         unicode_name_character): Add the range 0x12xxx to the code transform.
638         * lib/uniname/uninames.h: Regenerated.
639         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
640
641 2007-07-07  Bruno Haible  <bruno@clisp.org>
642
643         * modules/wcwidth-tests: New file.
644         * tests/test-wcwidth.c: New file.
645
646         Work around MacOS X wcwidth() bug.
647         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
648         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
649         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
650         original wcwidth in non-UTF-8 locales.
651         * modules/wcwidth (Depends-on): Add localcharset, streq,
652         uniwidth/width.
653         * doc/functions/wcwidth.texi: Update.
654
655 2007-07-07  Bruno Haible  <bruno@clisp.org>
656
657         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
658         (wcwidth): New declaration.
659         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
660         macros.
661         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
662         here. Prepare for creating <wchar.h> unconditionally.
663         * modules/wchar (Depends-on): Add link-warning.
664         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
665         REPLACE_WCWIDTH, and GL_LINK_WARNING.
666         * lib/wcwidth.h: Remove file.
667         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
668         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
669         * modules/wcwidth (Files): Remove lib/wcwidth.h.
670         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
671         (Include): Replace wcwidth.h with <wchar.h>.
672         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
673         * lib/mbchar.h: Don't include wcwidth.h.
674         * lib/mbswidth.c: Likewise.
675         * NEWS: Mention the change.
676
677 2007-07-07  Bruno Haible  <bruno@clisp.org>
678
679         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
680         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
681         definition with an external declaration.
682         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
683         defined as a function. Remove AC_C_INLINE requirement.
684         * modules/wcwidth (Files): Add lib/wcwidth.c.
685         (Makefile.am): Remove redundant statement.
686
687 2007-07-07  Bruno Haible  <bruno@clisp.org>
688
689         * MODULES.html.sh (Unicode string functions): Add the new modules.
690
691         * tests/uniwidth/test-u32-strwidth.c: New file.
692         * modules/uniwidth/u32-strwidth-tests: New file.
693
694         * lib/uniwidth/u32-strwidth.c: New file.
695         * modules/uniwidth/u32-strwidth: New file.
696
697         * tests/uniwidth/test-u16-strwidth.c: New file.
698         * modules/uniwidth/u16-strwidth-tests: New file.
699
700         * lib/uniwidth/u16-strwidth.c: New file.
701         * modules/uniwidth/u16-strwidth: New file.
702
703         * tests/uniwidth/test-u8-strwidth.c: New file.
704         * modules/uniwidth/u8-strwidth-tests: New file.
705
706         * lib/uniwidth/u8-strwidth.c: New file.
707         * modules/uniwidth/u8-strwidth: New file.
708
709         * tests/uniwidth/test-u32-width.c: New file.
710         * modules/uniwidth/u32-width-tests: New file.
711
712         * lib/uniwidth/u32-width.c: New file.
713         * modules/uniwidth/u32-width: New file.
714
715         * tests/uniwidth/test-u16-width.c: New file.
716         * modules/uniwidth/u16-width-tests: New file.
717
718         * lib/uniwidth/u16-width.c: New file.
719         * modules/uniwidth/u16-width: New file.
720
721         * tests/uniwidth/test-u8-width.c: New file.
722         * modules/uniwidth/u8-width-tests: New file.
723
724         * lib/uniwidth/u8-width.c: New file.
725         * modules/uniwidth/u8-width: New file.
726
727         * tests/uniwidth/test-uc_width.c: New file.
728         * modules/uniwidth/width-tests: New file.
729
730         * lib/uniwidth/width.c: New file, from GNU libiconv.
731         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
732         * modules/uniwidth/width: New file.
733
734         * lib/uniwidth.h: New file, from GNU libiconv.
735         * modules/uniwidth/base: New file.
736
737 2007-07-07  Bruno Haible  <bruno@clisp.org>
738
739         * lib/uniname.h: New file, from GNU gettext.
740         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
741         * lib/uniname/uninames.h: New file, from GNU gettext.
742         * lib/uniname/uniname.c: New file, from GNU gettext.
743         * tests/uniname/test-uninames.sh: New file.
744         * tests/uniname/test-uninames.c: New file, from GNU gettext.
745         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
746         * modules/uniname/base: New file.
747         * modules/uniname/uniname: New file.
748         * modules/uniname/uniname-tests: New file.
749         * MODULES.html.sh (Unicode string functions): Add the new modules.
750
751 2007-07-06  Bruno Haible  <bruno@clisp.org>
752
753         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
754
755 2007-07-06  Bruno Haible  <bruno@clisp.org>
756
757         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
758         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
759         includes <cygwin/sys_time.h> which includes <sys/select.h> which
760         include <sys/time.h>.
761         Reported by Eric Blake.
762
763 2007-07-06  Eric Blake  <ebb9@byu.net>
764
765         Fix testing canonicalize on cygwin.
766         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
767         Revert patch from 2007-06-19.
768         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
769         canonicalize module is also in use.
770         * tests/test-canonicalize.c: New file.
771         * tests/test-canonicalize.sh: Likewise.
772         * modules/canonicalize-tests: Likewise.
773
774 2007-07-06  Jim Meyering  <jim@meyering.net>
775
776         * lib/getugroups.c (getugroups): Detect getgrent failure.
777         Adjust comment to reflect reality: this function may return -1.
778
779 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
780
781         * build-aux/bootstrap (TP_URL,get_translations): Update to use
782         the new TP address.
783         (usage): Fix typo
784         (gnulib_mk): New variable.
785
786 2007-07-05  Jim Meyering  <jim@meyering.net>
787
788         Don't let endgrent clobber errno, no matter how improbable.
789         * lib/getugroups.c (getugroups): Save and restore errno around
790         endgrent call.
791
792         Close the group DB even when failing with 2^31 or more members.
793         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
794
795 2007-07-04  Jim Meyering  <jim@meyering.net>
796
797         * lib/getugroups.h: New file.
798         * lib/getugroups.c: Include "getugroups.h".
799         Remove uses of "register" keyword.
800         Move local variable, "cp", down into scope where used.
801         Give "username" parameter the "const" attribute.
802         * modules/getugroups (Files): Add lib/getugroups.h
803
804 2007-07-04  Karl Berry  <karl@gnu.org>
805
806         * MODULES.html.sh (func_all_modules): Complete rename of
807         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
808
809 2007-07-02  Bruno Haible  <bruno@clisp.org>
810
811         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
812         mode, when inttypes.h comes from gnulib.
813         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
814
815 2007-07-02  Simon Josefsson  <simon@josefsson.org>
816
817         * NEWS: Mention lgpl module name change.
818
819         * modules/lgpl-2.1: Renamed from lgpl.
820
821         * NEWS: Mention gpl module name change.
822
823         * modules/gpl-3.0: New file, based on gpl-2.0.
824
825         * modules/gpl-2.0: Renamed from gpl.
826
827         * modules/gpl: Fix filename, doc/gpl.texi is now found at
828         doc/gpl-2.0.texi.
829
830 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
831
832         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
833         #define __STDC_LIMIT_MACROS temporarily while including
834         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
835         Problem reported by Joel E. Denny in
836         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
837
838 2007-07-01  Bruno Haible  <bruno@clisp.org>
839
840         * lib/unistdio.h: New file.
841         * lib/unistdio/u-asnprintf.h: New file.
842         * lib/unistdio/u-asprintf.h: New file.
843         * lib/unistdio/u-printf-args.c: New file.
844         * lib/unistdio/u-printf-args.h: New file.
845         * lib/unistdio/u-printf-parse.h: New file.
846         * lib/unistdio/u-snprintf.h: New file.
847         * lib/unistdio/u-sprintf.h: New file.
848         * lib/unistdio/u-vasprintf.h: New file.
849         * lib/unistdio/u-vsnprintf.h: New file.
850         * lib/unistdio/u-vsprintf.h: New file.
851         * lib/unistdio/ulc-asnprintf.c: New file.
852         * lib/unistdio/ulc-asprintf.c: New file.
853         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
854         * lib/unistdio/ulc-printf-parse.c: New file.
855         * lib/unistdio/ulc-snprintf.c: New file.
856         * lib/unistdio/ulc-sprintf.c: New file.
857         * lib/unistdio/ulc-vasnprintf.c: New file.
858         * lib/unistdio/ulc-vasprintf.c: New file.
859         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
860         * lib/unistdio/ulc-vsnprintf.c: New file.
861         * lib/unistdio/ulc-vsprintf.c: New file.
862         * lib/unistdio/u8-asnprintf.c: New file.
863         * lib/unistdio/u8-asprintf.c: New file.
864         * lib/unistdio/u8-printf-parse.c: New file.
865         * lib/unistdio/u8-snprintf.c: New file.
866         * lib/unistdio/u8-sprintf.c: New file.
867         * lib/unistdio/u8-vasnprintf.c: New file.
868         * lib/unistdio/u8-vasprintf.c: New file.
869         * lib/unistdio/u8-vsnprintf.c: New file.
870         * lib/unistdio/u8-vsprintf.c: New file.
871         * lib/unistdio/u8-u8-asnprintf.c: New file.
872         * lib/unistdio/u8-u8-asprintf.c: New file.
873         * lib/unistdio/u8-u8-snprintf.c: New file.
874         * lib/unistdio/u8-u8-sprintf.c: New file.
875         * lib/unistdio/u8-u8-vasnprintf.c: New file.
876         * lib/unistdio/u8-u8-vasprintf.c: New file.
877         * lib/unistdio/u8-u8-vsnprintf.c: New file.
878         * lib/unistdio/u8-u8-vsprintf.c: New file.
879         * lib/unistdio/u16-asnprintf.c: New file.
880         * lib/unistdio/u16-asprintf.c: New file.
881         * lib/unistdio/u16-printf-parse.c: New file.
882         * lib/unistdio/u16-snprintf.c: New file.
883         * lib/unistdio/u16-sprintf.c: New file.
884         * lib/unistdio/u16-vasnprintf.c: New file.
885         * lib/unistdio/u16-vasprintf.c: New file.
886         * lib/unistdio/u16-vsnprintf.c: New file.
887         * lib/unistdio/u16-vsprintf.c: New file.
888         * lib/unistdio/u16-u16-asnprintf.c: New file.
889         * lib/unistdio/u16-u16-asprintf.c: New file.
890         * lib/unistdio/u16-u16-snprintf.c: New file.
891         * lib/unistdio/u16-u16-sprintf.c: New file.
892         * lib/unistdio/u16-u16-vasnprintf.c: New file.
893         * lib/unistdio/u16-u16-vasprintf.c: New file.
894         * lib/unistdio/u16-u16-vsnprintf.c: New file.
895         * lib/unistdio/u16-u16-vsprintf.c: New file.
896         * lib/unistdio/u32-asnprintf.c: New file.
897         * lib/unistdio/u32-asprintf.c: New file.
898         * lib/unistdio/u32-printf-parse.c: New file.
899         * lib/unistdio/u32-snprintf.c: New file.
900         * lib/unistdio/u32-sprintf.c: New file.
901         * lib/unistdio/u32-vasnprintf.c: New file.
902         * lib/unistdio/u32-vasprintf.c: New file.
903         * lib/unistdio/u32-vsnprintf.c: New file.
904         * lib/unistdio/u32-vsprintf.c: New file.
905         * lib/unistdio/u32-u32-asnprintf.c: New file.
906         * lib/unistdio/u32-u32-asprintf.c: New file.
907         * lib/unistdio/u32-u32-snprintf.c: New file.
908         * lib/unistdio/u32-u32-sprintf.c: New file.
909         * lib/unistdio/u32-u32-vasnprintf.c: New file.
910         * lib/unistdio/u32-u32-vasprintf.c: New file.
911         * lib/unistdio/u32-u32-vsnprintf.c: New file.
912         * lib/unistdio/u32-u32-vsprintf.c: New file.
913         * tests/unistdio/test-ulc-asnprintf1.c: New file.
914         * tests/unistdio/test-ulc-asnprintf1.h: New file.
915         * tests/unistdio/test-ulc-printf1.h: New file.
916         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
917         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
918         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
919         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
920         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
921         * tests/unistdio/test-ulc-vasprintf1.c: New file.
922         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
923         * tests/unistdio/test-ulc-vsprintf1.c: New file.
924         * tests/unistdio/test-u8-asnprintf1.c: New file.
925         * tests/unistdio/test-u8-asnprintf1.h: New file.
926         * tests/unistdio/test-u8-printf1.h: New file.
927         * tests/unistdio/test-u8-vasnprintf1.c: New file.
928         * tests/unistdio/test-u8-vasnprintf2.c: New file.
929         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
930         * tests/unistdio/test-u8-vasnprintf3.c: New file.
931         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
932         * tests/unistdio/test-u8-vasprintf1.c: New file.
933         * tests/unistdio/test-u8-vsnprintf1.c: New file.
934         * tests/unistdio/test-u8-vsprintf1.c: New file.
935         * tests/unistdio/test-u16-asnprintf1.c: New file.
936         * tests/unistdio/test-u16-asnprintf1.h: New file.
937         * tests/unistdio/test-u16-printf1.h: New file.
938         * tests/unistdio/test-u16-vasnprintf1.c: New file.
939         * tests/unistdio/test-u16-vasnprintf2.c: New file.
940         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
941         * tests/unistdio/test-u16-vasnprintf3.c: New file.
942         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
943         * tests/unistdio/test-u16-vasprintf1.c: New file.
944         * tests/unistdio/test-u16-vsnprintf1.c: New file.
945         * tests/unistdio/test-u16-vsprintf1.c: New file.
946         * tests/unistdio/test-u32-asnprintf1.c: New file.
947         * tests/unistdio/test-u32-asnprintf1.h: New file.
948         * tests/unistdio/test-u32-printf1.h: New file.
949         * tests/unistdio/test-u32-vasnprintf1.c: New file.
950         * tests/unistdio/test-u32-vasnprintf2.c: New file.
951         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
952         * tests/unistdio/test-u32-vasnprintf3.c: New file.
953         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
954         * tests/unistdio/test-u32-vasprintf1.c: New file.
955         * tests/unistdio/test-u32-vsnprintf1.c: New file.
956         * tests/unistdio/test-u32-vsprintf1.c: New file.
957         * modules/unistdio/base: New file.
958         * modules/unistdio/u-printf-args: New file.
959         * modules/unistdio/ulc-asnprintf: New file.
960         * modules/unistdio/ulc-asprintf: New file.
961         * modules/unistdio/ulc-fprintf: New file.
962         * modules/unistdio/ulc-printf-parse: New file.
963         * modules/unistdio/ulc-snprintf: New file.
964         * modules/unistdio/ulc-sprintf: New file.
965         * modules/unistdio/ulc-vasnprintf: New file.
966         * modules/unistdio/ulc-vasprintf: New file.
967         * modules/unistdio/ulc-vfprintf: New file.
968         * modules/unistdio/ulc-vsnprintf: New file.
969         * modules/unistdio/ulc-vsprintf: New file.
970         * modules/unistdio/u8-asnprintf: New file.
971         * modules/unistdio/u8-asprintf: New file.
972         * modules/unistdio/u8-printf-parse: New file.
973         * modules/unistdio/u8-snprintf: New file.
974         * modules/unistdio/u8-sprintf: New file.
975         * modules/unistdio/u8-vasnprintf: New file.
976         * modules/unistdio/u8-vasprintf: New file.
977         * modules/unistdio/u8-vsnprintf: New file.
978         * modules/unistdio/u8-vsprintf: New file.
979         * modules/unistdio/u8-u8-asnprintf: New file.
980         * modules/unistdio/u8-u8-asprintf: New file.
981         * modules/unistdio/u8-u8-snprintf: New file.
982         * modules/unistdio/u8-u8-sprintf: New file.
983         * modules/unistdio/u8-u8-vasnprintf: New file.
984         * modules/unistdio/u8-u8-vasprintf: New file.
985         * modules/unistdio/u8-u8-vsnprintf: New file.
986         * modules/unistdio/u8-u8-vsprintf: New file.
987         * modules/unistdio/u16-asnprintf: New file.
988         * modules/unistdio/u16-asprintf: New file.
989         * modules/unistdio/u16-printf-parse: New file.
990         * modules/unistdio/u16-snprintf: New file.
991         * modules/unistdio/u16-sprintf: New file.
992         * modules/unistdio/u16-vasnprintf: New file.
993         * modules/unistdio/u16-vasprintf: New file.
994         * modules/unistdio/u16-vsnprintf: New file.
995         * modules/unistdio/u16-vsprintf: New file.
996         * modules/unistdio/u16-u16-asnprintf: New file.
997         * modules/unistdio/u16-u16-asprintf: New file.
998         * modules/unistdio/u16-u16-snprintf: New file.
999         * modules/unistdio/u16-u16-sprintf: New file.
1000         * modules/unistdio/u16-u16-vasnprintf: New file.
1001         * modules/unistdio/u16-u16-vasprintf: New file.
1002         * modules/unistdio/u16-u16-vsnprintf: New file.
1003         * modules/unistdio/u16-u16-vsprintf: New file.
1004         * modules/unistdio/u32-asnprintf: New file.
1005         * modules/unistdio/u32-asprintf: New file.
1006         * modules/unistdio/u32-printf-parse: New file.
1007         * modules/unistdio/u32-snprintf: New file.
1008         * modules/unistdio/u32-sprintf: New file.
1009         * modules/unistdio/u32-vasnprintf: New file.
1010         * modules/unistdio/u32-vasprintf: New file.
1011         * modules/unistdio/u32-vsnprintf: New file.
1012         * modules/unistdio/u32-vsprintf: New file.
1013         * modules/unistdio/u32-u32-asnprintf: New file.
1014         * modules/unistdio/u32-u32-asprintf: New file.
1015         * modules/unistdio/u32-u32-snprintf: New file.
1016         * modules/unistdio/u32-u32-sprintf: New file.
1017         * modules/unistdio/u32-u32-vasnprintf: New file.
1018         * modules/unistdio/u32-u32-vasprintf: New file.
1019         * modules/unistdio/u32-u32-vsnprintf: New file.
1020         * modules/unistdio/u32-u32-vsprintf: New file.
1021         * modules/unistdio/ulc-asnprintf-tests: New file.
1022         * modules/unistdio/ulc-vasnprintf-tests: New file.
1023         * modules/unistdio/ulc-vasprintf-tests: New file.
1024         * modules/unistdio/ulc-vsnprintf-tests: New file.
1025         * modules/unistdio/ulc-vsprintf-tests: New file.
1026         * modules/unistdio/u8-asnprintf-tests: New file.
1027         * modules/unistdio/u8-vasnprintf-tests: New file.
1028         * modules/unistdio/u8-vasprintf-tests: New file.
1029         * modules/unistdio/u8-vsnprintf-tests: New file.
1030         * modules/unistdio/u8-vsprintf-tests: New file.
1031         * modules/unistdio/u16-asnprintf-tests: New file.
1032         * modules/unistdio/u16-vasnprintf-tests: New file.
1033         * modules/unistdio/u16-vasprintf-tests: New file.
1034         * modules/unistdio/u16-vsnprintf-tests: New file.
1035         * modules/unistdio/u16-vsprintf-tests: New file.
1036         * modules/unistdio/u32-asnprintf-tests: New file.
1037         * modules/unistdio/u32-vasnprintf-tests: New file.
1038         * modules/unistdio/u32-vasprintf-tests: New file.
1039         * modules/unistdio/u32-vsnprintf-tests: New file.
1040         * modules/unistdio/u32-vsprintf-tests: New file.
1041         * MODULES.html.sh (Unicode string functions): Add the new modules.
1042
1043 2007-07-01  Bruno Haible  <bruno@clisp.org>
1044
1045         * lib/sprintf.c (sprintf): Limit the available length estimation,
1046         to avoid address wraparound.
1047         * lib/vsprintf.c (vsprintf): Likewise.
1048         * modules/sprintf-posix (Dependencies): Add stdint.
1049         * modules/vsprintf-posix (Dependencies): Likewise.
1050
1051 2007-07-01  Bruno Haible  <bruno@clisp.org>
1052
1053         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
1054         Windows PATH as well. Conservative double-quoting. Comments.
1055
1056 2007-07-01  Bruno Haible  <bruno@clisp.org>
1057             Eric Blake  <ebb9@byu.net>
1058             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1059
1060         * gnulib-tool (self_abspathname): Fix algorithm to cope with
1061         empty components in $PATH, denoting '.'.
1062
1063 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1064
1065         * gnulib-tool: Fix indentation.
1066         (func_create_megatestdir): Likewise.
1067         Report by Bruno Haible.
1068
1069 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1070
1071         Sync from Automake.
1072         * build-aux/gnupload: Fix shell portability issues with for loops.
1073         Report by Karl Berry.
1074
1075 2007-06-29  Simon Josefsson  <simon@josefsson.org>
1076
1077         * build-aux/maint.mk (POURL): Use translationproject.org.
1078
1079 2007-06-27  Simon Josefsson  <simon@josefsson.org>
1080             Bruno Haible  <bruno@clisp.org>
1081
1082         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
1083         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
1084         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
1085         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
1086         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
1087
1088 2007-06-27  Bruno Haible  <bruno@clisp.org>
1089
1090         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
1091         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
1092
1093 2007-06-26  Karl Berry  <karl@gnu.org>
1094
1095         * MODULES.html.sh: remove xreadlink-with-size.
1096
1097 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1098
1099         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
1100         method that I hope also handles the double-include problem noted
1101         by Bruno Haible in
1102         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
1103
1104 2007-06-23  Bruno Haible  <bruno@clisp.org>
1105
1106         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1107         Don't let the 'mostlyclean' target fail if the last subdirectory could
1108         not be removed.
1109         Reported by Karl Berry.
1110
1111 2007-06-23  Bruno Haible  <bruno@clisp.org>
1112
1113         * gnulib-tool (echo): Add a speedier workaround for ksh.
1114         * tests/test-echo.sh: Likewise.
1115
1116 2007-06-23  Bruno Haible  <bruno@clisp.org>
1117
1118         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
1119         * tests/test-echo.sh: Likewise.
1120
1121 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1122
1123         * gnulib-tool (IFS): Initialize early, so we don't set it to
1124         empty later.
1125         (self_abspathname): Rewrite algorithm to set it, reindent.
1126         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
1127         (func_create_megatestdir): Merge some sed scripts.
1128
1129 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1130
1131         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
1132         exposed by Sun Studio 11 cc on Solaris 8.
1133
1134 2007-06-22  Bruno Haible  <bruno@clisp.org>
1135
1136         * gnulib-tool (echo): Ensure the echo primitive does not interpret
1137         backslashes.
1138         * tests/test-echo.sh: New file.
1139
1140 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1141
1142         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
1143         simplify `sed_replace_build_aux' scripts, they are portable but
1144         echoing them with `echo' is not.
1145         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
1146
1147 2007-06-21  Karl Berry  <karl@gnu.org>
1148
1149         * config/srclist.txt: guess we can't handle the licenses via
1150         srclist at the moment.
1151
1152 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
1153
1154         * MODULES.html.sh: Add include_next.
1155         * modules/include_next: New file.
1156
1157 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
1158
1159         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
1160         INCLUDE_NEXT.
1161         (gl_CHECK_NEXT_HEADERS): New macro.
1162         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
1163         the obsolescent gl_ABSOLUTE_HEADER.
1164         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
1165         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
1166         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
1167         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
1168         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
1169         * m4/math_h.m4 (gl_MATH_H): Likewise.
1170         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
1171         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
1172         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
1173         * m4/stdint.m4 (gl_STDINT_H): Likewise.
1174         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
1175         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
1176         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
1177         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
1178         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
1179         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
1180         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
1181         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
1182         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
1183         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
1184         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
1185         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1186         * m4/inttypes.m4 (gl_INTTYPES_H): Define
1187         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
1188         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
1189         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
1190         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
1191         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
1192         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
1193         * lib/float_.h: Likewise.
1194         * lib/inttypes_.h: Likewise.
1195         * lib/math_.h: Likewise.
1196         * lib/search_.h: Likewise.
1197         * lib/signal_.h: Likewise.
1198         * lib/stdint_.h: Likewise.
1199         * lib/stdio_.h: Likewise.
1200         * lib/stdlib_.h: Likewise.
1201         * lib/string_.h: Likewise.
1202         * lib/sys_stat_.h: Likewise.
1203         * lib/sys_time_.h: Likewise.
1204         * lib/time_.h: Likewise.
1205         * lib/unistd_.h: Likewise.
1206         * lib/wchar_.h: Likewise.
1207         * lib/wctype_.h: Likewise.
1208         * lib/dirent_.h: Likewise.
1209         * lib/iconv_.h: Likewise.
1210         * lib/locale_.h: Likewise.
1211         * lib/netinet_in_.h: Likewise.
1212         * lib/sys_select_.h: Likewise.
1213         * lib/sys_socket_.h: Likewise.
1214         * lib/sysexits_.h: Likewise.
1215         * modules/fcntl (Depends-on): Depend on include_next, not
1216         absolute_header.
1217         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
1218         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
1219         * modules/fchdir: Likewise.
1220         * modules/float: Likewise.
1221         * modules/iconv_open: Likewise.
1222         * modules/inttypes: Likewise.
1223         * modules/locale: Likewise.
1224         * modules/math: Likewise.
1225         * modules/netinet_in: Likewise.
1226         * modules/search: Likewise.
1227         * modules/signal: Likewise.
1228         * modules/stdint: Likewise.
1229         * modules/stdio: Likewise.
1230         * modules/stdlib: Likewise.
1231         * modules/string: Likewise.
1232         * modules/sys_select: Likewise.
1233         * modules/sys_socket: Likewise.
1234         * modules/sys_stat: Likewise.
1235         * modules/sys_time: Likewise.
1236         * modules/sysexits: Likewise.
1237         * modules/time: Likewise.
1238         * modules/unistd: Likewise.
1239         * modules/wchar: Likewise.
1240         * modules/wctype: Likewise.
1241         * modules/sys_stat: Change maintainer to "all".
1242         * modules/unistd: Likewise.
1243
1244 2007-06-20  Karl Berry  <karl@gnu.org>
1245
1246         * config/srclist.txt: track www changes in license files.
1247
1248 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
1249
1250         * build-aux/bootstrap: Remove stray dot.
1251         Make sure build_aux settings are honored when linking
1252         gnulib_extra_files.
1253
1254 2007-06-19  Eric Blake  <ebb9@byu.net>
1255
1256         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1257         Allow compilation on cygwin.
1258
1259 2007-06-19  Jim Meyering  <jim@meyering.net>
1260
1261         xreadlink-with-size: Remove module.  No longer used.
1262         Ex-callers now use xreadlink or mreadlink-with-size.
1263         * modules/xreadlink-with-size: Remove module.
1264         * lib/xreadlink-with-size.c: Remove file.
1265         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
1266         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
1267         just before the function definition *is* accurate.
1268
1269         Eliminate one way canonicalize_filename_mode could exit.
1270         * lib/canonicalize.c (canonicalize_filename_mode):
1271         Use mreadlink_with_size, not xreadlink_with_size.
1272
1273 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
1274
1275         Detect porting problems to FreeBSD/arm, which has time_t wider than
1276         long int.  Original problem reported for GNU diff by Xin Li in
1277         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
1278         * modules/getdate (Depends-on): Add intprops, verify.
1279         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
1280         is an integer type no wider than long int.
1281
1282 2007-06-18  Jim Meyering  <jim@meyering.net>
1283
1284         New module: mreadlink-with-size.
1285         * MODULES.html.sh: Add mreadlink-with-size.
1286         * modules/mreadlink-with-size: New module
1287         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
1288         not xreadlink-with-size.
1289         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
1290
1291 2007-06-16  Bruno Haible  <bruno@clisp.org>
1292
1293         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
1294         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
1295         Reported by Gary V. Vaughan <gary@gnu.org>.
1296
1297 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
1298
1299         Revamp lchown so that it lives in unistd.h where it belongs.
1300         * lib/lchown.h: Remove.
1301         * lib/dirchownmod.c: Don't include lib/lchown.h.
1302         * lib/fchownat.c: Likewise.
1303         * lib/openat.c: Likewise.
1304         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
1305         does not follow symlinks.
1306         (EOPNOTSUPP): Define if not defined.
1307         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
1308         is defined to 0.
1309         (lchown): New decl.
1310         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
1311         Do not check for lchown decl.
1312         Set REPLACE_LCHOWN.
1313         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
1314         REPLACE_LCHOWN.
1315         * modules/chown: Make it clear it follows symlinks.
1316         * modules/lchown: Make it clear it doesn't follow symlinks.
1317         (Files): Remove lib/lchown.h
1318         (Depends-on): Add unistd.
1319         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
1320         (Include): Include <unistd.h>, not "lchown.h".
1321         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
1322         REPLACE_LCHOWN.
1323
1324 2007-06-15  Jim Meyering  <jim@meyering.net>
1325
1326         Change license (GPL to LGPL) of fsusage and dependents.
1327         * modules/fsusage (License): Change to LGPL.
1328         * modules/full-read (License): Likewise.
1329         * modules/full-write (License): Likewise.
1330         * modules/safe-read (License): Likewise.
1331         * modules/safe-write (License): Likewise.
1332
1333 2007-06-14  Ben Pfaff  <blp@gnu.org>
1334
1335         Missing part of allocsa -> malloca transition.
1336         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
1337         gl_MALLOCA.
1338
1339 2007-06-12  Bruno Haible  <bruno@clisp.org>
1340
1341         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
1342         to ia64, x86_64, i386.
1343         Reported by Eric Blake.
1344
1345 2007-06-12  Bruno Haible  <bruno@clisp.org>
1346
1347         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
1348         cross-compiling to x86_64.
1349
1350 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
1351
1352         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
1353         glitch reported by Ralf Wildenhues in
1354         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
1355
1356         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
1357         Vin Shelton.
1358
1359 2007-06-11  Bruno Haible  <bruno@clisp.org>
1360
1361         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
1362         replacement string.
1363         Reported by Eric Blake.
1364
1365 2007-06-10  Bruno Haible  <bruno@clisp.org>
1366
1367         Prepare vasnprintf code for use with Unicode strings.
1368         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
1369         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
1370         TYPE_U32_STRING.
1371         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
1372         a_u32_string variants.
1373         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1374         * lib/printf-args.c: Don't include config.h and the specification
1375         header if PRINTF_FETCHARGS is already defined.
1376         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1377         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
1378         TYPE_U16_STRING, TYPE_U32_STRING.
1379         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
1380         u16_directive, u16_directives, u32_directive, u32_directives): New
1381         types.
1382         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
1383         New declarations.
1384         * lib/printf-parse.c: Don't include config.h and the specification
1385         header if PRINTF_PARSE is already defined. Eliminate the set of
1386         parameters for WIDE_CHAR_VERSION; the user of this file must provide
1387         them now. Include c-ctype.h.
1388         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
1389         directive and CHAR_T_ONLY_ASCII.
1390         * lib/vasnprintf.c: Don't include config.h and the specification header
1391         if VASNPRINTF is already defined.
1392         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
1393         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
1394         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
1395         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
1396         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
1397         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
1398         code accordingly.
1399         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
1400         pad_ourselves also in this case, with the 'c' and 's' directives, and
1401         with a different notion of "width".
1402         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
1403
1404 2007-06-10  Bruno Haible  <bruno@clisp.org>
1405
1406         * modules/unistr/u32-mbsnlen: New file.
1407         * lib/unistr/u32-mbsnlen.c: New file.
1408
1409         * modules/unistr/u16-mbsnlen: New file.
1410         * lib/unistr/u16-mbsnlen.c: New file.
1411
1412         * modules/unistr/u8-mbsnlen: New file.
1413         * lib/unistr/u8-mbsnlen.c: New file.
1414
1415         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
1416         declarations.
1417
1418 2007-06-10  Bruno Haible  <bruno@clisp.org>
1419
1420         * lib/string_.h (mbsnlen): New declaration.
1421         * lib/mbsnlen.c: New file.
1422         * m4/mbsnlen.m4: New file.
1423         * modules/mbsnlen: New file.
1424         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
1425         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
1426         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
1427
1428 2007-06-10  Bruno Haible  <bruno@clisp.org>
1429
1430         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
1431
1432 2007-06-10  Bruno Haible  <bruno@clisp.org>
1433
1434         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
1435         * lib/mbuiter.h: Likewise.
1436
1437 2007-06-10  Bruno Haible  <bruno@clisp.org>
1438
1439         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
1440         declaration.
1441
1442 2007-06-10  Karl Berry  <karl@gnu.org>
1443
1444         * config/srclist.txt: remove gettext entries, Bruno prefers
1445         to update individually.
1446
1447 2007-06-10  Bruno Haible  <bruno@clisp.org>
1448
1449         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
1450         'maxlen'. Ensure only length + width bytes are allocated, not
1451         length + 1 + width.
1452
1453 2007-06-09  Bruno Haible  <bruno@clisp.org>
1454
1455         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
1456         (CHAR_T): Remove macro.
1457         (VASNPRINTF): Update.
1458
1459 2007-06-09  Bruno Haible  <bruno@clisp.org>
1460
1461         * MODULES.html.sh (Unicode string functions): Add the new modules.
1462
1463         * modules/uniconv/u32-conv-to-enc: New file.
1464         * lib/uniconv/u32-conv-to-enc.c: New file.
1465         * modules/uniconv/u32-conv-to-enc-tests: New file.
1466         * tests/uniconv/test-u32-conv-to-enc.c: New file.
1467
1468         * modules/uniconv/u16-conv-to-enc: New file.
1469         * lib/uniconv/u16-conv-to-enc.c: New file.
1470         * lib/uniconv/u-conv-to-enc.h: New file.
1471         * modules/uniconv/u16-conv-to-enc-tests: New file.
1472         * tests/uniconv/test-u16-conv-to-enc.c: New file.
1473
1474         * modules/uniconv/u8-conv-to-enc: New file.
1475         * lib/uniconv/u8-conv-to-enc.c: New file.
1476         * modules/uniconv/u8-conv-to-enc-tests: New file.
1477         * tests/uniconv/test-u8-conv-to-enc.c: New file.
1478
1479         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
1480         u32_conv_to_encoding): New declarations.
1481
1482 2007-06-09  Bruno Haible  <bruno@clisp.org>
1483
1484         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
1485
1486 2007-06-09  Bruno Haible  <bruno@clisp.org>
1487
1488         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
1489         * modules/malloca: Renamed from modules/allocsa, updated.
1490         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
1491         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
1492         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
1493         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
1494         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
1495         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
1496         * modules/xmalloca: Renamed from modules/xallocsa, updated.
1497         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
1498         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
1499         * modules/c-strcasestr (Depends-on): Update.
1500         * lib/c-strcasestr.c: Update.
1501         * modules/c-strstr (Depends-on): Update.
1502         * lib/c-strstr.c: Update.
1503         * modules/canonicalize-lgpl (Depends-on): Update.
1504         * lib/canonicalize-lgpl.c: Update.
1505         * modules/clean-temp (Depends-on): Update.
1506         * lib/clean-temp.c: Update.
1507         * modules/csharpcomp (Depends-on): Update.
1508         * lib/csharpcomp.c: Update.
1509         * modules/csharpexec (Depends-on): Update.
1510         * lib/csharpexec.c: Update.
1511         * modules/javacomp (Depends-on): Update.
1512         * lib/javacomp.c: Update.
1513         * modules/javaexec (Depends-on): Update.
1514         * lib/javaexec.c: Update.
1515         * modules/mbscasestr (Depends-on): Update.
1516         * lib/mbscasestr.c: Update.
1517         * modules/mbsstr (Depends-on): Update.
1518         * lib/mbsstr.c: Update.
1519         * modules/setenv (Depends-on): Update.
1520         * lib/setenv.c: Update.
1521         * modules/strcasestr (Depends-on): Update.
1522         * lib/strcasestr.c: Update.
1523         * modules/striconveha (Depends-on): Update.
1524         * lib/striconveha.c: Update.
1525         * modules/relocatable-prog-wrapper (Files): Update.
1526         * lib/relocwrapper.c: Update.
1527         * build-aux/install-reloc: Update.
1528         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
1529
1530 2007-06-08  Bruno Haible  <bruno@clisp.org>
1531
1532         Port to uClibc.
1533         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
1534         * lib/fpurge.c (fpurge): Likewise.
1535         * lib/freading.c (freading): Likewise.
1536         * lib/fseeko.c (rpl_fseeko): Likewise.
1537         * lib/fseterr.c (fseterr): Likewise.
1538         * lib/fwriting.c (fwriting): Likewise.
1539         * tests/test-fflush.c (main): Avoid a failure on uClibc.
1540
1541 2007-06-08  Bruno Haible  <bruno@clisp.org>
1542
1543         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
1544         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
1545         * modules/gettext (Files): Add m4/intlmacosx.m4.
1546
1547 2007-06-07  Bruno Haible  <bruno@clisp.org>
1548
1549         * modules/localename-tests: New file.
1550         * tests/test-localename.c: New file.
1551
1552         New module 'localename'.
1553         * lib/localename.h: New file.
1554         * lib/localename.c: New file, from GNU gettext.
1555         * m4/localename.m4: New file.
1556         * modules/localename: New file.
1557
1558 2007-06-07  Bruno Haible  <bruno@clisp.org>
1559
1560         Work around the lack of <wchar.h> on some builds of uClibc.
1561         * doc/headers/wchar.texi: Update.
1562         * lib/wchar_.h: Include <wchar.h> only if it exists.
1563         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
1564         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
1565         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
1566         doesn't exist.
1567         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
1568         * modules/mbfile (Depends-on): Add wchar.
1569         * modules/mbiter (Depends-on): Likewise.
1570         * modules/mbuiter (Depends-on): Likewise.
1571         Reported by Simon Josefsson.
1572
1573 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
1574
1575         Work around problem reported by Steven M. Schweda in
1576         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
1577         Tru64 5.1B with the Compaq compiler environment installed declares
1578         an 'isblank' function but does not define it in the C library.
1579         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
1580         * lib/regex_internal.h (isblank): Likewise.
1581         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
1582         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1583
1584 2007-06-05  Bruno Haible  <bruno@clisp.org>
1585
1586         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
1587         ia64.
1588         * modules/printf-safe: New file.
1589         * modules/fprintf-posix (Depends-on): Add printf-safe.
1590         * modules/printf-posix (Depends-on): Likewise.
1591         * modules/snprintf-posix (Depends-on): Likewise.
1592         * modules/sprintf-posix (Depends-on): Likewise.
1593         * modules/vasnprintf-posix (Depends-on): Likewise.
1594         * modules/vasprintf-posix (Depends-on): Likewise.
1595         * modules/vfprintf-posix (Depends-on): Likewise.
1596         * modules/vprintf-posix (Depends-on): Likewise.
1597         * modules/vsnprintf-posix (Depends-on): Likewise.
1598         * modules/vsprintf-posix (Depends-on): Likewise.
1599         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
1600         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
1601         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
1602         "no" on i386, x86_64, ia64.
1603         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
1604         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1605         on i386, x86_64, ia64.
1606         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
1607         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1608         on i386, x86_64, ia64.
1609         * tests/test-vasnprintf-posix.c: Include float.h.
1610         (LDBL80_WORDS): New macro.
1611         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1612         on i386, x86_64, ia64.
1613         * tests/test-vasprintf-posix.c: Include float.h.
1614         (LDBL80_WORDS): New macro.
1615         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1616         on i386, x86_64, ia64.
1617         * tests/test-snprintf-posix.c: Include float.h.
1618         * tests/test-sprintf-posix.c: Likewise.
1619         * tests/test-vsnprintf-posix.c: Likewise.
1620         * tests/test-vsprintf-posix.c: Likewise.
1621
1622 2007-06-05  Bruno Haible  <bruno@clisp.org>
1623
1624         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
1625         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
1626         non-IEEE numbers on i386, x86_64, ia64.
1627         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
1628         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
1629         * tests/test-isnanl.h: Include float.h.
1630         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
1631
1632 2007-06-05  Bruno Haible  <bruno@clisp.org>
1633
1634         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
1635         also the %a / %A. Handle the %a / %A code before this extra handling.
1636
1637 2007-06-05  Bruno Haible  <bruno@clisp.org>
1638
1639         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
1640         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
1641
1642 2007-06-05  Bruno Haible  <bruno@clisp.org>
1643
1644         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
1645         typo in variable name.
1646
1647 2007-06-05  Eric Blake  <ebb9@byu.net>
1648
1649         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
1650         Reported by Simon Josefsson.
1651
1652 2007-06-04  Bruno Haible  <bruno@clisp.org>
1653
1654         Avoid test failures on some PowerPC platforms.
1655         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
1656         Define differently for PowerPC.
1657         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
1658         Reported by Gary V. Vaughan <gary@gnu.org>.
1659
1660 2007-06-02  Bruno Haible  <bruno@clisp.org>
1661
1662         Fix test-stdint failure on FreeBSD/ia64.
1663         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
1664         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
1665         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
1666         * doc/headers/stdint.texi: Update.
1667
1668 2007-06-01  Bruno Haible  <bruno@clisp.org>
1669
1670         * tests/test-binary-io.c (main): Pass a third argument to open().
1671         Reported by Gary V. Vaughan <gary@gnu.org>.
1672
1673 2007-06-01  Bruno Haible  <bruno@clisp.org>
1674
1675         * doc/functions/frexpl.texi: Update for mingw.
1676
1677 2007-06-01  Bruno Haible  <bruno@clisp.org>
1678
1679         * tests/test-lseek.c (main): Disable test of errno for invalid third
1680         argument.
1681         * doc/functions/lseek.texi: Update.
1682         Reported by Gary V. Vaughan <gary@gnu.org>.
1683
1684 2007-05-28  Bruno Haible  <bruno@clisp.org>
1685
1686         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
1687
1688 2007-05-31  Eric Blake  <ebb9@byu.net>
1689
1690         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
1691         cross compiling.
1692
1693 2007-05-30  Eric Blake  <ebb9@byu.net>
1694         and Bruno Haible  <bruno@clisp.org>
1695
1696         Work around mingw test failures exposed by m4-1.4.9b.
1697         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
1698         * tests/test-unistd.c: Disable uid_t and git_t tests for the
1699         moment.
1700
1701 2007-05-30  Bruno Haible  <bruno@clisp.org>
1702
1703         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
1704         assuming that they are closed. Needed on HP-UX 11.
1705
1706 2007-05-29  Bruno Haible  <bruno@clisp.org>
1707
1708         Fix a problem with #include_next.
1709         * lib/dirent_.h: Split the double-inclusion guard.
1710         * lib/fcntl_.h: Likewise.
1711         * lib/float_.h: Likewise.
1712         * lib/iconv_.h: Likewise.
1713         * lib/inttypes_.h: Likewise.
1714         * lib/locale_.h: Likewise.
1715         * lib/math_.h: Likewise.
1716         * lib/netinet_in_.h: Likewise.
1717         * lib/search_.h: Likewise.
1718         * lib/signal_.h: Likewise.
1719         * lib/stdint_.h: Likewise.
1720         * lib/stdio_.h: Likewise.
1721         * lib/stdlib_.h: Likewise.
1722         * lib/string_.h: Likewise.
1723         * lib/sys_select_.h: Likewise.
1724         * lib/sys_socket_.h: Likewise.
1725         * lib/sys_stat_.h: Likewise.
1726         * lib/sys_time_.h: Likewise.
1727         * lib/sysexits_.h: Likewise.
1728         * lib/time_.h: Likewise.
1729         * lib/unistd_.h: Likewise.
1730         * lib/wchar_.h: Likewise.
1731         * lib/wctype_.h: Likewise.
1732
1733 2007-05-29  Bruno Haible  <bruno@clisp.org>
1734
1735         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
1736         for the moment.
1737
1738 2007-05-29  Bruno Haible  <bruno@clisp.org>
1739
1740         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
1741         invocation.
1742         Reported by Eric Blake.
1743
1744 2007-05-29  Bruno Haible  <bruno@clisp.org>
1745
1746         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
1747         compiling case.
1748
1749 2007-05-29  Eric Blake  <ebb9@byu.net>
1750             Bruno Haible  <bruno@clisp.org>
1751
1752         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
1753         cross compiles.
1754
1755 2007-05-28  Eric Blake  <ebb9@byu.net>
1756
1757         * modules/closein-tests (test_closein_LDADD): Support test on
1758         cygwin with libtool.
1759
1760 2007-05-28  Bruno Haible  <bruno@clisp.org>
1761
1762         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
1763         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
1764         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
1765         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
1766         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
1767         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
1768         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
1769         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
1770         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
1771
1772 2007-05-28  Eric Blake  <ebb9@byu.net>
1773
1774         Unconditionally include <config.h> in unit tests.
1775         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
1776         * tests/test-allocsa.c, tests/test-arcfour.c,
1777         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
1778         tests/test-array_list.c, tests/test-array_oset.c,
1779         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
1780         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
1781         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
1782         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
1783         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
1784         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
1785         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
1786         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
1787         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
1788         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
1789         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
1790         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
1791         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
1792         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
1793         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
1794         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
1795         test-md5.c, test-memmem.c, test-printf-posix.c,
1796         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
1797         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
1798         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
1799         test-strcasestr.c, test-striconv.c, test-striconveh.c,
1800         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
1801         test-vasnprintf-posix2.c, test-vasnprintf.c,
1802         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
1803         test-vfprintf-posix.c, test-vprintf-posix.c,
1804         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
1805         test-xvasprintf.c: Likewise.
1806
1807 2007-05-28  Bruno Haible  <bruno@clisp.org>
1808
1809         * gnulib-tool (func_import): Remember the --with-tests command-line
1810         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
1811         Reported by Eric Blake.
1812
1813 2007-05-28  Bruno Haible  <bruno@clisp.org>
1814
1815         * modules/ftell-tests: New file.
1816         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
1817         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
1818
1819         * lib/ftell.c: New file.
1820         * modules/ftell: New file.
1821         * m4/ftell.m4: New file.
1822         * doc/functions/ftell.texi: Update.
1823         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
1824         REPLACE_FTELL.
1825         * lib/stdio_.h (rpl_ftell): New declaration.
1826         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
1827         REPLACE_FTELL.
1828
1829 2007-05-28  Eric Blake  <ebb9@byu.net>
1830
1831         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
1832
1833 2007-05-28  Bruno Haible  <bruno@clisp.org>
1834
1835         * modules/fseek-tests: New file.
1836         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
1837         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
1838
1839         * lib/fseek.c: New file.
1840         * modules/fseek: New file.
1841         * m4/fseek.m4: New file.
1842         * doc/functions/fseek.texi: Update.
1843         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
1844         REPLACE_FSEEK.
1845         * lib/stdio_.h (rpl_fseek): New declaration.
1846         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
1847         REPLACE_FSEEK.
1848
1849 2007-05-28  Bruno Haible  <bruno@clisp.org>
1850
1851         * lib/stdio_.h (fflush): More comments.
1852
1853 2007-05-28  Bruno Haible  <bruno@clisp.org>
1854
1855         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
1856         runtime test.
1857
1858 2007-05-28  Eric Blake  <ebb9@byu.net>
1859
1860         Improve lseek module.
1861         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
1862         * lib/unistd_.h (lseek): Scale back link warning message.
1863         * tests/test-lseek.c: Beef up test.
1864         * tests/test-lseek.sh: Exercise more facets of lseek.
1865         Reported by Bruno Haible.
1866
1867 2007-05-28  Bruno Haible  <bruno@clisp.org>
1868
1869         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
1870         to define.
1871
1872 2007-05-27  Bruno Haible  <bruno@clisp.org>
1873
1874         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
1875
1876 2007-05-27  Bruno Haible  <bruno@clisp.org>
1877
1878         * modules/openmp: New file.
1879         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
1880         Noah Misch.
1881
1882 2007-05-26  Bruno Haible  <bruno@clisp.org>
1883
1884         * modules/chdir-long (Depends-on): Add fchdir.
1885         * modules/chdir-safer (Depends-on): Likewise.
1886         * modules/fts (Depends-on): Likewise.
1887         * modules/fts-lgpl (Depends-on): Likewise.
1888         * modules/openat (Depends-on): Likewise.
1889         * modules/savewd (Depends-on): Likewise.
1890
1891 2007-05-24  Eric Blake  <ebb9@byu.net>
1892
1893         Fix lseek on mingw.
1894         * modules/lseek: New module.
1895         * m4/lseek.m4: New file.
1896         * lib/lseek.c: New file.
1897         * modules/lseek-tests: New file.
1898         * tests/test-lseek.c: New file.
1899         * tests/test-lseek.sh: New file.
1900         * MODULES.html.sh: Document lseek module.
1901         * modules/fflush (Depends-on): Add lseek, fseeko.
1902         * modules/fseeko (Depends-on): Likewise.
1903         * modules/ftello (Depends-on): Likewise.
1904         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
1905         broken.
1906         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
1907         broken.
1908         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
1909         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
1910         * lib/ftello.c (rpl_ftello): Likewise.
1911         * tests/test-fseeko.c (main): Test this.
1912         * tests/test-fseeko.sh: Likewise.
1913         * tests/test-ftello.c (main): Likewise.
1914         * tests/test-ftello.sh: Likewise.
1915         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
1916         implies replacing fseek.
1917         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
1918         HAVE_FTELLO.
1919         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
1920         * modules/unistd (Makefile.am): Likewise.
1921         * lib/unistd_.h (lseek): Declare a replacement.
1922         * doc/functions/lseek.texi (lseek): Document this fix.
1923         * doc/functions/fseek.texi (fseek): Likewise.
1924         * doc/functions/ftell.texi (ftell): Likewise.
1925
1926 2007-05-24  Bruno Haible  <bruno@clisp.org>
1927
1928         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
1929         in the printed representation of a NaN.
1930         * tests/test-vasprintf-posix.c (test_function): Likewise.
1931         * tests/test-snprintf-posix.h (test_function): Likewise.
1932         * tests/test-sprintf-posix.h (test_function): Likewise.
1933         Reported by Eric Blake.
1934
1935 2007-05-23  Eric Blake  <ebb9@byu.net>
1936
1937         Fix fseeko/ftello on cygwin 1.5.24.
1938         * doc/functions/fseeko.texi (fseeko): Document the fix.
1939         * doc/functions/ftello.texi (ftello): Document the fix.
1940         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
1941         * doc/functions/stdout.text (stdout): New file.
1942         * doc/functions/stderr.text (stderr): New file.
1943         * doc/gnulib.texi (Function Substitutes): Use new files.
1944         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
1945         prior to 1.7.0.
1946         * tests/test-ftello.c (main): Likewise for ftello.
1947         * tests/test-fseeko.sh: New file.
1948         * tests/test-ftello.sh: New file.
1949         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
1950         with seekable stdin.
1951         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
1952         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
1953         (gl_REPLACE_FSEEKO): New macro.
1954         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
1955         * modules/fseeko (Files): Distribute fseeko.c.
1956         * modules/ftello (Files): Distribute ftello.c.
1957         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
1958         mode.
1959         * lib/ftello.c (rpl_ftello): New file.
1960         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
1961         fseeko, ftello.
1962         (gl_STDIN_LARGE_OFFSET): New macro.
1963         * modules/stdio (Makefile.am): Perform the replacement.
1964         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
1965
1966 2007-05-23  Bruno Haible  <bruno@clisp.org>
1967
1968         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
1969         GNULIB_POSIXCHECK is defined.
1970
1971 2007-05-21  Bruno Haible  <bruno@clisp.org>
1972
1973         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
1974         Check also the output for NaN arguments. When cross-compiling, guess
1975         no on IRIX.
1976         * lib/vasnprintf.c: Update comments.
1977         * tests/test-vasnprintf-posix.c (strisnan): New function.
1978         (test_function): Use it.
1979         * tests/test-vasprintf-posix.c (strisnan): New function.
1980         (test_function): Use it.
1981         * tests/test-snprintf-posix.h (strisnan): New function.
1982         (test_function): Use it.
1983         * tests/test-sprintf-posix.h (strisnan): New function.
1984         (test_function): Use it.
1985         Reported by Eric Blake.
1986
1987 2007-05-20  Bruno Haible  <bruno@clisp.org>
1988
1989         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
1990         numbers that fails on BeOS.
1991         * doc/functions/frexpl.texi: Update.
1992
1993 2007-05-20  Jim Meyering  <jim@meyering.net>
1994
1995         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
1996         forced upon us by glibc-2.6.
1997
1998 2007-05-20  Bruno Haible  <bruno@clisp.org>
1999
2000         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
2001         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
2002         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
2003         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
2004         NEED_PRINTF_INFINITE.
2005         (is_infinitel): New function.
2006         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
2007         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
2008         gl_PREREQ_VASNPRINTF_INFINITE.
2009         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
2010         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2011         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
2012         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
2013         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
2014         gl_PREREQ_VASNPRINTF_INFINITE.
2015         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2016         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2017         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2018         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2019         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2020         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2021         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2022         * doc/functions/fprintf.texi: Update.
2023         * doc/functions/printf.texi: Update.
2024         * doc/functions/snprintf.texi: Update.
2025         * doc/functions/sprintf.texi: Update.
2026         * doc/functions/vfprintf.texi: Update.
2027         * doc/functions/vprintf.texi: Update.
2028         * doc/functions/vsnprintf.texi: Update.
2029         * doc/functions/vsprintf.texi: Update.
2030
2031 2007-05-20  Bruno Haible  <bruno@clisp.org>
2032
2033         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
2034         was not found in libc.
2035         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
2036
2037 2007-05-20  Bruno Haible  <bruno@clisp.org>
2038
2039         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2040         printed as "-nan" instead of "nan".
2041         * tests/test-vasprintf-posix.c (test_function): Likewise.
2042         * tests/test-snprintf-posix.h (test_function): Likewise.
2043         * tests/test-sprintf-posix.h (test_function): Likewise.
2044         Needed for HP-UX 11.
2045
2046 2007-05-20  Jim Meyering  <jim@meyering.net>
2047
2048         Fix buggy test for the fchownat-deref bug.
2049         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
2050         symlink required for the run-test.  Without it, this test would
2051         always declare that fchownat doesn't work, and client code would
2052         unnecessarily use the replacement function with fixed libc.
2053         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
2054         Reported by Greg Schafer.
2055
2056 2007-05-19  Bruno Haible  <bruno@clisp.org>
2057
2058         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
2059         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
2060         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
2061         Needed for IRIX 6.5 and Solaris 2.5.1.
2062
2063 2007-05-19  Bruno Haible  <bruno@clisp.org>
2064
2065         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
2066         (test_function): Skip tests involving -0.0 on platforms where
2067         -0.0 = 0.0.
2068         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
2069         (test_function): Skip tests involving -0.0 on platforms where
2070         -0.0 = 0.0.
2071         * tests/test-snprintf-posix.h (have_minus_zero): New function.
2072         (test_function): Skip tests involving -0.0 on platforms where
2073         -0.0 = 0.0.
2074         * tests/test-sprintf-posix.h (have_minus_zero): New function.
2075         (test_function): Skip tests involving -0.0 on platforms where
2076         -0.0 = 0.0.
2077         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
2078         tests.
2079         * tests/test-printf-posix.h (test_function): Likewise.
2080         * tests/test-printf-posix.output: Remove all -0.0 related results.
2081         Needed for IRIX 6.5.
2082
2083 2007-05-19  Bruno Haible  <bruno@clisp.org>
2084
2085         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2086         printed as "nan0x7fffffff" instead of "nan".
2087         * tests/test-vasprintf-posix.c (test_function): Likewise.
2088         * tests/test-snprintf-posix.h (test_function): Likewise.
2089         * tests/test-sprintf-posix.h (test_function): Likewise.
2090         * tests/test-fprintf-posix.h (NaN): Remove macro.
2091         (test_function): Remove all NaN related tests.
2092         * tests/test-printf-posix.h (NaN): Remove macro.
2093         (test_function): Remove all NaN related tests.
2094         * tests/test-printf-posix.output: Remove all NaN related results.
2095         Needed for IRIX 6.5.
2096
2097 2007-05-19  Bruno Haible  <bruno@clisp.org>
2098
2099         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
2100         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
2101
2102 2007-05-19  Bruno Haible  <bruno@clisp.org>
2103
2104         * lib/float_.h: New file.
2105         * m4/float_h.m4: New file.
2106         * modules/float: New file.
2107         * modules/isnanl (Dependencies): Add float.
2108         * modules/isnanl-nolibm (Dependencies): Likewise.
2109         * modules/mathl (Dependencies): Likewise.
2110         * modules/printf-frexpl (Dependencies): Likewise.
2111         * modules/signbit (Dependencies): Likewise.
2112         * modules/vasnprintf (Dependencies): Likewise.
2113         * doc/headers/float.texi: Update.
2114
2115 2007-05-19  Jim Meyering  <jim@meyering.net>
2116
2117         * lib/utimens.c (gl_futimens): Rename from futimens,
2118         now that glibc-2.6 declares futimens.
2119         * lib/utimens.h: Likewise.
2120
2121 2007-05-19  Bruno Haible  <bruno@clisp.org>
2122
2123         Avoid test failures on mingw.
2124         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
2125         * tests/test-printf-posix.sh: Likewise.
2126         * tests/test-vfprintf-posix.sh: Likewise.
2127         * tests/test-vprintf-posix.sh: Likewise.
2128
2129 2007-05-19  Bruno Haible  <bruno@clisp.org>
2130
2131         Fix *printf result for NaN, Inf, -0.0 on mingw.
2132         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
2133         * lib/vasnprintf.c: Include math.h and isnan.h.
2134         (is_infinite_or_zero): New function.
2135         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
2136         values in the %f, %F, %e, %E, %g, %G directives.
2137         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
2138         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2139         gl_PRINTF_INFINITE and test its result. Invoke
2140         gl_PREREQ_VASNPRINTF_INFINITE.
2141         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2142         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2143         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2144         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2145         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2146         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2147         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2148         * doc/functions/fprintf.texi: Update.
2149         * doc/functions/printf.texi: Update.
2150         * doc/functions/snprintf.texi: Update.
2151         * doc/functions/sprintf.texi: Update.
2152         * doc/functions/vfprintf.texi: Update.
2153         * doc/functions/vprintf.texi: Update.
2154         * doc/functions/vsnprintf.texi: Update.
2155         * doc/functions/vsprintf.texi: Update.
2156
2157 2007-05-19  Bruno Haible  <bruno@clisp.org>
2158
2159         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
2160         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
2161         Instead of multiplying with 10^k, set extra_zeroes to k.
2162         (scale10_round_long_double): Remove function.
2163
2164 2007-05-18  Bruno Haible  <bruno@clisp.org>
2165
2166         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
2167         introduced on 2007-05-06.
2168
2169 2007-05-18  Bruno Haible  <bruno@clisp.org>
2170
2171         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
2172         %g directives.
2173         * tests/test-vasprintf-posix.c (test_function): Likewise.
2174         * tests/test-snprintf-posix.h (test_function): Likewise.
2175         * tests/test-sprintf-posix.h (test_function): Likewise.
2176
2177 2007-05-18  Bruno Haible  <bruno@clisp.org>
2178
2179         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
2180         (strmatch): New function.
2181         (test_function): Test the %f directive on numbers of various exponents.
2182         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
2183         (strmatch): New function.
2184         (test_function): Test the %f directive on numbers of various exponents.
2185         * tests/test-snprintf-posix.h (strmatch): New function.
2186         (test_function): Test the %f directive on numbers of various exponents.
2187         * tests/test-sprintf-posix.h (strmatch): New function.
2188         (test_function): Test the %f directive on numbers of various exponents.
2189         * tests/test-snprintf-posix.c (SIZEOF): New macro.
2190         * tests/test-sprintf-posix.c (SIZEOF): New macro.
2191         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
2192         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
2193
2194 2007-05-18  Bruno Haible  <bruno@clisp.org>
2195
2196         Add support for 'long double' number output.
2197         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
2198         * lib/vasnprintf.c: Include math.h and float+.h.
2199         (mp_limb_t): New type.
2200         (GMP_LIMB_BITS): New macro.
2201         (mp_twolimb_t): New type.
2202         (GMP_TWOLIMB_BITS): New macro.
2203         (mpn_t): New type.
2204         (multiply, divide, convert_to_decimal, decode_long_double,
2205         scale10_round_long_double, scale10_round_decimal_long_double,
2206         floorlog10l): New functions.
2207         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
2208         for the %f, %F, %e, %E, %g, %G directives.
2209         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
2210         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2211         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
2212         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
2213         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2214         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2215         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2216         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2217         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2218         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2219         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2220         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
2221         * modules/snprintf-posix (Depends-on): Likewise.
2222         * modules/sprintf-posix (Depends-on): Likewise.
2223         * modules/vasnprintf-posix (Depends-on): Likewise.
2224         * modules/vasprintf-posix (Depends-on): Likewise.
2225         * modules/vfprintf-posix (Depends-on): Likewise.
2226         * modules/vsnprintf-posix (Depends-on): Likewise.
2227         * modules/vsprintf-posix (Depends-on): Likewise.
2228         * modules/vasnprintf (Files): Add lib/float+.h.
2229         * doc/functions/fprintf.texi: Update.
2230         * doc/functions/printf.texi: Update.
2231         * doc/functions/snprintf.texi: Update.
2232         * doc/functions/sprintf.texi: Update.
2233         * doc/functions/vfprintf.texi: Update.
2234         * doc/functions/vprintf.texi: Update.
2235         * doc/functions/vsnprintf.texi: Update.
2236         * doc/functions/vsprintf.texi: Update.
2237
2238 2007-05-18  Bruno Haible  <bruno@clisp.org>
2239
2240         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
2241
2242 2007-05-18  Bruno Haible  <bruno@clisp.org>
2243
2244         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
2245         for printing 64-bit integers. Needed for mingw.
2246
2247 2007-05-18  Bruno Haible  <bruno@clisp.org>
2248
2249         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
2250         gl_FUNC_FREXPL_WORKS.
2251         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
2252
2253 2007-05-18  Bruno Haible  <bruno@clisp.org>
2254
2255         * modules/frexpl-nolibm-tests: New file.
2256
2257         * modules/frexpl-nolibm: New file.
2258         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
2259
2260 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
2261
2262         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
2263         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2264         GCC 4.2, which otherwise issues a lot of warnings.
2265         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
2266         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
2267         Likewise.
2268         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
2269         * modules/iconv_open (iconv.h): Likewise.
2270         * modules/locale (locale.h): Likewise.
2271         * modules/netinet_in (netinet/in.h): Likewise.
2272         * modules/sys_select (sys_select.h): Likewise.
2273         * modules/sys_socket (sys/socket.h): Likewise.
2274         * modules/sys_stat (sys/stat.h): Likewise.
2275         * modules/sysexits (sysexits.h): Likewise.
2276         * modules/unistd (unistd.h): Likewise.
2277
2278 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2279
2280         * modules/closein-tests (Makefile.am): Distribute
2281         `test-closein.sh'.
2282
2283 2007-05-17  Bruno Haible  <bruno@clisp.org>
2284
2285         * tests/test-printf-posix.output: Renamed from
2286         tests/test-fprintf-posix.out.
2287         * modules/fprintf-posix-tests: Update.
2288         * modules/printf-posix-tests: Update.
2289         * modules/vfprintf-posix-tests: Update.
2290         * modules/vprintf-posix-tests: Update.
2291         * tests/test-fprintf-posix.sh: Update.
2292         * tests/test-printf-posix.sh: Update.
2293         * tests/test-vfprintf-posix.sh: Update.
2294         * tests/test-vprintf-posix.sh: Update.
2295         Reported by Ralf Wildenhues.
2296
2297 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
2298
2299         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
2300         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2301         GCC 4.2, which otherwise issues a lot of warnings.
2302         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
2303         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
2304         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
2305         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
2306         it should no longer be needed.
2307         * lib/string_.h: Likewise.
2308         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
2309         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
2310         * modules/inttypes (inttypes.h): Likewise.
2311         * modules/math (math.h): Likewise.
2312         * modules/search (search.h): Likewise.
2313         * modules/signal (signal.h): Likewise.
2314         * modules/stdint (stdint.h): Likewise.
2315         * modules/stdio (stdio.h): Likewise.
2316         * modules/stdlib (stdlib.h): Likewise.
2317         * modules/string (string.h): Likewise.
2318         * modules/sys_time (sys/time.h): Likewise.
2319         * modules/time (time.h): Likewise.
2320         * modules/wchar (wchar.h): Likewise.
2321         * modules/wctype (wtype.h): Likewise.
2322
2323 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
2324
2325         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
2326
2327 2007-05-13  Bruno Haible  <bruno@clisp.org>
2328
2329         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
2330         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
2331         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
2332         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
2333         (gl_PREREQ_STRTOK_R): Don't require it here.
2334
2335 2007-05-13  Bruno Haible  <bruno@clisp.org>
2336
2337         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
2338         when used in C++ mode.
2339
2340 2007-05-12  Bruno Haible  <bruno@clisp.org>
2341
2342         * lib/linebuffer.h: Tweak doc.
2343         * lib/linebuffer.c: Likewise.
2344
2345 2007-05-12  James Youngman  <jay@gnu.org>
2346
2347         * lib/linebuffer.c (readlinebuffer_delim): New function,
2348         like readlinebuffer, but use a caller-specified delimiter.
2349         (readlinebuffer): Just call readlinebuffer_delim with '\n'
2350         as the delimiter.
2351         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
2352
2353 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2354
2355         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
2356         * modules/openat (Files): Remove openat-die.c.
2357         (Depends-on): Add openat-die.
2358         * modules/openat-die: New module.
2359
2360 2007-05-06  Bruno Haible  <bruno@clisp.org>
2361
2362         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
2363         Update with info about Cygwin.
2364         * doc/functions/fprintf.texi: Update.
2365         * doc/functions/printf.texi: Update.
2366         * doc/functions/snprintf.texi: Update.
2367         * doc/functions/sprintf.texi: Update.
2368         * doc/functions/vfprintf.texi: Update.
2369         * doc/functions/vprintf.texi: Update.
2370         * doc/functions/vsnprintf.texi: Update.
2371         * doc/functions/vsprintf.texi: Update.
2372         Reported by Eric Blake.
2373
2374 2007-05-06  Bruno Haible  <bruno@clisp.org>
2375
2376         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
2377         padding ourselves for the floating-point directives.
2378         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
2379         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
2380         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2381         gl_PRINTF_FLAG_ZERO and test its result. Invoke
2382         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
2383         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2384         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2385         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2386         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2387         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2388         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2389         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2390         * tests/test-snprintf-posix.h (test_function): Also check the width
2391         and some flags in the %f directive.
2392         * tests/test-sprintf-posix.h (test_function): Likewise.
2393         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2394         * tests/test-vasprintf-posix.c (test_function): Likewise.
2395         * doc/functions/fprintf.texi: Update.
2396         * doc/functions/printf.texi: Update.
2397         * doc/functions/snprintf.texi: Update.
2398         * doc/functions/sprintf.texi: Update.
2399         * doc/functions/vfprintf.texi: Update.
2400         * doc/functions/vprintf.texi: Update.
2401         * doc/functions/vsnprintf.texi: Update.
2402         * doc/functions/vsprintf.texi: Update.
2403
2404 2007-05-06  Bruno Haible  <bruno@clisp.org>
2405
2406         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
2407         pass the ' flag character to sprintf or snprintf.
2408         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
2409         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
2410         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2411         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
2412         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
2413         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2414         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2415         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2416         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2417         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2418         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2419         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2420         * tests/test-snprintf-posix.h (test_function): Also check the grouping
2421         flag.
2422         * tests/test-sprintf-posix.h (test_function): Likewise.
2423         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2424         * tests/test-vasprintf-posix.c (test_function): Likewise.
2425         * doc/functions/fprintf.texi: Update.
2426         * doc/functions/printf.texi: Update.
2427         * doc/functions/snprintf.texi: Update.
2428         * doc/functions/sprintf.texi: Update.
2429         * doc/functions/vfprintf.texi: Update.
2430         * doc/functions/vprintf.texi: Update.
2431         * doc/functions/vsnprintf.texi: Update.
2432         * doc/functions/vsprintf.texi: Update.
2433
2434 2007-05-01  Bruno Haible  <bruno@clisp.org>
2435
2436         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
2437
2438 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
2439
2440         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
2441         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
2442
2443 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
2444
2445         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
2446         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
2447         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
2448
2449 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2450
2451         * lib/argp-help.c (struct hol_entry): New member `ord'.
2452         (HOL_ENTRY_PTRCMP): Use ord for comparison
2453         (hol_sort): Initialize ord.
2454
2455 2007-05-01  Bruno Haible  <bruno@clisp.org>
2456
2457         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
2458         Reported by Eric Blake.
2459         * doc/gnulib.texi (Function Substitutes): Update.
2460
2461 2007-05-01  Bruno Haible  <bruno@clisp.org>
2462
2463         * doc/functions.texi: Remove file, now redundant through
2464         doc/functions/*.texi.
2465
2466 2007-05-01  Bruno Haible  <bruno@clisp.org>
2467
2468         * modules/argp (Depends-on): Add sleep.
2469
2470 2007-05-01  Bruno Haible  <bruno@clisp.org>
2471
2472         * modules/sleep-tests: New file.
2473         * tests/test-sleep.c: New file.
2474
2475         * modules/sleep: New file.
2476         * lib/sleep.c: New file.
2477         * m4/sleep.m4: New file.
2478         * lib/unistd_.h (sleep): New declaration.
2479         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
2480         HAVE_SLEEP.
2481         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
2482         * doc/functions/sleep.texi: Document the sleep module.
2483
2484 2007-05-01  Bruno Haible  <bruno@clisp.org>
2485
2486         * lib/sigprocmask.h: Remove file.
2487         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
2488         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
2489         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
2490         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
2491         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
2492         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
2493         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
2494         HAVE_SIGSET_T as a shell variable.
2495         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
2496         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
2497         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
2498         (Depends-on): Add signal. Remove verify.
2499         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
2500         (Include): Mention <signal.h> instead of sigprocmask.h.
2501         * NEWS: Mention the change.
2502         * lib/fatal-signal.c: Don't include sigprocmask.h.
2503
2504 2007-05-01  Bruno Haible  <bruno@clisp.org>
2505
2506         * modules/signal: New file.
2507         * lib/signal_.h: New file.
2508         * m4/signal_h.m4: New file.
2509
2510 2007-05-01  Bruno Haible  <bruno@clisp.org>
2511
2512         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
2513         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
2514         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
2515         HAVE_WCTYPE_CTMP_BUG into wctype.h.
2516
2517 2007-05-01  Bruno Haible  <bruno@clisp.org>
2518
2519         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
2520         configure time.
2521         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
2522         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
2523         * modules/sys_stat (Makefile.am): Substitute their values into
2524         sys/stat.h.
2525
2526 2007-05-01  Bruno Haible  <bruno@clisp.org>
2527
2528         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
2529         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
2530         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
2531
2532 2007-05-01  Bruno Haible  <bruno@clisp.org>
2533
2534         * doc/header/assert.texi: Undo last change: don't mention the gnulib
2535         'assert' module here.
2536
2537 2007-05-01  Bruno Haible  <bruno@clisp.org>
2538
2539         * doc/functions/*.texi: New files.
2540         * doc/functions/google-ranking.txt: New file.
2541         * doc/gnulib.texi (Function Substitutes): New chapter.
2542         (ctime, inet_ntoa): Remove sections.
2543         * doc/ctime.texi: Remove file.
2544         * doc/inet_ntoa.texi: Remove file.
2545         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
2546         dependencies.
2547         (%.info): New rule, specifying a --reference-limit.
2548
2549 2007-05-01  Bruno Haible  <bruno@clisp.org>
2550
2551         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
2552
2553 2007-05-01  Bruno Haible  <bruno@clisp.org>
2554
2555         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
2556         the portability of 'mkdir' to mingw systems.
2557
2558 2007-05-01  Bruno Haible  <bruno@clisp.org>
2559
2560         * doc/headers/google-ranking.txt: New file.
2561
2562 2007-04-30  Eric Blake  <ebb9@byu.net>
2563
2564         Prefer fseeko to fseek.
2565         * modules/getpass (Depends-on): Add fseeko.
2566         * lib/getpass.c (getpass): Use fseeko, not fseek.
2567
2568 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
2569
2570         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
2571         assumes the sorting is stable, while most qsort implementations
2572         are not.  Use argument addresses to ensure they never compare as
2573         equal.
2574
2575         * tests/test-argp-2.sh (usage-indent test): Fix output
2576         (func_compare): Restore diff options
2577         * tests/test-argp.c: Restore #include "progname.h"
2578
2579 2007-04-29  Bruno Haible  <bruno@clisp.org>
2580
2581         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
2582         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2583         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
2584         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2585         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
2586         (configure.ac): Define CHECK_SNPRINTF_POSIX.
2587         (TESTS, check_PROGRAMS): Add test-snprintf.
2588         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
2589         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
2590         (TESTS, check_PROGRAMS): Add test-vsnprintf.
2591         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
2592         assertions that fail on HP-UX, OSF/1, or IRIX.
2593         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
2594
2595 2007-04-29  Bruno Haible  <bruno@clisp.org>
2596
2597         * MODULES.html.sh (posix_functions): Remove 'contents'.
2598
2599 2007-04-29  Karl Berry  <karl@gnu.org>
2600
2601         * config/srclist.txt (gendocs_template_min): new entry.
2602
2603 2007-04-29  Bruno Haible  <bruno@clisp.org>
2604
2605         Work around fpurge bug on BSD systems.
2606         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
2607         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
2608         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
2609         fpurge to rpl_fpurge if the system already has this function.
2610         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
2611         the case where the system already has this function. Correct invariants
2612         on BSD systems.
2613         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
2614         BSD systems.
2615
2616 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
2617
2618         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
2619         proposed by Sven Verdoolaege.
2620
2621         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
2622         options.
2623         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
2624         (usage and help tests): Update
2625
2626 2007-04-29  Bruno Haible  <bruno@clisp.org>
2627
2628         * tests/test-fflush.c (main): Use a file of size 17, not 10.
2629         Print more information in case of failure. Disable a test on BeOS.
2630
2631 2007-04-29  Bruno Haible  <bruno@clisp.org>
2632
2633         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
2634         This helps debugging on systems on which no gdb is available.
2635
2636 2007-04-29  Bruno Haible  <bruno@clisp.org>
2637
2638         * lib/freading.h: Improve comments.
2639         * lib/fwriting.h: Likewise.
2640         * tests/test-freading.c (main): Don't check freading immediately after
2641         repositioning. Needed for glibc.
2642
2643 2007-04-29  Bruno Haible  <bruno@clisp.org>
2644
2645         * lib/freading.c (freading): Trivial simplification.
2646
2647 2007-04-28  Bruno Haible  <bruno@clisp.org>
2648
2649         * tests/test-fwriting.c (main): Also test the interaction between
2650         fflush and fwriting.
2651         * modules/fwriting-tests (Depends-on): Add fflush.
2652
2653         * tests/test-freading.c (main): Also test the interaction between
2654         fflush and freading.
2655         * modules/freading-tests (Depends-on): Add fflush.
2656
2657 2007-04-28  Bruno Haible  <bruno@clisp.org>
2658
2659         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
2660         fseeko and ftello.
2661         Suggested by Eric Blake.
2662
2663 2007-04-28  Jim Meyering  <jim@meyering.net>
2664
2665         Avoid false-negative in gl_STDINT_H's C99 conformance test.
2666         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
2667         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
2668
2669 2007-04-27  Eric Blake  <ebb9@byu.net>
2670
2671         * doc/headers/assert.texi (assert.h): Document assert module use.
2672
2673 2007-04-27  Bruno Haible  <bruno@clisp.org>
2674
2675         * doc/headers/*.texi: New files.
2676         * doc/gnulib.texi (Header File Substitutes): New chapter.
2677         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
2678         dependencies.
2679         (standards.info ,standards.html, standards.dvi): Update dependencies.
2680         (mostlyclean, clean): New targets.
2681
2682 2007-04-27  Bruno Haible  <bruno@clisp.org>
2683
2684         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
2685         * modules/sysexits (Files, Makefile.am): Update.
2686
2687         * lib/sys_socket_.h: Renamed from lib/socket_.h.
2688         * modules/sys_socket (Files, Makefile.am): Update.
2689
2690         * lib/sys_stat_.h: Renamed from lib/stat_.h.
2691         * modules/sys_stat (Files, Makefile.am): Update.
2692
2693 2007-04-27  Eric Blake  <ebb9@byu.net>
2694
2695         * lib/freading.h: Improve comments.
2696         * lib/fwriting.h: Likewise.
2697         * lib/fflush.c: Likewise.
2698
2699         Fix closein for mingw.
2700         * modules/closein-tests: Add tests for closein.
2701         * tests/test-closein.c: New file.
2702         * tests/test-closein.sh: Likewise.
2703         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
2704         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
2705
2706 2007-04-27  Bruno Haible  <bruno@clisp.org>
2707
2708         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
2709         version is < 6.
2710         * lib/math_.h [__DECC]: Likewise.
2711         * lib/stdio_.h [__DECC]: Likewise.
2712         * lib/stdlib_.h [__DECC]: Likewise.
2713         * lib/string_.h [__DECC]: Likewise.
2714         * lib/time_.h [__DECC]: Likewise.
2715         * lib/wchar_.h [__DECC]: Likewise.
2716         * lib/wctype_.h [__DECC]: Likewise.
2717
2718 2007-04-27  Bruno Haible  <bruno@clisp.org>
2719
2720         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
2721
2722 2007-04-27  Bruno Haible  <bruno@clisp.org>
2723
2724         * lib/fflush.c: Add comments.
2725         * modules/fpurge-tests (Depends-on): Add fflush.
2726         * modules/freadable-tests (Depends-on): Likewise.
2727         * modules/fwritable-tests (Depends-on): Likewise.
2728
2729 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
2730
2731         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
2732         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
2733         Report by Bruno Haible <bruno@clisp.org>.
2734
2735 2007-04-26  Eric Blake  <ebb9@byu.net>
2736
2737         Fix fflush on mingw.
2738         * modules/fflush (Depends-on): Add freading.
2739         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
2740         but unread data.
2741
2742 2007-04-26  Eric Blake  <ebb9@byu.net>
2743         and Bruno Haible  <bruno@clisp.org>
2744
2745         Implement freading and fwriting.
2746         * lib/freading.c: New file.
2747         * lib/freading.h: Likewise.
2748         * m4/freading.m4: Likewise.
2749         * modules/freading: Likewise.
2750         * modules/freading-tests: Likewise.
2751         * tests/test-freading.c: Likewise.
2752         * lib/fwriting.c: New file.
2753         * lib/fwriting.h: Likewise.
2754         * m4/fwriting.m4: Likewise.
2755         * modules/fwriting: Likewise.
2756         * modules/fwriting-tests: Likewise.
2757         * tests/test-fwriting.c: Likewise.
2758         * MODULES.html.sh (File stream based Input/Output): Mention them.
2759
2760 2007-04-26  Bruno Haible  <bruno@clisp.org>
2761
2762         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
2763         'long' when we assume it.
2764         Suggested by Eric Blake.
2765
2766 2007-04-26  Bruno Haible  <bruno@clisp.org>
2767
2768         Ensure fseeko, ftello are declared on glibc systems.
2769         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
2770         * modules/fseeko (configure.ac-early): Likewise.
2771         * modules/ftello (configure.ac-early): Likewise.
2772         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
2773         AC_FUNC_FSEEKO for this.
2774         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
2775         (gl_CHECK_FSEEKO): Remove macro.
2776
2777 2007-04-26  Bruno Haible  <bruno@clisp.org>
2778
2779         * tests/test-fflush.c (main): Also check the ftell result after
2780         fflush and fseek/fseeko.
2781         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
2782         file descriptor position cache in the stream.
2783         * lib/fseeko.c (rpl_fseeko): Likewise.
2784
2785 2007-04-26  Bruno Haible  <bruno@clisp.org>
2786
2787         * modules/fflush-tests (Depends-on): Add fseeko.
2788
2789 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
2790             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2791
2792         * lib/argz_.h: ensure error_t definition is obtained in same
2793         mechanism system argz.h would have.
2794         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
2795         argz facilities are known bad.  Err on the side of caution if
2796         cross-compiling.
2797
2798 2007-04-25  Eric Blake  <ebb9@byu.net>
2799
2800         * lib/fpurge.c (includes): Use stdlib.h for free.
2801         * tests/test-fflush.c (main): Also test fflush-fseeko.
2802
2803 2007-04-25  Bruno Haible  <bruno@clisp.org>
2804
2805         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
2806         * lib/fseeko.c: New file.
2807         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
2808         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
2809         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
2810         gl_FUNC_FSEEKO.
2811         (gl_FUNC_FSEEKO): Invoke it.
2812         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
2813         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
2814         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
2815
2816 2007-04-25  Bruno Haible  <bruno@clisp.org>
2817
2818         * modules/fflush (Depends-on): Add ftello.
2819
2820 2007-04-25  Bruno Haible  <bruno@clisp.org>
2821
2822         * modules/ftello-tests: New file.
2823         * tests/test-ftello.c: New file.
2824
2825         * modules/ftello: New file.
2826         * m4/ftello.m4: New file.
2827         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
2828         HAVE_FTELLO.
2829         * lib/stdio_.h (ftello): New declaration.
2830         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
2831         HAVE_FTELLO.
2832
2833 2007-04-25  Bruno Haible  <bruno@clisp.org>
2834
2835         * modules/fseeko-tests: New file.
2836         * tests/test-fseeko.c: New file.
2837
2838         * modules/fseeko: New file.
2839         * m4/fseeko.m4: New file.
2840         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
2841         HAVE_FSEEKO.
2842         * lib/stdio_.h (fseeko): New declaration.
2843         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
2844         HAVE_FSEEKO.
2845
2846 2007-04-25  Bruno Haible  <bruno@clisp.org>
2847
2848         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
2849
2850 2007-04-25  Bruno Haible  <bruno@clisp.org>
2851
2852         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
2853         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
2854         * tests/test-unistd.c: Likewise.
2855         * tests/test-fcntl.c: Likewise.
2856
2857 2007-04-23  Eric Blake  <ebb9@byu.net>
2858
2859         * lib/fflush.c: Fix missing include.
2860         Reported by Bruno Haible.
2861
2862 2007-04-23  Bruno Haible  <bruno@clisp.org>
2863
2864         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
2865         Reported by Eric Blake.
2866
2867 2007-04-23  Bruno Haible  <bruno@clisp.org>
2868
2869         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
2870
2871 2007-04-23  Bruno Haible  <bruno@clisp.org>
2872
2873         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
2874
2875 2007-04-23  Bruno Haible  <bruno@clisp.org>
2876
2877         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
2878         Needed on HP-UX 11.
2879
2880 2007-04-16  Eric Blake  <ebb9@byu.net>
2881
2882         Make fflush rely on fpurge.
2883         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
2884         open coding all variants.
2885         * modules/fflush (Depends-on): Add fpurge and unistd.
2886         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
2887         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
2888
2889         Fix --with-tests compilation on cygwin.
2890         * modules/argmatch-tests (Makefile.am): List gnulib library first
2891         in LDADD.
2892         * modules/argp-tests (Makefile.am): Likewise.
2893         * modules/array-list-tests (Makefile.am): Likewise.
2894         * modules/array-oset-tests (Makefile.am): Likewise.
2895         * modules/avltree-list-tests (Makefile.am): Likewise.
2896         * modules/avltree-oset-tests (Makefile.am): Likewise.
2897         * modules/avltreehash-list-tests (Makefile.am): Likewise.
2898         * modules/carray-list-tests (Makefile.am): Likewise.
2899         * modules/dirname-tests (Makefile.am): Likewise.
2900         * modules/frexp-tests (Makefile.am): Likewise.
2901         * modules/isnanl-tests (Makefile.am): Likewise.
2902         * modules/linked-list-tests (Makefile.am): Likewise.
2903         * modules/linkedhash-list-tests (Makefile.am): Likewise.
2904         * modules/lock-tests (Makefile.am): Likewise.
2905         * modules/rbtree-list-tests (Makefile.am): Likewise.
2906         * modules/rbtree-oset-tests (Makefile.am): Likewise.
2907         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
2908         * modules/tls-tests (Makefile.am): Likewise.
2909         * modules/tsearch-tests (Makefile.am): Likewise.
2910         * modules/xvasprintf-tests (Makefile.am): Likewise.
2911
2912         Fix fpurge for cygwin.
2913         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
2914         value.
2915         * modules/fpurge-tests (Depends-on): Clean up trash.
2916
2917 2007-04-16  Simon Josefsson  <simon@josefsson.org>
2918
2919         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
2920
2921         * m4/autobuild.m4: Re-indent.
2922
2923 2007-04-13  Bruno Haible  <bruno@clisp.org>
2924
2925         * modules/fpurge-tests: New file.
2926         * tests/test-fpurge.c: New file.
2927
2928         * modules/fpurge: New file.
2929         * lib/fpurge.h: New file.
2930         * lib/fpurge.c: New file.
2931         * m4/fpurge.m4: New file.
2932
2933 2007-04-13  Bruno Haible  <bruno@clisp.org>
2934
2935         * modules/fbufmode-tests: New file.
2936         * tests/test-fbufmode.c: New file.
2937
2938         * modules/fbufmode: New file.
2939         * lib/fbufmode.h: New file.
2940         * lib/fbufmode.c: New file.
2941         * m4/fbufmode.m4: New file.
2942
2943 2007-04-13  Bruno Haible  <bruno@clisp.org>
2944
2945         * modules/fwritable-tests: New file.
2946         * tests/test-fwritable.c: New file.
2947
2948         * modules/fwritable: New file.
2949         * lib/fwritable.h: New file.
2950         * lib/fwritable.c: New file.
2951         * m4/fwritable.m4: New file.
2952
2953 2007-04-13  Bruno Haible  <bruno@clisp.org>
2954
2955         * modules/freadable-tests: New file.
2956         * tests/test-freadable.c: New file.
2957
2958         * modules/freadable: New file.
2959         * lib/freadable.h: New file.
2960         * lib/freadable.c: New file.
2961         * m4/freadable.m4: New file.
2962
2963 2007-04-13  Bruno Haible  <bruno@clisp.org>
2964
2965         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
2966         MOSTLYCLEANFILES.
2967
2968 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
2969
2970         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
2971         gzip bootstrap.conf to avoid dragging in i18n machinery.
2972         (gnulib_tool_option): Use it.
2973
2974 2007-04-13  Bruno Haible  <bruno@clisp.org>
2975
2976         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
2977         %F directives.
2978         * tests/test-vasprintf-posix.c (test_function): Likewise.
2979         * tests/test-snprintf-posix.h (test_function): Likewise.
2980         * tests/test-sprintf-posix.h (test_function): Likewise.
2981         * tests/test-fprintf-posix.h (test_function): Likewise.
2982         * tests/test-printf-posix.h (test_function): Likewise.
2983         * tests/test-fprintf-posix.out: Likewise.
2984
2985 2007-04-13  Bruno Haible  <bruno@clisp.org>
2986
2987         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
2988         * modules/tls-tests (configure.ac): Likewise.
2989         Reported by Arto C. Nirkko <anirkko@insel.ch>.
2990
2991 2007-04-13  Bruno Haible  <bruno@clisp.org>
2992
2993         * lib/tls.c (glthread_tls_get): Fix return type.
2994         Patch by Arto C. Nirkko <anirkko@insel.ch>.
2995
2996 2007-04-12  Eric Blake  <ebb9@byu.net>
2997
2998         * modules/gettime (Depends-on): Remove gettime.
2999         Reported by Dmitry V. Levin.
3000
3001 2007-04-12  Bruno Haible  <bruno@clisp.org>
3002
3003         * modules/fflush (Include): Mention <stdio.h>.
3004         * modules/strtoimax (Include): Mention <inttypes.h>.
3005         * modules/strtoumax (Include): Likewise.
3006
3007 2007-04-12  Eric Blake  <ebb9@byu.net>
3008
3009         * .cvsignore: New file.
3010         * .gitignore: Likewise.
3011
3012 2007-04-12  Bruno Haible  <bruno@clisp.org>
3013
3014         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
3015         not before, since $(LDADD) often contains libgnu.a.
3016         * modules/striconv-tests (test_striconv_LDADD): Likewise.
3017         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
3018         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
3019         Needed on Cygwin.
3020
3021 2007-04-12  Eric Blake  <ebb9@byu.net>
3022
3023         Work around glibc's failure to flush stdin on fclose.
3024         * lib/closein.c (close_stdin): Flush stdin before closing.
3025
3026         Work around glibc's failure to reset seekable stdin on exit.
3027         * modules/closein: New module.
3028         * lib/closein.c: New file.
3029         * lib/closein.h: Likewise.
3030         * m4/closein.m4: Likewise.
3031         * MODULES.html.sh (File stream based Input/Output): Document it.
3032
3033 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3034
3035         * gnulib-tool: Rename generated 'autobuild' script to
3036         'do-autobuild' in --create-megatestdir output.
3037
3038         * doc/gnulib.texi (Build robot for gnulib): Fix.
3039
3040 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3041
3042         * modules/sysexits (Depends-on): Add absolute-header.
3043
3044 2007-04-12  Eric Blake  <ebb9@byu.net>
3045
3046         No need to preserve errno on success.
3047         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
3048         Reported by Bruno Haible.
3049
3050 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3051
3052         * MODULES.html.sh (Support for maintaining and releasing
3053         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
3054
3055 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3056
3057         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
3058
3059 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3060
3061         * modules/autobuild: New module.
3062
3063         * m4/autobuild.m4: New file.
3064
3065 2007-04-11  Bruno Haible  <bruno@clisp.org>
3066
3067         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
3068         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
3069         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
3070         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
3071         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
3072         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3073         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3074         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3075         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3076         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3077         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
3078         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3079         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3080         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
3081         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3082         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3083         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
3084         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3085         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3086         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
3087         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3088         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3089         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
3090         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3091         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3092         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
3093         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3094         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3095         Reported by Eric Blake.
3096
3097 2007-04-11  Bruno Haible  <bruno@clisp.org>
3098
3099         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
3100
3101 2007-04-10  Bruno Haible  <bruno@clisp.org>
3102
3103         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
3104         for NaN and Infinity. Needed on FreeBSD 6.1.
3105         * tests/test-vasnprintf-posix.c (test_function): Undo last change
3106         regarding results for "%010a" of Infinity and NaN.
3107         * tests/test-vasprintf-posix.c (test_function): Likewise.
3108         * tests/test-snprintf-posix.h (test_function): Likewise.
3109         * tests/test-sprintf-posix.h (test_function): Likewise.
3110         * tests/test-fprintf-posix.h (test_function): Likewise.
3111         * tests/test-printf-posix.h (test_function): Likewise.
3112         * tests/test-fprintf-posix.out: Likewise.
3113
3114 2007-04-10  Bruno Haible  <bruno@clisp.org>
3115
3116         * modules/locale-tests: New file.
3117         * tests/test-locale.c: New file.
3118
3119         * modules/locale: New file.
3120         * lib/locale_.h: New file.
3121         * m4/locale_h.m4: New file.
3122
3123 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
3124             Bruno Haible  <bruno@clisp.org>
3125
3126         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
3127         be determined, test for availability of the copysignf, copysign,
3128         copysignl functions.
3129         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
3130         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
3131         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
3132
3133 2007-04-09  Eric Blake  <ebb9@byu.net>
3134
3135         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
3136         * modules/stdio (Makefile.am): Support fflush.
3137         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
3138         * modules/fflush: New file.
3139         * lib/fflush.c: Likewise.
3140         * m4/fflush.m4: Likewise.
3141         * modules/fflush-tests: New test.
3142         * tests/test-fflush.c: Likewise.
3143         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
3144
3145 2007-04-06  Bruno Haible  <bruno@clisp.org>
3146
3147         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
3148         (VASNPRINTF): Use signbit for faster determination whether to print a
3149         minus sign.
3150         * modules/vasnprintf (Files): Remove lib/float+.h.
3151         * modules/fprintf-posix (Depends-on): Add signbit.
3152         * modules/snprintf-posix (Depends-on): Likewise.
3153         * modules/sprintf-posix (Depends-on): Likewise.
3154         * modules/vasnprintf-posix (Depends-on): Likewise.
3155         * modules/vasprintf-posix (Depends-on): Likewise.
3156         * modules/vfprintf-posix (Depends-on): Likewise.
3157         * modules/vsnprintf-posix (Depends-on): Likewise.
3158         * modules/vsprintf-posix (Depends-on): Likewise.
3159
3160 2007-04-06  Bruno Haible  <bruno@clisp.org>
3161
3162         * tests/test-frexp.c (main): Test also the sign bit of zero results.
3163         * tests/test-frexpl.c (main): Likewise.
3164         * tests/test-ldexpl.c (main): Likewise.
3165         * modules/frexp-tests (Depends-on): Add signbit.
3166         * modules/frexpl-tests (Depdends-on): Likewise.
3167         * modules/ldexpl-tests (Depdends-on): Likewise.
3168
3169 2007-04-06  Bruno Haible  <bruno@clisp.org>
3170
3171         * modules/signbit-tests: New file.
3172         * tests/test-signbit.c: New file.
3173
3174         * modules/signbit: New file.
3175         * lib/signbitf.c: New file.
3176         * lib/signbitd.c: New file.
3177         * lib/signbitl.c: New file.
3178         * m4/signbit.m4: New file.
3179         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
3180         (signbit): New macro.
3181         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
3182         REPLACE_SIGNBIT.
3183         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
3184         REPLACE_FREXPL into math.h.
3185
3186 2007-04-06  Bruno Haible  <bruno@clisp.org>
3187
3188         * modules/isnanf-nolibm-tests: New file.
3189         * tests/test-isnanf.c: New file.
3190
3191         * modules/isnanf-nolibm: New file.
3192         * lib/isnanf.h: New file.
3193         * lib/isnanf.c: New file.
3194         * lib/isnan.c: Consider the USE_FLOAT macro.
3195         * m4/isnanf.m4: New file.
3196
3197 2007-04-06  Bruno Haible  <bruno@clisp.org>
3198
3199         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
3200         (Link): New section.
3201
3202         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
3203
3204 2007-04-06  Bruno Haible  <bruno@clisp.org>
3205
3206         Assume the 'long double' type.
3207         * m4/longdouble.m4: Remove file.
3208         * config/srclist.txt: Don't mention longdouble.m4.
3209         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
3210         * lib/float+.h: Likewise.
3211         * lib/frexp.c: Likewise.
3212         * lib/printf-args.h: Likewise.
3213         * lib/printf-args.c: Likewise.
3214         * lib/printf-frexp.c: Likewise.
3215         * lib/printf-parse.c: Likewise.
3216         * lib/vasnprintf.c: Likewise.
3217         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
3218         * m4/intl.m4: Likewise.
3219         * m4/isnanl.m4: Likewise.
3220         * m4/printf.m4: Likewise.
3221         * m4/printf-frexpl.m4: Likewise.
3222         * m4/vasnprintf.m4: Likewise.
3223         * modules/allocsa (Files): Remove m4/longdouble.m4.
3224         * modules/gettext (Files): Likewise.
3225         * modules/relocatable-prog-wrapper (Files): Likewise.
3226         * modules/vasnprintf (Files): Likewise.
3227         * modules/isnanl (Files): Likewise.
3228         (Include): Simplify.
3229         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
3230         (Include): Simplify.
3231         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
3232         (Include): Simplify.
3233         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
3234         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3235         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
3236         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3237         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3238         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3239         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
3240         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3241         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3242         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3243         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
3244         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3245         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
3246         * tests/test-isnanl.c: Likewise.
3247         * tests/test-snprintf-posix.h: Likewise.
3248         * tests/test-sprintf-posix.h: Likewise.
3249         * tests/test-vasnprintf-posix.c: Likewise.
3250         * tests/test-vasnprintf-posix2.c: Likewise.
3251         * tests/test-vasprintf-posix.c: Likewise.
3252
3253 2007-04-06  Bruno Haible  <bruno@clisp.org>
3254
3255         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
3256         * lib/math_.h [__DECC]: Include the overridden include file through
3257         #include_next, outside the double-inclusion guard.
3258         * lib/stdio_.h [__DECC]: Likewise.
3259         * lib/stdlib_.h [__DECC]: Likewise.
3260         * lib/string_.h [__DECC]: Likewise.
3261         * lib/time_.h [__DECC]: Likewise.
3262         * lib/wchar_.h [__DECC]: Likewise.
3263         * lib/wctype_.h [__DECC]: Likewise.
3264         * lib/inttypes_.h [__DECC]: Likewise.
3265         Reported by Albert Chin <china@thewrittenword.com> in
3266         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
3267
3268 2007-04-04  Eric Blake  <ebb9@byu.net>
3269
3270         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
3271         1.5.x.
3272
3273 2007-04-04  Bruno Haible  <bruno@clisp.org>
3274
3275         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
3276         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
3277
3278 2007-04-04  Bruno Haible  <bruno@clisp.org>
3279
3280         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
3281         results for "%010a" of Infinity and NaN.
3282         * tests/test-vasprintf-posix.c (test_function): Likewise.
3283         * tests/test-snprintf-posix.h (test_function): Likewise.
3284         * tests/test-sprintf-posix.h (test_function): Likewise.
3285         * tests/test-fprintf-posix.h (test_function): Remove these tests.
3286         * tests/test-printf-posix.h (test_function): Likewise.
3287         * tests/test-fprintf-posix.out: Update.
3288         Needed for FreeBSD 6.1.
3289
3290 2007-04-04  Bruno Haible  <bruno@clisp.org>
3291
3292         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
3293         directly used by the gnulib modules nor by gnulib-tool.
3294
3295 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
3296
3297         * DEPENDENCIES: Give overall description of version dependency
3298         desirability.  Use more-typical names for apps.
3299         Add shell, coreutils, diffutils, grep, tar, gzip.
3300
3301 2007-04-04  Simon Josefsson  <simon@josefsson.org>
3302
3303         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
3304
3305 2007-04-04  Karl Berry  <karl@gnu.org>
3306
3307         * MODULES.html.sh (func_module): missing '.
3308
3309 2007-04-03  Bruno Haible  <bruno@clisp.org>
3310
3311         * modules/argmatch-tests (Makefile.am): New variable
3312         test_argmatch_LDADD.
3313         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
3314         * modules/array-list-tests (Makefile.am): New variable
3315         test_array_list_LDADD.
3316         * modules/array-oset-tests (Makefile.am): New variable
3317         test_array_oset_LDADD.
3318         * modules/avltree-list-tests (Makefile.am): New variable
3319         test_avltree_list_LDADD.
3320         * modules/avltree-oset-tests (Makefile.am): New variable
3321         test_avltree_oset_LDADD.
3322         * modules/avltreehash-list-tests (Makefile.am): New variable
3323         test_avltreehash_list_LDADD.
3324         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
3325         test_canonicalize_lgpl_LDADD.
3326         * modules/carray-list-tests (Makefile.am): New variable
3327         test_carray_list_LDADD.
3328         * modules/dirname-tests (Makefile.am): New variable
3329         test_dirname_LDADD.
3330         * modules/linked-list-tests (Makefile.am): New variable
3331         test_linked_list_LDADD.
3332         * modules/linkedhash-list-tests (Makefile.am): New variable
3333         test_linkedhash_list_LDADD.
3334         * modules/rbtree-list-tests (Makefile.am): New variable
3335         test_rbtree_list_LDADD.
3336         * modules/rbtree-oset-tests (Makefile.am): New variable
3337         test_rbtree_oset_LDADD.
3338         * modules/rbtreehash-list-tests (Makefile.am): New variable
3339         test_rbtreehash_list_LDADD.
3340         * modules/xvasprintf-tests (Makefile.am): New variable
3341         test_xvasprintf_LDADD.
3342         Reported by Eric Blake.
3343
3344 2007-04-03  Eric Blake  <ebb9@byu.net>
3345
3346         * DEPENDENCIES: Weaken m4 requirements.
3347
3348 2007-04-03  Bruno Haible  <bruno@clisp.org>
3349
3350         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
3351         * modules/isnanl-tests (configure.ac): Likewise.
3352
3353 2007-04-03  Ben Pfaff  <blp@gnu.org>
3354
3355         * modules/iconv_open: Add $(srcdir)/ to source directory
3356         references in Makefile fragments that call gperf, to fix VPATH
3357         builds.
3358
3359 2007-04-03  Bruno Haible  <bruno@clisp.org>
3360
3361         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
3362         * lib/ldexpl.c: Undo last change.
3363
3364 2007-04-03  Bruno Haible  <bruno@clisp.org>
3365
3366         * modules/printf-frexpl (Depends-on): Undo last change.
3367         (Files): Add m4/ldexpl.m4.
3368
3369 2007-04-03  Bruno Haible  <bruno@clisp.org>
3370
3371         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
3372         * modules/isnanl (Link): New section.
3373
3374         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
3375         * modules/frexp (Link): New section.
3376
3377         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
3378         * modules/frexpl (Link): New section.
3379
3380         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
3381         * modules/ldexpl (Link): New section.
3382
3383 2007-04-03  Bruno Haible  <bruno@clisp.org>
3384
3385         * modules/TEMPLATE-EXTENDED: New file.
3386         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
3387
3388 2007-04-03  Bruno Haible  <bruno@clisp.org>
3389
3390         * DEPENDENCIES: New file.
3391         Suggested by Simon Josefsson.
3392
3393 2007-04-03  Bruno Haible  <bruno@clisp.org>
3394
3395         * doc/gnulib.texi: Escape @.
3396
3397 2007-04-03  James Youngman  <jay@gnu.org>
3398         and Paul Eggert  <eggert@cs.ucla.edu>
3399
3400         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
3401         birthtime on all systems that have birthtime, not just those which
3402         use st_birthtimensec rather than st_birthtim.  Putting zero in
3403         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
3404         that the birth time is not available for files on an NFS mount.
3405
3406 2007-04-03  Simon Josefsson  <simon@josefsson.org>
3407
3408         * modules/memxor: Move back from crypto/, suggested by Bruno.
3409         * modules/crypto/hmac-sha1: Fix memxor dependency.
3410
3411         * modules/crypto/gc: Moved from ../.
3412
3413 2007-04-02  Eric Blake  <ebb9@byu.net>
3414
3415         * lib/ldexpl.c (includes): Avoid libm.
3416
3417         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
3418
3419 2007-04-02  Bruno Haible  <bruno@clisp.org>
3420
3421         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
3422         on IRIX.
3423
3424 2007-04-02  Bruno Haible  <bruno@clisp.org>
3425
3426         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
3427         x86 or x86_64 platforms running MacOS X.
3428         Reported by Ryan Schmidt <@ryandesign.com>.
3429
3430 2007-04-02  Bruno Haible  <bruno@clisp.org>
3431
3432         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
3433         i386.
3434
3435 2007-04-01  Simon Josefsson  <simon@josefsson.org>
3436
3437         * modules/crypto/arcfour: Moved from ../.
3438         * modules/crypto/arcfour-tests: Moved from ../.
3439         * modules/crypto/arctwo: Moved from ../.
3440         * modules/crypto/arctwo-tests: Moved from ../.
3441         * modules/crypto/des: Moved from ../.
3442         * modules/crypto/des-tests: Moved from ../.
3443         * modules/crypto/gc-arcfour: Moved from ../.
3444         * modules/crypto/gc-arcfour-tests: Moved from ../.
3445         * modules/crypto/gc-arctwo: Moved from ../.
3446         * modules/crypto/gc-arctwo-tests: Moved from ../.
3447         * modules/crypto/gc-des: Moved from ../.
3448         * modules/crypto/gc-des-tests: Moved from ../.
3449         * modules/crypto/gc-hmac-md5: Moved from ../.
3450         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
3451         * modules/crypto/gc-hmac-sha1: Moved from ../.
3452         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
3453         * modules/crypto/gc-md2: Moved from ../.
3454         * modules/crypto/gc-md2-tests: Moved from ../.
3455         * modules/crypto/gc-md4: Moved from ../.
3456         * modules/crypto/gc-md4-tests: Moved from ../.
3457         * modules/crypto/gc-md5: Moved from ../.
3458         * modules/crypto/gc-md5-tests: Moved from ../.
3459         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
3460         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
3461         * modules/crypto/gc-random: Moved from ../.
3462         * modules/crypto/gc-rijndael: Moved from ../.
3463         * modules/crypto/gc-rijndael-tests: Moved from ../.
3464         * modules/crypto/gc-sha1: Moved from ../.
3465         * modules/crypto/gc-sha1-tests: Moved from ../.
3466         * modules/crypto/gc-tests: Moved from ../.
3467         * modules/crypto/hmac-md5: Moved from ../.
3468         * modules/crypto/hmac-md5-tests: Moved from ../.
3469         * modules/crypto/hmac-sha1: Moved from ../.
3470         * modules/crypto/hmac-sha1-tests: Moved from ../.
3471         * modules/crypto/md2: Moved from ../.
3472         * modules/crypto/md2-tests: Moved from ../.
3473         * modules/crypto/md4: Moved from ../.
3474         * modules/crypto/md4-tests: Moved from ../.
3475         * modules/crypto/md5: Moved from ../.
3476         * modules/crypto/md5-tests: Moved from ../.
3477         * modules/crypto/memxor: Moved from ../.
3478         * modules/crypto/rijndael: Moved from ../.
3479         * modules/crypto/rijndael-tests: Moved from ../.
3480         * modules/crypto/sha1: Moved from ../.
3481
3482 2007-03-30  James Youngman  <jay@gnu.org>
3483
3484         * tests/test-stat-time.c (prepare_test): use chmod() rather than
3485         rename() to change the ctime of a file (because ctime is unaffected
3486         by rename on jfs2 on AIX 5.1).
3487         (main): Start by doing cleanup, in case a previous run failed leaving
3488         test files behind.
3489
3490 2007-03-31  Bruno Haible  <bruno@clisp.org>
3491
3492         Support old proprietary implementations of iconv.
3493         * modules/iconv_open: New file.
3494         * lib/iconv_.h: New file.
3495         * m4/iconv_h.m4: New file.
3496         * lib/iconv_open.c: New file.
3497         * lib/iconv_open-aix.gperf: New file.
3498         * lib/iconv_open-hpux.gperf: New file.
3499         * lib/iconv_open-irix.gperf: New file.
3500         * lib/iconv_open-osf.gperf: New file.
3501         * m4/iconv_open.m4: New file.
3502         * modules/linebreak (Depends-on): Add iconv_open.
3503         * modules/striconv (Depends-on): Likewise.
3504         * modules/striconveh (Depends-on): Likewise.
3505         * modules/unicodeio (Depends-on): Likewise.
3506         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
3507         (iconv_t)(-1).
3508         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
3509         conversion if cd is (iconv_t)(-1).
3510         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
3511         is not possible.
3512
3513 2007-03-31  Bruno Haible  <bruno@clisp.org>
3514
3515         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3516         work on Solaris either. Protect also second use of "autodetect_jp".
3517
3518 2007-03-31  Bruno Haible  <bruno@clisp.org>
3519
3520         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
3521         the function is not present.
3522
3523 2007-03-31  Bruno Haible  <bruno@clisp.org>
3524
3525         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
3526         the function is not present.
3527
3528 2007-03-31  Bruno Haible  <bruno@clisp.org>
3529
3530         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
3531         a bug in HP-UX iconv_open().
3532
3533 2007-03-31  Bruno Haible  <bruno@clisp.org>
3534
3535         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
3536         (Mathematics <math.h>): New section, add fpieee.
3537         (Input/output <stdio.h>): Add fseterr.
3538         (Mathematics <math.h>): New section, add printf-frexp.
3539         (Container data structures): Add sublist.
3540         (Core language properties): Add fpucw, inline.
3541         (Functions for greatest-width integer types <inttypes.h>): Add
3542         imaxabs, imaxdiv, inttypes.
3543         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
3544         isnanl-nolibm, ldexp.
3545         (Mathematics <math.h>): New section, add printf-frexpl.
3546         (Support for systems lacking POSIX:2001): Add fprintf-posix,
3547         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
3548         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
3549         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
3550         (Unicode string functions): Add unistr/u*-mbtoucr.
3551         (Java): Add javacomp-script, javaexec-script.
3552         (C#): Add csharpcomp-script, csharpexec-script.
3553         (Support for building libraries and executables): Add havelib,
3554         relocatable-*.
3555         (Support for maintaining and releasing projects): Renamed from
3556         'Support for maintaining and release projects'. Add announce-gen.
3557
3558 2007-03-31  Bruno Haible  <bruno@clisp.org>
3559
3560         * README: Talk primarily about git.
3561         (git and CVS): Renamed from CVS.
3562         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
3563         gnulib is available through git.
3564         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
3565
3566 2007-03-30  Bruno Haible  <bruno@clisp.org>
3567
3568         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
3569         * lib/poll_.h: Likewise.
3570         * lib/stat_.h: Likewise.
3571         * lib/sys_time_.h: Likewise.
3572         * lib/sysexit_.h: Likewise.
3573         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
3574         * lib/stdbool_.h: Likewise.
3575         * lib/byteswap_.h: Add double-inclusion guard.
3576
3577 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
3578
3579         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
3580
3581 2007-03-30  Karl Berry  <karl@gnu.org>
3582
3583         * config/srclist-update: double space after USA in the license
3584         substitution, since that's how it's usually (?) written.
3585
3586 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
3587
3588         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
3589         reported by Bruno Haible.
3590
3591 2007-03-29  Bruno Haible  <bruno@clisp.org>
3592
3593         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
3594         a bug in AIX iconv().
3595
3596 2007-03-29  Bruno Haible  <bruno@clisp.org>
3597
3598         * modules/ldexpl-tests: New file.
3599         * tests/test-ldexpl.c: New file.
3600
3601 2007-03-29  Bruno Haible  <bruno@clisp.org>
3602
3603         * lib/ldexpl.c: Include fpucw.h.
3604         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
3605         multiplication.
3606         * modules/ldexpl (Depends-on): Add fpucw.
3607
3608 2007-03-29  Bruno Haible  <bruno@clisp.org>
3609
3610         * modules/ldexpl: New file.
3611         * m4/ldexpl.m4: New file.
3612         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
3613         set.
3614         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
3615         REPLACE_LDEXPL.
3616         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
3617         REPLACE_LDEXPL.
3618         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
3619         gl_FUNC_LDEXPL_WORKS.
3620         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
3621         * modules/mathl (Files): Remove lib/ldexpl.c.
3622         (Depends-on): Add ldexpl.
3623
3624 2007-03-29  Bruno Haible  <bruno@clisp.org>
3625
3626         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
3627
3628 2007-03-29  Bruno Haible  <bruno@clisp.org>
3629
3630         * tests/test-striconveh.c (main): Don't assume that a direct conversion
3631         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
3632         and possibly also HP-UX.
3633         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3634         work on AIX, IRIX, HP-UX, OSF/1.
3635         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
3636         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
3637         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
3638         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
3639         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
3640         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
3641
3642 2007-03-29  Bruno Haible  <bruno@clisp.org>
3643
3644         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
3645
3646 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3647
3648         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
3649         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
3650
3651 2007-03-29  Eric Blake  <ebb9@byu.net>
3652
3653         * lib/acl-internal.h: Remove redundant include.
3654         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
3655         Cygwin when a file is locked.
3656
3657 2007-03-29  Bruno Haible  <bruno@clisp.org>
3658
3659         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
3660         file.
3661         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
3662
3663 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3664
3665         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
3666         try to remove a parent directory if the child couldn't be removed
3667         (except for the first rmdir, which could fail because the child
3668         doesn't exist).  Problem reported by Jeff Blaine in
3669         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
3670
3671 2007-03-28  Bruno Haible  <bruno@clisp.org>
3672
3673         * lib/striconveh.c (utf8conv_carefully): New function.
3674         (mem_cd_iconveh_internal): Invoke it.
3675
3676 2007-03-28  Bruno Haible  <bruno@clisp.org>
3677
3678         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
3679         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
3680         input.
3681         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
3682         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
3683         unistr/u8-uctomb.
3684
3685 2007-03-28  Bruno Haible  <bruno@clisp.org>
3686
3687         * modules/unistr/u8-mbtoucr: New file.
3688         * lib/unistr/u8-mbtoucr.c: New file.
3689         * modules/unistr/u16-mbtoucr: New file.
3690         * lib/unistr/u16-mbtoucr.c: New file.
3691         * modules/unistr/u16-mbtoucr: New file.
3692         * lib/unistr/u16-mbtoucr.c: New file.
3693         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
3694
3695 2007-03-27  Simon Josefsson  <simon@josefsson.org>
3696             Bruno Haible  <bruno@clisp.org>
3697
3698         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
3699         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
3700         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
3701
3702         * m4/stdio_h.m4: Add stubs for vasprintf too.
3703
3704         * modules/stdio: Support vasprintf in sed command.
3705
3706         * modules/vasprintf: Depend on stdio for prototypes.  Remove
3707         vasprintf.h.  Add stdio module indicator.
3708
3709         * lib/stdio_.h: Declare asprintf and vasprintf, based on
3710         vasprintf.h.
3711
3712         * lib/vasprintf.h: File removed.
3713
3714         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
3715         * lib/vasprintf.c: Ditto.
3716         * lib/xvasprintf.c: Ditto.
3717         * tests/test-vasprintf-posix.c: Ditto.
3718         * tests/test-vasprintf.c: Ditto.
3719
3720 2007-03-27  Bruno Haible  <bruno@clisp.org>
3721
3722         Make vasnprintf multithread-safe.
3723         * lib/vasnprintf.c (decimal_point_char): New function.
3724         (VASNPRINTF): Use it.
3725         Suggested by Simon Josefsson.
3726
3727 2007-03-27  Eric Blake  <ebb9@byu.net>
3728
3729         Support sub-second birthtime on cygwin.
3730         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
3731         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
3732         (get_stat_birthtime): Also work with st_birthtim.
3733
3734 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
3735
3736         * lib/stat-time.h (USE_BIRTHTIME): Remove.
3737         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
3738         (get_stat_birthtime_ns): Do not try to use "spare" fields.
3739         (get_stat_birthtime_ns): Simplify compile-time tests.
3740         (get_stat_birthtime): Change the API to look like
3741         get_stat_mtime etc., except return a negative tv_nsec on error.
3742         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
3743         Don't check for "spare" fields.
3744         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
3745         or for struct stat.st_birthtime, as these tests aren't used.
3746         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
3747
3748 2007-03-27  Bruno Haible  <bruno@clisp.org>
3749
3750         * lib/stat-time.h: Include <sys/stat.h>.
3751
3752 2007-03-27  James Youngman  <jay@gnu.org>
3753
3754         * lib/stat-time.h (get_stat_birthtime): New function for
3755           retrieving st_birthtime as provided by UFS2 (hence *BSD).
3756         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
3757           and its variants.
3758         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
3759         * modules/stat-time-test: New file.
3760         * tests/test-stat-time.c: New test, devised by Bruno Haible.
3761
3762 2007-03-26  Bruno Haible  <bruno@clisp.org>
3763
3764         Better support of signalling NaNs.
3765         * lib/atanl.c: Include isnanl.h.
3766         (atanl): Perform test for NaN at the beginning of the function and
3767         through a call to isnanl.
3768         * lib/cosl.c: Include isnanl.h.
3769         (cosl): Perform test for NaN at the beginning of the function and
3770         through a call to isnanl.
3771         * lib/ldexpl.c: Include isnanl.h.
3772         (ldexpl): Perform test for NaN through a call to isnanl.
3773         * lib/logl.c: Include isnanl.h.
3774         (logl): Perform test for NaN at the beginning of the function and
3775         through a call to isnanl.
3776         * lib/sinl.c: Include isnanl.h.
3777         (sinl): Perform test for NaN at the beginning of the function and
3778         through a call to isnanl.
3779         * lib/sqrtl.c: Include isnanl.h.
3780         (sqrtl): Perform test for NaN at the beginning of the function and
3781         through a call to isnanl.
3782         * lib/tanl.c: Include isnanl.h.
3783         (tanl): Perform test for NaN at the beginning of the function and
3784         through a call to isnanl.
3785         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
3786         * modules/mathl (Depends-on): Add isnanl.
3787
3788 2007-03-26  Eric Blake  <ebb9@byu.net>
3789
3790         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
3791         regression in logic sense of previous patch.
3792
3793 2007-03-26  Bruno Haible  <bruno@clisp.org>
3794
3795         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
3796         unportable shell command "if ! ...".
3797         Reported by Ralf Wildenhues.
3798
3799 2007-03-25  Bruno Haible  <bruno@clisp.org>
3800
3801         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
3802         <sysexits.h> file, and only add EX_CONFIG.
3803         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
3804         absolute file name and whether it is sufficient. Substitute also
3805         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
3806         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
3807         ABSOLUTE_SYSEXITS_H into sysexits.h.
3808
3809 2007-03-25  Bruno Haible  <bruno@clisp.org>
3810
3811         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
3812         hints is NULL.
3813
3814 2007-03-25  Bruno Haible  <bruno@clisp.org>
3815
3816         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
3817         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
3818
3819 2007-03-25  Bruno Haible  <bruno@clisp.org>
3820
3821         * lib/vasnprintf.c: Include langinfo.h.
3822         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
3823         multithread-safe.
3824         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
3825         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
3826         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
3827         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
3828         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
3829         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
3830         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
3831         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
3832         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
3833         Reported by Simon Josefsson.
3834
3835 2007-03-25  Bruno Haible  <bruno@clisp.org>
3836
3837         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
3838         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
3839         * modules/vasnprintf (Depends-on): Add stdint.
3840
3841 2007-03-25  Bruno Haible  <bruno@clisp.org>
3842
3843         * modules/fpieee: New file.
3844         * m4/fpieee.m4: New file.
3845         * modules/isnan-nolibm (Depends-on): Add fpieee.
3846         * modules/isnanl-nolibm (Depends-on): Add fpieee.
3847         * modules/isnanl (Depends-on): Add fpieee.
3848
3849 2007-03-25  Bruno Haible  <bruno@clisp.org>
3850
3851         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
3852
3853 2007-03-25  Bruno Haible  <bruno@clisp.org>
3854
3855         Avoid test failures on IRIX 6.5.
3856         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
3857         (main): Use it.
3858         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
3859         macros.
3860         (main): Use them.
3861
3862 2007-03-25  Bruno Haible  <bruno@clisp.org>
3863
3864         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
3865         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
3866         exists but doesn't work.
3867         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
3868         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
3869         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
3870         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
3871
3872 2007-03-25  Bruno Haible  <bruno@clisp.org>
3873
3874         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
3875         returns inf. Needed on IRIX 6.5.
3876
3877 2007-03-25  Bruno Haible  <bruno@clisp.org>
3878
3879         * tests/test-frexpl.c: Include isnanl-nolibm.h.
3880         (main): Use isnanl instead of x != x idiom.
3881         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
3882
3883         * tests/test-frexp.c: Include isnan.h.
3884         (main): Use isnan instead of x != x idiom.
3885         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
3886
3887 2007-03-25  Bruno Haible  <bruno@clisp.org>
3888
3889         * tests/test-frexp.c (NaN): New function/macro.
3890         (main): Use it instead of 0.0 / 0.0.
3891         * tests/test-isnan.c (NaN): New function/macro.
3892         (main): Use it instead of 0.0 / 0.0.
3893         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
3894         (test_function): Use it instead of 0.0 / 0.0.
3895         * tests/test-vasprintf-posix.c (NaN): New function/macro.
3896         (test_function): Use it instead of 0.0 / 0.0.
3897         * tests/test-snprintf-posix.h (NaN): New function/macro.
3898         (test_function): Use it instead of 0.0 / 0.0.
3899         * tests/test-sprintf-posix.h (NaN): New function/macro.
3900         (test_function): Use it instead of 0.0 / 0.0.
3901         * tests/test-fprintf-posix.h (NaN): New function/macro.
3902         (test_function): Use it instead of 0.0 / 0.0.
3903         * tests/test-printf-posix.h (NaN): New function/macro.
3904         (test_function): Use it instead of 0.0 / 0.0.
3905
3906         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
3907
3908 2007-03-25  Bruno Haible  <bruno@clisp.org>
3909
3910         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
3911
3912 2007-03-25  Bruno Haible  <bruno@clisp.org>
3913
3914         * lib/regexec.c (merge_state_with_log): Make static.
3915
3916 2007-03-25  Bruno Haible  <bruno@clisp.org>
3917
3918         * lib/trigl.c (kernel_rem_pio2): Make static.
3919
3920 2007-03-25  Bruno Haible  <bruno@clisp.org>
3921
3922         * lib/sincosl.c (sincosl_table): Make static.
3923
3924 2007-03-25  Bruno Haible  <bruno@clisp.org>
3925
3926         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
3927         if the compiler does not support C99.
3928
3929 2007-03-25  Bruno Haible  <bruno@clisp.org>
3930
3931         * modules/time (Makefile.am): Ensure all rule action lines start with a
3932         tab.
3933
3934 2007-03-24  Bruno Haible  <bruno@clisp.org>
3935
3936         * modules/tsearch-tests: New file.
3937         * tests/test-tsearch.sh: New file.
3938         * tests/test-tsearch.c: New file, mostly copied from glibc.
3939
3940         * modules/search-tests: New file.
3941         * tests/test-search.c: New file.
3942
3943         * modules/search: New file.
3944         * lib/search_.h: New file, incorporating lib/tsearch.h.
3945         * m4/search_h.m4: New file.
3946         * lib/tsearch.h: Remove file.
3947         * lib/tsearch.c: Include search.h instead of tsearch.h.
3948         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
3949         HAVE_TSEARCH.
3950         * modules/tsearch (Files): Remove lib/tsearch.h.
3951         (Depends-on): Add search.
3952         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
3953         (Include): Change tsearch.h into search.h.
3954
3955 2007-03-24  Bruno Haible  <bruno@clisp.org>
3956
3957         * modules/fpucw: New file.
3958         * lib/fpucw.h: New file.
3959         * lib/frexp.c: Include fpucw.h.
3960         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3961         (FUNC): Use them.
3962         * lib/printf-frexp.c: Include fpucw.h.
3963         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3964         (FUNC): Use them.
3965         * lib/vasnprintf.c: Include fpucw.h.
3966         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
3967         'long double' calculations.
3968         * tests/test-frexpl.c: Include fpucw.h.
3969         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3970         * tests/test-printf-frexpl.c: Include fpucw.h.
3971         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3972         * modules/frexpl (Depends-on): Add fpucw.
3973         * modules/printf-frexpl (Depends-on): Likewise.
3974         * modules/fprintf-posix (Depends-on): Likewise.
3975         * modules/snprintf-posix (Depends-on): Likewise.
3976         * modules/sprintf-posix (Depends-on): Likewise.
3977         * modules/vasnprintf-posix (Depends-on): Likewise.
3978         * modules/vasprintf-posix (Depends-on): Likewise.
3979         * modules/vfprintf-posix (Depends-on): Likewise.
3980         * modules/vsnprintf-posix (Depends-on): Likewise.
3981         * modules/vsprintf-posix (Depends-on): Likewise.
3982         * modules/frexpl-tests (Depends-on): Likewise.
3983         * modules/printf-frexpl-tests (Depends-on): Likewise.
3984
3985 2007-03-24  Bruno Haible  <bruno@clisp.org>
3986
3987         * lib/float+.h: New file.
3988         * lib/isnan.c: Include float+.h.
3989         (SIZE): New macro.
3990         (FUNC): Compare only SIZE bytes of the value.
3991         * lib/vasnprintf.c: Include float+.h.
3992         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
3993         SIZEOF_LDBL or SIZEOF_DBL bytes.
3994         * modules/isnan-nolibm (Files): Add lib/float+.h.
3995         * modules/isnanl-nolibm (Files): Add lib/float+.h.
3996         * modules/isnanl (Files): Add lib/float+.h.
3997         * modules/vasnprintf (Files): Add lib/float+.h.
3998
3999 2007-03-24  Bruno Haible  <bruno@clisp.org>
4000
4001         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
4002         include isnanl-nolibm.h.
4003
4004 2007-03-24  Bruno Haible  <bruno@clisp.org>
4005
4006         * tests/test-read-file.c (main): Don't produce spurious output for
4007         expected situations. Make the test fail if it encountered unexpected
4008         results.
4009
4010 2007-03-24  Bruno Haible  <bruno@clisp.org>
4011
4012         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
4013         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
4014
4015 2007-03-24  Bruno Haible  <bruno@clisp.org>
4016
4017         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
4018
4019 2007-03-24  Bruno Haible  <bruno@clisp.org>
4020
4021         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
4022         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
4023
4024         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
4025         * modules/utf8-ucs4: Turn into a symbolic link to module
4026         unistr/u8-mbtouc.
4027
4028         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
4029         utf8-ucs4-unsafe.
4030         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
4031         unistr/u8-mbtouc-unsafe.
4032
4033         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
4034         * modules/utf16-ucs4: Turn into a symbolic link to module
4035         unistr/u16-mbtouc.
4036
4037         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
4038         utf16-ucs4-unsafe.
4039         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
4040         unistr/u16-mbtouc-unsafe.
4041
4042         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
4043         * modules/ucs4-utf8: Turn into a symbolic link to module
4044         unistr/u8-ubtomb.
4045
4046         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
4047         * modules/ucs4-utf16: Turn into a symbolic link to module
4048         unistr/u16-ubtomb.
4049
4050 2007-03-24  Bruno Haible  <bruno@clisp.org>
4051
4052         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
4053         Enable the function only if HAVE_INLINE.
4054         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
4055         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4056         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
4057         Enable the function only if HAVE_INLINE.
4058         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
4059         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4060         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
4061         Enable the function only if HAVE_INLINE.
4062         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
4063         Enable the function only if HAVE_INLINE.
4064         * modules/utf8-ucs4: Update.
4065         * modules/utf8-ucs4-unsafe: Update.
4066         * modules/utf16-ucs4: Update.
4067         * modules/utf16-ucs4-unsafe: Update.
4068         * modules/ucs4-utf8: Update.
4069         * modules/ucs4-utf16: Update.
4070
4071 2007-03-24  Bruno Haible  <bruno@clisp.org>
4072
4073         * lib/utf8-ucs4.h: Remove file.
4074         * lib/utf8-ucs4-unsafe.h: Remove file.
4075         * lib/utf16-ucs4.h: Remove file.
4076         * lib/utf16-ucs4-unsafe.h: Remove file.
4077         * lib/ucs4-utf8.h: Remove file.
4078         * lib/ucs4-utf16.h: Remove file.
4079         * lib/unistr.h: Include their previous contents.
4080         * m4/utf-ucs4.m4: Remove file.
4081         * m4/ucs4-utf.m4: Remove file.
4082         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
4083         (Depends-on): Add unistr/base.
4084         (configure.ac): Remove gl_UTF_UCS4.
4085         (Makefile.am): Update.
4086         (Include): Change to unistr.h.
4087         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
4088         (Depends-on): Add unistr/base.
4089         (configure.ac): Remove gl_UTF_UCS4.
4090         (Makefile.am): Update.
4091         (Include): Change to unistr.h.
4092         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
4093         (Depends-on): Add unistr/base.
4094         (configure.ac): Remove gl_UTF_UCS4.
4095         (Makefile.am): Update.
4096         (Include): Change to unistr.h.
4097         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
4098         (Depends-on): Add unistr/base.
4099         (configure.ac): Remove gl_UTF_UCS4.
4100         (Makefile.am): Update.
4101         (Include): Change to unistr.h.
4102         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
4103         (Depends-on): Add unistr/base.
4104         (configure.ac): Remove gl_UCS4_UTF.
4105         (Makefile.am): Update.
4106         (Include): Change to unistr.h.
4107         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
4108         (Depends-on): Add unistr/base.
4109         (configure.ac): Remove gl_UCS4_UTF.
4110         (Makefile.am): Update.
4111         (Include): Change to unistr.h.
4112         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
4113         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
4114         utf8-ucs4-unsafe.h.
4115         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
4116         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
4117         utf16-ucs4-unsafe.h.
4118         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
4119         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
4120         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
4121         * lib/unistr/u8-strchr.c: Likewise.
4122         * lib/unistr/u8-strrchr.c: Likewise.
4123         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
4124         * lib/unistr/u16-strchr.c: Likewise.
4125         * lib/unistr/u16-strrchr.c: Likewise.
4126         * lib/striconveh.c: Update.
4127         * lib/linebreak.c: Update.
4128
4129 2007-03-24  Bruno Haible  <bruno@clisp.org>
4130
4131         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
4132         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
4133
4134 2007-03-22  Bruno Haible  <bruno@clisp.org>
4135
4136         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
4137
4138 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
4139
4140         * MODULES.html.sh (File system functions): New module write-any-file.
4141         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
4142         * m4/write-any-file.m4: New files.
4143
4144 2007-03-23  Eric Blake  <ebb9@byu.net>
4145
4146         * gnulib-tool: Rearrange space-tab sequences, since some editors
4147         like to eat them.
4148
4149 2007-03-23  Eric Blake  <ebb9@byu.net>
4150
4151         * lib/version-etc.c (version_etc_va): Update license wording to
4152         be more concise.  Recommended by Richard Stallman.
4153
4154 2007-03-22  Bruno Haible  <bruno@clisp.org>
4155
4156         * lib/poll.c (MSG_PEEK): New fallback definition.
4157
4158 2007-03-22  Bruno Haible  <bruno@clisp.org>
4159
4160         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
4161         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
4162         (main): Update.
4163         Fixes a compilation error on BeOS.
4164
4165 2007-03-22  Bruno Haible  <bruno@clisp.org>
4166
4167         * modules/frexpl-tests: New file.
4168         * tests/test-frexpl.c: New file.
4169
4170         * modules/frexpl: New file.
4171         * m4/frexpl.m4: New file.
4172         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
4173         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
4174         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
4175         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
4176         (Depends-on): Add frexpl. Remove isnanl-nolibm.
4177         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
4178
4179 2007-03-22  Bruno Haible  <bruno@clisp.org>
4180
4181         * lib/frexpl.c: Share code with lib/frexp.c.
4182         * modules/mathl (Files): Add lib/frexp.c.
4183         (Depends-on): Add isnanl-nolibm.
4184
4185 2007-03-22  Bruno Haible  <bruno@clisp.org>
4186
4187         * modules/printf-frexp (Files): Add m4/frexp.m4.
4188         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
4189         only if the found frexp function actually works.
4190
4191 2007-03-22  Bruno Haible  <bruno@clisp.org>
4192
4193         * lib/frexp.c: Remove older implementation that uses divisions.
4194
4195 2007-03-21  Bruno Haible  <bruno@clisp.org>
4196
4197         * modules/frexp-tests: New file.
4198         * tests/test-frexp.c: New file.
4199
4200         * modules/frexp: New file.
4201         * lib/frexp.c: New file.
4202         * m4/frexp.m4: New file.
4203         * lib/math_.h (frexp): New declaration.
4204         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
4205         REPLACE_FREXP.
4206         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
4207
4208 2007-03-21  Bruno Haible  <bruno@clisp.org>
4209
4210         * modules/isnanl-tests: New file.
4211         * tests/test-isnanl.c: New file.
4212
4213         * modules/isnanl: New file.
4214         * lib/isnanl.h: New file.
4215         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
4216         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
4217         gl_FUNC_ISNANL_WORKS.
4218         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
4219         New macros.
4220
4221 2007-03-21  Bruno Haible  <bruno@clisp.org>
4222
4223         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
4224         lib/isnanl.h.
4225         (Include): Update.
4226         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
4227         * lib/vasnprintf.c: Update.
4228         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
4229         tests/test-isnanl.h, remove tests/test-isnanl.c.
4230         (Makefile.am): Update.
4231         * tests/test-isnanl-nolibm.c: New file.
4232         * tests/test-isnanl.h: New file.
4233         * tests/test-isnanl.c: Remove file.
4234
4235 2007-03-21  Jim Meyering  <jim@meyering.net>
4236
4237         When trying to open ".", treat ESTALE like EACCES.
4238         * lib/savewd.c (savewd_save): Resort to forking not just upon
4239         failure with EACCES, but also when errno is ESTALE.
4240
4241 2007-03-20  Bruno Haible  <bruno@clisp.org>
4242
4243         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
4244         Needed on AIX 5.1. Reported by Matthew Woehlke.
4245
4246 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4247
4248         Suggestions by Bruno Haible:
4249         * lib/acl-internal.h: Include "gettext.h" rather than rolling
4250         our own.
4251         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
4252         * modules/acl (Depends-on): Add gettext.
4253
4254 2007-03-19  Bruno Haible  <bruno@clisp.org>
4255
4256         * modules/iconvme: Remove file.
4257         * lib/iconvme.h: Remove file.
4258         * lib/iconvme.c: Remove file.
4259         * m4/iconvme.m4: Remove file.
4260
4261 2007-03-19  Bruno Haible  <bruno@clisp.org>
4262
4263         * doc/relocatable-maint.texi: Break long shell script line.
4264         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4265
4266 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4267
4268         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
4269         handle file_has_acl.
4270         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
4271         * lib/acl.c: Move header inclusions and related macro defns into
4272         lib/acl-internal.h.
4273         (S_ISLNK): Remove defn, since that's now done for us.
4274         (file_has_acl): Move to lib/file-has-acl.c.
4275         Call acl_trivial if available.  This is the crucial part of the fix.
4276         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
4277         shared within the library.  Rewrite a bit, partly to make it compatible
4278         with the GNU coding style.
4279         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
4280         Remove unnecessary double-quotes.
4281         Don't test for acl_to_text; the build will catch that.
4282         Replace acl_entries if it doesn't exist and it is needed.
4283         Check for -lsec and acl_trivial (as used on Solaris 10).
4284         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
4285         lib/file-has-acl.c.
4286         (Depends-on): Add sys_stat, for S_ISLNK.
4287
4288 2007-03-19  Ben Pfaff  <blp@gnu.org>
4289
4290         * doc/gnulib.texi: Fix typos.
4291         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4292
4293 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4294
4295         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
4296         If size is zero here, buf must be zero.
4297
4298 2007-03-19  Simon Josefsson  <simon@josefsson.org>
4299
4300         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
4301         <bruno@clisp.org>.
4302
4303 2007-03-18  Bruno Haible  <bruno@clisp.org>
4304
4305         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
4306         Suggested by Eric Blake.
4307
4308 2007-03-18  Ben Pfaff  <blp@gnu.org>
4309
4310         * doc/relocatable.texi: Recommend using as prefix a directory
4311         that does not exist and will never be created.  Based on
4312         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
4313         and others.
4314
4315 2007-03-17  Bruno Haible  <bruno@clisp.org>
4316
4317         * lib/fchownat.c: Include lchown.h.
4318
4319 2007-03-17  Bruno Haible  <bruno@clisp.org>
4320
4321         Fix endless loop when the given allocated size was > INT_MAX.
4322         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
4323         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
4324         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
4325         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
4326         * lib/sprintf.c (sprintf): Likewise.
4327
4328 2007-03-17  Bruno Haible  <bruno@clisp.org>
4329
4330         * tests/test-argp-2.sh (func_compare): Output a context diff.
4331
4332 2007-03-17  Bruno Haible  <bruno@clisp.org>
4333
4334         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
4335         locale's decimal-point character.
4336
4337 2007-03-17  Bruno Haible  <bruno@clisp.org>
4338
4339         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
4340         before comparing it. Needed because on some platforms (e.g. x86) a
4341         'long double' occupies less bytes than sizeof (long double).
4342
4343 2007-03-17  Bruno Haible  <bruno@clisp.org>
4344
4345         * tests/test-crc.c (main): Make printf statements 64-bit clean.
4346         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
4347         * tests/test-getaddrinfo.c (simple): Likewise.
4348         * tests/test-read-file.c (main): Likewise.
4349
4350 2007-03-17  Bruno Haible  <bruno@clisp.org>
4351
4352         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
4353
4354 2007-03-17  Bruno Haible  <bruno@clisp.org>
4355
4356         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
4357         unused variable.
4358
4359 2007-03-17  Bruno Haible  <bruno@clisp.org>
4360
4361         * tests/test-c-strcasecmp.c: Include c-strcase.h.
4362         * tests/test-c-strncasecmp.c: Likewise.
4363
4364 2007-03-17  Bruno Haible  <bruno@clisp.org>
4365
4366         * modules/stdlib (Depends-on): Add unistd.
4367         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
4368         Needed for MacOS X 10.3.
4369
4370 2007-03-17  Bruno Haible  <bruno@clisp.org>
4371
4372         * lib/unistr/u-strdup.h: Include <stdlib.h>.
4373
4374 2007-03-17  Bruno Haible  <bruno@clisp.org>
4375
4376         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
4377
4378 2007-03-17  Bruno Haible  <bruno@clisp.org>
4379
4380         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
4381         to reflect files copied from gnulib (with or without modifications).
4382         Suggested by Jim Meyering.
4383
4384 2007-03-17  Eric Blake  <ebb9@byu.net>
4385
4386         * NEWS: Document stdlib change from 2007-02-18.
4387
4388 2007-03-17  Jim Meyering  <jim@meyering.net>
4389
4390         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
4391         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
4392         someone uses a name containing shell meta-characters.
4393         Reported by Alfred M. Szmidt.
4394
4395         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
4396
4397 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4398
4399         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
4400         and copy gettext configuration files only if configure.ac contains
4401         a use of AM_GNU_GETTEXT_VERSION.
4402
4403 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4404
4405         * build-aux/bootstrap (gnulib_name): New variable.
4406         (gnulib_tool_options): Use it.
4407
4408 2007-03-13  Simon Josefsson  <simon@josefsson.org>
4409
4410         * tests/test-des.c: Use new namespace.
4411
4412 2007-03-15  Bruno Haible  <bruno@clisp.org>
4413
4414         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
4415         Reported by James Youngman <jay@gnu.org>.
4416
4417 2007-03-15  Bruno Haible  <bruno@clisp.org>
4418
4419         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
4420         declared prototype. Needed with cc on OSF/1 5.1.
4421
4422 2007-03-15  Bruno Haible  <bruno@clisp.org>
4423
4424         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
4425         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
4426         (struct gl_list_implementation): Add dispose_fn argument to the
4427         'create_empty', 'create' methods.
4428         (struct gl_list_impl_base): Add field 'dispose_fn'.
4429         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
4430         argument.
4431         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
4432         dispose_fn argument.
4433         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
4434         dispose_fn on the dropped values.
4435         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
4436         dispose_fn argument.
4437         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
4438         dropped values.
4439         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
4440         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4441         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
4442         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4443         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
4444         argument.
4445         (gl_tree_list_free): Call dispose_fn on the dropped values.
4446         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
4447         the dropped values.
4448         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4449         Add dispose_fn argument.
4450         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
4451         Call dispose_fn on the dropped values.
4452         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
4453         Add dispose_fn argument.
4454         (gl_sublist_create): Initialize the 'dispose_fn' field.
4455         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
4456         * tests/test-array_list.c (main): Update.
4457         * tests/test-carray_list.c (main): Update.
4458         * tests/test-avltree_list.c (main): Update.
4459         * tests/test-rbtree_list.c (main): Update.
4460         * tests/test-avltreehash_list.c (main): Update.
4461         * tests/test-rbtreehash_list.c (main): Update.
4462         * tests/test-linked_list.c (main): Update.
4463         * tests/test-linkedhash_list.c (main): Update.
4464         * tests/test-array_oset.c (main): Update.
4465
4466 2007-03-15  Bruno Haible  <bruno@clisp.org>
4467
4468         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
4469         (gl_oset_create_empty): Add dispose_fn argument.
4470         (struct gl_oset_implementation): Add dispose_fn argument to
4471         'create_empty' method.
4472         (struct gl_oset_impl_base): Add dispose_fn field.
4473         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
4474         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
4475         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
4476         values.
4477         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
4478         (gl_tree_oset_free): Call dispose_fn on the dropped values.
4479         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4480         dropped value.
4481         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4482         dropped value.
4483         * tests/test-array_oset.c (main): Update.
4484         * tests/test-avltree_oset.c (main): Update.
4485         * tests/test-rbtree_oset.c (main): Update.
4486         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
4487
4488 2007-03-13  Bruno Haible  <bruno@clisp.org>
4489
4490         * tests/test-stdbool.c (i): Update after last patch.
4491
4492 2007-03-12  Bruno Haible  <bruno@clisp.org>
4493
4494         * lib/quotearg.c: Include <wctype.h> early, before the definition of
4495         the iswprint macro. Needed on Solaris 2.5.1.
4496
4497 2007-03-12  Bruno Haible  <bruno@clisp.org>
4498
4499         * tests/test-printf-frexp.c (main): Declare x as volatile.
4500
4501 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4502
4503         * doc/gnulib.texi (Build robot for gnulib): New section.
4504
4505 2007-03-12  Jim Meyering  <jim@meyering.net>
4506
4507         * build-aux/bootstrap: New file.
4508         * build-aux/bootstrap.conf: New file, from coreutils.
4509
4510 2007-03-11  Bruno Haible  <bruno@clisp.org>
4511
4512         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
4513
4514 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4515
4516         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
4517         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
4518         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
4519
4520 2007-03-11  Bruno Haible  <bruno@clisp.org>
4521
4522         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
4523         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
4524
4525 2007-03-11  Bruno Haible  <bruno@clisp.org>
4526
4527         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
4528         formula. Needed for SunPRO C 5.0.
4529
4530 2007-03-11  Bruno Haible  <bruno@clisp.org>
4531
4532         * modules/long-options (Depends-on): Add getopt.
4533
4534 2007-03-11  Bruno Haible  <bruno@clisp.org>
4535
4536         * modules/modechange (Depends-on): Add stdbool.
4537
4538 2007-03-11  Bruno Haible  <bruno@clisp.org>
4539
4540         * modules/i-ring (Depends-on): Add stdbool.
4541
4542 2007-03-11  Bruno Haible  <bruno@clisp.org>
4543
4544         * modules/gc-des (Depends-on): Add stdbool.
4545
4546 2007-03-11  Bruno Haible  <bruno@clisp.org>
4547
4548         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
4549
4550 2007-03-11  Bruno Haible  <bruno@clisp.org>
4551
4552         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
4553
4554 2007-03-11  Bruno Haible  <bruno@clisp.org>
4555
4556         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
4557
4558 2007-03-11  Bruno Haible  <bruno@clisp.org>
4559
4560         * lib/vasnprintf.c (sprintf): Undefine.
4561
4562 2007-03-11  Bruno Haible  <bruno@clisp.org>
4563
4564         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
4565         initializers in SunPRO C and Compaq C compilers.
4566
4567 2007-03-11  Bruno Haible  <bruno@clisp.org>
4568
4569         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
4570         decrementing code ANSI C compliant.
4571
4572 2007-03-11  Bruno Haible  <bruno@clisp.org>
4573
4574         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
4575         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
4576
4577 2007-03-11  Bruno Haible  <bruno@clisp.org>
4578
4579         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
4580         <stdbool.h> substitute doesn't pass.
4581
4582 2007-03-11  Bruno Haible  <bruno@clisp.org>
4583
4584         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
4585
4586 2007-03-11  Bruno Haible  <bruno@clisp.org>
4587
4588         * gnulib-tool (func_create_megatestdir): Create also an autobuild
4589         script, for submission to autobuild.josefsson.org.
4590
4591 2007-03-10  Bruno Haible  <bruno@clisp.org>
4592
4593         * modules/canonicalize-lgpl-tests: New file.
4594         * tests/test-canonicalize-lgpl.sh: New file.
4595         * tests/test-canonicalize-lgpl.c: New file.
4596
4597         * modules/c-strcase-tests: New file.
4598         * tests/test-c-strcase.sh: New file.
4599         * tests/test-c-strcasecmp.c: New file.
4600         * tests/test-c-strncasecmp.c: New file.
4601
4602         * modules/atexit-tests: New file.
4603         * tests/test-atexit.sh: New file.
4604         * tests/test-atexit.c: New file.
4605
4606 2007-03-10  Bruno Haible  <bruno@clisp.org>
4607
4608         * tests/test-binary-io.sh: Use temporary filenames that are not so
4609         likely to clash with those of other tests (in a parallel make).
4610         * tests/test-binary-io.c: Likewise.
4611
4612 2007-03-10  Bruno Haible  <bruno@clisp.org>
4613
4614         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
4615         fallback; use #error instead.
4616         Suggested by Simon Josefsson.
4617
4618 2007-03-10  Bruno Haible  <bruno@clisp.org>
4619
4620         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
4621         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
4622         first and the last.
4623
4624 2007-03-10  Bruno Haible  <bruno@clisp.org>
4625
4626         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
4627
4628 2007-03-10  Bruno Haible  <bruno@clisp.org>
4629
4630         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
4631         "make distcheck".
4632         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
4633         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
4634         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
4635
4636 2007-03-10  Bruno Haible  <bruno@clisp.org>
4637
4638         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
4639         variable.
4640         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
4641         variable.
4642
4643 2007-03-09  Eric Blake  <ebb9@byu.net>
4644         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
4645
4646         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
4647         types are not being provided by gnulib.
4648         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
4649         types are supported.
4650
4651 2007-03-10  Bruno Haible  <bruno@clisp.org>
4652
4653         * lib/stdio_.h (__attribute__): New macro.
4654         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
4655         vsprintf): Specify __attribute__ __format__ for GCC.
4656         Suggested by Eric Blake.
4657
4658 2007-03-09  Bruno Haible  <bruno@clisp.org>
4659
4660         * modules/printf-posix-tests: New file.
4661         * tests/test-printf-posix.sh: New file.
4662         * tests/test-printf-posix.c: New file.
4663
4664         * modules/printf-posix: New file.
4665         * lib/printf.c: New file.
4666         * m4/printf-posix-rpl.m4: New file.
4667         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
4668         REPLACE_PRINTF.
4669         * lib/stdio_.h (printf): New declaration.
4670         (format, __format__, ____printf____, ____scanf____, ____strftime____,
4671         ____strfmon____): New macros.
4672         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
4673         REPLACE_PRINTF.
4674
4675 2007-03-09  Bruno Haible  <bruno@clisp.org>
4676
4677         * tests/test-vasnprintf-posix2.sh: New file.
4678         * tests/test-vasnprintf-posix2.c: New file.
4679         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
4680         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
4681         (Makefile.am): Activate test-vasnprintf-posix2.sh.
4682
4683         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
4684         a locale dependent decimal point, rather than always '.'.
4685
4686 2007-03-09  Eric Blake  <ebb9@byu.net>
4687
4688         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
4689         spite of platforms like Tandem/NSK that define it to -1.
4690
4691 2007-03-08  Bruno Haible  <bruno@clisp.org>
4692
4693         * modules/vprintf-posix-tests: New file.
4694         * tests/test-vprintf-posix.sh: New file.
4695         * tests/test-vprintf-posix.c: New file.
4696         * tests/test-printf-posix.h: New file.
4697
4698         * modules/vprintf-posix: New file.
4699         * lib/vprintf.c: New file.
4700         * m4/vprintf-posix.m4: New file.
4701         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
4702         REPLACE_VPRINTF.
4703         * lib/stdio_.h (vprintf): New declaration.
4704         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
4705         REPLACE_VPRINTF.
4706
4707 2007-03-08  Bruno Haible  <bruno@clisp.org>
4708
4709         * modules/fprintf-posix-tests: New file.
4710         * tests/test-fprintf-posix.sh: New file.
4711         * tests/test-fprintf-posix.c: New file.
4712
4713         * modules/fprintf-posix: New file.
4714         * lib/fprintf.c: New file.
4715         * m4/fprintf-posix.m4: New file.
4716         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
4717         REPLACE_FPRINTF.
4718         * lib/stdio_.h (fprintf): New declaration.
4719         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
4720         REPLACE_FPRINTF.
4721
4722 2007-03-08  Bruno Haible  <bruno@clisp.org>
4723
4724         * modules/vfprintf-posix-tests: New file.
4725         * tests/test-vfprintf-posix.sh: New file.
4726         * tests/test-vfprintf-posix.c: New file.
4727         * tests/test-fprintf-posix.h: New file.
4728         * tests/test-fprintf-posix.out: New file.
4729
4730         * modules/vfprintf-posix: New file.
4731         * lib/vfprintf.c: New file.
4732         * m4/vfprintf-posix.m4: New file.
4733         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
4734         REPLACE_VFPRINTF.
4735         * lib/stdio_.h (vfprintf): New declaration.
4736         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
4737         REPLACE_VFPRINTF.
4738
4739 2007-03-08  Bruno Haible  <bruno@clisp.org>
4740
4741         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
4742
4743 2007-03-08  Bruno Haible  <bruno@clisp.org>
4744
4745         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
4746         instead of 'expr' invocations.
4747         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4748         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4749         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4750         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
4751         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4752         Suggested by Paul Eggert.
4753
4754 2007-03-08  Bruno Haible  <bruno@clisp.org>
4755
4756         * modules/fseterr-tests: New file.
4757         * tests/test-fseterr.c: New file.
4758
4759         * modules/fseterr: New file.
4760         * lib/fseterr.h: New file.
4761         * lib/fseterr.c: New file.
4762
4763 2007-03-08  Bruno Haible  <bruno@clisp.org>
4764
4765         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
4766         * lib/getopt_.h: Likewise.
4767         * lib/mbswidth.h: Likewise.
4768         * lib/setenv.h: Likewise.
4769         * lib/vasnprintf.h: Likewise.
4770         * lib/vasprintf.h: Likewise.
4771         * lib/verror.h: Likewise.
4772         * lib/xsetenv.h: Likewise.
4773         * lib/xvasprintf.h: Likewise.
4774
4775 2007-03-08  Jim Meyering  <jim@meyering.net>
4776
4777         * users.txt: Add parted.
4778
4779         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
4780
4781 2007-03-07  Bruno Haible  <bruno@clisp.org>
4782
4783         * m4/printf.m4: Make the shell script snippets copy&pastable.
4784
4785 2007-03-02  Bruno Haible  <bruno@clisp.org>
4786
4787         * lib/netinet_in_.h: New file.
4788         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
4789         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
4790         * modules/netinet_in (Files): Add lib/netinet_in_.h.
4791         (Depends-on): Add absolute-header.
4792         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
4793         into netinet/in.h.
4794
4795 2007-03-03  Bruno Haible  <bruno@clisp.org>
4796
4797         * lib/sys_select_.h: New file.
4798         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
4799         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
4800         * modules/sys_select (Files): Add lib/sys_select_.h.
4801         (Depends-on): Add absolute-header.
4802         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
4803         into sys/select.h.
4804
4805 2007-03-02  Bruno Haible  <bruno@clisp.org>
4806
4807         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
4808         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
4809         values.
4810         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
4811         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
4812         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
4813         * modules/sys_socket (Depends-on): Add absolute-header.
4814         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
4815         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
4816         (Include): Remove requirement of inclusion of <sys/types.h>.
4817
4818 2007-03-02  Bruno Haible  <bruno@clisp.org>
4819
4820         * lib/byteswap_.h (bswap_32): Fix formula.
4821
4822 2007-03-06  Bruno Haible  <bruno@clisp.org>
4823
4824         * modules/sprintf-posix-tests: New file.
4825         * tests/test-sprintf-posix.c: New file.
4826
4827         * modules/sprintf-posix: New file.
4828         * lib/sprintf.c: New file.
4829         * m4/sprintf-posix.m4: New file.
4830         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
4831         REPLACE_SPRINTF.
4832         * lib/stdio_.h (sprintf): New declaration.
4833         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
4834         REPLACE_SPRINTF.
4835
4836 2007-03-06  Bruno Haible  <bruno@clisp.org>
4837
4838         * modules/vsprintf-posix-tests: New file.
4839         * tests/test-vsprintf-posix.c: New file.
4840         * tests/test-sprintf-posix.h: New file.
4841
4842         * modules/vsprintf-posix: New file.
4843         * lib/vsprintf.c: New file.
4844         * m4/vsprintf-posix.m4: New file.
4845         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
4846         REPLACE_VSPRINTF.
4847         * lib/stdio_.h (vsprintf): New declaration.
4848         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
4849         REPLACE_VSPRINTF.
4850
4851 2007-03-06  Bruno Haible  <bruno@clisp.org>
4852
4853         * modules/vsnprintf (Depend-on): Remove minmax.
4854
4855 2007-03-06  Bruno Haible  <bruno@clisp.org>
4856
4857         * modules/snprintf-posix-tests: New file.
4858         * tests/test-snprintf-posix.c: New file.
4859
4860         * modules/snprintf-posix: New file.
4861         * m4/snprintf-posix.m4: New file.
4862         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
4863         gl_FUNC_SNPRINTF.
4864         (gl_FUNC_SNPRINTF): Invoke it.
4865         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
4866         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
4867         is set.
4868         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
4869
4870 2007-03-06  Bruno Haible  <bruno@clisp.org>
4871
4872         * modules/vsnprintf-posix-tests: New file.
4873         * tests/test-vsnprintf-posix.c: New file.
4874         * tests/test-snprintf-posix.h: New file.
4875
4876         * modules/vsnprintf-posix: New file.
4877         * m4/vsnprintf-posix.m4: New file.
4878         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
4879         gl_FUNC_VSNPRINTF.
4880         (gl_FUNC_VSNPRINTF): Invoke it.
4881         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
4882         * lib/stdio_.h (vsnprintf): Define as a replacement if
4883         REPLACE_VSNPRINTF is set.
4884         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
4885
4886 2007-03-06  Bruno Haible  <bruno@clisp.org>
4887
4888         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
4889         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
4890
4891 2007-03-06  Bruno Haible  <bruno@clisp.org>
4892
4893         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
4894         (asinl): Declare also if HAVE_DECL_ASINL is set.
4895         (atanl): Declare also if HAVE_DECL_ATANL is set.
4896         (ceill): Declare also if HAVE_DECL_CEILL is set.
4897         (cosl): Declare also if HAVE_DECL_COSL is set.
4898         (expl): Declare also if HAVE_DECL_EXPL is set.
4899         (floorl): Declare also if HAVE_DECL_FLOORL is set.
4900         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
4901         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
4902         (logl): Declare also if HAVE_DECL_LOGL is set.
4903         (sinl): Declare also if HAVE_DECL_SINL is set.
4904         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
4905         (tanl): Declare also if HAVE_DECL_TANL is set.
4906         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
4907         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
4908         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
4909         declaration of frexpl, ldexpl.
4910         * modules/printf-frexpl (Depends-on): Add math.
4911         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
4912
4913 2007-03-05  Bruno Haible  <bruno@clisp.org>
4914
4915         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
4916         frexpl and ldexpl are declared.
4917         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
4918
4919 2007-03-05  Bruno Haible  <bruno@clisp.org>
4920
4921         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
4922         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
4923
4924 2007-03-05  Bruno Haible  <bruno@clisp.org>
4925
4926         * lib/stdio_.h: Include <stddef.h>.
4927
4928 2007-03-05  Bruno Haible  <bruno@clisp.org>
4929
4930         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
4931
4932 2007-03-05  Bruno Haible  <bruno@clisp.org>
4933
4934         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
4935         NetBSD 4, from Ralf Wildenhues.
4936
4937 2007-03-04  Bruno Haible  <bruno@clisp.org>
4938
4939         * lib/vasprintf.h: Update #if logic for the case when the functions
4940         exist but are overridden.
4941
4942 2007-03-04  Bruno Haible  <bruno@clisp.org>
4943
4944         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
4945         implementations: glibc-2.4 and MacOS X 10.3.
4946         * tests/test-vasnprintf-posix.c (test_function): Test also the case
4947         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
4948         * tests/test-vasprintf-posix.c (test_function): Likewise.
4949
4950 2007-03-04  Bruno Haible  <bruno@clisp.org>
4951
4952         * modules/vasprintf-posix-tests: New file.
4953         * tests/test-vasprintf-posix.c: New file.
4954
4955         * modules/vasprintf-posix: New file.
4956         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
4957         defined.
4958         * m4/vasprintf-posix.m4: New file.
4959         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
4960         gl_FUNC_VASPRINTF.
4961         (gl_FUNC_VASPRINTF): Invoke it.
4962         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
4963         here.
4964         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
4965
4966 2007-03-04  Bruno Haible  <bruno@clisp.org>
4967
4968         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
4969         REPLACE_GETTIMEOFDAY.
4970         * modules/sys_time (Makefile.am): Likewise.
4971         * m4/sys_time_h.m4: Likewise.
4972         * m4/gettimeofday.m4: Likewise.
4973
4974 2007-03-04  Bruno Haible  <bruno@clisp.org>
4975
4976         * modules/vasnprintf-posix-tests: New file.
4977         * tests/test-vasnprintf-posix.c: New file.
4978
4979         * modules/vasnprintf-posix: New file.
4980         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
4981         printf-frexpl.h.
4982         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
4983         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
4984         REPLACE_VASNPRINTF is defined.
4985         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
4986         gl_FUNC_VASNPRINTF.
4987         (gl_FUNC_VASNPRINTF): Invoke it.
4988         * m4/vasnprintf-posix.m4: New file.
4989         * m4/printf.m4: New file.
4990
4991 2007-03-04  Bruno Haible  <bruno@clisp.org>
4992
4993         Compile progreloc.c only if --enable-relocatable is specified.
4994         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
4995         if --enable-relocatable was specified.
4996         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
4997         lib_SOURCES.
4998
4999 2007-03-04  Jim Meyering  <jim@meyering.net>
5000
5001         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
5002         Use it consistently, rather than enumerating errno constants.
5003
5004 2007-03-04  Bruno Haible  <bruno@clisp.org>
5005
5006         * modules/xvasprintf-tests: New file.
5007         * tests/test-xvasprintf.c: New file.
5008
5009         * modules/vasprintf-tests: New file.
5010         * tests/test-vasprintf.c: New file.
5011
5012         * modules/vasnprintf-tests: New file.
5013         * tests/test-vasnprintf.c: New file.
5014
5015         * modules/vsnprintf-tests: New file.
5016         * tests/test-vsnprintf.c: New file.
5017
5018         * modules/snprintf-tests: New file.
5019         * tests/test-snprintf.c: New file.
5020
5021 2007-03-04  Bruno Haible  <bruno@clisp.org>
5022
5023         Compile relocatable.c only if --enable-relocatable is specified.
5024         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
5025         gl_RELOCATABLE_LIBRARY.
5026         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
5027         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
5028         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
5029         gl_RELOCATABLE_LIBRARY.
5030         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
5031         (Makefile.am): Remove lib_SOURCES.
5032         * modules/relocatable-lib-lgpl (configure.ac): Invoke
5033         gl_RELOCATABLE_LIBRARY.
5034         (Makefile.am): Remove lib_SOURCES.
5035         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
5036         always.
5037         * modules/relocatable-prog-wrapper (configure.ac): Invoke
5038         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
5039
5040 2007-03-04  Bruno Haible  <bruno@clisp.org>
5041
5042         * modules/argmatch-tests: New file.
5043         * tests/test-argmatch.c: New file.
5044
5045         * tests/test-allocsa.c (main): Halve the number of loop runs.
5046
5047         * modules/alloca-opt-tests: New file.
5048         * tests/test-alloca-opt.c: New file.
5049
5050 2007-03-04  Jim Meyering  <jim@meyering.net>
5051
5052         Work around difference between Linux ACLs and Solaris 10 ZFS.
5053         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
5054         for EINVAL.
5055
5056 2007-03-03  Bruno Haible  <bruno@clisp.org>
5057
5058         * modules/relocatable-prog (Depends-on): Add back progreloc's
5059         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
5060
5061 2007-03-03  Bruno Haible  <bruno@clisp.org>
5062
5063         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
5064         * modules/relocatable-lib: New file.
5065
5066 2007-03-03  Bruno Haible  <bruno@clisp.org>
5067
5068         * modules/relocatable-prog: Renamed from modules/relocatable.
5069         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
5070
5071 2007-03-03  Bruno Haible  <bruno@clisp.org>
5072
5073         * modules/relocatable-script (Files): Add doc/relocatable.texi,
5074         m4/relocatable-lib.m4.
5075         (Depends-on): Remove 'relocatable'.
5076         (configure.ac): Add gl_RELOCATABLE_NOP.
5077
5078 2007-03-03  Bruno Haible  <bruno@clisp.org>
5079
5080         * modules/relocatable-prog-wrapper: New file.
5081         * modules/relocatable (Depends-on): Add it. Remove all other
5082         dependencies except progname.
5083         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
5084
5085         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
5086         (gl_FUNC_STRERROR): Nop.
5087         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
5088
5089         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
5090         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
5091
5092         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
5093         (gl_FUNC_READLINK): Update.
5094
5095         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
5096
5097 2007-03-03  Bruno Haible  <bruno@clisp.org>
5098
5099         * lib/xreadlink.c: Include <unistd.h> unconditionally.
5100         * modules/xreadlink (Depends-on): Add unistd.
5101         * modules/xreadlink-with-size (Depends-on): Likewise.
5102
5103 2007-03-03  Bruno Haible  <bruno@clisp.org>
5104
5105         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
5106         extracted from gt_FUNC_SETENV.
5107         (gt_FUNC_SETENV): Remove macro.
5108         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
5109         remove gt_FUNC_SETENV.
5110
5111 2007-03-03  Bruno Haible  <bruno@clisp.org>
5112
5113         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
5114         ENABLE_RELOCATABLE here.
5115         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
5116
5117 2007-03-03  Bruno Haible  <bruno@clisp.org>
5118
5119         * modules/rbtreehash-list-tests (Depends-on): Add progname.
5120         * tests/test-rbtreehash_list.c: Include progname.h.
5121         (main): Call set_program_name.
5122
5123         * modules/rbtree-oset-tests (Depends-on): Add progname.
5124         * tests/test-rbtree_oset.c: Include progname.h.
5125         (main): Call set_program_name.
5126
5127         * modules/rbtree-list-tests (Depends-on): Add progname.
5128         * tests/test-rbtree_list.c: Include progname.h.
5129         (main): Call set_program_name.
5130
5131         * modules/linked-list-tests (Depends-on): Add progname.
5132         * tests/test-linked_list.c: Include progname.h.
5133         (main): Call set_program_name.
5134
5135 2007-03-03  Bruno Haible  <bruno@clisp.org>
5136
5137         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
5138         All uses of __restrict changed to _Restrict_.
5139         * lib/glob_.h (__restrict): Remove macro.
5140
5141 2007-03-02  Bruno Haible  <bruno@clisp.org>
5142
5143         * modules/gettext (configure.ac): Require gettext infrastructure
5144         from version 0.16.1.
5145
5146 2007-03-02  Bruno Haible  <bruno@clisp.org>
5147
5148         * modules/linkedhash-list-tests (Depends-on): Add progname.
5149         * tests/test-linkedhash_list.c: Include progname.h.
5150         (main): Call set_program_name.
5151
5152         * modules/carray-list-tests (Depends-on): Add progname.
5153         * tests/test-carray_list.c: Include progname.h.
5154         (main): Call set_program_name.
5155
5156         * modules/avltreehash-list-tests (Depends-on): Add progname.
5157         * tests/test-avltreehash_list.c: Include progname.h.
5158         (main): Call set_program_name.
5159
5160         * modules/avltree-oset-tests (Depends-on): Add progname.
5161         * tests/test-avltree_oset.c: Include progname.h.
5162         (main): Call set_program_name.
5163
5164         * modules/avltree-list-tests (Depends-on): Add progname.
5165         * tests/test-avltree_list.c: Include progname.h.
5166         (main): Call set_program_name.
5167
5168         * modules/array-oset-tests (Depends-on): Add progname.
5169         * tests/test-array_oset.c: Include progname.h.
5170         (main): Call set_program_name.
5171
5172         * modules/array-list-tests (Depends-on): Add progname.
5173         * tests/test-array_list.c: Include progname.h.
5174         (main): Call set_program_name.
5175
5176         * modules/argp-tests (Depends-on): Add progname.
5177         * tests/test-argp.c: Include argp.h first. Include progname.h.
5178         (main): Call set_program_name.
5179
5180 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
5181
5182         * doc/gnulib-tool.texi (Initial import): Reword description of
5183         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
5184         limited effect even if defined after the first system include.
5185
5186 2007-03-01  Bruno Haible  <bruno@clisp.org>
5187
5188         * build-aux/config.libpath: Update to libtool-1.5.22.
5189         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
5190
5191 2007-03-01  Bruno Haible  <bruno@clisp.org>
5192
5193         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
5194         foo_CFLAGS.
5195         Reported by Ralf Wildenhues.
5196
5197 2007-03-01  Bruno Haible  <bruno@clisp.org>
5198
5199         * build-aux/install-reloc: Remove object files left over by some
5200         compilers.
5201         Reported by Ralf Wildenhues.
5202
5203 2007-03-01  Bruno Haible  <bruno@clisp.org>
5204
5205         * build-aux/install-reloc: Break long lines.
5206
5207 2007-03-01  Bruno Haible  <bruno@clisp.org>
5208
5209         * doc/relocatable.texi: Document that it may not work on OpenBSD.
5210         Reported by Ralf Wildenhues.
5211
5212 2007-03-01  Bruno Haible  <bruno@clisp.org>
5213
5214         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
5215         include ordering constraints.
5216
5217 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5218
5219         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
5220         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
5221         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
5222         as another example.
5223         * lib/time_.h: Fix misspelling.
5224         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5225         Require gl_HEADER_TIME_H_DEFAULTS.
5226         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
5227         * m4/time_r.m4 (gl_TIME_R): Likewise.
5228         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
5229
5230 2007-03-01  Bruno Haible  <bruno@clisp.org>
5231
5232         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
5233         * m4/utimens.m4 (gl_UTIMENS): Likewise.
5234
5235 2007-03-01  Jim Meyering  <jim@meyering.net>
5236
5237         * modules/xreadlink (Maintainer): Add my name.
5238         * modules/xreadlink-with-size (Depends-on): Alphabetize.
5239
5240 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
5241             Bruno Haible  <bruno@clisp.org>
5242
5243         * build-aux/install-reloc: Compile also c-ctype.c.
5244         * build-aux/relocatable.sh.in: New file.
5245         * doc/relocatable.texi: New file.
5246         * doc/relocatable-maint.texi: New file.
5247         * doc/gnulib.texi: Include relocatable-maint.texi.
5248         * lib/progreloc.c: Include unistd.h unconditionally.
5249         * lib/relocwrapper.c: Include unistd.h unconditionally.
5250         Include c-ctype.h.
5251         (add_dotbin): Use c_tolower.
5252         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
5253         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
5254         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
5255         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
5256         to m4/relocatable-lib.m4.
5257         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
5258         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
5259         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
5260         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
5261         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
5262         * modules/relocatable: New file.
5263         * modules/relocatable-lib: New file.
5264         * modules/relocatable-script: New file.
5265
5266 2007-02-28  Bruno Haible  <bruno@clisp.org>
5267
5268         Import --enable-relocatable infrastructure.
5269         * build-aux/config.libpath: New file, from GNU gettext.
5270         * build-aux/install-reloc: New file, from GNU gettext.
5271         * build-aux/reloc-ldflags: New file, from GNU gettext.
5272         * lib/relocatable.h: New file, from GNU gettext.
5273         * lib/relocatable.c: New file, from GNU gettext.
5274         * lib/relocwrapper.c: New file, from GNU gettext.
5275         * m4/relocatable.m4: New file, from GNU gettext.
5276
5277 2007-02-28  Bruno Haible  <bruno@clisp.org>
5278
5279         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
5280
5281         * modules/xreadlink: New file, from GNU gettext with modifications.
5282         * lib/xreadlink.c: New file, from GNU gettext.
5283         * lib/xreadlink.h: Add comments.
5284         (xreadlink): New declaration.
5285
5286         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
5287         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
5288         lib/xreadlink-with-size.c.
5289         (configure.ac): Remove gl_XREADLINK invocation.
5290         (Makefile.am): Augment lib_SOURCES.
5291         * m4/xreadlink.m4: Remove file.
5292         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
5293         (xreadlink_with_size): Renamed from xreadink.
5294         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
5295         * modules/canonicalize (Depends-on): Replace xreadlink with
5296         xreadlink-with-size.
5297         * lib/canonicalize.c (canonicalize_filename_mode): Update.
5298
5299 2007-02-25  Jim Meyering  <jim@meyering.net>
5300
5301         * build-aux/announce-gen: When complaining about excess arguments,
5302         list them.
5303
5304 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
5305
5306         * README: Document signed integer overflow situation more
5307         accurately.
5308
5309 2007-02-25  Bruno Haible  <bruno@clisp.org>
5310
5311         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
5312         'a' or 'A' conversion.
5313
5314 2007-02-25  Bruno Haible  <bruno@clisp.org>
5315
5316         * modules/filename: Renamed from modules/pathname.
5317         (Files): Replace lib/pathname.h with lib/filename.h. Replace
5318         lib/concatpath.c with lib/concat-filename.c.
5319         (Makefile.am): Update.
5320         (Include): Replace pathname.h with filename.h.
5321         * lib/filename.h: Renamed from lib/pathname.h.
5322         (concatenated_filename): Renamed from concatenated_pathname.
5323         * lib/concat-filename.c: Renamed from lib/concatpath.c.
5324         (concatenated_filename): Renamed from concatenated_pathname.
5325         * lib/findprog.c: Include filename.h instead of pathname.h.
5326         (find_in_path): Update.
5327         * lib/javacomp.c: Include filename.h instead of pathname.h.
5328         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
5329         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
5330         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
5331         is_oldgcj_14_13_usable, is_javac_usable): Update.
5332         * lib/javaexec.c: Include filename.h instead of pathname.h.
5333         (execute_java_class): Update.
5334         * modules/findprog: Update.
5335         * modules/javacomp: Update.
5336         * modules/javaexec: Update.
5337         * MODULES.html.sh (File system functions): Add 'filename', remove
5338         'pathname'.
5339
5340 2007-02-25  Bruno Haible  <bruno@clisp.org>
5341
5342         * modules/printf-frexpl-tests: New file.
5343         * tests/test-printf-frexpl.c: New file.
5344
5345         * modules/printf-frexpl: New file.
5346         * lib/printf-frexpl.h: New file.
5347         * lib/printf-frexpl.c: New file.
5348         * m4/printf-frexpl.m4: New file.
5349
5350 2007-02-25  Bruno Haible  <bruno@clisp.org>
5351
5352         * modules/printf-frexp-tests: New file.
5353         * tests/test-printf-frexp.c: New file.
5354
5355         * modules/printf-frexp: New file.
5356         * lib/printf-frexp.h: New file.
5357         * lib/printf-frexp.c: New file.
5358         * m4/printf-frexp.m4: New file.
5359
5360 2007-02-25  Bruno Haible  <bruno@clisp.org>
5361
5362         Assume automake >= 1.10 for the tests.
5363         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
5364         * modules/arctwo-tests: Likewise.
5365         * modules/argp-tests: Likewise.
5366         * modules/avltree-list-tests: Likewise.
5367         * modules/avltree-oset-tests: Likewise.
5368         * modules/avltreehash-list-tests: Likewise.
5369         * modules/carray-list-tests: Likewise.
5370         * modules/crc-tests: Likewise.
5371         * modules/des-tests: Likewise.
5372         * modules/gc-arcfour-tests: Likewise.
5373         * modules/gc-arctwo-tests: Likewise.
5374         * modules/gc-des-tests: Likewise.
5375         * modules/gc-hmac-md5-tests: Likewise.
5376         * modules/gc-hmac-sha1-tests: Likewise.
5377         * modules/gc-md2-tests: Likewise.
5378         * modules/gc-md4-tests: Likewise.
5379         * modules/gc-md5-tests: Likewise.
5380         * modules/gc-pbkdf2-sha1-tests: Likewise.
5381         * modules/gc-rijndael-tests: Likewise.
5382         * modules/gc-sha1-tests: Likewise.
5383         * modules/gc-tests: Likewise.
5384         * modules/getaddrinfo-tests: Likewise.
5385         * modules/hmac-md5-tests: Likewise.
5386         * modules/hmac-sha1-tests: Likewise.
5387         * modules/linked-list-tests: Likewise.
5388         * modules/linkedhash-list-tests: Likewise.
5389         * modules/lock-tests: Likewise.
5390         * modules/md2-tests: Likewise.
5391         * modules/md4-tests: Likewise.
5392         * modules/md5-tests: Likewise.
5393         * modules/rbtree-list-tests: Likewise.
5394         * modules/rbtree-oset-tests: Likewise.
5395         * modules/rbtreehash-list-tests: Likewise.
5396         * modules/read-file-tests: Likewise.
5397         * modules/rijndael-tests: Likewise.
5398         * modules/stdint-tests: Likewise.
5399         * modules/tls-tests: Likewise.
5400
5401 2007-02-24  Bruno Haible  <bruno@clisp.org>
5402
5403         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
5404         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
5405         function; instead check whether isnan with a double argument links.
5406         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
5407         function; instead check whether isnan with a 'long double' argument
5408         links.
5409         Reported by Eric Blake <ebb9@byu.net>.
5410
5411 2007-02-24  Bruno Haible  <bruno@clisp.org>
5412
5413         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
5414         defined.
5415         * lib/isnanl.c: Remove all code. Just include isnan.c.
5416         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
5417
5418 2007-02-25  Jim Meyering  <jim@meyering.net>
5419
5420         Avoid conflicting types for 'unsetenv' on FreeBSD.
5421         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
5422         conflicting with FreeBSD's (5.0 and 6.1) function declaration
5423         in stdlib.h.
5424
5425 2007-02-24  Bruno Haible  <bruno@clisp.org>
5426
5427         * modules/isnanl-nolibm-tests: New file.
5428         * tests/test-isnanl.c: New file.
5429
5430         * modules/isnanl-nolibm: New file.
5431         * lib/isnanl.h: New file.
5432         * lib/isnanl.c: New file.
5433         * m4/isnanl.m4: New file.
5434
5435 2007-02-24  Bruno Haible  <bruno@clisp.org>
5436
5437         * modules/isnan-nolibm-tests: New file.
5438         * tests/test-isnan.c: New file.
5439
5440         * modules/isnan-nolibm: New file.
5441         * lib/isnan.h: New file.
5442         * lib/isnan.c: New file.
5443         * m4/isnan.m4: New file.
5444
5445 2007-02-24  Bruno Haible  <bruno@clisp.org>
5446
5447         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
5448         assume that an exponent fits in 20 bits.
5449
5450 2007-02-24  Jim Meyering  <jim@meyering.net>
5451
5452         * m4/regex.m4: Update the description of the configure-time option,
5453         --without-included-regex, to state accurately what the defaults are,
5454         and perhaps to give people an idea why using this option is risky.
5455
5456 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
5457
5458         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
5459         loops on small arguments.  This attempts to avoid the problem
5460         Bruno Haible reported for AIX 4.3.2 in
5461         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
5462
5463 2007-02-23  Bruno Haible  <bruno@clisp.org>
5464
5465         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
5466         Needed for help2man.
5467
5468 2007-02-23  Karl Berry  <karl@gnu.org>
5469
5470         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
5471         exists, foo.h should be cvs-ignored, not committed.
5472
5473 2007-02-23  Eric Blake  <ebb9@byu.net>
5474
5475         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
5476         * lib/stat-time.h (includes): Likewise.
5477         * lib/utimecmp.c (includes): Likewise.
5478         * lib/utimens.h (includes): Likewise.
5479         * lib/getdate.y (includes): Also include "timespec.h" for use
5480         internal to the module.
5481         * modules/utimens (Depends-on): Revert yesterday's patch.
5482         * modules/nanosleep (Depends-on): Add missing dependency.
5483
5484 2007-02-22  Bruno Haible  <bruno@clisp.org>
5485
5486         * lib/glob.c: Don't include getlogin_r.h.
5487
5488 2007-02-22  Jim Meyering  <jim@meyering.net>
5489
5490         * modules/utimens (Depends-on): Add timespec, required for
5491         utimens.h's inclusion of timespec.h.
5492
5493 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
5494
5495         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
5496         long unreadable paths in GNU/Linux.  Problem reported by Andreas
5497         Schwab in
5498         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
5499         I'll try to think of a better way to fix the Solaris problem.
5500
5501         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
5502         like glibc; on Solaris 10, it fails with errno == EINVAL.
5503         POSIX says the behavior is unspecified if the first argument is NULL,
5504         so play it safe and never pass NULL to the system getcwd.
5505
5506 2007-02-21  Jim Meyering  <jim@meyering.net>
5507
5508         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
5509         of gettimeofday.  It would conflict with the one now always
5510         provided via sys_time_.h.  Reported by Matthew Woehlke, as
5511         an IRIX 6.5 build failure.
5512
5513 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
5514
5515         Minor fixups to port to Solaris 10 with Sun C 5.8.
5516         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
5517         * modules/getcwd (Depends-on): Add dirfd.
5518         * lib/putenv.c (putenv): #undef it.
5519         (rpl_putenv): New decl.
5520         (malloc, free): Include <stdlib.h> rather than prototyping separately.
5521
5522 2007-02-20  Bruno Haible  <bruno@clisp.org>
5523
5524         * modules/stdio-tests: New file.
5525         * tests/test-stdio.c: New file.
5526
5527         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
5528         (Depends-on): Add stdio.
5529         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5530         (Include): Use <stdio.h> instead of vsnprintf.h.
5531         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
5532         HAVE_DECL_VSNPRINTF.
5533         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
5534
5535         * modules/snprintf (Files): Remove lib/snprintf.h.
5536         (Depends-on): Add stdio.
5537         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5538         (Include): Use <stdio.h> instead of snprintf.h.
5539         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
5540         HAVE_DECL_SNPRINTF.
5541         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
5542         * lib/getaddrinfo.c: Likewise.
5543
5544         * modules/stdio: New file.
5545         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
5546         * lib/snprintf.h: Remove file.
5547         * lib/vsnprintf.h: Remove file.
5548         * lib/.cppi-disable: Remove snprintf.h.
5549         * m4/stdio_h.m4: New file.
5550         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
5551
5552 2007-02-20  Jim Meyering  <jim@meyering.net>
5553
5554         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
5555         used by e.g., mingw.  From Bruno Haible.
5556
5557 2007-02-19  Bruno Haible  <bruno@clisp.org>
5558
5559         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
5560         warnings.
5561         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5562
5563 2007-02-19  Bruno Haible  <bruno@clisp.org>
5564
5565         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
5566         from mingw users.
5567
5568 2007-02-19  Bruno Haible  <bruno@clisp.org>
5569
5570         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
5571         warnings.
5572         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
5573
5574 2007-02-19  Jim Meyering  <jim@meyering.net>
5575
5576         Don't use FD after a successful "fdopendir (fd)".
5577         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
5578         Reset it by calling dirfd on the just-obtained DIR*.
5579
5580         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
5581         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
5582
5583 2007-02-18  Bruno Haible  <bruno@clisp.org>
5584
5585         * lib/readlink.c: Include <unistd.h>.
5586         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
5587         HAVE_READLINK.
5588         * modules/readlink (Depends-on): Add unistd.
5589         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5590         (Include): Add <unistd.h>.
5591
5592         * lib/getlogin_r.h: Remove file.
5593         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
5594         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
5595         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
5596         HAVE_DECL_GETLOGIN_R.
5597         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
5598         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5599         (Include): Use <unistd.h> instead of getlogin_r.h.
5600
5601         * lib/getcwd.h: Remove file.
5602         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
5603         * lib/xgetcwd.c: Likewise.
5604         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
5605         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
5606         * modules/getcwd (Files): Remove lib/getcwd.h.
5607         (Depends-on): Add unistd.
5608         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5609         (Include): Use <unistd.h> instad of getcwd.h.
5610
5611         * lib/ftruncate.c: Include <unistd.h> first.
5612         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
5613         Set HAVE_FTRUNCATE.
5614         * modules/ftruncate (Depends-on): Add unistd.
5615         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5616
5617         * lib/fchdir.c: Include <unistd.h> first.
5618         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
5619         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
5620         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
5621         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5622         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
5623
5624         * lib/dup2.c: Include <unistd.h> first.
5625         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
5626         HAVE_DUP2.
5627         * modules/dup2 (Depends-on): Add unistd.
5628         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5629
5630         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
5631         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
5632         REPLACE_CHOWN. Don't define chown as a macro here.
5633         * modules/chown (Depends-on): Add unistd.
5634         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5635
5636         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
5637         Add definition for GL_LINK_WARNING.
5638         (chown, dup2): New declarations.
5639         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
5640         link warning.
5641         (ftruncate): New declaration.
5642         (getcwd): New declaration, taken from old getcwd.h.
5643         (getlogin_r): New declaration, taken from old getlogin_r.h.
5644         (readlink): New declaration.
5645         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
5646         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
5647         (gl_PREREQ_UNISTD): Remove macro.
5648         (gl_UNISTD_MODULE_INDICATOR): New macro.
5649         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
5650         many new variables. Don't set UNISTD_H.
5651         * modules/unistd (Description): Change.
5652         (Depends-on): Add link-warning.
5653         (configure.ac): Update.
5654         (Makefile.am): Create unistd.h always. Substitute many new variables
5655         into it.
5656
5657 2007-02-18  Bruno Haible  <bruno@clisp.org>
5658
5659         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
5660         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
5661         HAVE_GETSUBOPT.
5662         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
5663         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
5664         * lib/getsubopt.h: Remove file.
5665         * modules/getsubopt (Files): Remove lib/getsubopt.h.
5666         (Depends-on): Add stdlib.
5667         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5668         (Includes): Use <stdlib.h> instead of getsubopt.h.
5669         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
5670         Set HAVE_GETSUBOPT.
5671         * lib/getsubopt.c: Don't include getsubopt.h.
5672
5673 2007-02-18  Bruno Haible  <bruno@clisp.org>
5674
5675         * modules/fchdir (Depends-on): Add dup2.
5676
5677 2007-02-18  Bruno Haible  <bruno@clisp.org>
5678
5679         * lib/stdlib_.h: Handle glibc's special invocation convention
5680         specially.
5681
5682 2007-02-18  Bruno Haible  <bruno@clisp.org>
5683
5684         * modules/stdlib-tests: New file.
5685         * tests/test-stdlib.c: New file.
5686
5687         * modules/mkstemp (Files): Remove lib/mkstemp.h.
5688         (Depends-on): Add stdlib.
5689         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5690         (Includes): Use <stdlib.h> instead of mkstemp.h.
5691         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5692         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
5693         * lib/mkstemp.c: Don't include mkstemp.h.
5694         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
5695         * lib/stdlib--.h: Don't include mkstemp.h.
5696
5697         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
5698         (Depends-on): Add stdlib.
5699         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5700         (Includes): Use <stdlib.h> instead of mkdtemp.h.
5701         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5702         HAVE_MKDTEMP.
5703         * lib/mkdtemp.c: Don't include mkdtemp.h.
5704         * lib/clean-temp.c: Don't include mkdtemp.h.
5705
5706         * modules/exit (Files): Remove lib/exit.h.
5707         (Depends-on): Add stdlib.
5708         (Makefile.am): Remove lib_SOURCES.
5709         (Include): Use <stdlib.h> instead of exit.h.
5710         * lib/argmatch.c: Don't include exit.h.
5711         * lib/execute.c: Likewise.
5712         * lib/pagealign_alloc.c: Likewise.
5713         * lib/pipe.c: Likewise.
5714         * lib/wait-process.c: Likewise.
5715         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
5716         * lib/exitfail.c: Likewise.
5717         * lib/savewd.c: Likewise.
5718         * lib/xsetenv.c: Likewise.
5719
5720         * modules/stdlib: New file.
5721         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
5722         and extra comments about mkstemp().
5723         * lib/exit.h: Remove file.
5724         * lib/mkdtemp.h: Remove file.
5725         * lib/mkstemp.h: Remove file.
5726         * m4/stdlib_h.m4: New file.
5727         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
5728
5729 2007-02-18  Bruno Haible  <bruno@clisp.org>
5730
5731         * modules/math-tests: New file.
5732         * tests/test-math.c: New file.
5733
5734         * modules/math: New file.
5735         * modules/mathl (Files): Remove lib/mathl.h.
5736         (Depends-on): Add math.
5737         (Makefile.am): Don't mention mathl.h.
5738         (Include): Use <math.h> instead of mathl.h.
5739         * lib/math_.h: New file.
5740         * lib/mathl.h: Remove file.
5741         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
5742         mathl.h.
5743         * lib/asinl.c: Likewise.
5744         * lib/atanl.c: Likewise.
5745         * lib/ceill.c: Likewise.
5746         * lib/cosl.c: Likewise.
5747         * lib/expl.c: Likewise.
5748         * lib/floorl.c: Likewise.
5749         * lib/frexpl.c: Likewise.
5750         * lib/ldexpl.c: Likewise.
5751         * lib/logl.c: Likewise.
5752         * lib/sincosl.c: Likewise.
5753         * lib/sinl.c: Likewise.
5754         * lib/sqrtl.c: Likewise.
5755         * lib/tanl.c: Likewise.
5756         * lib/trigl.c: Likewise.
5757         * m4/math_h.m4: New file.
5758         * MODULES.html.sh (Mathematics): Add math.
5759
5760 2007-02-17  Bruno Haible  <bruno@clisp.org>
5761
5762         * modules/wctype-tests: New file.
5763         * tests/test-wctype.c: New file.
5764
5765         * modules/wchar-tests: New file.
5766         * tests/test-wchar.c: New file.
5767
5768         * modules/unistd-tests: New file.
5769         * tests/test-unistd.c: New file.
5770
5771         * modules/time-tests: New file.
5772         * tests/test-time.c: New file.
5773
5774         * modules/sysexits-tests: New file.
5775         * tests/test-sysexits.c: New file.
5776
5777         * modules/sys_time-tests: New file.
5778         * tests/test-sys_time.c: New file.
5779
5780         * modules/sys_stat-tests: New file.
5781         * tests/test-sys_stat.c: New file.
5782
5783         * modules/sys_socket-tests: New file.
5784         * tests/test-sys_socket.c: New file.
5785
5786         * modules/sys_select-tests: New file.
5787         * tests/test-sys_select.c: New file.
5788
5789         * modules/string-tests: New file.
5790         * tests/test-string.c: New file.
5791
5792         * modules/stdbool-tests: New file.
5793         * tests/test-stdbool.c: New file.
5794
5795         * modules/netinet_in-tests: New file.
5796         * tests/test-netinet_in.c: New file.
5797
5798         * modules/inttypes-tests: New file.
5799         * tests/test-inttypes.c: New file.
5800
5801         * modules/fcntl-tests: New file.
5802         * tests/test-fcntl.c: New file.
5803
5804         * modules/byteswap-tests: New file.
5805         * tests/test-byteswap.c: New file.
5806
5807         * modules/arpa_inet-tests: New file.
5808         * tests/test-arpa_inet.c: New file.
5809
5810 2007-02-17  Bruno Haible  <bruno@clisp.org>
5811
5812         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
5813         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
5814         if the corresponding module is not enabled. Emit link warnings if
5815         the function is used nevertheless.
5816         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
5817         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
5818         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
5819         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
5820         * modules/inttypes (Depends-on): Add link-warning.
5821         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5822         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
5823         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
5824         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
5825         * modules/imaxdiv (configure.ac): Likewise.
5826         * modules/strtoimax (configure.ac): Likewise.
5827         * modules/strtoumax (configure.ac): Likewise.
5828
5829 2007-02-17  Bruno Haible  <bruno@clisp.org>
5830
5831         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
5832         gl_STRING_MODULE_INDICATOR_DEFAULTS.
5833         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
5834         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
5835
5836 2007-02-17  Bruno Haible  <bruno@clisp.org>
5837
5838         * modules/link-warning: New file.
5839         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
5840         * lib/string_.h (GL_LINK_WARNING): Remove definition.
5841         * modules/string (Depends-on): Add link-warning.
5842         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5843         string.h.
5844         * MODULES.html.sh (Support for building libraries and executables): Add
5845         link-warning.
5846
5847 2007-02-17  Bruno Haible  <bruno@clisp.org>
5848
5849         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
5850         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
5851         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
5852         long lines.
5853
5854 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
5855             Bruno Haible  <bruno@clisp.org>
5856
5857         * modules/tmpfile: New file.
5858         * lib/tmpfile.c: New file.
5859         * m4/tmpfile.m4: New file.
5860         * MODULES.html.sh (func_all_modules): New section "Input/output".
5861
5862 2007-02-15  Bruno Haible  <bruno@clisp.org>
5863
5864         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
5865         (supports_delete_on_close): New function.
5866         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
5867
5868 2007-02-14  Bruno Haible  <bruno@clisp.org>
5869
5870         * modules/mbspcasecmp-tests: New file.
5871         * tests/test-mbspcasecmp.sh: New file.
5872         * tests/test-mbspcasecmp.c: New file.
5873
5874         New module mbspcasecmp.
5875         * modules/mbspcasecmp: New file.
5876         * lib/mbspcasecmp.c: New file.
5877         * lib/string_.h (strncasecmp): Change warning message.
5878         (mbspcasecmp): New declaration.
5879         * m4/mbspcasecmp.m4: New file.
5880         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5881         GNULIB_MBSPCASECMP.
5882         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
5883         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
5884
5885 2007-02-14  Bruno Haible  <bruno@clisp.org>
5886
5887         * modules/mbsncasecmp-tests: New file.
5888         * tests/test-mbsncasecmp.sh: New file.
5889         * tests/test-mbsncasecmp.c: New file.
5890
5891         New module mbsncasecmp.
5892         * modules/mbsncasecmp: New file.
5893         * lib/mbsncasecmp.c: New file.
5894         * lib/string_.h (mbsncasecmp): New declaration.
5895         * m4/mbsncasecmp.m4: New file.
5896         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5897         GNULIB_MBSNCASECMP.
5898         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
5899         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
5900
5901 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
5902
5903         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
5904         Verify that it doesn't overlap with our flags.
5905         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
5906         do not have the desired effect in multibyte locales; instead, use
5907         mbscasecmp.
5908         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
5909         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
5910         we don't require GNU fnmatch ourselves (if our users require it, they
5911         should do so explicitly).
5912
5913         Fix regex code so it doesn't rely on strcasecmp.
5914         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
5915         Otherwise, include gnulib's langinfo.h.
5916         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
5917         undesirable behavior in non-C locales.  Instead, rely on localecharset.
5918         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
5919         * modules/regex (FILES): Remove m4/codeset.m4.
5920         (Depends-on): Add localcharset.  Remove strcase.
5921
5922 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5923
5924         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
5925         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
5926
5927 2007-02-13  Bruno Haible  <bruno@clisp.org>
5928
5929         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
5930         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5931
5932 2007-02-12  Bruno Haible  <bruno@clisp.org>
5933
5934         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
5935         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
5936         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
5937         time warning rather than a link error.
5938
5939 2007-02-12  Bruno Haible  <bruno@clisp.org>
5940
5941         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
5942         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
5943         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5944
5945 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5946
5947         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
5948         args, not 2.
5949
5950 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5951
5952         New module 'time', so that apps can include <time.h> as per
5953         POSIX and GNU instead of separate include files like time_r.h
5954         and timegm.h.  This implementation tries out a simpler approach
5955         for replacing decls in standard include files (as compared to
5956         the string module), somewhat as an experiment.
5957
5958         * config/srclist.txt: Comment out mktime.c for now.
5959         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
5960         since it doesn't apply any more.  Use generic wording instead.
5961         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
5962         'time'.
5963         * lib/time_.h, m4/time_h.m4, modules/time: New files.
5964         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
5965         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
5966         Don't include <sys/types.h>; no longer needed since we assume C89.
5967         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
5968         * lib/strftime.c: Likewise.
5969         * lib/time_r.c: Likewise.
5970         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
5971         * lib/nanosleep.c: Include <time.h> first, to check interface.
5972         * lib/strptime.c: Likewise.
5973         * lib/time_r.c: Likewise.
5974         * lib/timegm.c: Likewise.
5975         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
5976         needed.
5977         * lib/timegm.c: Don't include timegm.h; no longer needed.
5978         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
5979         time.h now handles any problems in that area.
5980         (struct timespec, nanosleep): Remove; time.h now arranges for these.
5981         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
5982         that time.h defines struct timespec.
5983         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
5984         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
5985         handles that.
5986         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
5987         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
5988         needed.  Set REPLACE_LOCALTIME.
5989         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
5990         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
5991         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
5992         nanosleep; time_h.m4 now does that.  Don't require
5993         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
5994         module handles this now.
5995         * modules/getdate (Depends-on): Remove timespec.  Add time.
5996         * modules/nanosleep (Depends-on): Likewise.
5997         * modules/stat-time (Depends-on): Likewise.
5998         * modules/nanosleep (Include): Include time.h, not timespec.h.
5999         * modules/strptime (Files): Remove lib/strptime.h.
6000         (Depends-on): Add extensions, time.
6001         (Include): Include time.h, not strptime.h.
6002         * modules/time_r (Files): Remove lib/time_r.h.
6003         (Depends-on): Add time.
6004         (Include): Include time.h, not time_r.h.
6005         * modules/timegm: Likewise.
6006         * modules/timespec (Description): Now does timespec-related decls
6007         of our own, instead of struct timespec itself.
6008         (Depends-on): Add time; remove extensions.
6009         (Maintainer): Add self.
6010         * modules/utimecmp (Depends-on): Add time; remove timespec.
6011         * modules/utimens (Depends-on): Likewise.
6012         * modules/xnanosleep (Depends-on): Likewise.
6013
6014 2007-02-11  Bruno Haible  <bruno@clisp.org>
6015
6016         * lib/c-strstr.c: Include allocsa.h.
6017         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6018         * lib/c-strcasestr.c: Include allocsa.h.
6019         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6020         * lib/strcasestr.c: Include allocsa.h.
6021         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6022         * lib/mbsstr.c: Include allocsa.h.
6023         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6024         allocsa/freesa instead of malloc/free.
6025         * lib/mbscasestr.c: Include allocsa.h.
6026         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6027         allocsa/freesa instead of malloc/free.
6028         * modules/c-strstr (Depends-on): Add allocsa.
6029         * modules/c-strcasestr (Depends-on): Likewise.
6030         * modules/strcasestr (Depends-on): Likewise.
6031         * modules/mbsstr (Depends-on): Likewise.
6032         * modules/mbscasestr (Depends-on): Likewise.
6033
6034 2007-02-11  Bruno Haible  <bruno@clisp.org>
6035
6036         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
6037
6038         * modules/mbsspn-tests: New file.
6039         * tests/test-mbsspn.sh: New file.
6040         * tests/test-mbsspn.c: New file.
6041
6042 2007-02-11  Bruno Haible  <bruno@clisp.org>
6043
6044         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
6045
6046         * modules/mbspbrk-tests: New file.
6047         * tests/test-mbspbrk.sh: New file.
6048         * tests/test-mbspbrk.c: New file.
6049
6050 2007-02-11  Bruno Haible  <bruno@clisp.org>
6051
6052         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
6053         unneeded cast.
6054
6055         * modules/mbscspn-tests: New file.
6056         * tests/test-mbscspn.sh: New file.
6057         * tests/test-mbscspn.c: New file.
6058
6059 2007-02-11  Bruno Haible  <bruno@clisp.org>
6060
6061         * modules/mbscasecmp-tests: New file.
6062         * tests/test-mbscasecmp.sh: New file.
6063         * tests/test-mbscasecmp.c: New file.
6064
6065 2007-02-11  Bruno Haible  <bruno@clisp.org>
6066
6067         Ensure O(n) worst-case complexity of mbscasestr.
6068         * lib/mbscasestr.c: Include stdbool.h.
6069         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6070         functions.
6071         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
6072         the bookkeeping indicates that it's worth it.
6073         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
6074
6075         * modules/mbscasestr-tests: New file.
6076         * tests/test-mbscasestr1.c: New file.
6077         * tests/test-mbscasestr2.sh: New file.
6078         * tests/test-mbscasestr2.c: New file.
6079         * tests/test-mbscasestr3.sh: New file.
6080         * tests/test-mbscasestr3.c: New file.
6081         * tests/test-mbscasestr4.sh: New file.
6082         * tests/test-mbscasestr4.c: New file.
6083         * m4/locale-tr.m4: New file.
6084
6085 2007-02-11  Bruno Haible  <bruno@clisp.org>
6086
6087         Ensure O(n) worst-case complexity of mbsstr.
6088         * lib/mbsstr.c: Include stdbool.h.
6089         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6090         functions.
6091         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
6092         bookkeeping indicates that it's worth it.
6093         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
6094
6095         * modules/mbsstr-tests: New file.
6096         * tests/test-mbsstr1.c: New file.
6097         * tests/test-mbsstr2.sh: New file.
6098         * tests/test-mbsstr2.c: New file.
6099         * tests/test-mbsstr3.sh: New file.
6100         * tests/test-mbsstr3.c: New file.
6101         * m4/locale-fr.m4: New file.
6102
6103 2007-02-11  Bruno Haible  <bruno@clisp.org>
6104
6105         * lib/mbsrchr.c (mbsrchr): Fix bug.
6106
6107         * modules/mbsrchr-tests: New file.
6108         * tests/test-mbsrchr.sh: New file.
6109         * tests/test-mbsrchr.c: New file.
6110
6111 2007-02-11  Bruno Haible  <bruno@clisp.org>
6112
6113         * lib/mbschr.c (mbschr): Fix bug.
6114
6115         * modules/mbschr-tests: New file.
6116         * tests/test-mbschr.sh: New file.
6117         * tests/test-mbschr.c: New file.
6118         * m4/locale-zh.m4: New file.
6119
6120 2007-02-11  Bruno Haible  <bruno@clisp.org>
6121
6122         Support for copying multibyte string iterators.
6123         * lib/mbiter.h: Include <string.h>.
6124         (mbiter_multi_copy): New function.
6125         (mbi_copy): New macro.
6126         * lib/mbuiter.h: Include <string.h>.
6127         (mbuiter_multi_copy): New function.
6128         (mbui_copy): New macro.
6129
6130 2007-02-11  Bruno Haible  <bruno@clisp.org>
6131
6132         New module mbslen.
6133         * modules/mbslen: New file.
6134         * lib/mbslen.c: New file.
6135         * lib/string_.h (mbslen): New declaration.
6136         * m4/mbslen.m4: New file.
6137         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6138         GNULIB_MBSLEN.
6139         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
6140         * MODULES.html.sh (Internationalization functions): Add mbslen.
6141
6142 2007-02-11  Bruno Haible  <bruno@clisp.org>
6143
6144         Ensure O(n) worst-case complexity of strcasestr substitute.
6145         * lib/strcasestr.c: Include stdbool.h.
6146         (knuth_morris_pratt): New function.
6147         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6148         bookkeeping indicates that it's worth it.
6149         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
6150
6151         * modules/strcasestr-tests: New file.
6152         * tests/test-strcasestr.c: New file.
6153
6154 2007-02-11  Bruno Haible  <bruno@clisp.org>
6155
6156         Ensure O(n) worst-case complexity of c_strcasestr.
6157         * lib/c-strcasestr.c: Include stdbool.h, string.h.
6158         (knuth_morris_pratt): New function.
6159         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
6160         the bookkeeping indicates that it's worth it.
6161         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
6162
6163         * modules/c-strcasestr-tests: New file.
6164         * tests/test-c-strcasestr.c: New file.
6165
6166 2007-02-11  Bruno Haible  <bruno@clisp.org>
6167
6168         Ensure O(n) worst-case complexity of c_strstr.
6169         * lib/c-strstr.c: Include stdbool.h, string.h.
6170         (knuth_morris_pratt): New function.
6171         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6172         bookkeeping indicates that it's worth it.
6173         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
6174
6175         * lib/c-strstr.c: Complete rewrite for maintainability.
6176
6177         * modules/c-strstr-tests: New file.
6178         * tests/test-c-strstr.c: New file.
6179
6180 2007-02-11  Bruno Haible  <bruno@clisp.org>
6181
6182         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
6183         5.2.1 and earlier, whereby \055 was treated just like the range
6184         delimiter '-'.
6185         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
6186
6187 2007-02-08  Bruno Haible  <bruno@clisp.org>
6188
6189         * modules/regex (Depends-on): Add stdbool.
6190         Reported by Dalibor Topic <robilad@kaffe.org>.
6191
6192 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
6193
6194         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
6195         Prefer returning from main to exiting from it.
6196         Remove unnecessary parens after sizeof.
6197
6198 2007-02-05  Bruno Haible  <bruno@clisp.org>
6199
6200         New module mbssep.
6201         * modules/mbssep: New file.
6202         * lib/mbssep.c: New file.
6203         * lib/string_.h (strsep): Add a conditional link warning.
6204         (mbssep): New declaration.
6205         * m4/mbssep.m4: New file.
6206         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6207         GNULIB_MBSSEP.
6208         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
6209         * MODULES.html.sh (Internationalization functions): Add mbssep.
6210
6211 2007-02-05  Bruno Haible  <bruno@clisp.org>
6212
6213         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
6214         Optimize search in case of 1 delimiter.
6215
6216 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6217
6218         * lib/acl.h: Include sys/types.h before sys/acl.h.
6219
6220 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6221
6222         Merge upstream fix for glibc bugzilla #3957:
6223
6224         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
6225
6226         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
6227         bit for RE_HAT_LISTS_NOT_NEWLINE.
6228         (build_charclass_op): Remove bogus comment.
6229
6230 2007-02-05  Simon Josefsson  <simon@josefsson.org>
6231
6232         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
6233
6234 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6235
6236         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
6237         * lib/memmem.c [!defined _LIBC]: Include config.h.
6238
6239 2007-02-04  Bruno Haible  <bruno@clisp.org>
6240
6241         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
6242         warning message.
6243
6244 2007-02-04  Bruno Haible  <bruno@clisp.org>
6245
6246         New module mbstok_r.
6247         * modules/mbstok_r: New file.
6248         * lib/mbstok_r.c: New file.
6249         * lib/string_.h (strtok_r): Change argument names to match the
6250         comments. Add a conditional link warning.
6251         (mbstok_r): New declaration.
6252         * m4/mbstok_r.m4: New file.
6253         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6254         GNULIB_MBSTOK_R.
6255         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
6256         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
6257
6258 2007-02-04  Bruno Haible  <bruno@clisp.org>
6259
6260         New module mbsspn.
6261         * modules/mbsspn: New file.
6262         * lib/mbsspn.c: New file.
6263         * lib/string_.h (strspn): Add a conditional link warning.
6264         (mbsspn): New declaration.
6265         * m4/mbsspn.m4: New file.
6266         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6267         GNULIB_MBSSPN.
6268         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
6269         * MODULES.html.sh (Internationalization functions): Add mbsspn.
6270
6271 2007-02-04  Bruno Haible  <bruno@clisp.org>
6272
6273         New module mbspbrk.
6274         * modules/mbspbrk: New file.
6275         * lib/mbspbrk.c: New file.
6276         * lib/string_.h (strpbrk): Add a conditional link warning.
6277         (mbspbrk): New declaration.
6278         * m4/mbspbrk.m4: New file.
6279         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6280         GNULIB_MBSPBRK.
6281         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
6282         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
6283
6284 2007-02-04  Bruno Haible  <bruno@clisp.org>
6285
6286         New module mbscspn.
6287         * modules/mbscspn: New file.
6288         * lib/mbscspn.c: New file.
6289         * lib/string_.h (strcspn): Add a conditional link warning.
6290         (mbscspn): New declaration.
6291         * m4/mbscspn.m4: New file.
6292         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6293         GNULIB_MBSCSPN.
6294         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
6295         * MODULES.html.sh (Internationalization functions): Add mbscspn.
6296
6297 2007-02-04  Bruno Haible  <bruno@clisp.org>
6298
6299         New module mbscasestr, reduced goal of strcasestr.
6300         * modules/mbscasestr: New file.
6301         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
6302         (mbscasestr): Renamed from strcasestr.
6303         * lib/strcasestr.c: Don't include mbuiter.h.
6304         (strcasestr): Remove support for multibyte locales.
6305         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
6306         Change the conditional link warning.
6307         (mbscasestr): New declaration.
6308         * m4/mbscasestr.m4: New file.
6309         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
6310         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
6311         REPLACE_STRCASESTR.
6312         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
6313         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6314         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6315         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
6316         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
6317         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6318         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
6319         (Depends-on): Remove mbuiter.
6320         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
6321
6322 2007-02-04  Bruno Haible  <bruno@clisp.org>
6323
6324         Simplify handling of strncasecmp.
6325         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
6326         the conditional link warning.
6327         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6328         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
6329         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
6330         * modules/strcase (configure.ac): Don't invoke
6331         gl_STRING_MODULE_INDICATOR.
6332         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
6333
6334 2007-02-04  Bruno Haible  <bruno@clisp.org>
6335
6336         New module mbscasecmp, reduced goal of strcasecmp.
6337         * modules/mbscasecmp: New file.
6338         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
6339         (mbscasecmp): Renamed from strcasecmp.
6340         * lib/strcasecmp.c: Don't include mbuiter.h.
6341         (strcasecmp): Remove support for multibyte locales.
6342         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
6343         Change the conditional link warning.
6344         (mbscasecmp): New declaration.
6345         * m4/mbscasecmp.m4: New file.
6346         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
6347         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
6348         REPLACE_STRCASECMP.
6349         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
6350         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6351         GNULIB_MBSCASECMP.
6352         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
6353         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
6354         * modules/strcase (Files): Remove m4/mbrtowc.m4.
6355         (Depends-on): Remove mbuiter.
6356         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
6357
6358 2007-02-04  Bruno Haible  <bruno@clisp.org>
6359
6360         New module mbsstr. Remove module strstr.
6361         * modules/mbsstr: New file.
6362         * modules/strstr: Remove file.
6363         * lib/mbsstr.c: Renamed from lib/strstr.c.
6364         (mbsstr): Renamed from strstr.
6365         * lib/string_.h (strstr): Remove declaration. Change the conditional
6366         link warning.
6367         (mbsstr): New declaration.
6368         * m4/mbsstr.m4: New file.
6369         * m4/strstr.m4: Remove file.
6370         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
6371         REPLACE_STRSTR.
6372         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
6373         Don't initialize GNULIB_STRSTR.
6374         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
6375         substitute GNULIB_STRSTR and REPLACE_STRSTR.
6376         * MODULES.html.sh (Internationalization functions): Add mbsstr.
6377         (Support for systems lacking ANSI C 89): Remove strstr.
6378
6379 2007-02-04  Bruno Haible  <bruno@clisp.org>
6380
6381         New module mbsrchr.
6382         * modules/mbsrchr: New file.
6383         * lib/mbsrchr.c: New file.
6384         * lib/string_.h (strrchr): Add a conditional link warning.
6385         (mbsrchr): New declaration.
6386         * m4/mbsrchr.m4: New file.
6387         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6388         GNULIB_MBSRCHR.
6389         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
6390         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
6391
6392 2007-02-04  Bruno Haible  <bruno@clisp.org>
6393
6394         New module mbschr.
6395         * modules/mbschr: New file.
6396         * lib/mbschr.c: New file.
6397         * lib/string_.h (strchr): Add a conditional link warning.
6398         (mbschr): New declaration.
6399         * m4/mbschr.m4: New file.
6400         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6401         GNULIB_MBSCHR.
6402         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
6403         * MODULES.html.sh (Internationalization functions): Add mbschr.
6404
6405 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6406
6407         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
6408
6409         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
6410
6411 2007-02-04  Bruno Haible  <bruno@clisp.org>
6412
6413         New module description section 'configure.ac-early'.
6414         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
6415         (func_get_autoconf_early_snippet): New function.
6416         (func_import, func_create_testdir): Use it. Remove special cases for
6417         modules 'extensions' and 'lock'.
6418         * modules/extensions (configure.ac-early): Require
6419         gl_USE_SYSTEM_EXTENSIONS.
6420         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
6421
6422 2007-02-04  Bruno Haible  <bruno@clisp.org>
6423
6424         Make use of gcj-4.3's -fsource and -ftarget option.
6425         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
6426         and if so try the options -fsource and -ftarget.
6427         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
6428         source_version, ftarget_option, target_version arguments.
6429         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
6430         (is_envjavac_oldgcj_14_14_usable): Renamed from
6431         is_envjavac_gcj_14_14_usable.
6432         (is_envjavac_oldgcj_14_13_usable): Renamed from
6433         is_envjavac_gcj_14_13_usable.
6434         (is_gcj_present): Update.
6435         (is_gcj_43, is_gcj43_usable): New functions.
6436         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
6437         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
6438         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
6439         try the options -fsource and -ftarget.
6440
6441 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
6442
6443         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
6444         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
6445         larger value.
6446
6447 2007-02-03  Jim Meyering  <jim@meyering.net>
6448
6449         Give tools a better chance to allocate space for very large buffers.
6450         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
6451
6452         Make pwd and readlink work also when run with an unreadable parent dir
6453         on systems with openat support.
6454         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
6455         provided getcwd function, even when we have openat support.
6456         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
6457
6458 2007-02-02  Bruno Haible  <bruno@clisp.org>
6459
6460         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6461         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
6462         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
6463         portability problems if one of these functions is only used on specific
6464         platforms.
6465         Reported by Paul Eggert.
6466
6467 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
6468
6469         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
6470         is causing more trouble than it's curing.
6471         * lib/regex_internal.h (__mempcpy): Remove.
6472         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
6473         (and make the code a tad smaller to boot).
6474         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
6475
6476 2007-02-02  Jim Meyering  <jim@meyering.net>
6477
6478         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
6479         section, not in the Makefile.am: one.
6480
6481 2007-02-02  Eric Blake  <ebb9@byu.net>
6482
6483         * lib/strchrnul.c: Always include config.h first.
6484
6485         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
6486         gnulib strstr is not necessary here.
6487
6488 2007-02-02  Simon Josefsson  <simon@josefsson.org>
6489
6490         * m4/socklen.m4: Fix typo.
6491
6492 2007-02-02  Eric Blake  <ebb9@byu.net>
6493
6494         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
6495         * modules/netinet_in (Makefile.am): Likewise.
6496
6497 2007-02-01  Bruno Haible  <bruno@clisp.org>
6498
6499         * lib/string_.h (GL_LINK_WARNING): New macro.
6500         (strcasecmp, strstr, strcasestr): If provided by the system,
6501         conditionally define as a macro that leads to a warning instead of to
6502         an error.
6503         (strncasecmp): Conditionally define as a macro that leads to a warning.
6504
6505 2007-02-01  Karl Berry  <karl@gnu.org>
6506
6507         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
6508
6509 2007-02-01  Bruno Haible  <bruno@clisp.org>
6510
6511         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
6512         renamings.
6513
6514 2007-02-01  Eric Blake  <ebb9@byu.net>
6515
6516         * modules/regex (Depends-on): Revert dependence on mempcpy.
6517         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
6518         module's definition of mempcpy.
6519         Reported by Paul Eggert.
6520
6521 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
6522
6523         * lib/string_.h: If the gnulib module XYZ is not present, undefine
6524         the symbol XYZ before redefining it.  This fixes a problem with
6525         programs that don't use XYZ, when compiled on systems that define
6526         XYZ to something else.
6527
6528 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
6529
6530         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
6531         occurs when "mkdir -m foo" creates a setgid directory that is (1)
6532         writeable to group or other and (2) is intended to have a special
6533         mode bit that is set or cleared.  In such a case, the directory
6534         should be neither group- nor other-writeable until the special
6535         mode bits are right.
6536
6537 2007-01-31  Eric Blake  <ebb9@byu.net>
6538
6539         * modules/mountlist (Depends-on): Add strstr.
6540
6541         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
6542         bug.
6543         * modules/string (Makefile.am): Remove redundant replacement.
6544         * modules/regex (Depends-on): Add mempcpy.
6545
6546 2007-01-31  Bruno Haible  <bruno@clisp.org>
6547
6548         New module description field 'Link'.
6549         * gnulib-tool (func_usage): Document --extract-link-directive.
6550         (sed_extract_prog): Recognize 'Link' directive.
6551         (func_get_link_directive): New function.
6552         (func_import): Show summary of link directives.
6553         Handle --extract-link-directive option.
6554         * modules/acl (Link): New section.
6555         * modules/clock-time (Link): New section.
6556         * modules/euidaccess (Link): New section.
6557         * modules/gettext (Link): New section.
6558         * modules/iconv (Link): New section.
6559         * modules/lock (Link): New section.
6560         * modules/nanosleep (Link): New section.
6561         * modules/readline (Link): New section.
6562
6563 2007-01-27  Bruno Haible  <bruno@clisp.org>
6564
6565         Enforce the use of gnulib modules for unportable <string.h> functions.
6566         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
6567         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
6568         (gl_HEADER_STRING_H_BODY): Require it.
6569         * lib/string_.h: If the gnulib module XYZ is not present, redefine
6570         the symbol XYZ to one that gives a link error.
6571         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
6572         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
6573         * modules/mempcpy (configure.ac): Likewise.
6574         * modules/memrchr (configure.ac): Likewise.
6575         * modules/stpcpy (configure.ac): Likewise.
6576         * modules/stpncpy (configure.ac): Likewise.
6577         * modules/strcase (configure.ac): Likewise.
6578         * modules/strcasestr (configure.ac): Likewise.
6579         * modules/strchrnul (configure.ac): Likewise.
6580         * modules/strdup (configure.ac): Likewise.
6581         * modules/strndup (configure.ac): Likewise.
6582         * modules/strnlen (configure.ac): Likewise.
6583         * modules/strpbrk (configure.ac): Likewise.
6584         * modules/strsep (configure.ac): Likewise.
6585         * modules/strstr (configure.ac): Likewise.
6586         * modules/strtok_r (configure.ac): Likewise.
6587
6588 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
6589
6590         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
6591
6592 2007-01-30  Jim Meyering  <jim@meyering.net>
6593
6594         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
6595
6596 2007-01-29  Bruno Haible  <bruno@clisp.org>
6597
6598         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
6599         * lib/execute.c: Likewise.
6600         * lib/pipe.c: Likewise.
6601         * lib/printf-args.h: Likewise.
6602         * lib/printf-args.c: Likewise.
6603         * lib/printf-parse.c: Likewise.
6604         * lib/vasnprintf.c: Likewise.
6605
6606 2007-01-29  Eric Blake  <ebb9@byu.net>
6607
6608         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
6609         declaration.
6610
6611 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
6612
6613         * lib/strptime.h (strptime): Use 'restrict' for args where
6614         POSIX requires this.
6615         * lib/strptime.c (strptime): Likewise.
6616         Change license notice from LGPL to GPL, since gnulib-tool will
6617         change this as needed.
6618         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
6619         defined.
6620         Include "strptime.h" first, to check interface.
6621         Do not #undef _LIBC and _NL_CURRENT.
6622         Do not include <stdlib.h>; no longer needed.
6623         Include "time_r.h" and declare ptime_locale_status
6624         only if _LIBC is not defined.
6625         (__P): Remove unused macro.
6626         (match_string): Bring back glibc version, but use it only if _LIBC
6627         is defined.
6628         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
6629         Remove unnecessary assertion and abort() call.
6630         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
6631         * m4/strptime.m4: Fix serial number comment.
6632         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
6633         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
6634         (Depends-on): Add time_r.
6635
6636 2007-01-29  Bruno Haible  <bruno@clisp.org>
6637
6638         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
6639         strptime.
6640         * modules/strptime (Depends-on): Add stdbool.
6641         * lib/strptime.h: Include <time.h> always. Add comments.
6642
6643 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
6644
6645         * modules/strptime: New file.
6646         * lib/strptime.h: New file.
6647         * lib/strptime.c: New file.
6648         * m4/strptime.m4: New file.
6649
6650 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
6651
6652         * MODULES.html.sh: New module mpsort.
6653         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
6654
6655         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
6656         a circularity problem with HP-UX ia64 reported by Bob Proulx in
6657         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
6658         All uses changed.
6659         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
6660         All uses changed.
6661         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
6662         to _Restrict_.
6663         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
6664         the parameter matches the prototype.
6665
6666 2007-01-28  Jim Meyering  <jim@meyering.net>
6667
6668         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
6669         sys/time.h here, reverting that part of the previous patch:
6670         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
6671
6672 2007-01-28  Bruno Haible  <bruno@clisp.org>
6673
6674         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
6675         value of $(SYS_TIME_H).
6676         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
6677         remove it conditionally, too. [added by Jim Meyering]
6678         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
6679         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6680         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
6681         GETTIMEOFDAY_REPLACEMENT to 1.
6682
6683 2007-01-28  Bruno Haible  <bruno@clisp.org>
6684
6685         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
6686         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
6687         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
6688         Set UNISTD_H instead of UNISTD_H2.
6689         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
6690
6691 2007-01-28  Bruno Haible  <bruno@clisp.org>
6692
6693         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
6694         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
6695
6696 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6697
6698         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
6699         (func_create_testdir): Ensure C locale for `grep' and `tr'
6700         character ranges.
6701         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
6702         ACLOCAL_AMFLAGS parsing state machine.
6703
6704 2007-01-27  Bruno Haible  <bruno@clisp.org>
6705
6706         * modules/unistr/base: Update.
6707
6708 2007-01-27  Bruno Haible  <bruno@clisp.org>
6709
6710         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
6711         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
6712         * modules/unistr/u32-mbtouc-unsafe: Renamed from
6713         modules/unistr/u32-mbtouc.
6714         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
6715         * lib/unistr.h: Update.
6716         * lib/linebreak.c: Update.
6717         * modules/unistr/u32-mbtouc: Renamed from
6718         modules/unistr/u32-mbtouc-safe.
6719         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
6720         * lib/unistr.h: Update.
6721         * lib/unistr/u32-to-u8.c: Update.
6722         * lib/unistr/u32-to-u16.c: Update.
6723
6724 2007-01-27  Bruno Haible  <bruno@clisp.org>
6725
6726         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
6727         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
6728         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
6729         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
6730         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
6731         * modules/unistr/u16-mbtouc-unsafe: Renamed from
6732         modules/unistr/u16-mbtouc.
6733         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
6734         * lib/unistr.h: Update.
6735         * lib/linebreak.c: Update.
6736         * modules/linebreak: Update.
6737         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
6738         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
6739         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
6740         * modules/unistr/u16-mbtouc: Renamed from
6741         modules/unistr/u16-mbtouc-safe.
6742         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
6743         * lib/unistr.h: Update.
6744         * lib/unistr/u16-to-u8.c: Update.
6745         * modules/unistr/u16-to-u8: Update.
6746         * lib/unistr/u16-to-u32.c: Update.
6747         * modules/unistr/u16-to-u32: Update.
6748
6749 2007-01-27  Bruno Haible  <bruno@clisp.org>
6750
6751         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
6752         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
6753         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
6754         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
6755         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
6756         * modules/unistr/u8-mbtouc-unsafe: Renamed from
6757         modules/unistr/u8-mbtouc.
6758         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
6759         * lib/unistr.h: Update.
6760         * lib/striconveh.c: Update.
6761         * modules/striconveh: Update.
6762         * lib/linebreak.c: Update.
6763         * modules/linebreak: Update.
6764         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
6765         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
6766         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
6767         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
6768         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
6769         * lib/unistr.h: Update.
6770         * lib/striconveh.c: Update.
6771         * modules/striconveh: Update.
6772         * lib/unistr/u8-to-u16.c: Update.
6773         * modules/unistr/u8-to-u16: Update.
6774         * lib/unistr/u8-to-u32.c: Update.
6775         * modules/unistr/u8-to-u32: Update.
6776
6777 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6778
6779         Sync from Libtool.
6780         * lib/argz.c: Do not include strings.h nor memory.h, include
6781         string.h unconditionally.  Patch by Simon Josefsson.
6782
6783 2007-01-27  Bruno Haible  <bruno@clisp.org>
6784
6785         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
6786         from gl_HEADER_STRING_H_BODY.
6787         (gl_HEADER_STRING_H_BODY): Require it.
6788         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
6789         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
6790         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
6791         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
6792         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
6793         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
6794         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
6795         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
6796         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
6797         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
6798         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
6799         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
6800         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
6801         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
6802         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6803
6804 2007-01-27  Bruno Haible  <bruno@clisp.org>
6805
6806         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
6807         check_PROGRAMS into noinst_PROGRAMS.
6808         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
6809         check_PROGRAMS in this case.
6810         (func_import): Set for_test to false.
6811         (func_create_testdir): Set for_test to true.
6812
6813 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
6814             Bruno Haible  <bruno@clisp.org>
6815
6816         * modules/strcasestr (Files): Remove lib/strcasestr.h.
6817         (Depends-on): Add string.
6818         (Includes): Use <string.h> instead of strcasestr.h.
6819         * modules/string (Makefile.am): Also substitute the value of
6820         REPLACE_STRCASESTR.
6821         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
6822         assume strcasestr is declared in <string.h> not <strings.h>. Also
6823         set REPLACE_STRCASESTR.
6824         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
6825         REPLACE_STRCASESTR.
6826         * lib/strcasestr.h: Remove file.
6827         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
6828         * lib/string_.h (strcasestr): New declaration.
6829
6830 2007-01-27  Bruno Haible  <bruno@clisp.org>
6831
6832         * lib/string_.h: Use 'extern'.
6833
6834 2007-01-27  Jim Meyering  <jim@meyering.net>
6835
6836         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
6837         of set-but-not-used local, "q".
6838
6839         * lib/mempcpy.c: Include <config.h> before <string.h>.
6840         This fixes a compilation error on HP-UX, due to the system's
6841         "restrict"-using mempcpy prototype.
6842
6843 2007-01-26  Bruno Haible  <bruno@clisp.org>
6844
6845         Small optimization.
6846         * lib/javacomp.c: Include c-strstr.h.
6847          (is_envjavac_gcj): Use c_strstr instead of strstr.
6848         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
6849
6850 2007-01-26  Bruno Haible  <bruno@clisp.org>
6851
6852         * MODULES.html.sh (Unicode string functions): Add the new modules.
6853
6854         * modules/uniconv/u32-strconv-to-locale: New file.
6855         * lib/uniconv/u32-strconv-to-locale.c: New file.
6856
6857         * modules/uniconv/u16-strconv-to-locale: New file.
6858         * lib/uniconv/u16-strconv-to-locale.c: New file.
6859
6860         * modules/uniconv/u8-strconv-to-locale: New file.
6861         * lib/uniconv/u8-strconv-to-locale.c: New file.
6862
6863         * modules/uniconv/u32-strconv-from-locale: New file.
6864         * lib/uniconv/u32-strconv-from-locale.c: New file.
6865
6866         * modules/uniconv/u16-strconv-from-locale: New file.
6867         * lib/uniconv/u16-strconv-from-locale.c: New file.
6868
6869         * modules/uniconv/u8-strconv-from-locale: New file.
6870         * lib/uniconv/u8-strconv-from-locale.c: New file.
6871
6872         * modules/uniconv/u32-strconv-to-enc: New file.
6873         * lib/uniconv/u32-strconv-to-enc.c: New file.
6874         * modules/uniconv/u32-strconv-to-enc-tests: New file.
6875         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
6876
6877         * modules/uniconv/u16-strconv-to-enc: New file.
6878         * lib/uniconv/u16-strconv-to-enc.c: New file.
6879         * lib/uniconv/u-strconv-to-enc.h: New file.
6880         * modules/uniconv/u16-strconv-to-enc-tests: New file.
6881         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
6882
6883         * modules/uniconv/u8-strconv-to-enc: New file.
6884         * lib/uniconv/u8-strconv-to-enc.c: New file.
6885         * modules/uniconv/u8-strconv-to-enc-tests: New file.
6886         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
6887
6888         * modules/uniconv/u32-strconv-from-enc: New file.
6889         * lib/uniconv/u32-strconv-from-enc.c: New file.
6890         * modules/uniconv/u32-strconv-from-enc-tests: New file.
6891         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
6892
6893         * modules/uniconv/u16-strconv-from-enc: New file.
6894         * lib/uniconv/u16-strconv-from-enc.c: New file.
6895         * modules/uniconv/u16-strconv-from-enc-tests: New file.
6896         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
6897
6898         * modules/uniconv/u8-strconv-from-enc: New file.
6899         * lib/uniconv/u8-strconv-from-enc.c: New file.
6900         * lib/uniconv/u-strconv-from-enc.h: New file.
6901         * modules/uniconv/u8-strconv-from-enc-tests: New file.
6902         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
6903
6904         * modules/uniconv/u32-conv-from-enc: New file.
6905         * lib/uniconv/u32-conv-from-enc.c: New file.
6906         * modules/uniconv/u32-conv-from-enc-tests: New file.
6907         * tests/uniconv/test-u32-conv-from-enc.c: New file.
6908
6909         * modules/uniconv/u16-conv-from-enc: New file.
6910         * lib/uniconv/u16-conv-from-enc.c: New file.
6911         * lib/uniconv/u-conv-from-enc.h: New file.
6912         * modules/uniconv/u16-conv-from-enc-tests: New file.
6913         * tests/uniconv/test-u16-conv-from-enc.c: New file.
6914
6915         * modules/uniconv/u8-conv-from-enc: New file.
6916         * lib/uniconv/u8-conv-from-enc.c: New file.
6917         * modules/uniconv/u8-conv-from-enc-tests: New file.
6918         * tests/uniconv/test-u8-conv-from-enc.c: New file.
6919
6920         * modules/uniconv/base: New file.
6921         * lib/uniconv.h: New file.
6922
6923 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
6924
6925         * doc/gnulib-tool.texi (Initial import): Update to match current
6926         behavior with strdup module.
6927         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
6928         * lib/memmem.h: Remove; all uses removed.  This is now done
6929         by <string.h>.
6930         * lib/mempcpy.h: Likewise.
6931         * lib/memrchr.h: Likewise.
6932         * lib/stpcpy.h: Likewise.
6933         * lib/stpncpy.h: Likewise.
6934         * lib/strcase.h: Likewise.
6935         * lib/strchrnul.h: Likewise.
6936         * lib/strdup.h: Likewise.
6937         * lib/strndup.h: Likewise.
6938         * lib/strnlen.h: Likewise.
6939         * lib/strpbrk.h: Likewise.
6940         * lib/strsep.h: Likewise.
6941         * lib/strstr.h: Likewise.
6942         * lib/strtok_r.h: Likewise.
6943         * lib/string_.h: New file.
6944         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
6945         Rely on <string.h> instead.
6946         * lib/canon-host.c: Likewise.
6947         * lib/chdir-long.c: Likewise.
6948         * lib/concatpath.c: Likewise.
6949         * lib/exclude.c: Likewise.
6950         * lib/fchdir.c: Likewise.
6951         * lib/getaddrinfo.c: Likewise.
6952         * lib/getcwd.c: Likewise.
6953         * lib/getsubopt.c: Likewise.
6954         * lib/glob.c: Likewise.
6955         * lib/hard-locale.c: Likewise.
6956         * lib/iconvme.c: Likewise.
6957         * lib/javacomp.c: Likewise.
6958         * lib/mempcpy.c: Likewise.
6959         * lib/memrchr.c: Likewise.
6960         * lib/regex_internal.h: Likewise.
6961         * lib/stpncpy.c: Likewise.
6962         * lib/strcasecmp.c: Likewise.
6963         * lib/strchrnul.c: Likewise.
6964         * lib/strdup.c: Likewise.
6965         * lib/striconv.c: Likewise.
6966         * lib/striconveh.c: Likewise.
6967         * lib/striconveha.c: Likewise.
6968         * lib/strncasecmp.c: Likewise.
6969         * lib/strndup.c: Likewise.
6970         * lib/strnlen.c: Likewise.
6971         * lib/strsep.c: Likewise.
6972         * lib/strstr.c: Likewise.
6973         * lib/strtok_r.c: Likewise.
6974         * lib/userspec.c: Likewise.
6975         * lib/w32spawn.h: Likewise.
6976         * lib/xstrndup.c: Likewise.
6977         * lib/mountlist.c (strstr): Remove decl.
6978         * m4/string_h.m4: New file.
6979         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
6980         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
6981         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
6982         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
6983         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
6984         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
6985         Set REPLACE_STRCASECMP if necessary.
6986         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
6987         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
6988         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
6989         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
6990         HAVE_DECL_STRDUP if necessary.
6991         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
6992         since gl_FUNC_STRNDUP does that now.
6993         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
6994         Check for decl here...
6995         (gl_PREREQ_STRNLEN): ... not here.
6996         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
6997         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
6998         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
6999         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
7000         necessary.
7001         * modules/string: New file.
7002         * modules/memmem (Files): Remove special-purpose include file.
7003         (Depends-on): Add string.
7004         (Include): Include <string.h>, not the removed file.
7005         * modules/mempcpy: Likewise.
7006         * modules/memrchr: Likewise.
7007         * modules/stpcpy: Likewise.
7008         * modules/stpncpy: Likewise.
7009         * modules/strcase: Likewise.
7010         * modules/strchrnul: Likewise.
7011         * modules/strdup: Likewise.
7012         * modules/strndup: Likewise.
7013         * modules/strnlen: Likewise.
7014         * modules/strpbrk: Likewise.
7015         * modules/strsep: Likewise.
7016         * modules/strstr: Likewise.
7017         * modules/strtok_r: Likewise.
7018         * tests/test-dirname.c: Don't include "strdup.h", since
7019         <string.h> now suffices.
7020         * tests/test-memmem.c: Don't include "memmem.h", since
7021         <string.h> now suffices.
7022
7023 2007-01-25  Bruno Haible  <bruno@clisp.org>
7024
7025         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
7026         *resultp is 0.
7027
7028         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
7029         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
7030         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
7031         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
7032
7033         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
7034         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
7035         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
7036         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
7037         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
7038         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
7039
7040 2007-01-24  Bruno Haible  <bruno@clisp.org>
7041
7042         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
7043         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
7044         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
7045         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
7046         gl_FUNC_FTS_CORE.
7047         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
7048         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
7049         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
7050         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
7051         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
7052         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
7053         gl_FUNC_FCHOWNAT.
7054         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
7055         gl_FUNC_STRFTIME.
7056         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
7057         Reported by Ralf Wildenhues.
7058
7059 2007-01-24  Bruno Haible  <bruno@clisp.org>
7060
7061         Drop AC_REQUIRE calls that are redundant with the module dependencies.
7062         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
7063         gl_GETADDRINFO.
7064         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
7065         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
7066         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
7067
7068 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
7069
7070         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
7071         Don't use 'exit'; just return from 'main'.
7072         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
7073
7074         * lib/fnmatch_.h: Readjust white space and comments to match
7075         glibc, to avoid spurious diffs.
7076
7077 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7078
7079         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
7080         2004-12-01 change by Jakub Jelinek, since this code won't compile
7081         if !LIBC.  Problem reported by Bob Proulx.
7082
7083 2007-01-23  Bruno Haible  <bruno@clisp.org>
7084
7085         * lib/striconveh.c: Include c-strcaseeq.h.
7086         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
7087         * modules/striconveh (Depends-on): Add c-strcaseeq.
7088
7089 2007-01-23  Bruno Haible  <bruno@clisp.org>
7090
7091         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
7092
7093         * modules/c-strcaseeq: New file.
7094         * lib/c-strcaseeq.h: New file.
7095
7096         * modules/streq: New file.
7097         * lib/streq.h: New file.
7098
7099 2007-01-23  Bruno Haible  <bruno@clisp.org>
7100
7101         * modules/striconveha-tests: New file.
7102         * tests/test-striconveha.c: New file.
7103
7104         * lib/striconveha.h: Include <stdbool.h>.
7105         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
7106         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
7107         (mem_iconveha_notranslit): Renamed from mem_iconveha.
7108         (mem_iconveha): New function.
7109         (str_iconveha_notranslit): Renamed from str_iconveha.
7110         (str_iconveha): New function.
7111         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
7112         c-strcase.
7113
7114 2007-01-23  Bruno Haible  <bruno@clisp.org>
7115
7116         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
7117         encodings without forgiving before trying any encoding with handler.
7118         (str_iconveha): Try all encodings without forgiving before trying any
7119         encoding with handler.
7120
7121 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7122
7123         Import the following changes from libc.
7124
7125         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7126
7127         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
7128
7129         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
7130
7131         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
7132         normal_bracket label.
7133
7134         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
7135
7136         [BZ #361]
7137         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
7138         to normal_bracket after fetching the next character.
7139
7140 2007-01-22  Bruno Haible  <bruno@clisp.org>
7141
7142         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
7143         argument.
7144         * lib/striconveh.c (iconv_carefully_1): New function.
7145         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
7146         argument.
7147         (str_cd_iconveh): Update.
7148         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
7149         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
7150         * tests/test-striconveh.c (MAGIC): New macro.
7151         (new_offsets): New function.
7152         (main): Test call with and without offsets.
7153
7154 2007-01-22  Bruno Haible  <bruno@clisp.org>
7155
7156         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
7157         * modules/sys_select (Makefile.am): Likewise.
7158         * modules/sys_socket (Makefile.am): Likewise.
7159         * modules/sys_time (Makefile.am): Likewise.
7160
7161 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7162
7163         * modules/gettimeofday (License): Change from GPL to LGPL, since
7164         gettimeofday is a library function.
7165
7166 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7167
7168         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
7169
7170 2007-01-21  Bruno Haible  <bruno@clisp.org>
7171
7172         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
7173
7174 2007-01-21  Bruno Haible  <bruno@clisp.org>
7175
7176         * modules/striconveha: New file.
7177         * lib/striconveha.h: New file.
7178         * lib/striconveha.c: New file.
7179         * MODULES.html.sh (Internationalization functions): Add striconveha.
7180         * lib/striconv.c (str_iconv): Optimize the case of an empty input
7181         string.
7182         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
7183
7184 2007-01-21  Bruno Haible  <bruno@clisp.org>
7185
7186         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
7187         * lib/striconveh.c (str_iconveh): Likewise.
7188
7189 2007-01-21  Bruno Haible  <bruno@clisp.org>
7190
7191         * lib/striconveh.h (mem_iconveh): New declaration.
7192         * lib/striconveh.c (mem_iconveh): New function.
7193         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
7194
7195 2007-01-21  Bruno Haible  <bruno@clisp.org>
7196
7197         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
7198
7199         * lib/striconveh.h (mem_cd_iconveh): Change specification.
7200         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
7201         original result buffer.
7202         (str_cd_iconveh): Update.
7203         * tests/test-striconveh.c (main): Update.
7204
7205         * lib/striconv.h (mem_cd_iconv): Change specification.
7206         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
7207         result buffer.
7208         (str_cd_iconv): Update.
7209         * tests/test-striconv.c (main): Update.
7210
7211 2007-01-21  Bruno Haible  <bruno@clisp.org>
7212
7213         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
7214
7215 2007-01-20  Jim Meyering  <jim@meyering.net>
7216
7217         * lib/userspec.c (parse_with_separator): If a user or group string
7218         starts with "+", skip the corresponding name-to-ID look-up, since
7219         such a look-up must fail: user and group names may not include "+".
7220
7221 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
7222
7223         * lib/poll.c: Include sys/time.h and time.h unconditionally,
7224         since we now assume the sys_time module.
7225         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
7226         check for sys/time.h; no longer needed.
7227         * modules/poll (Depends-on): Depend on sys_time.
7228
7229 2007-01-18  Bruno Haible  <bruno@clisp.org>
7230
7231         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
7232         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7233
7234         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
7235         gettimeofday.
7236
7237         * tests/test-gettimeofday.c: Include <time.h>.
7238         (dummy): Remove variable.
7239
7240         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
7241         gl_HEADER_SYS_TIME_H.
7242         (gl_HEADER_SYS_TIME_H): New macro.
7243
7244         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
7245         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7246         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
7247         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
7248         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7249         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
7250         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
7251         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7252         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
7253         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
7254         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7255
7256         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
7257         last change; it caused a compilation error when cross-compiling to
7258         Cygwin.
7259
7260 2007-01-18  Jim Meyering  <jim@meyering.net>
7261
7262         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
7263         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
7264         than the race-prone "test -d sys || mkdir sys".
7265         (configure.ac): Use AC_PROG_MKDIR_P.
7266         * modules/sys_select: Likewise.
7267         * modules/sys_socket: Likewise.
7268         * modules/sys_time: Likewise.
7269
7270 2007-01-18  Eric Blake  <ebb9@byu.net>
7271
7272         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
7273         replace gettimeofday.
7274         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
7275         name, to avoid infinite recursion.
7276
7277 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
7278
7279         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
7280         module sys_time.
7281         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
7282         assume timespec.h defines struct timeval.
7283         * lib/settime.c: Likewise.
7284         * lib/utimens.c: Likewise.
7285         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
7286         since we now assume the gettimeofday module.
7287         * lib/tempname.c (__gen_tempname): Likewise.
7288         * lib/gettimeofday.h: Remove.
7289         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
7290         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
7291         Include <time.h>, for 'time()'.
7292         (localtime_buffer_addr): Also use this workaround if
7293         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
7294         to simplify the uses.  All uses changed.
7295         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
7296         that #undef is inside {}, and 'const' follows type name consistently.
7297         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
7298         (gettimeofday): Do not use the maximum possible value for
7299         tv->tv_usec, since that might break usages other than ls.c.
7300         Instead, we'll leave ls.c alone.  This undoes today's patch
7301         by Bruno.  Add a compile-time warning for 1s-clock resolution;
7302         we've never observed the problem but might as well keep the
7303         canary.
7304         * lib/nanosleep.c: Include timespec.h first, for interface check.
7305         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
7306         now assume the sys_time module.
7307         * lib/tempname.c: Likewise.
7308         * lib/timespec.h: Likewise.
7309         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
7310         needed.
7311         * lib/strftime.c: Likewise.
7312         * lib/timespec.h: Likewise.
7313         * lib/posixtm.c: Include posixtm.h first, for interface check.
7314         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
7315         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
7316         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
7317         * lib/sys_time_.h: New file.
7318         * lib/timespec.h (struct timespec): Use long int, not long.
7319         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7320         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
7321         Remove obsolescent call to AC_HEADER_TIME.
7322         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
7323         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7324         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7325         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
7326         Likewise.
7327         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
7328         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
7329         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
7330         into the sys_time module.  Check for gettimeofday just once.
7331         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
7332         for gettimeofday signature to just check the signature.  Merely
7333         compile it, since linking doesn't test signature.  Improve test for
7334         whether gettimeofday.o is actually needed.
7335         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
7336         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
7337         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
7338         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7339         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
7340         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
7341         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
7342         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
7343         than worrying about sys/time.h.
7344         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7345         Don't bother worrying about TIME_WITH_SYS_TIME.
7346         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
7347         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
7348         * m4/sys_time_h.m4: New file.
7349         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
7350         Don't include sys/time.h.  Return from main rather than exiting.
7351         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
7352         all uses changed.
7353         * modules/gethrxtime (Depends-on): Add sys_time.
7354         * modules/gettime (Depends-on): Likewise.
7355         * modules/gettimeofday (Depends-on): Likewise.
7356         * modules/nanosleep (Depends-on): Likewise.
7357         * modules/settime (Depends-on): Likewise.
7358         * modules/tempname (Depends-on): Likewise.
7359         * modules/utimens (Depends-on): Likewise.
7360         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
7361         (Include:) Change back to <sys/time.h>.
7362         (Maintainer:) Add self.
7363         * modules/sys_time: New file.
7364         * modules/tempname (Depends-on): Add gettimeofday.
7365         * tests/test-gettimeofday.c: Include <sys/time.h>
7366         rather than gettimeofday.h.
7367
7368 2007-01-17  Bruno Haible  <bruno@clisp.org>
7369
7370         * gnulib-tool (func_get_license): Revert last patch. Instead, let
7371         the license default to GPL.
7372         (func_create_testdir): Don't complain if a module is LGPL and its
7373         tests module depends on GPLed modules.
7374
7375 2007-01-17  Bruno Haible  <bruno@clisp.org>
7376
7377         * lib/gettimeofday.c (gettimeofday): Add code for the case
7378         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
7379         maximum possible value for tv->tv_usec, rather than the minimum one.
7380
7381 2005-10-08  Martin Lambers  <marlam@marlam.de>
7382 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7383 2007-01-16  Bruno Haible  <bruno@clisp.org>
7384
7385         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
7386         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
7387         gl_FUNC_GETTIMEOFDAY.
7388         (Include): Add gettimeofday.h.
7389         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
7390         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
7391         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
7392         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
7393         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
7394         * lib/gettimeofday.h: New file.
7395         * lib/gettimeofday.c: Include <sys/timeb.h>.
7396         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
7397         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7398         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
7399         fall back on time().
7400
7401         * tests/test-gettimeofday.c: New file.
7402         * modules/gettimeofday-tests: New file.
7403
7404 2007-01-16  Eric Blake  <ebb9@byu.net>
7405
7406         * modules/fnmatch (Depends-on): Depend on wchar.
7407         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
7408         * m4/fnmatch.m4: Likewise.
7409         * modules/mbchar (Makefile.am): Assume <wchar.h>.
7410         * m4/mbchar.m4: Likewise.
7411         * modules/mbswidth (Depends-on): Depend on wchar.
7412         * lib/mbswidth.c: Assume <wchar.h>.
7413         * m4/mbswidth.m4: Likewise.
7414         * modules/quotearg (Depends-on): Depend on wchar.
7415         * lib/quotearg.c: Assume <wchar.h>.
7416         * m4/quotearg.m4: Likewise.
7417         * modules/regex (Depends-on): Depend on wchar.
7418         * lib/regex_internal.h: Assume <wchar.h>.
7419         * m4/regex.m4: Likewise.
7420         * modules/stdint (Depends-on): Depend on wchar.
7421         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
7422         * m4/stdint.m4: Likewise.
7423         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
7424         * modules/strftime (Depends-on): Depend on wchar.
7425         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
7426         * modules/strtol (Depends-on): Depend on wchar.
7427         * lib/strtol.c: Assume <wchar.h>.
7428         * modules/wcwidth (Depends-on): Depend on wchar.
7429         * lib/wcwidth.h: Assume <wchar.h>.
7430         * m4/wcwidth.m4: Likewise.
7431
7432 2007-01-16  Bruno Haible  <bruno@clisp.org>
7433
7434         * modules/csharpexec-script: New, created from...
7435         * modules/csharpexec: ... this.
7436
7437 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
7438
7439         * modules/javaexec-script: New, created from...
7440         * modules/javaexec: ... this.
7441
7442 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7443
7444         * modules/poll (Dependencies): Add sys_select.
7445
7446 2007-01-15  Jim Meyering  <jim@meyering.net>
7447
7448         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
7449         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
7450         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
7451         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
7452
7453 2007-01-15  Bruno Haible  <bruno@clisp.org>
7454
7455         * modules/striconveh: New file.
7456         * lib/striconveh.h: New file.
7457         * lib/striconveh.c: New file.
7458         * MODULES.html.sh (Internationalization functions): Add striconveh.
7459
7460         * modules/striconveh-tests: New file.
7461         * tests/test-striconveh.c: New file.
7462
7463 2007-01-15  Bruno Haible  <bruno@clisp.org>
7464
7465         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
7466         not from GNU libiconv or GNU libc.
7467
7468 2007-01-15  Bruno Haible  <bruno@clisp.org>
7469
7470         * doc/gnulib-intro.texi (Copyright): Explain the different license
7471         terms for module descriptions, autoconf macros, tests, documentation.
7472
7473 2007-01-14  Bruno Haible  <bruno@clisp.org>
7474
7475         * modules/striconv-tests: New file.
7476         * tests/test-striconv.c: New file.
7477
7478 2007-01-14  Bruno Haible  <bruno@clisp.org>
7479
7480         * modules/iconv-tests: New file.
7481         * tests/test-iconv.c: New file.
7482
7483 2007-01-14  Bruno Haible  <bruno@clisp.org>
7484
7485         * gnulib-tool (func_get_license): For test modules, use the license of
7486         the main module.
7487
7488 2007-01-14  Bruno Haible  <bruno@clisp.org>
7489
7490         * modules/iconv (Include): Clarify that <iconv.h> can only be included
7491         if iconv is found to exist.
7492
7493 2007-01-14  Bruno Haible  <bruno@clisp.org>
7494
7495         * modules/c-ctype-tests: New file.
7496         * tests/test-c-ctype.c: New file.
7497
7498 2007-01-14  Bruno Haible  <bruno@clisp.org>
7499
7500         * modules/binary-io-tests: New file.
7501         * tests/test-binary-io.sh: New file.
7502         * tests/test-binary-io.c: New file.
7503
7504 2007-01-14  Bruno Haible  <bruno@clisp.org>
7505
7506         * modules/array-oset-tests: New file.
7507         * tests/test-array_oset.c: New file.
7508
7509 2007-01-14  Bruno Haible  <bruno@clisp.org>
7510
7511         * modules/array-list-tests: New file.
7512         * tests/test-array_list.c: New file.
7513
7514 2007-01-14  Bruno Haible  <bruno@clisp.org>
7515
7516         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
7517         and make.
7518         Reported by Simon Josefsson in
7519         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
7520
7521 2007-01-14  Bruno Haible  <bruno@clisp.org>
7522
7523         * modules/allocsa-tests: New file.
7524         * tests/test-allocsa.c: New file.
7525
7526 2007-01-14  Bruno Haible  <bruno@clisp.org>
7527
7528         * modules/fchdir (Depends-on): Add absolute-header.
7529         * modules/unistd (Depends-on): Likewise.
7530
7531 2006-12-30  Bruno Haible  <bruno@clisp.org>
7532
7533         * modules/fchdir: New file.
7534         * modules/unistd (Files): Add lib/unistd_.h.
7535         (Makefile.am): Generate unistd.h from unistd_.h.
7536         * lib/fchdir.c: New file.
7537         * lib/dirent_.h: New file.
7538         * lib/unistd_.h: New file.
7539         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
7540         * m4/fchdir.m4: New file.
7541         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
7542         (gl_HEADER_UNISTD): Invoke it.
7543         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
7544         function.
7545         * lib/backupfile.c (opendir, closedir): Undefine.
7546         * lib/chown.c (open, close): Undefine.
7547         * lib/clean-temp.c (open, close): Undefine.
7548         * lib/copy-file.c (open, close): Undefine.
7549         * lib/execute.c (open, close): Undefine.
7550         * lib/fsusage.c (open, close): Undefine.
7551         * lib/gc-gnulib.c (open, close): Undefine.
7552         * lib/getcwd.c (opendir, closedir): Undefine.
7553         * lib/glob.c (opendir, closedir): Undefine.
7554         * lib/javacomp.c (open, close): Undefine.
7555         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
7556         * lib/openat-proc.c (open, close): Undefine.
7557         * lib/pagealign_alloc.c (open, close): Undefine.
7558         * lib/pipe.c (open, close): Undefine.
7559         * lib/progreloc.c (open, close): Undefine.
7560         * lib/savedir.c (opendir, closedir): Undefine.
7561         * lib/utime.c (open, close): Undefine.
7562         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
7563
7564 2007-01-10  Bruno Haible  <bruno@clisp.org>
7565
7566         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
7567
7568 2007-01-12  Eric Blake  <ebb9@byu.net>
7569
7570         Provide a robust <wchar.h>.  Further simplifications are now
7571         possible in other modules, but not included here.
7572         * modules/wchar: New module.
7573         * m4/wchar.m4: New file.
7574         * lib/wchar_.h: Likewise.
7575         * modules/mbchar (Depends-on): Depend on wchar, as the first use
7576         of the new module.
7577         * MODULES.html.sh (Extended multibyte and wide character utilities):
7578         New section.
7579
7580 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
7581
7582         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
7583         to a reasonable default for memory allocation.
7584         (xreadlink): Don't allocate a huge buffer, to work around a buggy
7585         file system that reports garbage st_size values for symlinks.
7586         Problem reported by Liyang Hu.
7587
7588 2007-01-11  Simon Josefsson  <simon@josefsson.org>
7589
7590         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
7591         Emacs .#* auto-save files).
7592
7593 2007-01-11  Bruno Haible  <bruno@clisp.org>
7594
7595         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
7596         directory.
7597
7598 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7599
7600         Use @...@ consistently in lib/wctype_.h.
7601         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
7602         on it being set to 1 or 0.
7603         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
7604         go back to AC_SUBSTing it.
7605         * modules/wctype (Makefile.am): Undo previous change.
7606
7607 2007-01-10  Eric Blake  <ebb9@byu.net>
7608
7609         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
7610         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
7611         * modules/wctype (Makefile.am): Likewise.
7612         Reported by Chris McGuire.
7613
7614 2007-01-10  Jim Meyering  <jim@meyering.net>
7615
7616         fts.c: a small readability/maintainability improvement
7617         * lib/fts.c (fts_read): Make this code slightly more readable and
7618         maintainable by hoisting the "sp->fts_cur = p" assignments to
7619         immediately follow the statements that set P.  Derived from
7620         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
7621
7622 2007-01-10  Eric Blake  <ebb9@byu.net>
7623
7624         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
7625         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
7626         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
7627         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
7628         Reported by Chris McGuire.
7629
7630 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7631
7632         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
7633         in sed script.
7634
7635 2007-01-09  Bruno Haible  <bruno@clisp.org>
7636
7637         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
7638         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
7639         variables.
7640         (func_module): Use them.
7641
7642 2007-01-09  Bruno Haible  <bruno@clisp.org>
7643
7644         * modules/unistr/base: New file.
7645         * lib/unistr.h: New file.
7646
7647         * modules/unistr/u8-to-u16: New file.
7648         * lib/unistr/u8-to-u16.c: New file.
7649
7650         * modules/unistr/u8-to-u32: New file.
7651         * lib/unistr/u8-to-u32.c: New file.
7652
7653         * modules/unistr/u16-to-u8: New file.
7654         * lib/unistr/u16-to-u8.c: New file.
7655
7656         * modules/unistr/u16-to-u32: New file.
7657         * lib/unistr/u16-to-u32.c: New file.
7658
7659         * modules/unistr/u32-to-u8: New file.
7660         * lib/unistr/u32-to-u8.c: New file.
7661
7662         * modules/unistr/u32-to-u16: New file.
7663         * lib/unistr/u32-to-u16.c: New file.
7664
7665         * modules/unistr/u8-check: New file.
7666         * modules/unistr/u16-check: New file.
7667         * modules/unistr/u32-check: New file.
7668         * lib/unistr/u8-check.c: New file.
7669         * lib/unistr/u16-check.c: New file.
7670         * lib/unistr/u32-check.c: New file.
7671
7672         * modules/unistr/u8-chr: New file.
7673         * modules/unistr/u16-chr: New file.
7674         * modules/unistr/u32-chr: New file.
7675         * lib/unistr/u8-chr.c: New file.
7676         * lib/unistr/u16-chr.c: New file.
7677         * lib/unistr/u32-chr.c: New file.
7678
7679         * modules/unistr/u8-cmp: New file.
7680         * modules/unistr/u16-cmp: New file.
7681         * modules/unistr/u32-cmp: New file.
7682         * lib/unistr/u8-cmp.c: New file.
7683         * lib/unistr/u16-cmp.c: New file.
7684         * lib/unistr/u32-cmp.c: New file.
7685
7686         * modules/unistr/u8-cpy: New file.
7687         * modules/unistr/u16-cpy: New file.
7688         * modules/unistr/u32-cpy: New file.
7689         * lib/unistr/u8-cpy.c: New file.
7690         * lib/unistr/u16-cpy.c: New file.
7691         * lib/unistr/u32-cpy.c: New file.
7692         * lib/unistr/u-cpy.h: New file.
7693
7694         * modules/unistr/u8-cpy-alloc: New file.
7695         * modules/unistr/u16-cpy-alloc: New file.
7696         * modules/unistr/u32-cpy-alloc: New file.
7697         * lib/unistr/u8-cpy-alloc.c: New file.
7698         * lib/unistr/u16-cpy-alloc.c: New file.
7699         * lib/unistr/u32-cpy-alloc.c: New file.
7700         * lib/unistr/u-cpy-alloc.h: New file.
7701
7702         * modules/unistr/u8-endswith: New file.
7703         * modules/unistr/u16-endswith: New file.
7704         * modules/unistr/u32-endswith: New file.
7705         * lib/unistr/u8-endswith.c: New file.
7706         * lib/unistr/u16-endswith.c: New file.
7707         * lib/unistr/u32-endswith.c: New file.
7708         * lib/unistr/u-endswith.h: New file.
7709
7710         * modules/unistr/u8-mblen: New file.
7711         * modules/unistr/u16-mblen: New file.
7712         * modules/unistr/u32-mblen: New file.
7713         * lib/unistr/u8-mblen.c: New file.
7714         * lib/unistr/u16-mblen.c: New file.
7715         * lib/unistr/u32-mblen.c: New file.
7716
7717         * modules/unistr/u8-mbtouc: New file.
7718         * modules/unistr/u16-mbtouc: New file.
7719         * modules/unistr/u32-mbtouc: New file.
7720         * lib/unistr/u8-mbtouc.c: New file.
7721         * lib/unistr/u16-mbtouc.c: New file.
7722         * lib/unistr/u32-mbtouc.c: New file.
7723
7724         * modules/unistr/u8-mbtouc-safe: New file.
7725         * modules/unistr/u16-mbtouc-safe: New file.
7726         * modules/unistr/u32-mbtouc-safe: New file.
7727         * lib/unistr/u8-mbtouc-safe.c: New file.
7728         * lib/unistr/u16-mbtouc-safe.c: New file.
7729         * lib/unistr/u32-mbtouc-safe.c: New file.
7730
7731         * modules/unistr/u8-move: New file.
7732         * modules/unistr/u16-move: New file.
7733         * modules/unistr/u32-move: New file.
7734         * lib/unistr/u8-move.c: New file.
7735         * lib/unistr/u16-move.c: New file.
7736         * lib/unistr/u32-move.c: New file.
7737         * lib/unistr/u-move.h: New file.
7738
7739         * modules/unistr/u8-next: New file.
7740         * modules/unistr/u16-next: New file.
7741         * modules/unistr/u32-next: New file.
7742         * lib/unistr/u8-next.c: New file.
7743         * lib/unistr/u16-next.c: New file.
7744         * lib/unistr/u32-next.c: New file.
7745
7746         * modules/unistr/u8-prev: New file.
7747         * modules/unistr/u16-prev: New file.
7748         * modules/unistr/u32-prev: New file.
7749         * lib/unistr/u8-prev.c: New file.
7750         * lib/unistr/u16-prev.c: New file.
7751         * lib/unistr/u32-prev.c: New file.
7752
7753         * modules/unistr/u8-set: New file.
7754         * modules/unistr/u16-set: New file.
7755         * modules/unistr/u32-set: New file.
7756         * lib/unistr/u8-set.c: New file.
7757         * lib/unistr/u16-set.c: New file.
7758         * lib/unistr/u32-set.c: New file.
7759         * lib/unistr/u-set.h: New file.
7760
7761         * modules/unistr/u8-startswith: New file.
7762         * modules/unistr/u16-startswith: New file.
7763         * modules/unistr/u32-startswith: New file.
7764         * lib/unistr/u8-startswith.c: New file.
7765         * lib/unistr/u16-startswith.c: New file.
7766         * lib/unistr/u32-startswith.c: New file.
7767         * lib/unistr/u-startswith.h: New file.
7768
7769         * modules/unistr/u8-stpcpy: New file.
7770         * modules/unistr/u16-stpcpy: New file.
7771         * modules/unistr/u32-stpcpy: New file.
7772         * lib/unistr/u8-stpcpy.c: New file.
7773         * lib/unistr/u16-stpcpy.c: New file.
7774         * lib/unistr/u32-stpcpy.c: New file.
7775         * lib/unistr/u-stpcpy.h: New file.
7776
7777         * modules/unistr/u8-stpncpy: New file.
7778         * modules/unistr/u16-stpncpy: New file.
7779         * modules/unistr/u32-stpncpy: New file.
7780         * lib/unistr/u8-stpncpy.c: New file.
7781         * lib/unistr/u16-stpncpy.c: New file.
7782         * lib/unistr/u32-stpncpy.c: New file.
7783         * lib/unistr/u-stpncpy.h: New file.
7784
7785         * modules/unistr/u8-strcat: New file.
7786         * modules/unistr/u16-strcat: New file.
7787         * modules/unistr/u32-strcat: New file.
7788         * lib/unistr/u8-strcat.c: New file.
7789         * lib/unistr/u16-strcat.c: New file.
7790         * lib/unistr/u32-strcat.c: New file.
7791         * lib/unistr/u-strcat.h: New file.
7792
7793         * modules/unistr/u8-strchr: New file.
7794         * modules/unistr/u16-strchr: New file.
7795         * modules/unistr/u32-strchr: New file.
7796         * lib/unistr/u8-strchr.c: New file.
7797         * lib/unistr/u16-strchr.c: New file.
7798         * lib/unistr/u32-strchr.c: New file.
7799
7800         * modules/unistr/u8-strcmp: New file.
7801         * modules/unistr/u16-strcmp: New file.
7802         * modules/unistr/u32-strcmp: New file.
7803         * lib/unistr/u8-strcmp.c: New file.
7804         * lib/unistr/u16-strcmp.c: New file.
7805         * lib/unistr/u32-strcmp.c: New file.
7806
7807         * modules/unistr/u8-strcpy: New file.
7808         * modules/unistr/u16-strcpy: New file.
7809         * modules/unistr/u32-strcpy: New file.
7810         * lib/unistr/u8-strcpy.c: New file.
7811         * lib/unistr/u16-strcpy.c: New file.
7812         * lib/unistr/u32-strcpy.c: New file.
7813         * lib/unistr/u-strcpy.h: New file.
7814
7815         * modules/unistr/u8-strcspn: New file.
7816         * modules/unistr/u16-strcspn: New file.
7817         * modules/unistr/u32-strcspn: New file.
7818         * lib/unistr/u8-strcspn.c: New file.
7819         * lib/unistr/u16-strcspn.c: New file.
7820         * lib/unistr/u32-strcspn.c: New file.
7821         * lib/unistr/u-strcspn.h: New file.
7822
7823         * modules/unistr/u8-strdup: New file.
7824         * modules/unistr/u16-strdup: New file.
7825         * modules/unistr/u32-strdup: New file.
7826         * lib/unistr/u8-strdup.c: New file.
7827         * lib/unistr/u16-strdup.c: New file.
7828         * lib/unistr/u32-strdup.c: New file.
7829         * lib/unistr/u-strdup.h: New file.
7830
7831         * modules/unistr/u8-strlen: New file.
7832         * modules/unistr/u16-strlen: New file.
7833         * modules/unistr/u32-strlen: New file.
7834         * lib/unistr/u8-strlen.c: New file.
7835         * lib/unistr/u16-strlen.c: New file.
7836         * lib/unistr/u32-strlen.c: New file.
7837         * lib/unistr/u-strlen.h: New file.
7838
7839         * modules/unistr/u8-strmblen: New file.
7840         * modules/unistr/u16-strmblen: New file.
7841         * modules/unistr/u32-strmblen: New file.
7842         * lib/unistr/u8-strmblen.c: New file.
7843         * lib/unistr/u16-strmblen.c: New file.
7844         * lib/unistr/u32-strmblen.c: New file.
7845
7846         * modules/unistr/u8-strmbtouc: New file.
7847         * modules/unistr/u16-strmbtouc: New file.
7848         * modules/unistr/u32-strmbtouc: New file.
7849         * lib/unistr/u8-strmbtouc.c: New file.
7850         * lib/unistr/u16-strmbtouc.c: New file.
7851         * lib/unistr/u32-strmbtouc.c: New file.
7852
7853         * modules/unistr/u8-strncat: New file.
7854         * modules/unistr/u16-strncat: New file.
7855         * modules/unistr/u32-strncat: New file.
7856         * lib/unistr/u8-strncat.c: New file.
7857         * lib/unistr/u16-strncat.c: New file.
7858         * lib/unistr/u32-strncat.c: New file.
7859         * lib/unistr/u-strncat.h: New file.
7860
7861         * modules/unistr/u8-strncmp: New file.
7862         * modules/unistr/u16-strncmp: New file.
7863         * modules/unistr/u32-strncmp: New file.
7864         * lib/unistr/u8-strncmp.c: New file.
7865         * lib/unistr/u16-strncmp.c: New file.
7866         * lib/unistr/u32-strncmp.c: New file.
7867
7868         * modules/unistr/u8-strncpy: New file.
7869         * modules/unistr/u16-strncpy: New file.
7870         * modules/unistr/u32-strncpy: New file.
7871         * lib/unistr/u8-strncpy.c: New file.
7872         * lib/unistr/u16-strncpy.c: New file.
7873         * lib/unistr/u32-strncpy.c: New file.
7874         * lib/unistr/u-strncpy.h: New file.
7875
7876         * modules/unistr/u8-strnlen: New file.
7877         * modules/unistr/u16-strnlen: New file.
7878         * modules/unistr/u32-strnlen: New file.
7879         * lib/unistr/u8-strnlen.c: New file.
7880         * lib/unistr/u16-strnlen.c: New file.
7881         * lib/unistr/u32-strnlen.c: New file.
7882         * lib/unistr/u-strnlen.h: New file.
7883
7884         * modules/unistr/u8-strpbrk: New file.
7885         * modules/unistr/u16-strpbrk: New file.
7886         * modules/unistr/u32-strpbrk: New file.
7887         * lib/unistr/u8-strpbrk.c: New file.
7888         * lib/unistr/u16-strpbrk.c: New file.
7889         * lib/unistr/u32-strpbrk.c: New file.
7890         * lib/unistr/u-strpbrk.h: New file.
7891
7892         * modules/unistr/u8-strrchr: New file.
7893         * modules/unistr/u16-strrchr: New file.
7894         * modules/unistr/u32-strrchr: New file.
7895         * lib/unistr/u8-strrchr.c: New file.
7896         * lib/unistr/u16-strrchr.c: New file.
7897         * lib/unistr/u32-strrchr.c: New file.
7898
7899         * modules/unistr/u8-strspn: New file.
7900         * modules/unistr/u16-strspn: New file.
7901         * modules/unistr/u32-strspn: New file.
7902         * lib/unistr/u8-strspn.c: New file.
7903         * lib/unistr/u16-strspn.c: New file.
7904         * lib/unistr/u32-strspn.c: New file.
7905         * lib/unistr/u-strspn.h: New file.
7906
7907         * modules/unistr/u8-strstr: New file.
7908         * modules/unistr/u16-strstr: New file.
7909         * modules/unistr/u32-strstr: New file.
7910         * lib/unistr/u8-strstr.c: New file.
7911         * lib/unistr/u16-strstr.c: New file.
7912         * lib/unistr/u32-strstr.c: New file.
7913         * lib/unistr/u-strstr.h: New file.
7914
7915         * modules/unistr/u8-strtok: New file.
7916         * modules/unistr/u16-strtok: New file.
7917         * modules/unistr/u32-strtok: New file.
7918         * lib/unistr/u8-strtok.c: New file.
7919         * lib/unistr/u16-strtok.c: New file.
7920         * lib/unistr/u32-strtok.c: New file.
7921         * lib/unistr/u-strtok.h: New file.
7922
7923         * modules/unistr/u8-uctomb: New file.
7924         * modules/unistr/u16-uctomb: New file.
7925         * modules/unistr/u32-uctomb: New file.
7926         * lib/unistr/u8-uctomb.c: New file.
7927         * lib/unistr/u16-uctomb.c: New file.
7928         * lib/unistr/u32-uctomb.c: New file.
7929
7930         * MODULES.html.sh (Unicode string functions): Add the new modules.
7931
7932 2007-01-08  Bruno Haible  <bruno@clisp.org>
7933
7934         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
7935         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
7936         subdirectories.
7937
7938 2007-01-08  Karl Berry  <karl@gnu.org>
7939
7940         * doc/error.texi: mention that main() fns must set program_name
7941         when progname is used.
7942
7943 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
7944
7945         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
7946         WCTYPE_H is empty, for the benefit of builds from non-distclean
7947         directories.  Problem reported by Eric Blake in
7948         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
7949
7950 2007-01-08  Bruno Haible  <bruno@clisp.org>
7951
7952         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
7953         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
7954         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
7955         PROVIDE_CANONICALIZE_FILENAME_MODE.
7956         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
7957
7958 2007-01-08  Bruno Haible  <bruno@clisp.org>
7959
7960         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
7961         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
7962         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
7963         * lib/fts.c: Likewise.
7964         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
7965
7966 2006-12-25  Bruno Haible  <bruno@clisp.org>
7967
7968         * modules/utf8-ucs4-safe: New file.
7969         * lib/utf8-ucs4-safe.h: New file.
7970         * lib/unistr/utf8-ucs4-safe.c: New file.
7971
7972         * modules/utf16-ucs4-safe: New file.
7973         * lib/utf16-ucs4-safe.h: New file.
7974         * lib/unistr/utf16-ucs4-safe.c: New file.
7975
7976         * MODULES.html.sh (Unicode string functions): Add the new modules.
7977
7978 2007-01-08  Bruno Haible  <bruno@clisp.org>
7979
7980         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
7981         (Depends-on): Add unitypes.
7982         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7983         (u8_mbtouc_aux): Move out to separate file.
7984         (u8_mbtouc): Use ucs4_t, uint8_t types.
7985         * lib/unistr/utf8-ucs4.c: New file.
7986
7987         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
7988         (Depends-on): Add unitypes.
7989         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7990         (u16_mbtouc_aux): Move out to separate file.
7991         (u16_mbtouc): Use ucs4_t, uint16_t types.
7992         * lib/unistr/utf16-ucs4.c: New file.
7993
7994         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
7995         (Depends-on): Add unitypes.
7996         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
7997         (u8_uctomb_aux): Move out to separate file.
7998         (u8_uctomb): Use ucs4_t, uint8_t types.
7999         * lib/unistr/ucs4-utf8.c: New file.
8000
8001         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
8002         (Depends-on): Add unitypes.
8003         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
8004         (u16_uctomb_aux): Move out to separate file.
8005         (u16_uctomb): Use ucs4_t, uint16_t types.
8006         * lib/unistr/ucs4-utf16.c: New file.
8007
8008 2006-12-25  Bruno Haible  <bruno@clisp.org>
8009
8010         * modules/unitypes: New file.
8011         * lib/unitypes.h: New file.
8012         * MODULES.html.sh (func_all_modules): New section "Unicode string
8013         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
8014         this section. Add unitypes.
8015
8016 2007-01-08  Bruno Haible  <bruno@clisp.org>
8017
8018         Avoid variable names that conflict with those from libtool.
8019         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
8020         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
8021         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
8022         library_names_spec to acl_library_names_spec, hardcode_* to
8023         acl_hardcode_*.
8024         Reported by Ralf Wildenhues.
8025
8026 2007-01-08  Bruno Haible  <bruno@clisp.org>
8027
8028         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
8029         definition.
8030         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
8031         definition.
8032         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
8033         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
8034         definition.
8035         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
8036         definition.
8037         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
8038         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
8039         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
8040         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
8041         definition.
8042         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
8043         definition.
8044         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
8045         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
8046         GC_USE_<algorithm>.
8047         * lib/gc-libgcrypt.c: Likewise.
8048         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
8049         * modules/gc-arctwo (configure.ac): Likewise.
8050         * modules/gc-des (configure.ac): Likewise.
8051         * modules/gc-hmac-md5 (configure.ac): Likewise.
8052         * modules/gc-hmac-sha1 (configure.ac): Likewise.
8053         * modules/gc-md2 (configure.ac): Likewise.
8054         * modules/gc-md4 (configure.ac): Likewise.
8055         * modules/gc-md5 (configure.ac): Likewise.
8056         * modules/gc-random (configure.ac): Likewise.
8057         * modules/gc-rijndael (configure.ac): Likewise.
8058         * modules/gc-sha1 (configure.ac): Likewise.
8059
8060 2007-01-08  Bruno Haible  <bruno@clisp.org>
8061
8062         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
8063         macro definition.
8064         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
8065         definition.
8066         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
8067         definition.
8068         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
8069         * modules/fcntl-safer (configure.ac): Likewise.
8070         * modules/fopen-safer (configure.ac): Likewise.
8071         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
8072         GNULIB_FWRITEERROR macro definition.
8073
8074 2007-01-08  Bruno Haible  <bruno@clisp.org>
8075
8076         * m4/gnulib-common.m4: New file.
8077         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
8078         (func_get_filelist): Add m4/gnulib-common.m4.
8079
8080 2007-01-08  Bruno Haible  <bruno@clisp.org>
8081
8082         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
8083         command.
8084
8085 2007-01-08  Jim Meyering  <jim@meyering.net>
8086
8087         Use a more robust test for a "can't happen" condition.
8088         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
8089         narrowed the st_size value.  Presuming the "can't happen" condition
8090         is true, that narrowing could conceivably convert an invalid st_size
8091         value into a valid one.  Instead, use a change based on Matthew
8092         Woehlke's original patch.
8093
8094         Slight readability improvement: use an assert-like macro
8095         in place of literal "abort ()" uses.
8096         * lib/fts.c (fts_assert): Define.
8097         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
8098         Use this macro instead of a bare 'abort'.
8099
8100 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
8101
8102         Don't worry about using IRIX 5.3's wctype.h broken definitions;
8103         simply work around them.
8104         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
8105         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
8106         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
8107         declaring.
8108         Don't bother to define as macros, since the standard doesn't require it.
8109         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
8110         longer worry about IRIX 5.3.
8111         (HAVE_WCTYPE_CTMP_BUG): Remove.
8112
8113 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8114
8115         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
8116         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
8117         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
8118         Problems reported by Georg Schwarz for IRIX 5.3.
8119
8120         * gnulib-tool (autoconf_minversion): Take the maximum version number
8121         found, not the minimum.  Problem reported by James Youngman.
8122
8123 2007-01-03  Karl Berry  <karl@gnu.org>
8124
8125         * doc/error.texi: new file, explaining interaction with progname.
8126         * doc/gnulib.texi: include it.  Update copyright.
8127
8128 2007-01-03  Simon Josefsson  <simon@josefsson.org>
8129
8130         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
8131         AC_CANONICAL_HOST, to improve autobuild outputs.
8132
8133 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
8134             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
8135
8136         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
8137         sockets, server sockets, and other file descriptors.  Count errors
8138         to compute the return value.  Reorder the code a bit to be easier
8139         to follow.  Don't set event bits that were not requested (except
8140         POLLERR and POLLHUP).
8141
8142 2007-01-01  Bruno Haible  <bruno@clisp.org>
8143
8144         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
8145
8146 2007-01-03  Jim Meyering  <jim@meyering.net>
8147
8148         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
8149
8150 2007-01-02  Bruno Haible  <bruno@clisp.org>
8151
8152         * modules/settime (Include): Require timespec.h.
8153         * modules/nanosleep (Include): Likewise.
8154
8155 2007-01-01  Bruno Haible  <bruno@clisp.org>
8156
8157         * gnulib-tool (func_emit_copyright_notice): Bump year.
8158         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
8159
8160 2007-01-01  Bruno Haible  <bruno@clisp.org>
8161
8162         Improve support for OpenBSD.
8163         * build-aux/config.rpath (libname_spec): Export.
8164         (library_names_spec): New variable. Export.
8165         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
8166         library_names_spec from the config.rpath output. Locate shared library
8167         through the name pattern in library_names_spec.
8168
8169 2007-01-01  Eric Blake  <ebb9@byu.net>
8170
8171         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
8172
8173 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
8174
8175         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
8176         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
8177         assume the C locale, and avoid an "eval" that could cause trouble.
8178         Problem with SORT reported by Bob Proulx.
8179
8180         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
8181         Define.  Trivial patch from Henning Nielsen Lund, originally
8182         sent to bug-grep@gnu.org today.
8183
8184 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
8185
8186         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
8187         struct stat.  Problem reported by Henning Nielsen Lund.
8188         * lib/acl.c: Include acl.h first, to check interface.  Don't
8189         bother to include sys/types.h and sys/stat.h again.
8190
8191 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
8192
8193         Import the following change from libc; problem reported by
8194         Sven Verdoolaege.
8195
8196         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
8197
8198         [BZ #1373]
8199         * lib/argp.h: Remove __NTH for __argp_usage inline function.
8200
8201 2006-12-28  Jim Meyering  <jim@meyering.net>
8202
8203         * build-aux/announce-gen: Do not assume that the package
8204         builds any of tar.gz, tar.bz2, and .xdelta files.
8205         Suggestion from Simon Josefsson.
8206
8207 2006-12-28  Simon Josefsson  <simon@josefsson.org>
8208
8209         * modules/announce-gen: New file.
8210
8211 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
8212
8213         * lib/mbchar.h: Just include <wctype.h>; the wctype module
8214         handles its gotchas now.
8215         * lib/mbswidth.c: Likewise.
8216         * lib/wcwidth.h: Likewise.
8217         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
8218         and iswcntrl; the wctype module does this stuff now.
8219         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
8220         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8221         * modules/mbchar (Depends-on): Add wctype.
8222         * modules/mbswidth (Depends-on): Likewise.
8223         * modules/wcwidth (Depends-on): Likewise.
8224
8225 2006-12-27  Eric Blake  <ebb9@byu.net>
8226
8227         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
8228         module uses more than what <wctype.h> is required to provide.
8229
8230 2006-12-26  Eric Blake  <ebb9@byu.net>
8231
8232         * gnulib-tool (sed_extract_prog): Avoid space-tab.
8233
8234 2006-12-26  Eric Blake  <ebb9@byu.net>
8235
8236         * modules/absolute-header: New module.
8237         * modules/fcntl (Depends-on): Depend on it.
8238         * modules/inttypes (Depends-on): Likewise.
8239         * modules/stdint (Depends-on): Likewise.
8240         * modules/sys_stat (Depends-on): Likewise.
8241         * modules/wctype (Depends-on): Likewise.
8242         * MODULES.html.sh (Support for building libraries and
8243         executables): Document it.
8244
8245 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
8246
8247         * gnulib-tool (SED): Remove, undoing previous change.
8248         The problem was that it broke coreutils on Solaris, because
8249         "sed --posix" leaked into a makefile.
8250         (sed): New alias, if 'alias' and GNU sed.
8251
8252 2006-12-24  Jim Meyering  <jim@meyering.net>
8253
8254         Work around an fchownat bug in glibc-2.4:
8255         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
8256         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
8257         in spite of the -P option.
8258         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
8259         New macros.
8260         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
8261         * modules/openat (Files): Add lib/fchownat.c.
8262         * lib/openat.c (fchownat): Don't define here.  Move to...
8263         * lib/fchownat.c: ...this new file.
8264
8265 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
8266
8267         Fix bug reported by Bruno Haible in
8268         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
8269         where quotearg.c didn't compile on Mac OS X 10.2 because it
8270         lacks <wchar.h> and wint_t.
8271         * lib/wctype_.h (__wctype_wint_t): New type.
8272         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
8273         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
8274         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
8275         Arg is now of type __wctype_wint_t, not wint_t.
8276         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
8277         substitute HAVE_WINT_T.
8278         * modules/wctype (Files): Add m4/wint_t.m4.
8279         (wctype.h): Substitute HAVE_WINT_T.
8280
8281 2006-12-23  Bruno Haible  <bruno@clisp.org>
8282
8283         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
8284
8285 2006-12-23  Bruno Haible  <bruno@clisp.org>
8286
8287         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
8288         S_ISLNK.
8289         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
8290         mingw.
8291
8292 2006-12-22  Bruno Haible  <bruno@clisp.org>
8293
8294         * lib/copy-file.c: Include acl.h.
8295         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
8296         Close the file descriptors only after being done with copy_acl.
8297         * modules/copy-file (Depends-on): Add acl.
8298
8299 2006-12-22  Bruno Haible  <bruno@clisp.org>
8300
8301         * gnulib-tool (SED): New variable.
8302         Use $SED instead of sed everywhere.
8303
8304 2006-12-22  Bruno Haible  <bruno@clisp.org>
8305
8306         * modules/no-c++: New file.
8307         * m4/no-c++.m4: New file.
8308         * MODULES.html.sh (Support for building libraries and executables):
8309         Add no-c++.
8310
8311 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
8312
8313         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8314         Include <limits.h>, and use its INT_MAX to rewrite the
8315         j loop so that it does not overflow 'int'.  Problem reported by
8316         Ralf Wildenhues in
8317         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
8318         Play it safe by shifting left by 1 rather than multiplying by 2,
8319         as GCC is less likely to optimize this away when the value
8320         is signed (when it assumes overflow leads to undefined behavior).
8321         Also, don't assume time_t uses two's complement.
8322
8323 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
8324
8325         * MODULES.html.sh: New module wctype.
8326         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
8327         * lib/fnmatch.c: Don't bother to include <wchar.h> before
8328         <wctype.h>, since the new wctype module should fix this.
8329         * lib/quotearg.c: Include <wctype.h> unconditionally, since
8330         the wctype module should arrange for it.
8331         * lib/regex_internal.h: Likewise.
8332         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
8333         since the wctype module should handle this now.
8334         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
8335         * modules/fnmatch (Depends-on): Add wctype.
8336         * modules/quotearg (Depends-on): Likewise.
8337         * modules/regex (Depends-on): Likewise.
8338
8339 2006-12-19  Bruno Haible  <bruno@clisp.org>
8340
8341         * lib/strdup.h [C++]: Wrap definitions in extern "C".
8342         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
8343
8344 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8345
8346         * modules/savewd (Depends-on): Fix dependency on fcntl.
8347
8348 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8349
8350         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
8351         conforms to C99, rather than relying on the user's environment
8352         setting of STDINT_H.
8353
8354 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8355         and Eric Blake  <ebb9@byu.net>
8356
8357         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
8358         This is more consistent with the other defines here.
8359         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
8360         Port to z/OS.  Problem reported by Paul Gilmartin.
8361         Change local vars to use gl_ prefix rather than ac_.
8362         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
8363         with other defines.
8364         * modules/double-slash-root: New module.
8365         * modules/dirname (Files): Remove m4/double-slash-root.m4.
8366         (Depends-on): Add double-slash-root.
8367         * MODULES.html.sh (File system functions): Mention new module.
8368
8369 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
8370
8371         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
8372         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
8373         This is for the benefit of gzip, which doesn't do i18n.
8374
8375 2006-12-12  Jim Meyering  <jim@meyering.net>
8376
8377         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
8378         Reported by Andreas Schwab <schwab@suse.de>.
8379
8380 2006-12-12  Bruno Haible  <bruno@clisp.org>
8381
8382         Merge these changes.
8383         2006-09-05  Bruno Haible  <bruno@clisp.org>
8384         * lib/iconvme.c (iconv_string): No need to save and restore errno when
8385         iconv_alloc succeeded.
8386         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
8387         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
8388         test for " && dest " at the end - dest is always != NULL there. Call
8389         iconv with 4xNULL arguments initially, to reset the state. Call iconv
8390         with 2xNULL arguments, also to flush the state storage. Handle the
8391         IRIX iconv behaviour. Realloc the final result, to throw away unused
8392         memory.
8393
8394 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
8395
8396         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
8397         and fchmodat unconditionally, since glibc 2.4 has them.
8398         Problem reported by Arkadiusz Miskiewicz.
8399
8400 2006-12-10  Bruno Haible  <bruno@clisp.org>
8401
8402         * gnulib-tool (func_import): Show the include files only for those
8403         modules that are copied and specified.
8404         Reported by Karl Berry.
8405
8406 2006-12-08  Jim Meyering  <jim@meyering.net>
8407
8408         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
8409         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
8410
8411         * build-aux/announce-gen: Add two new options, both optional:
8412         --bootstrap-tools=TOOL_LIST
8413               a comma-separated list of tools, e.g.,
8414               autoconf,automake,bison,gnulib
8415         --gnulib-snapshot-date=DATE
8416               if gnulib is in the bootstrap tool list,
8417               then report this as the snapshot date.
8418               If not specified, use the current date/time.
8419               If you specify a date here, be sure it's UTC.
8420
8421 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8422
8423         * tests/test-argp-2.sh: Fix test to match actual output.
8424         (func_compare): Fix sed script to be portable.
8425
8426 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
8427
8428         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
8429         workaround for this case.  It is not autoconfigured now; offhand
8430         it's hard to see how to autoconfigure it.
8431
8432 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
8433
8434         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
8435         a directory that is about to be chowned.  Such a directory's
8436         initial file permissions should permit the owner only and this
8437         should not be changed until after the chown, since the group and
8438         other bits would be incorrect if they granted permission before
8439         the chown.
8440
8441         Fix porting problem for iswctype reported by Georg Schwarz in:
8442         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
8443         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
8444         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
8445         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
8446         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
8447
8448 2006-12-03  Jim Meyering  <jim@meyering.net>
8449
8450         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
8451         p->fts_statp may not yet be defined.
8452         (fts_read): Instead, set it in the caller, once p->fts_statp is
8453         sure to be defined, and corresponds to a top-level directory.
8454         This bug made du -x fail.  Here's the coreutils test case:
8455         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
8456         Reported by Mike Frysinger.
8457
8458 2006-12-01  Jim Meyering  <jim@meyering.net>
8459
8460         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
8461         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
8462         Reported by Simon Josefsson.
8463
8464 2006-11-30  Jim Meyering  <jim@meyering.net>
8465
8466         * m4/warning.m4: Use the all-permissive copyright notice
8467         recommended by RMS (rather than LGPL).
8468         * m4/vararrays.m4: Likewise.
8469         * m4/flexmember.m4: Likewise.
8470
8471 2006-11-29  Bruno Haible  <bruno@clisp.org>
8472
8473         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8474         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
8475         using +=.
8476         Reported by Simon Josefsson <simon@josefsson.org>.
8477
8478 2006-11-28  James Youngman <jay@gnu.org>
8479
8480         * README: Advise users that they might find the bug-gnulib@gnu.org
8481         and autotools-announce@gnu.org mailing lists useful.
8482
8483 2006-11-28  Bruno Haible  <bruno@clisp.org>
8484
8485         * m4/ptrdiff_max.m4: Remove file.
8486
8487 2006-11-21  Bruno Haible  <bruno@clisp.org>
8488
8489         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
8490         _AC_COMPUTE_INT.
8491         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8492         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
8493         _AC_COMPUTE_INT.
8494         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8495         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
8496         _AC_COMPUTE_INT.
8497         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8498
8499 2006-11-28  Jim Meyering  <jim@meyering.net>
8500
8501         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
8502         warning from "gcc -Wshadow" about shadowing the builtin.
8503
8504 2006-11-27  Bruno Haible  <bruno@clisp.org>
8505
8506         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
8507         _AC_COMPUTE_INT.
8508         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8509
8510 2006-11-27  Bruno Haible  <bruno@clisp.org>
8511             Paul Eggert  <eggert@cs.ucla.edu>
8512
8513         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
8514
8515 2006-11-26  Bruno Haible  <bruno@clisp.org>
8516
8517         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8518         noinst_LTLIBRARIES.
8519
8520 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
8521             Bruno Haible  <bruno@clisp.org>
8522
8523         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
8524         if compiling with "gcc -ansi".
8525
8526 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
8527
8528         Fix some incompatibilities with gcc -ansi -pedantic.
8529         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
8530         if compiling pedantically with GCC, unless it's C99 or later.
8531         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
8532         it mishandles gcc -ansi -pedantic as well.
8533         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
8534         if gcc -pedantic.
8535         * lib/regexec.c (check_node_accept_bytes): Don't use auto
8536         initializers for struct if -pedantic, unless it's C99 or later.
8537
8538 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
8539
8540         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
8541         Don't close an fd more than once. Identical atimes indicate
8542         success, not failure.
8543
8544 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
8545
8546         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
8547
8548 2006-11-23  Jim Meyering  <jim@meyering.net>
8549
8550         * build-aux/announce-gen: New file.  From coreutils.
8551
8552 2006-11-22  Jim Meyering  <jim@meyering.net>
8553
8554         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
8555         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
8556         (fts_read): Use a temporary to narrow the overused st_size member
8557         before using it in a switch statement.  Reported by Matthew Woehlke.
8558
8559         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
8560         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
8561
8562 2006-11-20  Bruno Haible  <bruno@clisp.org>
8563
8564         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
8565         changequote instead of pairs of brackets.
8566         Reported by Andreas Schwab <schwab@suse.de>.
8567
8568 2006-11-21  Jim Meyering  <jim@meyering.net>
8569
8570         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
8571         so as to remain compatible with older compilers.
8572         Patch from Michael Deutschmann.
8573
8574 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
8575
8576         * MODULES.html.sh (File system functions): Add openat.
8577
8578         * lib/openat.h (rpl_fstatat): New macro, if
8579         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
8580         (fstatat): Define to rpl_fstatat under the same conditions,
8581         unless COMPILING_FSTATAT.
8582         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
8583         seems to have the bug.
8584         * lib/fstatat.c: New file.
8585         * modules/openat (Files): Add it.
8586
8587 2006-11-20  Bruno Haible  <bruno@clisp.org>
8588
8589         * Makefile: New file.
8590
8591 2006-11-20  Jim Meyering  <jim@meyering.net>
8592
8593         The beginnings of syntax-related checks for gnulib.
8594         * lib/Makefile: New file.
8595         * lib/t-idcache: New script.  Ensure that the two halves of
8596         idcache.c stay in sync.
8597
8598         * lib/idcache.c: Adjust comments in user- and group- portions to
8599         be more accurate, and to be consistent with one another.
8600
8601 2006-11-20  Jim Meyering  <jim@meyering.net>
8602
8603         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
8604         continue using the flexible array member (thus, this module performs
8605         half as many malloc calls), with the addition that...
8606         (getgroup, getuser): Consistently record a non-match via an empty
8607         "name" string, and map an empty string match to a NULL return value.
8608         * modules/idcache (Depends-on): Re-add flexmember.
8609
8610         * lib/idcache.c (getuser): Remove all uses of the register keyword.
8611         (getuidbyname, getgroup, getgidbyname): Likewise.
8612
8613         Use cleaner syntax: NULL rather than 0.
8614         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
8615
8616 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
8617
8618         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
8619         It mishandled the case where the group was missing.
8620         Problem reported by Greg Schafer.
8621         * modules/idcache: Likewise.
8622
8623 2006-11-18  Jim Meyering  <jim@meyering.net>
8624
8625         * check-module (%exempt_header): Add exception for some
8626         conditionally-included headers.
8627
8628         * modules/i-ring (Depends-on): Add verify.
8629         (License): Change to LGPL.
8630
8631 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
8632
8633         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
8634         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
8635         and inttostr.h.  Use snprintf rather than uinttostr, so that
8636         LGPLed code doesn't depend on GPLed.
8637
8638 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
8639
8640         * modules/inline (License): Change from GPL to LGPL.
8641
8642 2006-11-17  Jim Meyering  <jim@meyering.net>
8643
8644         * modules/d-type (License): Switch to LGPL.
8645
8646 2006-11-15  Bruno Haible  <bruno@clisp.org>
8647
8648         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
8649
8650 2006-11-15  Eric Blake  <ebb9@byu.net>
8651
8652         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
8653         the module dependency.
8654
8655 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8656             Bruno Haible  <bruno@clisp.org>
8657
8658         * gnulib-tool (func_create_testdir): Add license consistency check.
8659
8660 2006-11-15  Eric Blake  <ebb9@byu.net>
8661
8662         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
8663         random "(cached)" in configure output.
8664
8665 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8666
8667         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
8668         test for conforming inttypes.h is both announced and cached.
8669
8670         * MODULES.html.sh (seen_modules, seen_files): New variables.
8671         (func_module): Rewrite to use a few less gnulib-tool and sed
8672         invocations.  Avoid a couple of quadratic algorithms for ...
8673         (missed_modules, missed_files): ... these, with ...
8674         (func_append, func_tmpdir): ... these new functions, from
8675         gnulib-tool.  Analogously, install traps for cleanup.
8676
8677         * tests/test-gc.c (main): Remove unused variables.
8678         * tests/test-read-file.c: Include stdlib.h, for 'free'.
8679
8680 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
8681
8682         * modules/inttostr (License): Change to LGPL.
8683
8684 2006-11-14  Eric Blake  <ebb9@byu.net>
8685
8686         * modules/tempname (License): Change to LGPL.
8687
8688 2006-11-14  Eric Blake  <ebb9@byu.net>
8689
8690         * doc/functions.texi (Function Portability): *printf functions on
8691         Cygwin now understand all POSIX size specifiers.
8692
8693 2006-11-14  Bruno Haible  <bruno@clisp.org>
8694
8695         * modules/c-ctype (License): Change to LGPL.
8696
8697 2006-11-12  Bruno Haible  <bruno@clisp.org>
8698
8699         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
8700         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
8701         for GNOME libraries, for which the include files are installed in
8702         subdirectories of $prefix/include.
8703
8704 2006-11-12  Bruno Haible  <bruno@clisp.org>
8705
8706         * m4/lib-link.m4: Require at least autoconf-2.54.
8707         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
8708         name to underscores for the --with option.
8709
8710 2006-11-13  Bruno Haible  <bruno@clisp.org>
8711
8712         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
8713         the tests directory.
8714         Reported by Ralf Wildenhues.
8715
8716 2006-11-13  Bruno Haible  <bruno@clisp.org>
8717
8718         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
8719         (func_emit_initmacro_end): Undo the override here.
8720         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
8721         Works around the famous automake error in coreutils.
8722
8723 2006-11-13  Eric Blake  <ebb9@byu.net>
8724
8725         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
8726         element, not its node.
8727
8728 2006-11-12  Bruno Haible  <bruno@clisp.org>
8729
8730         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
8731         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
8732
8733 2006-11-12  Bruno Haible  <bruno@clisp.org>
8734
8735         * gnulib-tool: New option --local-symlink.
8736         (func_usage): Document it.
8737         (lsymbolic): New variable.
8738         (func_import, func_create_testdir): If --symlink was not specified,
8739         test whether --local-symlink was specified and the file comes from
8740         the local_gnulib_dir.
8741
8742 2006-11-12  Bruno Haible  <bruno@clisp.org>
8743
8744         * gnulib-tool (func_ln): New function.
8745         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
8746
8747 2006-11-12  Bruno Haible  <bruno@clisp.org>
8748
8749         Finish support for source files in subdirectories.
8750         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
8751         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
8752         AUTOMAKE_OPTIONS.
8753         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
8754
8755 2006-11-12  Bruno Haible  <bruno@clisp.org>
8756
8757         * gnulib-tool (func_get_automake_snippet): Synthesize also an
8758         EXTRA_lib_SOURCES augmentation.
8759         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
8760
8761 2006-11-12  Jim Meyering  <jim@meyering.net>
8762
8763         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
8764         file descriptors.  This also averts a failure on systems with
8765         native openat support when a traversed directory lacks "x" access.
8766         * lib/fts_.h: Include "i-ring.h"
8767         (struct FTS) [fts_fd_ring]: New member.
8768         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
8769         (FCHDIR): Add parentheses.
8770         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
8771         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
8772         When descending, rather than simply closing the previous
8773         fts_cwd_fd value, push that file descriptor onto the ring.
8774         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
8775         (fts_open): Initialize the new fd_ring member.
8776         (fts_close): Clear the ring.
8777         (fts_safe_changedir): When possible, use our new fd_ring to skip
8778         the diropen and fstat and dev/ino comparison that would normally
8779         accompany a virtual `chdir ("..")'.
8780
8781         * modules/fts (Depends-on): Add i-ring.
8782         * modules/i-ring: New module.
8783         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
8784         * m4/i-ring.m4: New file.
8785
8786 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8787
8788         * gnulib-tool (func_create_testdir): Fix replacement of
8789         `build-aux' in configure.ac.  Run autotools in gltests
8790         subdirectory.
8791         (func_create_testdir, func_create_megatestdir, test): There is
8792         no need for '--force' in most autotool invocations in a new
8793         tree.  Actually fail the whole test if any of the tools, or the
8794         configure or make stages fail.
8795
8796         Sync from Automake.
8797         * build-aux/gnupload: Revert last change.  Add pointer to upload
8798         instructions of the GNU Maintenance Instructions.
8799         Suggestion by Karl Berry.
8800
8801 2006-11-10  Jim Meyering  <jim@meyering.net>
8802
8803         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
8804
8805 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8806
8807         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
8808         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
8809         (bind_textdomain_codeset) [! ENABLE_NLS]:
8810         Evaluate all the arguments.  That way, callers get compatible behavior
8811         if the arguments have side effects.  Also, it avoids some GCC
8812         diagnostics in some cases; Joel E. Denny reported problems when Bison
8813         was configured with --enable-gcc-warnigs.
8814
8815 2006-11-10  Jim Meyering  <jim@meyering.net>
8816
8817         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
8818         relevant options in CFLAGS (like -O, -fno-inline) are taken into
8819         account.
8820
8821 2006-11-10  Jim Meyering  <jim@meyering.net>
8822
8823         * modules/inline: New file/module.
8824         * modules/xalloc (Files): Remove m4/inline.m4.
8825         (Depends-on): Add inline, instead.
8826         * modules/oset: Likewise.
8827         * modules/list: Likewise.
8828
8829 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8830
8831         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
8832         Problem reported by Matthew Woehlke.
8833
8834 2006-11-09  Bruno Haible  <bruno@clisp.org>
8835
8836         * lib/tempname.c (gen_tempname): Remove variant that invokes
8837         __gen_tempname.
8838         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
8839         __gen_tempname.
8840
8841 2006-11-08  Bruno Haible  <bruno@clisp.org>
8842
8843         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
8844         to 'yes' instead of 'cross-compiling'.
8845
8846 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
8847
8848         * lib/quotearg.h (quotearg_free): New decl.
8849         * lib/quotearg.c (quotearg_free): New function.
8850         (slot0, nslots, slotvec0, slotvec):
8851         Now file-scope so that quotearg_free can get at them.
8852
8853 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8854
8855         Sync from Automake.
8856         * build-aux/gnupload: Add missing 'gnu' to example URL.
8857         Report by Karl Berry.
8858
8859 2006-11-08  Bruno Haible  <bruno@clisp.org>
8860
8861         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
8862         Suggested by Paul Eggert.
8863
8864 2006-11-08  Jim Meyering  <jim@meyering.net>
8865
8866         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
8867         It's already included if !_LIBC.
8868         (fts_safe_changedir): Add a comment.
8869
8870 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8871
8872         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
8873         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
8874         Matthew Woehlke.
8875
8876         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
8877         definitions up, to avoid colliding with change below.
8878         (static_inline) [HAVE_INLINE]: New macro.
8879         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
8880         Provide extern decls when !HAVE_INLINE.  Do not define unless
8881         static_inline is defined, either by us or by xmalloc.c.  Use
8882         static_inline rather than static inline.
8883         (XCALLOC): Optimize sizeof(T) = 1 case.
8884         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
8885
8886 2006-11-07  Bruno Haible  <bruno@clisp.org>
8887
8888         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
8889         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
8890         AC_C_INLINE.
8891         * modules/xalloc (Files): Add m4/inline.m4.
8892
8893 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8894
8895         * README: Fix typo.
8896         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
8897         (Miscellanous Notes): ...from this.
8898
8899 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8900
8901         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
8902         Mention that offsetof should be used instead of sizeof.
8903         From Bruno Haible.
8904
8905 2006-11-07  Bruno Haible  <bruno@clisp.org>
8906
8907         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
8908
8909 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8910
8911         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8912         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
8913         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8914         (gl_tree_add_before, gl_tree_add_after):
8915         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
8916         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
8917         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
8918         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
8919         (gl_linked_add_after, gl_linked_add_at): Likewise.
8920         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
8921         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8922         (gl_tree_add_before, gl_tree_add_after): Likewise.
8923         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
8924         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
8925         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
8926
8927 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8928
8929         * lib/gl_oset.h: Use C comment style, not C++ comment style.
8930
8931 2006-11-06  Bruno Haible  <bruno@clisp.org>
8932
8933         * m4/inline.m4: New file.
8934         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
8935         * modules/list (Files): Add m4/inline.m4.
8936         * modules/oset (Files): Likewise.
8937
8938 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8939
8940         * lib/idcache.c: Include <stddef.h>, for offsetof.
8941         (struct userid.name): Change from char * to a flexible array member.
8942         All uses changed.
8943         * modules/idcache (Depends-on): Add flexmember.
8944
8945         * MODULES.html.sh (Core language properties): New module flexmember.
8946         * modules/flexmember, m4/flexmember.m4: New files.
8947
8948         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
8949         inline functions that are identical with the old xnmalloc_inline,
8950         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
8951         that we can avoid some unnecessary integer multiplications and
8952         divisions in the common case where the element size is known at
8953         compile time.
8954         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
8955         needed.
8956         (xnboundedmalloc): Remove.
8957         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
8958         arguments, for consistency with rest of this header.
8959         (xcharalloc): Rewrite using XNMALLOC.
8960         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
8961         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
8962         versions have been moved to lib/xalloc.h and renamed to be the
8963         non-*_inline versions.
8964         (xmalloc, xrealloc): Implement without reference to the xnmalloc
8965         and xnrealloc functions, since those functions are now inline and
8966         now call us.
8967         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
8968         renaming described above.
8969         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
8970         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
8971         captures the dependency in AC_C_INLINE.
8972
8973         New module canonicalize-lgpl, proposed by Charles Wilson in
8974         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
8975         with a few small changes afterwards.
8976         * MODULES.html.sh (File system functions): New module
8977         canonicalize-lgpl.
8978         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
8979         and canonicalize_file_name.
8980         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
8981         * modules/canonicalize-lgpl: New files.
8982
8983 2006-11-05  Bruno Haible  <bruno@clisp.org>
8984
8985         * gnulib-tool (func_import, func_create_testdir): Create directories
8986         also for files in subdirectories of lib/.
8987
8988 2006-11-05  Bruno Haible  <bruno@clisp.org>
8989
8990         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
8991         ANSI C compliant.
8992
8993 2006-11-03  Bruno Haible  <bruno@clisp.org>
8994
8995         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8996         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
8997         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
8998         (xnboundedmalloc): New inline function.
8999         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
9000         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
9001         xmalloc.
9002         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
9003         xmalloc.
9004         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
9005         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
9006         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
9007         xmalloc.
9008         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9009         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
9010         xmalloc.
9011         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
9012         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9013         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
9014         xmalloc.
9015         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9016         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
9017         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9018         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
9019         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
9020         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
9021         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
9022
9023 2006-11-03  Bruno Haible  <bruno@clisp.org>
9024
9025         * lib/c-ctype.h [C++]: Define functions without name mangling.
9026         * lib/fwriteerror.h [C++]: Likewise.
9027         * lib/gcd.h [C++]: Likewise.
9028         * lib/linebreak.h [C++]: Likewise.
9029
9030 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
9031
9032         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
9033         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
9034         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
9035         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9036         Check for functions and headers just once.
9037         Check for declaration of canonicalize_file_name.
9038         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
9039
9040 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9041
9042         * gnulib-tool (func_import): Fix typo in actioncmd.
9043
9044 2006-11-02  Bruno Haible  <bruno@clisp.org>
9045
9046         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
9047         newline sequence in the Makefile.am snippet as a space, like "make"
9048         does.
9049         Reported by Roger Persson <perrog@gmail.com>.
9050
9051 2006-11-01  Bruno Haible  <bruno@clisp.org>
9052
9053         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
9054         already declared in <string.h>.
9055         * lib/strcase.h (strncasecmp): Don't declare it if yes.
9056
9057 2006-11-01  Bruno Haible  <bruno@clisp.org>
9058
9059         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
9060         * lib/strcase.h: Include <string.h>.
9061         (strcasecmp): Define to rpl_strcasecmp here.
9062
9063 2006-11-01  Bruno Haible  <bruno@clisp.org>
9064
9065         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
9066
9067 2006-11-01  Eric Blake  <ebb9@byu.net>
9068
9069         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
9070
9071         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
9072
9073 2006-10-29  Bruno Haible  <bruno@clisp.org>
9074
9075         Make it compile in C++ mode.
9076         * lib/full-write.c (full_rw): Add a cast.
9077
9078 2006-11-01  Bruno Haible  <bruno@clisp.org>
9079
9080         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
9081         be POSIX compliant.
9082         Reported by Roger Persson <perrog@gmail.com>.
9083
9084 2006-11-01  Eric Blake  <ebb9@byu.net>
9085
9086         * lib/getopt_.h: Fix comments.
9087
9088 2006-10-31  Eric Blake  <ebb9@byu.net>
9089
9090         * modules/tmpdir (Depends-on): Add sys_stat.
9091         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
9092         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
9093         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
9094         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
9095         tempname.
9096
9097 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
9098
9099         Avoid some C++ diagnostics reported by Bruno Haible.
9100         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
9101         xmalloc.
9102         (quotearg_alloc): Use xcharalloc rather than xmalloc.
9103         (struct slotvec): Move to top level.
9104         (quotearg_n_options): Rewrite to avoid xmalloc.
9105         * lib/xalloc.h (xcharalloc): New function.
9106         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
9107         [defined __cplusplus]: Add function template that provides result
9108         type propagation.  This part of the change is from Bruno Haible.
9109
9110 2006-10-29  Bruno Haible  <bruno@clisp.org>
9111
9112         Make it compile in C++ mode.
9113         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
9114         * lib/strnlen1.c (strnlen1): Cast memchr result.
9115         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
9116         * lib/clean-temp.c (string_equals, string_hash): Add casts.
9117         (create_temp_dir): Rename local variable 'template'.
9118         (compile_csharp_using_sscli): Add cast.
9119         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
9120         * lib/findprog.c (find_in_path): Likewise.
9121         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
9122         * lib/wait-process.c (register_slave_subprocess): Likewise.
9123
9124 2006-10-22  Bruno Haible  <bruno@clisp.org>
9125
9126         * modules/tsearch: New file.
9127         * lib/tsearch.h: New file.
9128         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
9129         * m4/tsearch.m4: New file.
9130         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
9131
9132 2006-10-29  Eric Blake  <ebb9@byu.net>
9133
9134         * lib/arcfour.c: Assume config.h.
9135         * lib/arctwo.c: Likewise.
9136         * lib/base64.c: Likewise.
9137         * lib/check-version.c: Likewise.
9138         * lib/crc.c: Likewise.
9139         * lib/des.c: Likewise.
9140         * lib/gc-gnulib.c: Likewise.
9141         * lib/gc-libgcrypt.c: Likewise.
9142         * lib/gc-pbkdf2-sha1.c: Likewise.
9143         * lib/getaddrinfo.c: Likewise.
9144         * lib/getdelim.c: Likewise.
9145         * lib/getline.c: Likewise.
9146         * lib/hmac-md5.c: Likewise.
9147         * lib/hmac-sha1.c: Likewise.
9148         * lib/iconvme.c: Likewise.
9149         * lib/md2.c: Likewise.
9150         * lib/md4.c: Likewise.
9151         * lib/memxor.c: Likewise.
9152         * lib/read-file.c: Likewise.
9153         * lib/readline.c: Likewise.
9154         * lib/rijndael-alg-fst.c: Likewise.
9155         * lib/rijndael-api-fst.c: Likewise.
9156         * lib/xgetdomainname.c: Likewise.
9157
9158 2006-10-28  Eric Blake  <ebb9@byu.net>
9159
9160         * lib/xstrndup.c: Assume config.h.
9161
9162 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9163
9164         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
9165         stat-macros.h is now for our own macros, whereas stat_h is for
9166         macros in the <sys/stat.h> name space.
9167         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
9168         (STAT_MACROS_H): Remove.
9169         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
9170         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
9171         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
9172         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
9173         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
9174         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
9175         Move these macros to ...
9176         * lib/stat_.h: here.  Don't include stat-macros.h.
9177         * lib/canonicalize.c: Don't include stat-macros.h.
9178         * lib/chown.c: Likewise.
9179         * lib/euidaccess.c: Likewise.
9180         * lib/file-type.c: Likewise.
9181         * lib/filemode.c: Likewise.
9182         * lib/glob.c: Likewise.
9183         * lib/isapipe.c: Likewise.
9184         * lib/lchown.c: Likewise.
9185         * lib/lstat.c: Likewise.
9186         * lib/mkdir-p.c: Likewise.
9187         * lib/rmdir.c: Likewise.
9188         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
9189         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
9190         unless mkdir isn't declared, to speed up 'configure'.
9191         Always create sys/stat.h, since it's unlikely any real sys/stat.h
9192         would define all the S_* symbols.
9193         * modules/canonicalize (Depends-on):
9194         Depend on sys_stat, not stat-macros.
9195         * modules/chown: Likewise.
9196         * modules/euidaccess: Likewise.
9197         * modules/filemode: Likewise.
9198         * modules/file-type: Likewise.
9199         * modules/glob: Likewise.
9200         * modules/isapipe: Likewise.
9201         * modules/lchown: Likewise.
9202         * modules/lstat: Likewise.
9203         * modules/mkancesdirs: Likewise.
9204         * modules/rmdir: Likewise.
9205         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
9206         * modules/modechange: Likewise.
9207         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
9208         (configure.ac): Remove gl_STAT_MACROS.
9209         * modules/sys_stat (Depends-on): Remove stat-macros.
9210
9211 2006-10-27  Bruno Haible  <bruno@clisp.org>
9212
9213         * m4/signed.m4: Remove file.
9214         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
9215         invocation.
9216         * modules/vasnprintf (Files): Remove m4/signed.m4.
9217
9218 2006-10-27  Bruno Haible  <bruno@clisp.org>
9219
9220         Update to GNU gettext 0.16.
9221         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
9222         m4/inttypes-h.m4, m4/signed.m4.
9223         * m4/gettext.m4: Update to GNU gettext 0.16.
9224         * m4/intl.m4: New file, from GNU gettext.
9225         * m4/intldir.m4: New file, from GNU gettext.
9226         * config/srclist.txt: Update
9227
9228 2006-10-27  Eric Blake  <ebb9@byu.net>
9229
9230         * MODULES.html.sh: Document tempname.
9231         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
9232         dependencies.
9233         (Files): Move lib/tempname.c...
9234         * modules/tempname: ...to this new module.
9235         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
9236         (gl_PREREQ_TEMPNAME): Move...
9237         * m4/tempname.m4: ...to this new file.
9238         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
9239         * modules/sys_stat (Depends-on): Add stat-macros.
9240         * lib/stat_.h (includes): Pick up stat macros.
9241         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
9242         if stat macros are broken.
9243         * lib/tempname.c (includes): No need to include "stat-macros.h".
9244         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
9245         (direxists, __path_search) [!_LIBC]: Don't compile these in
9246         gnulib; the tmpdir module covers that.
9247         * lib/tempname.h: New file.
9248
9249 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
9250
9251         * COPYING: Explain how gnulib-tool converts licence headers.
9252         Almost all wording by Eric Blake.
9253
9254 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
9255
9256         * lib/mbchar.h (is_basic_table): Make read-only.
9257         * lib/mbchar.c (is_basic_table): Likewise.
9258         Reported by John Darrington.
9259
9260 2006-10-25  Bruno Haible  <bruno@clisp.org>
9261
9262         * lib/progname.h (set_program_name): Undefine before defining.
9263
9264 2006-10-25  Bruno Haible  <bruno@clisp.org>
9265
9266         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
9267         false for non-gcc C++ compilers.
9268         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
9269
9270 2006-10-24  Bruno Haible  <bruno@clisp.org>
9271
9272         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
9273         iconv implementations like Irix iconv.
9274
9275 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9276
9277         * modules/vararrays: New file.
9278         * m4/vararrays.m4: New file, taken from diffutils.
9279         * MODULES.html.sh: New module vararrays.
9280
9281 2006-10-24  Karl Berry  <karl@gnu.org>
9282
9283         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
9284         Don't call GNU Unix.
9285
9286 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9287
9288         * users.txt: Add Libtool.
9289
9290         Sync from Libtool:
9291
9292         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9293
9294         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
9295         to gnulib's policy of including config.h unconditionally.
9296
9297 2006-10-24  Bruno Haible  <bruno@clisp.org>
9298
9299         * modules/wcwidth (Files): Add m4/wint_t.m4.
9300         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
9301         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
9302
9303 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9304
9305         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
9306         to pacify GCC with some -W flags enabled.  Problem reported by
9307         Bruno Haible.
9308
9309 2006-10-24  Jim Meyering  <jim@meyering.net>
9310
9311         * MODULES.html.sh: Remove uinttostr.  It's not a module.
9312         Reported by Karl Berry.
9313
9314 2006-10-23  Bruno Haible  <bruno@clisp.org>
9315
9316         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
9317
9318 2006-10-24  Bruno Haible  <bruno@clisp.org>
9319
9320         * lib/gl_list.h: Use C comment style, not C++ comment style.
9321
9322 2006-10-23  Eric Blake  <ebb9@byu.net>
9323
9324         * lib/getaddrinfo.c (includes): Add missing include.
9325
9326 2006-10-23  Bruno Haible  <bruno@clisp.org>
9327             Paul Eggert  <eggert@cs.ucla.edu>
9328
9329         Ability to rename obstack_free.
9330         * lib/obstack.h (__obstack_free): New macro. Declare instead of
9331         obstack_free.
9332         (obstack_free): Invoke the __obstack_free macro.
9333         * lib/obstack.c (obstack_free): Use __obstack_free macro.
9334
9335 2006-10-23  Bruno Haible  <bruno@clisp.org>
9336             Paul Eggert  <eggert@cs.ucla.edu>
9337
9338         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
9339         __argc, __argv from the declaration. (They are defined as macros on
9340         mingw.)
9341
9342 2006-10-22  Bruno Haible  <bruno@clisp.org>
9343
9344         * doc/gnulib-intro.texi: New file.
9345         * doc/gnulib.texi: Include it.
9346
9347 2006-10-21  Bruno Haible  <bruno@clisp.org>
9348
9349         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
9350         "Introduction", "Miscellanous Notes", "Particular Modules".
9351
9352 2006-10-21  Bruno Haible  <bruno@clisp.org>
9353
9354         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9355         Change mostlyclean-local rule to avoid sh syntax error from bash
9356         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
9357
9358 2006-10-23  Jim Meyering  <jim@meyering.net>
9359
9360         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
9361         in place of snprintf.
9362
9363         * modules/inttostr (Files): Add lib/uinttostr.c.
9364         * lib/uinttostr.c (inttostr): New file/function.
9365         * lib/inttostr.h (uinttostr): Declare.
9366         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
9367         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9368         Add uinttostr.
9369         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
9370
9371 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9372
9373         * lib/canonicalize.c (ELOOP): Define if not already defined.
9374         Problem reported by Bruno Haible in
9375         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
9376
9377 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9378
9379         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
9380         Problem reported by Perry Smith and Ville Laurikari.
9381
9382         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
9383         uses.
9384
9385 2006-10-19  Bruno Haible  <bruno@clisp.org>
9386
9387         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
9388         for mingw.
9389
9390 2006-10-19  Bruno Haible  <bruno@clisp.org>
9391
9392         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
9393         Needed for mingw.
9394
9395 2006-10-19  Bruno Haible  <bruno@clisp.org>
9396
9397         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
9398
9399 2006-10-19  Bruno Haible  <bruno@clisp.org>
9400
9401         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
9402         it.
9403
9404 2006-10-19  Bruno Haible  <bruno@clisp.org>
9405
9406         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
9407         invocation.
9408
9409 2006-10-19  Bruno Haible  <bruno@clisp.org>
9410
9411         * gnulib-tool (func_create_testdir): Don't include ftruncate and
9412         mountlist by default.
9413
9414 2006-10-16  Bruno Haible  <bruno@clisp.org>
9415
9416         * lib/c-strstr.c: Include c-strstr.h.
9417
9418 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9419
9420         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
9421         in a slash.
9422
9423 2006-10-18  Bruno Haible  <bruno@clisp.org>
9424
9425         * lib/lock.h [C++]: Wrap definitions in extern "C".
9426
9427 2006-10-18  Bruno Haible  <bruno@clisp.org>
9428
9429         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
9430         gl_LIBOBJS list.
9431
9432 2006-10-18  Bruno Haible  <bruno@clisp.org>
9433
9434         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
9435
9436 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
9437
9438         * lib/xstrtol.h: Include gettext.h.
9439         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
9440         Problem reported by Eric Blake.
9441         * modules/xstrtol (Depends-on): Add gettext-h.
9442
9443 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
9444
9445         * lib/strftime.c (advance): New macro.
9446         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
9447         incomplete type, so you can't add 0 to it.  Problem and patch
9448         reported by Eelco Dolstra for dietlibc.
9449
9450 2006-10-18  Jim Meyering  <jim@meyering.net>
9451
9452         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
9453         type for a local, and rename it: s/up/user_proc/.
9454
9455 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9456
9457         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
9458         READ_UTMP_USER_PROCESS.
9459         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
9460
9461 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9462
9463         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
9464         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
9465
9466 2006-10-17  Eric Blake  <ebb9@byu.net>
9467
9468         * lib/sigprocmask.c (sigprocmask): Fix typo.
9469
9470         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
9471
9472         * modules/clean-temp (Makefile.am): Don't add to make output...
9473         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
9474         config.h.
9475
9476 2006-10-17  Bruno Haible  <bruno@clisp.org>
9477
9478         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
9479         differently if DEFAULT_TEXT_DOMAIN is set.
9480
9481 2006-10-16  Bruno Haible  <bruno@clisp.org>
9482
9483         * lib/clean-temp.c: Include fwriteerror.h.
9484
9485 2006-10-16  Bruno Haible  <bruno@clisp.org>
9486
9487         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
9488
9489 2006-10-16  Bruno Haible  <bruno@clisp.org>
9490
9491         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
9492         * lib/sigprocmask.h: Include <sys/types.h>.
9493         (sigset_t): Use the system's definition if present.
9494
9495 2006-10-17  Eric Blake  <ebb9@byu.net>
9496
9497         * lib/xvasprintf.c (includes): Assume config.h.
9498         * lib/xasprintf.c (includes): Likewise.
9499
9500 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
9501
9502         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
9503         at least as wide as intmax_t.
9504
9505 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
9506
9507         (Imported from Automake.)
9508         * build-aux/gnupload: Update to version 1.1 of directive file.
9509
9510 2006-10-16  Eric Blake  <ebb9@byu.net>
9511
9512         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
9513         match Automake 1.10a.
9514
9515 2006-10-14  Bruno Haible  <bruno@clisp.org>
9516
9517         * modules/sigprocmask: New file.
9518         * lib/sigprocmask.h: New file.
9519         * lib/sigprocmask.c: New file.
9520         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
9521         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
9522         request sigprocmask.o.
9523         (gl_PREREQ_SIGPROCMASK): New macro.
9524         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
9525         (Depends-on): Add sigprocmask.
9526         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
9527         gt_SIGNALBLOCKING. Test for 'raise' only once.
9528         * lib/fatal-signal.c: Include sigprocmask.h.
9529         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
9530         unblock_fatal_signals): Define always.
9531         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
9532         sigprocmask.
9533
9534 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9535
9536         Sync from Automake.
9537         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
9538         which incorrectly sets the mode of an existing destination
9539         directory.  In some cases the unpatched install-sh could do the
9540         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
9541         system.  We hope this is rare in practice, but it's clearly worth
9542         fixing.  Problem reported by Alex Unleashed in
9543         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
9544         Also, don't bother to check for -m bugs unless we're using -m;
9545         suggested by Stepan Kasal.
9546
9547 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9548
9549         Sync from Automake.
9550         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
9551         `-c' flag, so they appear at the same position as in %FASTDEP%
9552         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
9553         which ignores unknown options only after the first non-option.
9554         Bug report against M4 by Nelson H. F. Beebe.
9555
9556 2006-10-13  Jim Meyering  <jim@meyering.net>
9557
9558         Fix a bug in yesterday's change.
9559         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
9560         p->fts_statp->st_dev would be used uninitialized.
9561         Ensures that we always call fts_stat on the very first entry.
9562         Miklos Szeredi reported that find -xdev stopped working.
9563
9564 2006-10-12  Bruno Haible  <bruno@clisp.org>
9565
9566         * gnulib-tool (func_get_automake_snippet): Append an automatically
9567         computed EXTRA_DIST augmentation.
9568         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
9569         * modules/alloca-opt (Makefile.am): Likewise.
9570         * modules/allocsa (Makefile.am): Likewise.
9571         * modules/arcfour (Makefile.am): Likewise.
9572         * modules/arctwo (Makefile.am): Likewise.
9573         * modules/argmatch (Makefile.am): Likewise.
9574         * modules/argz (Makefile.am): Likewise.
9575         * modules/atexit (Makefile.am): Likewise.
9576         * modules/backupfile (Makefile.am): Likewise.
9577         * modules/byteswap (Makefile.am): Likewise.
9578         * modules/c-strtod (Makefile.am): Likewise.
9579         * modules/c-strtold (Makefile.am): Likewise.
9580         * modules/calloc (Makefile.am): Likewise.
9581         * modules/canon-host (Makefile.am): Likewise.
9582         * modules/canonicalize (Makefile.am): Likewise.
9583         * modules/chdir-long (Makefile.am): Likewise.
9584         * modules/chdir-safer (Makefile.am): Likewise.
9585         * modules/check-version (Makefile.am): Likewise.
9586         * modules/chown (Makefile.am): Likewise.
9587         * modules/cloexec (Makefile.am): Likewise.
9588         * modules/close-stream (Makefile.am): Likewise.
9589         * modules/closeout (Makefile.am): Likewise.
9590         * modules/crc (Makefile.am): Likewise.
9591         * modules/csharpexec (Makefile.am): Likewise.
9592         * modules/cycle-check (Makefile.am): Likewise.
9593         * modules/des (Makefile.am): Likewise.
9594         * modules/dev-ino (Makefile.am): Likewise.
9595         * modules/dirfd (Makefile.am): Likewise.
9596         * modules/dirname (Makefile.am): Likewise.
9597         * modules/dup2 (Makefile.am): Likewise.
9598         * modules/eealloc (Makefile.am): Likewise.
9599         * modules/error (Makefile.am): Likewise.
9600         * modules/euidaccess (Makefile.am): Likewise.
9601         * modules/exclude (Makefile.am): Likewise.
9602         * modules/exitfail (Makefile.am): Likewise.
9603         * modules/fcntl-safer (Makefile.am): Likewise.
9604         * modules/fcntl (Makefile.am): Likewise.
9605         * modules/file-type (Makefile.am): Likewise.
9606         * modules/fileblocks (Makefile.am): Likewise.
9607         * modules/filemode (Makefile.am): Likewise.
9608         * modules/filenamecat (Makefile.am): Likewise.
9609         * modules/fnmatch (Makefile.am): Likewise.
9610         * modules/fopen-safer (Makefile.am): Likewise.
9611         * modules/fpending (Makefile.am): Likewise.
9612         * modules/fprintftime (Makefile.am): Likewise.
9613         * modules/free (Makefile.am): Likewise.
9614         * modules/fsusage (Makefile.am): Likewise.
9615         * modules/ftruncate (Makefile.am): Likewise.
9616         * modules/fts (Makefile.am): Likewise.
9617         * modules/gc-arcfour (Makefile.am): Likewise.
9618         * modules/gc-des (Makefile.am): Likewise.
9619         * modules/gc-hmac-md5 (Makefile.am): Likewise.
9620         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
9621         * modules/gc-md4 (Makefile.am): Likewise.
9622         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9623         * modules/gc-sha1 (Makefile.am): Likewise.
9624         * modules/gc (Makefile.am): Likewise.
9625         * modules/getaddrinfo (Makefile.am): Likewise.
9626         * modules/getcwd (Makefile.am): Likewise.
9627         * modules/getdelim (Makefile.am): Likewise.
9628         * modules/getdomainname (Makefile.am): Likewise.
9629         * modules/getgroups (Makefile.am): Likewise.
9630         * modules/gethostname (Makefile.am): Likewise.
9631         * modules/gethrxtime (Makefile.am): Likewise.
9632         * modules/getline (Makefile.am): Likewise.
9633         * modules/getloadavg (Makefile.am): Likewise.
9634         * modules/getlogin_r (Makefile.am): Likewise.
9635         * modules/getndelim2 (Makefile.am): Likewise.
9636         * modules/getopt (Makefile.am): Likewise.
9637         * modules/getpagesize (Makefile.am): Likewise.
9638         * modules/getpass-gnu (Makefile.am): Likewise.
9639         * modules/getpass (Makefile.am): Likewise.
9640         * modules/getsubopt (Makefile.am): Likewise.
9641         * modules/gettime (Makefile.am): Likewise.
9642         * modules/gettimeofday (Makefile.am): Likewise.
9643         * modules/getugroups (Makefile.am): Likewise.
9644         * modules/getusershell (Makefile.am): Likewise.
9645         * modules/glob (Makefile.am): Likewise.
9646         * modules/group-member (Makefile.am): Likewise.
9647         * modules/hard-locale (Makefile.am): Likewise.
9648         * modules/hash (Makefile.am): Likewise.
9649         * modules/hmac-md5 (Makefile.am): Likewise.
9650         * modules/hmac-sha1 (Makefile.am): Likewise.
9651         * modules/human (Makefile.am): Likewise.
9652         * modules/idcache (Makefile.am): Likewise.
9653         * modules/imaxabs (Makefile.am): Likewise.
9654         * modules/imaxdiv (Makefile.am): Likewise.
9655         * modules/inet_ntop (Makefile.am): Likewise.
9656         * modules/inet_pton (Makefile.am): Likewise.
9657         * modules/intprops (Makefile.am): Likewise.
9658         * modules/inttostr (Makefile.am): Likewise.
9659         * modules/inttypes (Makefile.am): Likewise.
9660         * modules/isapipe (Makefile.am): Likewise.
9661         * modules/javaversion (Makefile.am): Likewise.
9662         * modules/lchmod (Makefile.am): Likewise.
9663         * modules/lchown (Makefile.am): Likewise.
9664         * modules/localcharset (Makefile.am): Likewise.
9665         * modules/long-options (Makefile.am): Likewise.
9666         * modules/lstat (Makefile.am): Likewise.
9667         * modules/malloc (Makefile.am): Likewise.
9668         * modules/mathl (Makefile.am): Likewise.
9669         * modules/mbchar (Makefile.am): Likewise.
9670         * modules/md2 (Makefile.am): Likewise.
9671         * modules/md4 (Makefile.am): Likewise.
9672         * modules/md5 (Makefile.am): Likewise.
9673         * modules/memcasecmp (Makefile.am): Likewise.
9674         * modules/memchr (Makefile.am): Likewise.
9675         * modules/memcmp (Makefile.am): Likewise.
9676         * modules/memcoll (Makefile.am): Likewise.
9677         * modules/memcpy (Makefile.am): Likewise.
9678         * modules/memmem (Makefile.am): Likewise.
9679         * modules/memmove (Makefile.am): Likewise.
9680         * modules/mempcpy (Makefile.am): Likewise.
9681         * modules/memrchr (Makefile.am): Likewise.
9682         * modules/memset (Makefile.am): Likewise.
9683         * modules/memxor (Makefile.am): Likewise.
9684         * modules/mkancesdirs (Makefile.am): Likewise.
9685         * modules/mkdir-p (Makefile.am): Likewise.
9686         * modules/mkdir (Makefile.am): Likewise.
9687         * modules/mkdtemp (Makefile.am): Likewise.
9688         * modules/mkstemp (Makefile.am): Likewise.
9689         * modules/mktime (Makefile.am): Likewise.
9690         * modules/modechange (Makefile.am): Likewise.
9691         * modules/mountlist (Makefile.am): Likewise.
9692         * modules/nanosleep (Makefile.am): Likewise.
9693         * modules/obstack (Makefile.am): Likewise.
9694         * modules/openat (Makefile.am): Likewise.
9695         * modules/pagealign_alloc (Makefile.am): Likewise.
9696         * modules/pathmax (Makefile.am): Likewise.
9697         * modules/physmem (Makefile.am): Likewise.
9698         * modules/poll (Makefile.am): Likewise.
9699         * modules/posixtm (Makefile.am): Likewise.
9700         * modules/posixver (Makefile.am): Likewise.
9701         * modules/putenv (Makefile.am): Likewise.
9702         * modules/quote (Makefile.am): Likewise.
9703         * modules/quotearg (Makefile.am): Likewise.
9704         * modules/raise (Makefile.am): Likewise.
9705         * modules/read-file (Makefile.am): Likewise.
9706         * modules/readline (Makefile.am): Likewise.
9707         * modules/readlink (Makefile.am): Likewise.
9708         * modules/readtokens (Makefile.am): Likewise.
9709         * modules/readutmp (Makefile.am): Likewise.
9710         * modules/realloc (Makefile.am): Likewise.
9711         * modules/regex (Makefile.am): Likewise.
9712         * modules/rename-dest-slash (Makefile.am): Likewise.
9713         * modules/rename (Makefile.am): Likewise.
9714         * modules/rijndael (Makefile.am): Likewise.
9715         * modules/rmdir (Makefile.am): Likewise.
9716         * modules/rpmatch (Makefile.am): Likewise.
9717         * modules/safe-read (Makefile.am): Likewise.
9718         * modules/safe-write (Makefile.am): Likewise.
9719         * modules/same-inode (Makefile.am): Likewise.
9720         * modules/same (Makefile.am): Likewise.
9721         * modules/save-cwd (Makefile.am): Likewise.
9722         * modules/savedir (Makefile.am): Likewise.
9723         * modules/setenv (Makefile.am): Likewise.
9724         * modules/settime (Makefile.am): Likewise.
9725         * modules/sha1 (Makefile.am): Likewise.
9726         * modules/sig2str (Makefile.am): Likewise.
9727         * modules/snprintf (Makefile.am): Likewise.
9728         * modules/stat-macros (Makefile.am): Likewise.
9729         * modules/stat-time (Makefile.am): Likewise.
9730         * modules/stdbool (Makefile.am): Likewise.
9731         * modules/stdint (Makefile.am): Likewise.
9732         * modules/stdlib-safer (Makefile.am): Likewise.
9733         * modules/stpcpy (Makefile.am): Likewise.
9734         * modules/stpncpy (Makefile.am): Likewise.
9735         * modules/strcase (Makefile.am): Likewise.
9736         * modules/strcasestr (Makefile.am): Likewise.
9737         * modules/strchrnul (Makefile.am): Likewise.
9738         * modules/strcspn (Makefile.am): Likewise.
9739         * modules/strdup (Makefile.am): Likewise.
9740         * modules/strerror (Makefile.am): Likewise.
9741         * modules/strftime (Makefile.am): Likewise.
9742         * modules/strndup (Makefile.am): Likewise.
9743         * modules/strnlen (Makefile.am): Likewise.
9744         * modules/strpbrk (Makefile.am): Likewise.
9745         * modules/strsep (Makefile.am): Likewise.
9746         * modules/strstr (Makefile.am): Likewise.
9747         * modules/strtod (Makefile.am): Likewise.
9748         * modules/strtoimax (Makefile.am): Likewise.
9749         * modules/strtok_r (Makefile.am): Likewise.
9750         * modules/strtol (Makefile.am): Likewise.
9751         * modules/strtoll (Makefile.am): Likewise.
9752         * modules/strtoul (Makefile.am): Likewise.
9753         * modules/strtoull (Makefile.am): Likewise.
9754         * modules/strtoumax (Makefile.am): Likewise.
9755         * modules/strverscmp (Makefile.am): Likewise.
9756         * modules/sys_socket (Makefile.am): Likewise.
9757         * modules/sys_stat (Makefile.am): Likewise.
9758         * modules/sysexits (Makefile.am): Likewise.
9759         * modules/time_r (Makefile.am): Likewise.
9760         * modules/timegm (Makefile.am): Likewise.
9761         * modules/timespec (Makefile.am): Likewise.
9762         * modules/tmpfile-safer (Makefile.am): Likewise.
9763         * modules/trim (Makefile.am): Likewise.
9764         * modules/unistd-safer (Makefile.am): Likewise.
9765         * modules/unlinkdir (Makefile.am): Likewise.
9766         * modules/unlocked-io (Makefile.am): Likewise.
9767         * modules/userspec (Makefile.am): Likewise.
9768         * modules/utime (Makefile.am): Likewise.
9769         * modules/utimecmp (Makefile.am): Likewise.
9770         * modules/utimens (Makefile.am): Likewise.
9771         * modules/vasnprintf (Makefile.am): Likewise.
9772         * modules/vasprintf (Makefile.am): Likewise.
9773         * modules/vsnprintf (Makefile.am): Likewise.
9774         * modules/xalloc (Makefile.am): Likewise.
9775         * modules/xgetcwd (Makefile.am): Likewise.
9776         * modules/xnanosleep (Makefile.am): Likewise.
9777         * modules/xreadlink (Makefile.am): Likewise.
9778         * modules/xstrtod (Makefile.am): Likewise.
9779         * modules/xstrtol (Makefile.am): Likewise.
9780         * modules/xstrtold (Makefile.am): Likewise.
9781         * modules/yesno (Makefile.am): Likewise.
9782         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
9783
9784 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9785
9786         * modules/error (Makefile.am): Distribute files through
9787         EXTRA_DIST, not lib_SOURCES.
9788
9789 2006-10-12  Eric Blake  <ebb9@byu.net>
9790
9791         * modules/error (Makefile.am): Distribute files in /lib.
9792         * modules/obstack (Makefile.am): Likewise.
9793
9794 2006-10-12  Bruno Haible  <bruno@clisp.org>
9795
9796         * modules/acl (Makefile.am): Distribute all files in lib/ through
9797         EXTRA_DIST.
9798         * modules/arcfour (Makefile.am): Likewise.
9799         * modules/arctwo (Makefile.am): Likewise.
9800         * modules/argmatch (Makefile.am): Likewise.
9801         * modules/argz (Makefile.am): Likewise.
9802         * modules/atexit (Makefile.am): Likewise.
9803         * modules/backupfile (Makefile.am): Likewise.
9804         * modules/c-strtod (Makefile.am): Likewise.
9805         * modules/c-strtold (Makefile.am): Likewise.
9806         * modules/calloc (Makefile.am): Likewise.
9807         * modules/canon-host (Makefile.am): Likewise.
9808         * modules/canonicalize (Makefile.am): Likewise.
9809         * modules/chdir-long (Makefile.am): Likewise.
9810         * modules/chdir-safer (Makefile.am): Likewise.
9811         * modules/check-version (Makefile.am): Likewise.
9812         * modules/chown (Makefile.am): Likewise.
9813         * modules/cloexec (Makefile.am): Likewise.
9814         * modules/close-stream (Makefile.am): Likewise.
9815         * modules/closeout (Makefile.am): Likewise.
9816         * modules/crc (Makefile.am): Likewise.
9817         * modules/cycle-check (Makefile.am): Likewise.
9818         * modules/des (Makefile.am): Likewise.
9819         * modules/dirfd (Makefile.am): Likewise.
9820         * modules/dirname (Makefile.am): Likewise.
9821         * modules/dup2 (Makefile.am): Likewise.
9822         * modules/euidaccess (Makefile.am): Likewise.
9823         * modules/exclude (Makefile.am): Likewise.
9824         * modules/exitfail (Makefile.am): Likewise.
9825         * modules/fcntl-safer (Makefile.am): Likewise.
9826         * modules/file-type (Makefile.am): Likewise.
9827         * modules/fileblocks (Makefile.am): Likewise.
9828         * modules/filemode (Makefile.am): Likewise.
9829         * modules/filenamecat (Makefile.am): Likewise.
9830         * modules/fnmatch (Makefile.am): Likewise.
9831         * modules/fopen-safer (Makefile.am): Likewise.
9832         * modules/fpending (Makefile.am): Likewise.
9833         * modules/fprintftime (Makefile.am): Likewise.
9834         * modules/free (Makefile.am): Likewise.
9835         * modules/fsusage (Makefile.am): Likewise.
9836         * modules/ftruncate (Makefile.am): Likewise.
9837         * modules/fts (Makefile.am): Likewise.
9838         * modules/gc (Makefile.am): Likewise.
9839         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9840         * modules/getaddrinfo (Makefile.am): Likewise.
9841         * modules/getcwd (Makefile.am): Likewise.
9842         * modules/getdelim (Makefile.am): Likewise.
9843         * modules/getdomainname (Makefile.am): Likewise.
9844         * modules/getgroups (Makefile.am): Likewise.
9845         * modules/gethostname (Makefile.am): Likewise.
9846         * modules/gethrxtime (Makefile.am): Likewise.
9847         * modules/getline (Makefile.am): Likewise.
9848         * modules/getloadavg (Makefile.am): Likewise.
9849         * modules/getlogin_r (Makefile.am): Likewise.
9850         * modules/getopt (Makefile.am): Likewise.
9851         * modules/getpass (Makefile.am): Likewise.
9852         * modules/getpass-gnu (Makefile.am): Likewise.
9853         * modules/getsubopt (Makefile.am): Likewise.
9854         * modules/gettime (Makefile.am): Likewise.
9855         * modules/gettimeofday (Makefile.am): Likewise.
9856         * modules/getugroups (Makefile.am): Likewise.
9857         * modules/getusershell (Makefile.am): Likewise.
9858         * modules/glob (Makefile.am): Likewise.
9859         * modules/group-member (Makefile.am): Likewise.
9860         * modules/hard-locale (Makefile.am): Likewise.
9861         * modules/hash (Makefile.am): Likewise.
9862         * modules/hmac-md5 (Makefile.am): Likewise.
9863         * modules/hmac-sha1 (Makefile.am): Likewise.
9864         * modules/human (Makefile.am): Likewise.
9865         * modules/idcache (Makefile.am): Likewise.
9866         * modules/imaxabs (Makefile.am): Likewise.
9867         * modules/imaxdiv (Makefile.am): Likewise.
9868         * modules/inet_ntop (Makefile.am): Likewise.
9869         * modules/inet_pton (Makefile.am): Likewise.
9870         * modules/inttostr (Makefile.am): Likewise.
9871         * modules/isapipe (Makefile.am): Likewise.
9872         * modules/lchown (Makefile.am): Likewise.
9873         * modules/long-options (Makefile.am): Likewise.
9874         * modules/lstat (Makefile.am): Likewise.
9875         * modules/malloc (Makefile.am): Likewise.
9876         * modules/mathl (Makefile.am): Likewise.
9877         * modules/mbchar (Makefile.am): Likewise.
9878         * modules/md2 (Makefile.am): Likewise.
9879         * modules/md4 (Makefile.am): Likewise.
9880         * modules/md5 (Makefile.am): Likewise.
9881         * modules/memcasecmp (Makefile.am): Likewise.
9882         * modules/memchr (Makefile.am): Likewise.
9883         * modules/memcmp (Makefile.am): Likewise.
9884         * modules/memcoll (Makefile.am): Likewise.
9885         * modules/memcpy (Makefile.am): Likewise.
9886         * modules/memmem (Makefile.am): Likewise.
9887         * modules/memmove (Makefile.am): Likewise.
9888         * modules/mempcpy (Makefile.am): Likewise.
9889         * modules/memrchr (Makefile.am): Likewise.
9890         * modules/memset (Makefile.am): Likewise.
9891         * modules/memxor (Makefile.am): Likewise.
9892         * modules/mkancesdirs (Makefile.am): Likewise.
9893         * modules/mkdir (Makefile.am): Likewise.
9894         * modules/mkdir-p (Makefile.am): Likewise.
9895         * modules/mkdtemp (Makefile.am): Likewise.
9896         * modules/mkstemp (Makefile.am): Likewise.
9897         * modules/mktime (Makefile.am): Likewise.
9898         * modules/modechange (Makefile.am): Likewise.
9899         * modules/mountlist (Makefile.am): Likewise.
9900         * modules/nanosleep (Makefile.am): Likewise.
9901         * modules/openat (Makefile.am): Likewise.
9902         * modules/pagealign_alloc (Makefile.am): Likewise.
9903         * modules/physmem (Makefile.am): Likewise.
9904         * modules/poll (Makefile.am): Likewise.
9905         * modules/posixtm (Makefile.am): Likewise.
9906         * modules/posixver (Makefile.am): Likewise.
9907         * modules/putenv (Makefile.am): Likewise.
9908         * modules/quote (Makefile.am): Likewise.
9909         * modules/quotearg (Makefile.am): Likewise.
9910         * modules/raise (Makefile.am): Likewise.
9911         * modules/read-file (Makefile.am): Likewise.
9912         * modules/readline (Makefile.am): Likewise.
9913         * modules/readlink (Makefile.am): Likewise.
9914         * modules/readtokens (Makefile.am): Likewise.
9915         * modules/readutmp (Makefile.am): Likewise.
9916         * modules/realloc (Makefile.am): Likewise.
9917         * modules/regex (Makefile.am): Likewise.
9918         * modules/rename (Makefile.am): Likewise.
9919         * modules/rename-dest-slash (Makefile.am): Likewise.
9920         * modules/rijndael (Makefile.am): Likewise.
9921         * modules/rmdir (Makefile.am): Likewise.
9922         * modules/rpmatch (Makefile.am): Likewise.
9923         * modules/safe-read (Makefile.am): Likewise.
9924         * modules/safe-write (Makefile.am): Likewise.
9925         * modules/same (Makefile.am): Likewise.
9926         * modules/save-cwd (Makefile.am): Likewise.
9927         * modules/savedir (Makefile.am): Likewise.
9928         * modules/setenv (Makefile.am): Likewise.
9929         * modules/settime (Makefile.am): Likewise.
9930         * modules/sha1 (Makefile.am): Likewise.
9931         * modules/sig2str (Makefile.am): Likewise.
9932         * modules/snprintf (Makefile.am): Likewise.
9933         * modules/stdlib-safer (Makefile.am): Likewise.
9934         * modules/stpcpy (Makefile.am): Likewise.
9935         * modules/stpncpy (Makefile.am): Likewise.
9936         * modules/strcase (Makefile.am): Likewise.
9937         * modules/strcasestr (Makefile.am): Likewise.
9938         * modules/strchrnul (Makefile.am): Likewise.
9939         * modules/strcspn (Makefile.am): Likewise.
9940         * modules/strdup (Makefile.am): Likewise.
9941         * modules/strerror (Makefile.am): Likewise.
9942         * modules/strftime (Makefile.am): Likewise.
9943         * modules/strndup (Makefile.am): Likewise.
9944         * modules/strnlen (Makefile.am): Likewise.
9945         * modules/strpbrk (Makefile.am): Likewise.
9946         * modules/strsep (Makefile.am): Likewise.
9947         * modules/strstr (Makefile.am): Likewise.
9948         * modules/strtod (Makefile.am): Likewise.
9949         * modules/strtoimax (Makefile.am): Likewise.
9950         * modules/strtok_r (Makefile.am): Likewise.
9951         * modules/strtol (Makefile.am): Likewise.
9952         * modules/strtoll (Makefile.am): Likewise.
9953         * modules/strtoul (Makefile.am): Likewise.
9954         * modules/strtoull (Makefile.am): Likewise.
9955         * modules/strtoumax (Makefile.am): Likewise.
9956         * modules/strverscmp (Makefile.am): Likewise.
9957         * modules/time_r (Makefile.am): Likewise.
9958         * modules/timegm (Makefile.am): Likewise.
9959         * modules/tmpfile-safer (Makefile.am): Likewise.
9960         * modules/unistd-safer (Makefile.am): Likewise.
9961         * modules/unlinkdir (Makefile.am): Likewise.
9962         * modules/userspec (Makefile.am): Likewise.
9963         * modules/utime (Makefile.am): Likewise.
9964         * modules/utimecmp (Makefile.am): Likewise.
9965         * modules/utimens (Makefile.am): Likewise.
9966         * modules/vasnprintf (Makefile.am): Likewise.
9967         * modules/vasprintf (Makefile.am): Likewise.
9968         * modules/vsnprintf (Makefile.am): Likewise.
9969         * modules/xalloc (Makefile.am): Likewise.
9970         * modules/xgetcwd (Makefile.am): Likewise.
9971         * modules/xnanosleep (Makefile.am): Likewise.
9972         * modules/xreadlink (Makefile.am): Likewise.
9973         * modules/xstrtod (Makefile.am): Likewise.
9974         * modules/xstrtol (Makefile.am): Likewise.
9975         * modules/xstrtold (Makefile.am): Likewise.
9976         * modules/yesno (Makefile.am): Likewise.
9977
9978 2006-10-12  Jim Meyering  <jim@meyering.net>
9979
9980         * m4/getloadavg.m4: Revert the change below.
9981
9982         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
9983         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
9984         fail with a symlink, which is what coreutils' ./bootstrap now
9985         creates by default.
9986
9987 2006-10-12  Bruno Haible  <bruno@clisp.org>
9988
9989         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
9990         mingw.
9991         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
9992         MSVC and mingw explicitly.
9993
9994 2006-10-11  Simon Josefsson  <jas@extundo.com>
9995             Bruno Haible  <bruno@clisp.org>
9996
9997         Add support for multiple gnulib-tool invocations in the scope of a
9998         single configure.ac file.
9999         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
10000         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
10001         with the same contents as the _LIBADD variable.
10002         (func_emit_initmacro_start, func_emit_initmacro_end,
10003         func_emit_initmacro_done): New functions.
10004         (func_import, func_create_testdir): Invoke them. Allow the identifiers
10005         gl_LIBOBJS and gl_LTLIBOBJS.
10006
10007 2006-10-11  Bruno Haible  <bruno@clisp.org>
10008
10009         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
10010         (func_create_testdir): Don't create po/Makefile.am, don't invoke
10011         autoreconf. Instead, invoke autopoint explicitly but move back the
10012         *.m4 files from gnulib.
10013
10014 2006-10-11  Bruno Haible  <bruno@clisp.org>
10015
10016         * gnulib-tool (func_usage): Make module names after --create-testdir
10017         optional.
10018         (func_create_testdir): If no module was specified, use nearly all
10019         modules.
10020
10021 2006-10-12  Jim Meyering  <jim@meyering.net>
10022
10023         Big performance improvement for fts-based tools that use FTS_NOSTAT.
10024         Avoid spurious inode-mismatch problems on non-POSIX file systems.
10025         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
10026         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
10027         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
10028         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
10029         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
10030         (fts_set_stat_required): New function.
10031         (fts_open): Defer the calls to fts_stat, if possible or requested.
10032         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
10033         into fts_stat itself.
10034         (fts_read): Perform any required (deferred) fts_stat call.
10035         (fts_build): Likewise, for the directory we're about to open and read.
10036         In the readdir loop, carefully decide whether each entry will require
10037         an eventual call to fts_stat, using dirent.d_type info if available.
10038         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
10039         a command line argument into this function.  Update all callers.
10040         Map a return value of FTS_DOT to FTS_D for a command line argument.
10041         * modules/fts (Depends-on): Add d-type.  Alphabetize.
10042         Thanks to Miklos Szeredi for his tenacity and for the initial
10043         bug report about "find" failing on a FUSE-based file system.
10044
10045         * lib/fts.c (fts_open): Use consistent indentation.
10046
10047 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10048
10049         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
10050         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
10051         reported by Jim Meyering.  All uses of cache variables renamed
10052         to match Autoconf's.
10053         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
10054         the other one.
10055
10056         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
10057         Fix misspelling in diagnostic.
10058
10059 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10060
10061         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
10062         defined.  Problem reported by Matthew Woehlke.
10063
10064         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
10065         Add support for Tandem NonStop R series.
10066         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
10067         Use new macro.
10068
10069         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
10070         (has_trailing_slash): Omit size arg; all callers changed.
10071         Omit 'inline', since it doesn't help performance and we'd
10072         need to configure it.
10073         Don't count //, ///, etc. as having a trailing slash.
10074         As a side effect, this removes a C99ism reported by Matthew Woehlke.
10075         (rpl_rename_dest_slash): On failure, use rename's errno rather
10076         than (in some cases) an incorrect or junk errno.
10077         Simplify code by removing need to compute length; this does
10078         cause it to make two passes instead of one over the file name,
10079         but it's worth it.
10080
10081         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
10082         change, since Autoconf's version may no longer be appropriate now
10083         that we are using CVS Autoconf's version.  Add support for Tandem.
10084
10085 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10086             Bruno Haible  <bruno@clisp.org>
10087
10088         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
10089         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
10090         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
10091         gl_AC_TYPE_LONG_LONG.
10092
10093         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
10094         instead of HAVE_LONG_LONG.
10095         * lib/printf-args.c (printf_fetchargs): Likewise.
10096         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
10097         * lib/vasnprintf.c (VASNPRINTF): Likewise.
10098         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
10099         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
10100         gl_AC_TYPE_LONG_LONG.
10101
10102 2006-10-11  Bruno Haible  <bruno@clisp.org>
10103
10104         * m4/longlong.m4: Add comments.
10105         * m4/ulonglong.m4: Likewise.
10106
10107 2006-10-10  Bruno Haible  <bruno@clisp.org>
10108
10109         Make it possible to #define stpcpy, strdup to aliases.
10110         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
10111         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
10112
10113 2006-10-10  Bruno Haible  <bruno@clisp.org>
10114
10115         Make it possible to #define gcd to an alias.
10116         * lib/gcd.c: Include config.h.
10117
10118 2006-10-10  Bruno Haible  <bruno@clisp.org>
10119
10120         Make it possible to #define c_isascii to an alias.
10121         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
10122         defined. Undefine the macros before defining them, to avoid gcc
10123         warnings.
10124         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
10125         define NO_C_CTYPE_MACROS early.
10126
10127 2006-10-10  Bruno Haible  <bruno@clisp.org>
10128
10129         Make it possible to #define set_program_name to an alias.
10130         * lib/progname.c: Don't undefine set_program_name; instead, undefine
10131         ENABLE_RELOCATABLE early.
10132
10133 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10134
10135         Port to Tandem NSK OSS, which has 64-bit signed int but at most
10136         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
10137         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
10138         More generally, don't assume that 64-bit signed int is available
10139         if unsigned int is, and vice versa.
10140         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
10141         unsigned symbols, not on their signed counterparts.
10142         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
10143         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
10144         (UINT64_C, UINTMAX_C):
10145         Likewise.
10146         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
10147         unsigned counterparts.
10148         (Have_long_long, Unsigned): New macros.
10149         (Int): Renamed from INT.
10150         (strtoimax): Use the new macros.
10151         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
10152         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
10153         * modules/inttypes (inttypes.h): Substitute
10154         HAVE_UNSIGNED_LONG_LONG_INT.
10155         * modules/stdint (stdint.h): Likewise.
10156         (Files): Add m4/ulonglong.m4.
10157
10158 2006-10-10  Bruno Haible  <bruno@clisp.org>
10159
10160         Fix a gcc -Wshadow warning.
10161         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
10162         to 'bucket'.
10163         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
10164         gl_linked_indexof_from_to): Likewise.
10165         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
10166         Likewise.
10167         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
10168         Likewise.
10169         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
10170         Reported by Eric Blake.
10171
10172 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
10173
10174         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
10175         for NetBSD.  Problem reported by Bruno Haible.
10176
10177 2006-10-09  Jim Meyering  <jim@meyering.net>
10178
10179         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
10180         Patch from Bruno Haible.
10181
10182 2006-10-09  Jim Meyering  <jim@meyering.net>
10183
10184         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
10185         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
10186         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
10187
10188 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
10189
10190         Don't include <config.h> twice; this doesn't work in some cases,
10191         e.g., when config.h has "#define intmax_t long long int" and
10192         we include <config.h>, <inttypes.h>, <config.h> in that order.
10193         Problem reported by Matthew Woehlke in:
10194         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
10195         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
10196         * lib/fts-cycle.c: Don't include config.h.
10197         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
10198         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
10199         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
10200         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
10201         inttypes.h.
10202         * lib/xstrtoumax.c: Likewise.
10203         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
10204         __strtol and the like, so that this module is more like its siblings.
10205         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
10206         Remove; no longer needed now that we assume gnulib inttypes.h.
10207
10208 2006-10-08  Bruno Haible  <bruno@clisp.org>
10209
10210         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
10211         option.
10212
10213 2006-10-07  Jim Meyering  <jim@meyering.net>
10214
10215         * modules/inttypes (inttypes.h): Revert what seems to have been
10216         an inadvertent part of today's change: use "|", not "/" in the
10217         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
10218
10219 2006-10-07  Bruno Haible  <bruno@clisp.org>
10220
10221         * modules/sublist: New file.
10222
10223 2006-10-07  Bruno Haible  <bruno@clisp.org>
10224
10225         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
10226         * modules/argz (argz.h): Likewise.
10227         * modules/arpa_inet (arpa/inet.h): Likewise.
10228         * modules/byteswap (byteswap.h): Likewise.
10229         * modules/configmake (configmake.h): Likewise.
10230         * modules/fcntl (fcntl.h): Likewise.
10231         * modules/fnmatch (fnmatch.h): Likewise.
10232         * modules/getopt (getopt.h): Likewise.
10233         * modules/glob (glob.h): Likewise.
10234         * modules/inttypes (inttypes.h): Likewise.
10235         * modules/netinet_in (netinet/in.h): Likewise.
10236         * modules/poll (poll.h): Likewise.
10237         * modules/stdbool (stdbool.h): Likewise.
10238         * modules/stdint (stdint.h): Likewise.
10239         * modules/sys_select (sys/select.h): Likewise.
10240         * modules/sys_socket (sys/socket.h): Likewise.
10241         * modules/sys_stat (sys/stat.h): Likewise.
10242         * modules/sysexits (sysexits.h): Likewise.
10243         * modules/unistd (unistd.h): Likewise.
10244         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10245         Add a "DO NOT EDIT" comment to the generated file.
10246         (func_import): Likewise for gnulib-comp.m4.
10247
10248 2006-10-07  Bruno Haible  <bruno@clisp.org>
10249
10250         * lib/gl_sublist.h: New file.
10251         * lib/gl_sublist.c: New file.
10252
10253 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10254
10255         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
10256         name (relative to the original working directory) and the file
10257         name component (relative to the temporary working directory).  All
10258         callers changed.
10259         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
10260         * lib/mkdir-p.c (make_dir_parents): Likewise.
10261         * lib/mkdir-p.h (make_dir_parents): Likewise.
10262
10263 2006-10-06  Eric Blake  <ebb9@byu.net>
10264
10265         Define several macros for use by the clean-temp module.
10266         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
10267         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
10268         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
10269
10270         * lib/clean-temp.h (close_stream_temp): New declaration.
10271         * lib/clean-temp.c (includes): Pull in headers according to what
10272         other modules are in use.
10273         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
10274
10275 2006-10-06  Bruno Haible  <bruno@clisp.org>
10276
10277         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
10278         instead of fopen, fwriteerror.
10279
10280 2006-10-06  Bruno Haible  <bruno@clisp.org>
10281
10282         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
10283         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
10284         int.
10285         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
10286         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
10287         Return an error indicator.
10288         Suggested by Eric Blake.
10289
10290 2006-10-06  Bruno Haible  <bruno@clisp.org>
10291
10292         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
10293         Reported by Eric Blake.
10294
10295 2006-10-06  Bruno Haible  <bruno@clisp.org>
10296
10297         * modules/closeout (Description): Mention stderr too.
10298
10299 2006-10-06  Bruno Haible  <bruno@clisp.org>
10300         and Paul Eggert  <eggert@cs.ucla.edu>
10301
10302         * lib/closeout.c (close_stdout): Also close stderr.
10303         * lib/closeout.h: Update comment.
10304
10305 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10306
10307         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
10308         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
10309         * lib/dirchownmod.c: Include lchown.h.
10310         * lib/lchown.c: Don't include files that lchown.h now includes.
10311         Don't declare chown, since lchown.h now does that.
10312         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
10313         (lchown): Define to rpl_chown if lchown is declared but
10314         does not exist.  Declare using a prototype if lchown is not
10315         declared.  Add a copyright notice.
10316         * lib/mkstemp.h: Include <unistd.h>.
10317         * lib/openat.c: Include lchown.h.
10318
10319         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
10320         we now test for that separately.
10321         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
10322         rather than O_NOFOLLOW, when testing whether it's possible to
10323         avoid a race condition reliably.
10324         * lib/savewd.c (savewd_chdir): Likewise.
10325
10326         Remove macros that are no longer needed now that stdint.h is
10327         reliable.
10328         * lib/fsusage.c (UINTMAX_MAX): Remove.
10329         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
10330         * lib/utimecmp.c (SIZE_MAX): Remove.
10331
10332         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
10333
10334         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
10335         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
10336         O_NOATIME works.
10337
10338 2006-10-05  Bruno Haible  <bruno@clisp.org>
10339
10340         * lib/gl_list.h (gl_sortedlist_search_from_to,
10341         gl_sortedlist_indexof_from_to): New declarations.
10342         (gl_list_implementation): New fields sortedlist_search_from_to,
10343         sortedlist_indexof_from_to.
10344         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
10345         inline functions.
10346         * lib/gl_list.c (gl_sortedlist_search_from_to,
10347         gl_sortedlist_indexof_from_to): New functions.
10348         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
10349         function.
10350         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
10351         (gl_array_sortedlist_search_from_to): New function.
10352         (gl_array_list_implementation): Update.
10353         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
10354         function.
10355         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
10356         (gl_carray_sortedlist_search_from_to): New function.
10357         (gl_carray_list_implementation): Update.
10358         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
10359         gl_linked_sortedlist_indexof_from_to): New functions.
10360         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10361         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10362         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
10363         gl_tree_sortedlist_indexof_from_to): New functions.
10364         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10365         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10366         Update.
10367         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10368         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
10369         Update.
10370
10371 2006-10-05  Bruno Haible  <bruno@clisp.org>
10372
10373         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
10374         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
10375         (struct gl_list_implementation): Add fields search_from_to,
10376         indexof_from_to. Remove fields search, indexof.
10377         (gl_list_search): Use the search_from_to method.
10378         (gl_list_search_from, gl_list_search_from_to): New functions.
10379         (gl_list_indexof): Use the indexof_from_to method.
10380         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10381         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
10382         (gl_list_search_from, gl_list_search_from_to): New functions.
10383         (gl_list_indexof): Use the indexof_from_to method.
10384         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10385         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
10386         gl_array_indexof. Add start_index, end_index arguments.
10387         (gl_array_search_from_to): Renamed from gl_array_search. Add
10388         start_index, end_index arguments.
10389         (gl_array_remove, gl_array_list_implementation): Update.
10390         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
10391         gl_carray_indexof. Add start_index, end_index arguments.
10392         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
10393         start_index, end_index arguments.
10394         (gl_carray_remove, gl_carray_list_implementation): Update.
10395         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
10396         gl_linked_search. Add start_index, end_index arguments.
10397         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
10398         start_index, end_index arguments.
10399         (gl_linked_remove): Update.
10400         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10401         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10402         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
10403         field to 'size_t'.
10404         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
10405         gl_tree_search. Add start_index, end_index arguments.
10406         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10407         start_index, end_index arguments.
10408         (gl_tree_remove): Update.
10409         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10410         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10411         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
10412         function.
10413         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
10414         gl_tree_search. Add start_index, end_index arguments.
10415         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10416         start_index, end_index arguments.
10417         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10418         Update.
10419         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
10420
10421 2006-10-05  Bruno Haible  <bruno@clisp.org>
10422
10423         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
10424
10425         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
10426         fwriteerror_temp): New declarations.
10427         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
10428         (descriptors): New variable.
10429         (cleanup): First, close the descriptors.
10430         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
10431         fclose_temp, fwriteerror_temp): New functions.
10432
10433 2006-10-04  Jim Meyering  <jim@meyering.net>
10434
10435         * lib/fts.c (fts_open): Tiny comment change.
10436
10437 2006-10-04  Bruno Haible  <bruno@clisp.org>
10438
10439         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
10440         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
10441         gl_LOCK_BODY.
10442         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
10443         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
10444         gl_LOCK_EARLY_BODY.
10445         (gl_LOCK): Require gl_LOCK_BODY.
10446
10447 2006-10-04  Bruno Haible  <bruno@clisp.org>
10448
10449         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
10450         (gl_oset_search_atleast): New declaration.
10451         (struct gl_oset_implementation): Add field 'search_atleast'.
10452         (gl_oset_search_atleast): New inline function.
10453         * lib/gl_oset.c (gl_oset_search_atleast): New function.
10454         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
10455         (gl_array_oset_implementation): Update.
10456         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
10457         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
10458         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
10459
10460 2006-10-04  Bruno Haible  <bruno@clisp.org>
10461
10462         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
10463
10464 2006-10-03  Bruno Haible  <bruno@clisp.org>
10465
10466         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
10467         from gl_avltreehash_list_implementation.
10468
10469 2006-10-03  Bruno Haible  <bruno@clisp.org>
10470
10471         * lib/gl_oset.c (gl_oset_add): Fix return type.
10472
10473 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
10474
10475         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
10476
10477 2006-10-02  Eric Blake  <ebb9@byu.net>
10478
10479         * modules/strnlen (Depends-on): Add extensions.
10480
10481 2006-10-02  Eric Blake  <ebb9@byu.net>
10482
10483         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
10484         definition in 2.60+.
10485
10486 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
10487
10488         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
10489         checks.
10490
10491 2006-10-02  Bruno Haible  <bruno@clisp.org>
10492
10493         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
10494         to the AUTOMAKE_OPTIONS.
10495         Reported by Jim Meyering.
10496
10497 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10498
10499         Work around bug in Solaris 10 /proc file system:
10500         /proc/self/fd/NNN/.. isn't the parent directory of
10501         the directory whose file descriptor is NNN.  This needs to
10502         be worked around at run time, not compile time, since a
10503         program might be built on Solaris 8, where things work, and
10504         run on Solaris 10.
10505         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
10506         to use the following interface instead:
10507         (OPENAT_BUFFER_SIZE): New macro.
10508         (openat_proc_name): New function.
10509         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
10510         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
10511         Likewise.
10512         * lib/openat-proc.c: New file.
10513         * modules/openat (Files): Add lib/openat-proc.c.
10514         (Depends-on): Add same-inode, stdbool.
10515         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
10516
10517 2006-09-29  Bruno Haible  <bruno@clisp.org>
10518
10519         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
10520         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
10521         argument. Set stdout_closed before testing for ferror, not after.
10522         (fwriteerror, fwriteerror_no_ebadf): New functions.
10523
10524 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10525
10526         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
10527
10528 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
10529
10530         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
10531         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
10532
10533 2006-09-28  Jim Meyering  <jim@meyering.net>
10534
10535         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
10536         Include <unistd.h>.
10537
10538 2006-09-28  Bruno Haible  <bruno@clisp.org>
10539
10540         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
10541         * modules/linkedhash-list (Depends-on): Likewise.
10542         * modules/rbtreehash-list (Depends-on): Likewise.
10543
10544 2006-09-28  Bruno Haible  <bruno@clisp.org>
10545
10546         * lib/strndup.h: Simplify the redefinition of strndup.
10547         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
10548         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
10549
10550 2006-09-28  Bruno Haible  <bruno@clisp.org>
10551
10552         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
10553         * lib/gl_linkedhash_list.c: Likewise.
10554         * lib/gl_rbtreehash_list.c: Likewise.
10555
10556 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10557
10558         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
10559         getaddrinfo.
10560
10561         * lib/__fpending.h: Don't include <stdio_ext.h> unless
10562         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
10563         it causes <stdio_ext.h> to cause a compile-time error.
10564         Problem reported by Nelson H. F. Beebe.
10565         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
10566         of HAVE_DECL___PENDING.
10567
10568         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
10569         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
10570         declaration.
10571
10572 2006-09-27  Jim Meyering  <jim@meyering.net>
10573
10574         This file could end up with a definition for a function
10575         named __strndup, rather than rpl_strndup on a system with
10576         incomplete weak_alias support.
10577         * lib/strndup.c (strndup): Rename from __strndup.
10578         Remove #defines that used to map __strndup to strndup.
10579         Don't use K&R prototypes.
10580         Remove LIBC-related code, since this file is not sync'd with glibc.
10581         * lib/strndup.h: Revamp, accordingly.
10582         * m4/strndup.m4: Modernize.
10583
10584 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10585
10586         * modules/savewd (Depends-on): Add 'raise'.
10587         * lib/savewd.c: Include <signal.h>, for 'raise'.
10588
10589 2006-09-26  Jim Meyering  <jim@meyering.net>
10590
10591         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
10592         when we detect Darwin 8.7.0's acl_get_file bug.
10593         Rearrange to perform the new (below) run-test while $LIBS
10594         contains any acl-related library.  Set USE_ACL at the end.
10595         (gl_ACL_GET_FILE): New function.
10596
10597 2006-09-26  Eric Blake  <ebb9@byu.net>
10598
10599         * lib/verror.c: Include <config.h> unconditionally.
10600
10601 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
10602
10603         * modules/clock-time (Maintainer): Add self.
10604         * modules/getlogin_r (Depends-on): Add extensions.
10605
10606 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10607
10608         * modules/clock-time: New module.
10609         * modules/nanosleep (Depends-on): Add clock-time.
10610         * modules/gethrxtime (Depends-on): Likewise.
10611         * modules/gettime (Depends-on): Likewise.
10612         * modules/settime (Depends-on): Likewise.
10613
10614         * modules/fts-lgpl: Depend on openat.
10615         * modules/mkancesdirs: Depend on savewd.
10616         * modules/mkdir-p: Likewise.
10617
10618 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10619
10620         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
10621
10622         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
10623         `gl_have_arbitrary_file_name_length_limit' to
10624         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
10625         actually works between configure runs.
10626
10627 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10628             Bruno Haible  <bruno@clisp.org>
10629
10630         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
10631
10632 2006-09-25  Jim Meyering  <jim@meyering.net>
10633
10634         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
10635         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
10636
10637 2006-09-25  Eric Blake  <ebb9@byu.net>
10638
10639         * gnulib-tool (func_import, func_create_testdir): Fix typos in
10640         exec's in 2006-09-18 patch when shuffling fds.
10641
10642 2006-09-25  Bruno Haible  <bruno@clisp.org>
10643
10644         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
10645         Reported by Jim Meyering.
10646
10647 2006-09-24  Jim Meyering  <jim@meyering.net>
10648
10649         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
10650         compare a pointer against a literal "0".  That caused failures with
10651         at least HP-UX's hpcc.
10652
10653 2006-09-22  Simon Josefsson  <jas@extundo.com>
10654
10655         * modules/gc-sha1:
10656         * modules/gc-md4:
10657         * modules/gc-hmac-sha1:
10658         * modules/gc-hmac-md5:
10659         * modules/gc-des:
10660         * modules/gc-arcfour: Distribute more files.
10661
10662 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10663
10664         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
10665         (gl_linked_iterator_from_to): Initialize struct completely.
10666         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
10667         (gl_tree_iterator_from_to): Likewise
10668         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
10669         * lib/gl_array_list.c [lint] (gl_array_iterator)
10670         (gl_array_iterator_from_to): Likewise.
10671         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
10672         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
10673         (gl_carray_iterator_from_to): Likewise.
10674
10675         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
10676         * lib/md4.c (md4_process_block): Remove unused variable.
10677         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
10678         parentheses for clarity.
10679
10680 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10681
10682         * modules/bison-i18n (Depends-on): Add gettext.
10683
10684 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10685
10686         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
10687         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
10688         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
10689         also add missing comma that caused broken test.
10690         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
10691         stdlib.h, for `abort'.
10692         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
10693         variables.
10694         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
10695         include unistd.h if present, for `rmdir'.
10696         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
10697         variables.
10698         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
10699         in the process include standard headers for prototypes.
10700         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
10701         gets declared on GNU/Linux.
10702         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
10703         unistd.h, for `rmdir'.
10704         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
10705
10706         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
10707         always true.
10708         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
10709
10710         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
10711
10712 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10713
10714         * gnulib-tool (func_version): Create output all at once.  This
10715         may help avoid triggering unnecessary SIGPIPEs, and at any
10716         rate it doesn't hurt.
10717
10718 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10719             Bruno Haible  <bruno@clisp.org>
10720
10721         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
10722         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
10723         * m4/signed.m4 (bh_C_SIGNED): Likewise.
10724
10725         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
10726         (gl_FUNC_VASPRINTF): Invoke it.
10727
10728 2006-09-22  Bruno Haible  <bruno@clisp.org>
10729
10730         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
10731         getloadavg.c as first argument.
10732
10733 2006-09-22  Bruno Haible  <bruno@clisp.org>
10734
10735         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
10736         at the beginning of the gl_INIT macro.
10737         * modules/getloadavg (configure.ac): Pass $gl_source_base to
10738         gl_GETLOADAVG.
10739
10740 2006-09-22  Bruno Haible  <bruno@clisp.org>
10741
10742         * gnulib-tool (func_create_megatestdir): Don't include the config-h
10743         module.
10744         Suggested by Ralf Wildenhues.
10745
10746 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
10747
10748         Import this patch from libc:
10749
10750         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
10751
10752         * lib/regex_internal.c (re_string_reconstruct): Handle
10753         offset < pstr->valid_raw_len && pstr->offsets_needed case.
10754         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
10755         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
10756         re_string_context_at.
10757
10758         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
10759         now requires it.
10760         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
10761         gl_REGEX now does it for us.
10762         (gl_REGEX): Add test taken from
10763         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
10764
10765         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
10766         Check that large offsets work.  Modernize Autoconf usages.
10767         Prefer "yes" to mean a good thing rather than a bad.
10768         Don't put "#define mkstemp" in config.h, as this might interfere
10769         with standard system headers that "#define mkstemp mkstemp64".
10770
10771         * modules/mkstemp (Depends-on): Add extensions, so that
10772         mkstemp is visible on some platforms.
10773         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
10774         (Include): Change to "mkstemp.h" from <stdlib.h>.
10775         (Files): Add mkstemp.h.
10776
10777         * lib/mkstemp.h: New file, since some standard headers
10778         #define mkstemp.
10779         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
10780         Include "mkstemp.h".
10781         Make the _LIBC code resemble glibc original more,
10782         e.g., use K&R style.
10783         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
10784         (mkstemp): Remove, since mkstemp.h does this for us.
10785         * lib/stdlib--.h: Include mkstemp.h.
10786
10787         Import this patch from libc:
10788
10789         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10790
10791         * lib/tempname.c (__gen_tempname): Change attempts_min
10792         into a macro.  Use preprocessor to decide how to initialize
10793         attempts [Coverity CID 67].
10794
10795 2006-09-20  Bruno Haible  <bruno@clisp.org>
10796
10797         * lib/mkdtemp.c: Import from libc.
10798         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10799                 * sysdeps/posix/tempname.c (__gen_tempname): Change
10800                 attempts_min into a macro.  Use preprocessor to decide how to
10801                 initialize attempts [Coverity CID 67].
10802         2001-11-27  Paul Eggert  <eggert@twinsun.com>
10803                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
10804                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
10805
10806 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10807
10808         * gnulib-tool (func_exit): New function, to allow to pass the
10809         exit status portably through the trap.  Use everywhere.
10810         (--help, --version): Signal a write error.
10811         (trap): catch SIGPIPE, for write errors.
10812         Exit at the end of the trap, with the correct exit status.
10813
10814 2006-09-19  Karl Berry  <karl@gnu.org>
10815
10816         * doc/gnulib.texi: note about the license texinfo files.
10817
10818 2006-09-19  Eric Blake  <ebb9@byu.net>
10819
10820         * gnulib-tool: Avoid space-tab.
10821
10822 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10823
10824         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
10825         that prevented coreutils 6.1 from building.  Problem reported
10826         by Petter Reinholdtsen.
10827
10828 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10829
10830         * gnulib-tool (avoidlist): Fix typo that broke options like
10831         --avoid=lock that are used by coreutils bootstrap.
10832
10833 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
10834
10835         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
10836         more systematically.
10837
10838 2006-09-18  Jim Meyering  <jim@meyering.net>
10839
10840         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
10841
10842 2006-09-18  Bruno Haible  <bruno@clisp.org>
10843
10844         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
10845
10846 2006-09-18  Bruno Haible  <bruno@clisp.org>
10847
10848         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
10849         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
10850         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
10851         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
10852         * m4/gettext.m4: Require autoconf >= 2.52.
10853         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
10854         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
10855         of gl_cv_header_inttypes_h.
10856
10857 2006-09-18  Bruno Haible  <bruno@clisp.org>
10858
10859         * lib/javaversion.c: Include configmake.h.
10860
10861 2006-09-18  Bruno Haible  <bruno@clisp.org>
10862
10863         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
10864         avoid that the while loops be executed in a subshell.
10865
10866 2006-09-18  Bruno Haible  <bruno@clisp.org>
10867
10868         * MODULES.html.sh (func_module): Break long lines.
10869         Suggested by Bruce Korb <bkorb@gnu.org>.
10870
10871 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10872
10873         Speed up by a factor of 1.12.
10874         * gnulib-tool (nl): New variable.
10875         (func_import): Rewrite include directive extraction to only read each
10876         directive once.
10877
10878 2006-09-17  Bruno Haible  <bruno@clisp.org>
10879
10880         * modules/javaversion (Makefile.am): Remove DEFS setting.
10881         (Depends-on): Add configmake, for PKGDATADIR definition.
10882
10883 2006-09-17  Bruno Haible  <bruno@clisp.org>
10884
10885         * gnulib-tool (func_create_testdir): Rewrite all files at once.
10886
10887 2006-09-17  Bruno Haible  <bruno@clisp.org>
10888
10889         * gnulib-tool (func_append): New function, stolen from libtool.m4.
10890         (func_modules_transitive_closure, func_modules_add_dummy,
10891         func_modules_to_filelist, func_import, func_create_testdir,
10892         func_create_megatestdir, ...): Use it wherever possible.
10893         Suggested by Ralf Wildenhues.
10894
10895 2006-09-16  Karl Berry  <karl@gnu.org>
10896
10897         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
10898         to avoid sectioning errors.
10899         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
10900         [ifinfo]: blank line after @center-ed titles.
10901         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
10902         Spell FSF address consistently with others.
10903         (These changes approved by rms.)
10904
10905 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10906
10907         Speed up by a factor of 1.61.
10908         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
10909         already checked module names again.
10910
10911 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10912
10913         Speed up by a factor of 1.13.
10914         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
10915         for new_files, and the input to func_add_or_update.
10916
10917 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10918
10919         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
10920         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
10921
10922 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10923
10924         * modules/mkancesdirs (Depends-on): Add fcntl.
10925         * modules/savewd: New file.
10926         * MODULES.html.sh (File system functions): Add savewd.
10927
10928         * modules/configmake (Makefile.am): Add support for the
10929         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
10930
10931 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10932
10933         * m4/savewd.m4: New file.
10934
10935 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10936
10937         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
10938         (dirchownmod): New arg FD.  All callers changed.
10939         Use FD rather than opening the directory ourself, as opening is
10940         now the caller's responsibility.
10941         * lib/dirchownmod.h: Likewise.
10942         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
10943         hosts that require <sys/types.h> before <sys/stat.h>.  Include
10944         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
10945         (test_dir): Remove.
10946         (mkancesdirs): Return length of prefix of FILE that has already
10947         been made, or -2 if there is a child doing the work.  Redo
10948         algorithm so that it is O(N) rather than O(N**2).  Optimize away
10949         ".", and treat ".." specially since it might stray back into
10950         already-created areas.  Use a subprocess if necessary.  New arg
10951         WD; all users changed.  MAKE_DIR function should now return 1
10952         if it creates a directory that is not readable.  Return -2 if
10953         a child process is spun off.
10954         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
10955         Adjust signature to match code.
10956         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
10957         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
10958         all users changed.
10959         * lib/savewd.c, lib/savewd.h: New files.
10960
10961 2006-09-15  Jim Meyering  <jim@meyering.net>
10962
10963         * modules/rename-dest-slash: New module.
10964         * MODULES.html.sh (posix_compat): Add it here.
10965
10966         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
10967
10968 2006-09-15  Jim Meyering  <jim@meyering.net>
10969
10970         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
10971         file.
10972
10973         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
10974
10975 2006-09-15  Jim Meyering  <jim@meyering.net>
10976
10977         * lib/rename-dest-slash.c (has_trailing_slash): Use
10978         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
10979         (rpl_rename_dest_slash): Perform the cheaper trailing slash
10980         test before testing whether SRC is a directory.
10981         Suggestions from Bruno Haible.
10982
10983         Avoid a warning about an unused variable.
10984         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
10985         into the #ifdef block where it's used.
10986
10987         * lib/rename-dest-slash.c: New file.
10988
10989 2006-09-14  Bruno Haible  <bruno@clisp.org>
10990
10991         * lib/allocsa.c: Include <config.h> unconditionally.
10992         * lib/asnprintf.c: Likewise.
10993         * lib/asprintf.c: Likewise.
10994         * lib/c-strcasecmp.c: Likewise.
10995         * lib/c-strcasestr.c: Likewise.
10996         * lib/c-strncasecmp.c: Likewise.
10997         * lib/c-strstr.c: Likewise.
10998         * lib/classpath.c: Likewise.
10999         * lib/clean-temp.c: Likewise.
11000         * lib/concatpath.c: Likewise.
11001         * lib/copy-file.c: Likewise.
11002         * lib/csharpcomp.c: Likewise.
11003         * lib/csharpexec.c: Likewise.
11004         * lib/execute.c: Likewise.
11005         * lib/fatal-signal.c: Likewise.
11006         * lib/findprog.c: Likewise.
11007         * lib/fwriteerror.c: Likewise.
11008         * lib/gl_array_list.c: Likewise.
11009         * lib/gl_array_oset.c: Likewise.
11010         * lib/gl_avltree_list.c: Likewise.
11011         * lib/gl_avltree_oset.c: Likewise.
11012         * lib/gl_avltreehash_list.c: Likewise.
11013         * lib/gl_carray_list.c: Likewise.
11014         * lib/gl_linked_list.c: Likewise.
11015         * lib/gl_linkedhash_list.c: Likewise.
11016         * lib/gl_list.c: Likewise.
11017         * lib/gl_oset.c: Likewise.
11018         * lib/gl_rbtree_list.c: Likewise.
11019         * lib/gl_rbtree_oset.c: Likewise.
11020         * lib/gl_rbtreehash_list.c: Likewise.
11021         * lib/imaxabs.c: Likewise.
11022         * lib/imaxdiv.c: Likewise.
11023         * lib/javacomp.c: Likewise.
11024         * lib/javaexec.c: Likewise.
11025         * lib/javaversion.c: Likewise.
11026         * lib/linebreak.c: Likewise.
11027         * lib/localcharset.c: Likewise.
11028         * lib/lock.c: Likewise.
11029         * lib/mbchar.c: Likewise.
11030         * lib/mbswidth.c: Likewise.
11031         * lib/mkdtemp.c: Likewise.
11032         * lib/pipe.c: Likewise.
11033         * lib/printf-args.c: Likewise.
11034         * lib/printf-parse.c: Likewise.
11035         * lib/progname.c: Likewise.
11036         * lib/progreloc.c: Likewise.
11037         * lib/readlink.c: Likewise.
11038         * lib/sh-quote.c: Likewise.
11039         * lib/stpcpy.c: Likewise.
11040         * lib/stpncpy.c: Likewise.
11041         * lib/strcasecmp.c: Likewise.
11042         * lib/strcasestr.c: Likewise.
11043         * lib/strcspn.c: Likewise.
11044         * lib/striconv.c: Likewise.
11045         * lib/strncasecmp.c: Likewise.
11046         * lib/strnlen1.c: Likewise.
11047         * lib/strstr.c: Likewise.
11048         * lib/strtok_r.c: Likewise.
11049         * lib/tls.c: Likewise.
11050         * lib/tmpdir.c: Likewise.
11051         * lib/unicodeio.c: Likewise.
11052         * lib/unsetenv.c: Likewise.
11053         * lib/vasnprintf.c: Likewise.
11054         * lib/vasprintf.c: Likewise.
11055         * lib/wait-process.c: Likewise.
11056         * lib/xallocsa.c: Likewise.
11057         * lib/xsetenv.c: Likewise.
11058         * lib/xstriconv.c: Likewise.
11059
11060 2006-09-13  Simon Josefsson  <jas@extundo.com>
11061
11062         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
11063         that internally, suggested by Ralf Wildenhues
11064         <Ralf.Wildenhues@gmx.de>.
11065
11066 2006-09-13  Simon Josefsson  <jas@extundo.com>
11067
11068         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
11069         @LIBOBJS@.
11070         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11071
11072 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
11073
11074         * lib/_fpending.c: Include <config.h> unconditionally, since we no
11075         longer worry about uses that don't define HAVE_CONFIG_H.
11076         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
11077         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
11078         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
11079         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
11080         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
11081         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
11082         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
11083         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
11084         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
11085         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
11086         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
11087         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
11088         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
11089         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
11090         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
11091         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
11092         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
11093         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
11094         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
11095         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
11096         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
11097         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
11098         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
11099         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
11100         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
11101         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
11102         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
11103         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
11104         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
11105         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
11106         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
11107         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
11108         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
11109         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
11110         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
11111         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
11112         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
11113         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
11114         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
11115         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
11116         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
11117         Likewise.
11118
11119 2006-09-13  Eric Blake  <ebb9@byu.net>
11120
11121         * lib/getopt.c: Fix typo in last commit.
11122
11123 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11124
11125         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
11126         dgettext.
11127
11128 2006-09-12  Jim Meyering  <jim@meyering.net>
11129
11130         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
11131         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
11132         Reported by Nelson H. F. Beebe.
11133
11134 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11135
11136         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
11137         program_invocation_name and program_invocation_short_name are
11138         initialized.
11139         * lib/argp-namefrob.h: Move declarations of program_invocation_name
11140         and program_invocation_short_name to argp.h, so they are visible
11141         to user programs.
11142         * lib/argp.h: Likewise
11143
11144 2006-09-10  Bruno Haible  <bruno@clisp.org>
11145
11146         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11147         m4/inttypes_h.m4, m4/uintmax_t.m4.
11148
11149 2006-09-10  Bruno Haible  <bruno@clisp.org>
11150
11151         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
11152         gl_AC_TYPE_UINTMAX_T.
11153
11154 2006-09-10  Bruno Haible  <bruno@clisp.org>
11155
11156         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
11157
11158 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11159
11160         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
11161         convention.  Text proposed by Bruno Haible.
11162         (struct argp_option): Document the use of N_() wrappers.
11163
11164         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
11165         '\v', and translate the two parts separately, instead of feeding
11166         the whole string to gettext.  This allows to exclude
11167         '\v' from the strings visible to the translator by writing doc
11168         strings as N_("..") "\v" N_("..").
11169
11170 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
11171
11172         * config/srclist.txt: Undo latest change; the bug was fixed.
11173
11174 2006-09-09  Bruno Haible  <bruno@clisp.org>
11175
11176         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
11177         assignments if building a library without libtool.
11178         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
11179         in func_emit_lib_Makefile_am.
11180         (func_import): When building a static library libfoo.a, arrange to
11181         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
11182         (func_create_testdir): Likewise.
11183         * modules/gc (configure.ac, Makefile.am): If building statically,
11184         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
11185         * modules/iconvme (configure.ac, Makefile.am): Likewise.
11186         * modules/striconv (configure.ac, Makefile.am): Likewise.
11187         Based on a suggestion by Ralf Wildenhues.
11188
11189 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11190
11191         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
11192         Check for unistd.h too, since Autoconf doesn't assume POSIX.
11193         Also:
11194
11195         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11196         Add year_2050_test to catch glibc bug 2821
11197         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11198
11199         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11200         Prefer #ifdef to #if.
11201
11202         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
11203         Return from 'main' instead of calling 'exit'.
11204
11205 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11206
11207         * lib/mktime.c (guess_time_tm): Fix bug where mktime
11208         returned the maximum time_t value rather than (time_t) -1.
11209         Problem originally reported by William Bardwell
11210         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11211
11212         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11213         Moved to here ...
11214         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11215         ... from here.
11216
11217 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11218
11219         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
11220         2821 is fixed.
11221
11222 2006-09-08  Jim Meyering  <jim@meyering.net>
11223
11224         Don't make generated files read-only.  That would bother too many
11225         people.  However, do retain the ability to work when targets are
11226         read-only: remove the destination and temporary files before writing
11227         them (when generated via sed or echo), or by using the -f option for
11228         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
11229         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11230         * modules/byteswap, modules/configmake, modules/fcntl:
11231         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11232         * modules/localcharset, modules/netinet_in, modules/poll:
11233         * modules/stdbool, modules/stdint, modules/sys_select:
11234         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11235
11236 2006-09-08  Jim Meyering  <jim@meyering.net>
11237
11238         Avoid new build failure on FreeBSD 6.0.
11239         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
11240         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
11241         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
11242
11243 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11244
11245         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
11246
11247 2006-09-07  Jim Meyering  <jim@meyering.net>
11248
11249         Fix global typo in last change: use chmod u-w, not chmod u-x.
11250         Spotted by Paul Eggert and Bruce Korb.
11251         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11252         * modules/byteswap, modules/configmake, modules/fcntl:
11253         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11254         * modules/localcharset, modules/netinet_in, modules/poll:
11255         * modules/stdbool, modules/stdint, modules/sys_select:
11256         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11257
11258 2006-09-06  Jim Meyering  <jim@meyering.net>
11259
11260         Make generated files be read-only.
11261         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
11262         Ensure that each generated file is now read-only.
11263         * modules/argz: Likewise.
11264         * modules/arpa_inet: Likewise.
11265         * modules/byteswap: Likewise.
11266         * modules/configmake: Likewise.
11267         * modules/fcntl: Likewise.
11268         * modules/fnmatch: Likewise.
11269         * modules/getopt: Likewise.
11270         * modules/glob: Likewise.
11271         * modules/inttypes: Likewise.
11272         * modules/netinet_in: Likewise.
11273         * modules/poll: Likewise.
11274         * modules/stdbool: Likewise.
11275         * modules/stdint: Likewise.
11276         * modules/sys_select: Likewise.
11277         * modules/sys_socket: Likewise.
11278         * modules/sys_stat: Likewise.
11279         * modules/sysexits: Likewise.
11280         * modules/localcharset: Same as above, but continue using temporary
11281         file named "t-$@" (why different?) rather than the "$@-t" used
11282         everywhere else.
11283
11284         * modules/sysexits (Makefile.am): Replace literal occurrences
11285         of "sysexit.h" more readable, and more consistent, "$@".
11286
11287 2006-09-06  Bruno Haible  <bruno@clisp.org>
11288
11289         * modules/striconv: New file.
11290         * modules/xstriconv: New file.
11291         * MODULES.html.sh (Internationalization functions): Add striconv,
11292         xstriconv.
11293
11294 2006-09-06  Bruno Haible  <bruno@clisp.org>
11295
11296         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
11297         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
11298         not using libtool correctly.
11299
11300 2006-09-06  Bruno Haible  <bruno@clisp.org>
11301
11302         * lib/striconv.h: New file.
11303         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
11304         iconvstring.c.
11305         * lib/xstriconv.h: New file.
11306         * lib/xstriconv.c: New file.
11307
11308 2006-09-06  Bruno Haible  <bruno@clisp.org>
11309
11310         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
11311         lib_..._LDFLAGS.
11312
11313 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11314
11315         * lib/argz_.h: Sync from Libtool.
11316
11317         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
11318                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11319
11320         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
11321
11322 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11323
11324         * modules/trim: New file.
11325
11326 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11327
11328         * lib/trim.h: New file.
11329         * lib/trim.c: New file.
11330
11331 2006-09-05  Bruno Haible  <bruno@clisp.org>
11332
11333         * MODULES.html.sh (String handling): Add trim.
11334
11335 2006-09-04  Karl Berry  <karl@gnu.org>
11336
11337         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
11338         until next release.
11339
11340 2006-09-03  Bruno Haible  <bruno@clisp.org>
11341
11342         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
11343         correctly.
11344
11345 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11346
11347         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
11348         not gl_GETLOADAVG.  Omit unneeded semicolons.
11349         Problems reported by Ralf Wildenhues in
11350         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11351         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
11352         at the end, which is the usual gnulib style.
11353
11354         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
11355         of doing all the work ourselves.
11356         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
11357         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
11358
11359 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11360
11361         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
11362         Problem reported by Ralf Wildenhues in
11363         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11364
11365         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
11366         HAVE_STRUCT_STATFS_F_FSTYPENAME.
11367
11368 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11369
11370         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
11371         yesterday's patch by changing test -n to test -z.
11372
11373 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11374
11375         * modules/getloadavg (Files): Add m4/getloadavg.m4.
11376         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
11377         the former is now obsolescent.
11378
11379         * modules/chdir-long (Depends-on): Add fcntl.
11380
11381 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11382
11383         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
11384         obsolescent, and programs should use gnulib instead.
11385         * m4/getloadavg.m4: New file, with contents taken from Autoconf
11386         but with prefixes changed.
11387
11388 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11389
11390         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
11391         or stdbool.h, because they might not exist while configuring.
11392
11393         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
11394         Don't include unistd.h or limits.h; not needed, since chdir-long.h
11395         does that for us.
11396         (O_DIRECTORY): Remove.
11397
11398 2006-08-31  Eric Blake  <ebb9@byu.net>
11399
11400         * gnulib-tool: Don't let emacs change spaces to TAB.
11401
11402 2006-08-31  Bruno Haible  <bruno@clisp.org>
11403
11404         * gnulib-tool: When calling func_import more than once, do it in a
11405         subshell.
11406         Reported by Eric Blake <ebb9@byu.net>.
11407
11408 2006-08-31  Bruno Haible  <bruno@clisp.org>
11409
11410         * gnulib-tool (nl): Remove variable.
11411         (sed_transform_lib_file): Use more robust test for config-h module.
11412         (func_import): Fix typo in 2006-08-25 patch.
11413
11414 2006-08-31  Bruno Haible  <bruno@clisp.org>
11415
11416         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
11417         specified, augment Makefile.am variables instead of assigning them.
11418
11419 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11420
11421         Work around a bug in both the Linux and SunOS 64-bit kernels:
11422         nanosleep mishandles sleeps for longer than 2**31 seconds.
11423         Problem reported by Frank v Waveren in
11424         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11425         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
11426         Check for nanosleep bug.
11427         (LIB_NANOSLEEP): Append clock_gettime library if needed.
11428
11429 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11430
11431         Work around a bug in both the Linux and SunOS 64-bit kernels:
11432         nanosleep mishandles sleeps for longer than 2**31 seconds.
11433         Problem reported by Frank v Waveren in
11434         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11435         * lib/nanosleep.c (BILLION): New constant.
11436         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
11437         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
11438         implementation.
11439
11440 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11441
11442         * modules/nanosleep (Depends-on): Add gettime.
11443
11444 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11445         and Simon Josefsson  <jas@extundo.com>
11446         and Oskar Liljeblad  <oskar@osk.mine.nu>
11447
11448         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
11449         * gnulib-tool (func_import): New license type 'unmodifiable license
11450         text'.
11451         * modules/fdl: Use it.  Longer description.
11452         * module/gpl, module/lgpl: New files.
11453
11454 2006-08-30  Jim Meyering  <jim@meyering.net>
11455
11456         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
11457         shadowing the parameter.
11458
11459 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11460
11461         Sync from Libtool:
11462
11463         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11464
11465         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
11466         sharing with gnulib.  Report by Eric Blake.
11467
11468 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11469
11470         * modules/isapipe: New file.
11471         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
11472
11473 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11474
11475         * modules/configmake (Makefile.am): Add a comment, and omit
11476         the CONFIGMAKE_ prefix from generated macro names.  Suggested
11477         by Bruno Haible.
11478
11479 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11480
11481         * m4/isapipe.m4: New file.
11482
11483 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11484
11485         * lib/isapipe.c, lib/isapipe.h: New files.
11486
11487 2006-08-29  Jim Meyering  <jim@meyering.net>
11488
11489         * modules/configmake (Makefile.am): Make configmake.h depend on
11490         Makefile.  Otherwise, a stale configmake.h could hang around.
11491
11492 2006-08-29  Eric Blake  <ebb9@byu.net>
11493
11494         * lib/error.c (error_at_line, print_errno_message): Match libc, after
11495         resolution of upstream bug 3044.
11496
11497 2006-08-29  Bruno Haible  <bruno@clisp.org>
11498
11499         * modules/localcharset (Depends-on): Add configmake.
11500         (Makefile.am): Remove setting of LIBDIR through DEFS.
11501
11502 2006-08-29  Bruno Haible  <bruno@clisp.org>
11503
11504         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
11505         defined.
11506
11507 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11508
11509         * modules/fcntl: New file.
11510         * modules/chdir-safer (Depends-on): Add fcntl.
11511         * modules/fts: Likewise.
11512         * modules/mkdir-p: Likewise.
11513
11514         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
11515         This undoes the most recent change, since we're now addressing the
11516         problem in a different way.
11517
11518         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
11519         into output, since the output might be called Makefile.am even
11520         if $makefile_name is something different.
11521         (func_import): Use $makefile_am rather than
11522         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
11523         empty.
11524
11525         * modules/inttypes (Files): Add m4/inttypes-h.m4.
11526
11527 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11528
11529         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
11530         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
11531         recent change to stdint.m4, since we're now addressing the problem in a
11532         different way.
11533
11534 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11535
11536         * m4/fcntl_h.m4: New file.
11537
11538 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11539
11540         * lib/fcntl_.h: New file.
11541         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
11542         the fcntl module.
11543         * lib/dirchownmod.c: Likewise.
11544         * lib/fts.c: Likewise.
11545
11546         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
11547         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
11548         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
11549         just before including <inttypes.h>, to avoid circular inclusion.
11550
11551 2006-08-28  Jim Meyering  <jim@meyering.net>
11552
11553         * doc/visibility.texi: Actually read and correct the grammar of the
11554         sentence affected by yesterday's change.
11555
11556 2006-08-28  Eric Blake  <ebb9@byu.net>
11557
11558         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
11559         needs wrapper.
11560
11561 2006-08-28  Eric Blake  <ebb9@byu.net>
11562
11563         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
11564
11565 2006-08-28  Eric Blake  <ebb9@byu.net>
11566
11567         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
11568
11569 2006-08-28  Bruno Haible  <bruno@clisp.org>
11570
11571         * modules/c-strstr: New file, from GNU gettext.
11572         * MODULES.html.sh (String handling): Add c-strstr.
11573
11574 2006-08-28  Bruno Haible  <bruno@clisp.org>
11575
11576         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
11577         macros.
11578         Reported by Eric Blake.
11579
11580 2006-08-28  Bruno Haible  <bruno@clisp.org>
11581
11582         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
11583         (VASNPRINTF): Return a string of length > INT_MAX without failing.
11584         * lib/vasprintf.c: Include errno.h, limits.h.
11585         (EOVERFLOW): New fallback definition.
11586         (vasprintf): Test here whether the string length is > INT_MAX.
11587         * lib/vsnprintf.c: Include errno.h, limits.h.
11588         (EOVERFLOW): New fallback definition.
11589         (vsnprintf): Fix bug when generated string was too long for the buffer.
11590         Test here whether the string length is > INT_MAX.
11591
11592 2006-08-28  Bruno Haible  <bruno@clisp.org>
11593
11594         * lib/inttypes_.h (SCNX*): Remove definitions.
11595         Reported by Eric Blake.
11596
11597 2006-08-28  Bruno Haible  <bruno@clisp.org>
11598
11599         * lib/c-strstr.h: New file, from GNU gettext.
11600         * lib/c-strstr.c: New file, from GNU gettext.
11601
11602 2006-08-28  Bruno Haible  <bruno@clisp.org>
11603
11604         * gnulib-tool: Reorder some statements.
11605
11606 2006-08-28  Bruno Haible  <bruno@clisp.org>
11607
11608         * gnulib-tool: New option --makefile-name.
11609         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
11610         $makefile_name.
11611         (func_import): Write $makefile_name to the cache file, and read it from
11612         there unless explicitly specified. Use $makefile_name as file name
11613         instead of Makefile.am. Adjust the recommendations accordingly.
11614
11615 2006-08-28  Bruno Haible  <bruno@clisp.org>
11616
11617         * gnulib-tool (func_verify_module): Check against misapplying patch.
11618
11619 2006-08-28  Bruno Haible  <bruno@clisp.org>
11620
11621         * gnulib-tool (func_relativize, func_relconcat): New functions.
11622         Give an error if --local-dir is given with --update.
11623         Remove trailing slashes from $local_gnulib_dir.
11624         (func_import): Store the relativized $local_gnulib_dir in
11625         gnulib-cache.m4, and read it from there if not specified explicitly.
11626
11627 2006-08-28  Bruno Haible  <bruno@clisp.org>
11628
11629         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
11630         is the current directory. Respect also $local_gnulib_dir.
11631
11632 2006-08-28  Bruno Haible  <bruno@clisp.org>
11633             Simon Josefsson  <jas@extundo.com>
11634
11635         BeOS portability.
11636         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
11637
11638 2006-08-27  Jim Meyering  <jim@meyering.net>
11639
11640         * doc/visibility.texi: Remove duplicate word: "pointer".
11641
11642 2006-08-26  Bruno Haible  <bruno@clisp.org>
11643
11644         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
11645         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
11646         (Makefile.am): Create inttypes.h from inttypes_.h.
11647         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
11648
11649         * modules/imaxabs: New file.
11650
11651         * modules/imaxdiv: New file.
11652
11653 2006-08-26  Bruno Haible  <bruno@clisp.org>
11654
11655         * m4/inttypes.m4: New file.
11656         * m4/_inttypes_h.m4: Remove file.
11657         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
11658         PRI_MACROS_BROKEN.
11659         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
11660
11661         * m4/imaxabs.m4: New file.
11662
11663         * m4/imaxdiv.m4: New file.
11664
11665 2006-08-26  Bruno Haible  <bruno@clisp.org>
11666
11667         * lib/inttypes_.h: New file.
11668         * lib/inttypes.h: Remove file.
11669         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
11670
11671         * lib/imaxabs.c: New file.
11672
11673         * lib/imaxdiv.c: New file.
11674
11675 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11676
11677         New config-h module, so that "make" output needn't be cluttered
11678         by -DHAVE_CONFIG_H.
11679         * MODULES.html.sh (Support for building libraries and executables):
11680         Add config-h.
11681         * modules/config-h: New file.
11682         * gnulib-tool (nl, sed_transform_lib_file): New vars.
11683         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
11684         the config-h module is used.
11685
11686         New configmake module, so that "make" output needn't be cluttered
11687         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
11688         * MODULES.html.sh (Support for building libraries and executables):
11689         Add configmake.
11690         * modules/configmake: New file.
11691
11692 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11693
11694         * m4/config-h.m4: New file.
11695
11696 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11697
11698         * config/srclist.txt: Add elisp-comp.
11699
11700 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11701
11702         * MODULES.html.sh (Support for building libraries and executables):
11703         Add elisp-comp.
11704         * build-aux/elisp-comp: New file.
11705         * modules/elisp-comp: New file.
11706
11707 2006-08-24  Bruno Haible  <bruno@clisp.org>
11708
11709         * gnulib-tool (func_create_testdir): Use non-default values of
11710         sourcebase and m4base.
11711
11712 2006-08-24  Bruno Haible  <bruno@clisp.org>
11713
11714         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
11715         HTML structure.
11716
11717 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11718
11719         * modules/openat (Depends-on): Add lchown.
11720
11721 2006-08-23  Bruno Haible  <bruno@clisp.org>
11722
11723         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
11724         of gl_LOCK_EARLY instead of gl_LOCK.
11725
11726 2006-08-23  Bruno Haible  <bruno@clisp.org>
11727
11728         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
11729         on OSF/1 to no.
11730         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
11731
11732 2006-08-23  Bruno Haible  <bruno@clisp.org>
11733
11734         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
11735         as unusable.
11736
11737         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
11738         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
11739         (gl_LOCK): New macro.
11740
11741 2006-08-22  Simon Josefsson  <jas@extundo.com>
11742
11743         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
11744         to md5 module.
11745
11746 2006-08-22  Simon Josefsson  <jas@extundo.com>
11747
11748         * MODULES.html.sh: Add "Support for maintaining and release
11749         projects".
11750
11751         * build-aux/gnupload: New file, from coreutils.
11752
11753 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11754
11755         Avoid the need for AC_LIBSOURCES in m4 macros.
11756         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
11757         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
11758         * modules/check-version (EXTRA_DIST): Add check-version.h.
11759         * modules/crc (EXTRA_DIST): Add crc.h.
11760         * modules/des (EXTRA_DIST): Add des.h.
11761         * modules/gc (EXTRA_DIST): Add gc.h.
11762         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
11763         * modules/getline (EXTRA_DIST): Add getline.h.
11764         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
11765         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
11766         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
11767         * modules/md2 (EXTRA_DIST): Add md2.h.
11768         * modules/md4 (EXTRA_DIST): Add md4.h.
11769         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
11770         * modules/read-file (EXTRA_DIST): Add read-file.h.
11771         * modules/readline (EXTRA_DIST): Add readline.h.
11772         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
11773         rijndael-api-fst.h.
11774
11775 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11776
11777         * m4/rijndael.m4 (gl_ARCFOUR):
11778         * m4/arctwo.m4 (gl_ARCTWO):
11779         * m4/check-version.m4 (gl_CHECK_VERSION):
11780         * m4/crc.m4 (gl_CRC):
11781         * m4/des.m4 (gl_DES):
11782         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
11783         * m4/gc.m4 (gl_GC):
11784         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
11785         * m4/getline.m4 (gl_FUNC_GETLINE):
11786         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
11787         * m4/hmac-md5.m4 (gl_HMAC_MD5):
11788         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
11789         * m4/md2.m4 (gl_MD2):
11790         * m4/md4.m4 (gl_MD4):
11791         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
11792         * m4/read-file.m4 (gl_FUNC_READ_FILE):
11793         * m4/readline.m4 (gl_FUNC_READLINE):
11794         * m4/rijndael.m4 (gl_RIJNDAEL):
11795         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11796         to get the necessary .h files and whatnot.
11797
11798 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11799
11800         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
11801         gnulib rather than the other way around.
11802         * config/srclistvars.sh (COREUTILS): Remove.
11803
11804 2006-08-22  Jim Meyering  <jim@meyering.net>
11805
11806         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
11807
11808         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
11809
11810 2006-08-22  Eric Blake  <ebb9@byu.net>
11811
11812         * modules/regexprops-generic: New file.
11813         * MODULES.html.sh (Support for building documentation): List it.
11814
11815 2006-08-22  Eric Blake  <ebb9@byu.net>
11816
11817         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
11818         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
11819         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
11820         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
11821
11822 2006-08-22  Bruno Haible  <bruno@clisp.org>
11823
11824         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
11825         and lib_LTLIBRARIES like the other lib_* variables.
11826
11827 2006-08-22  Bruno Haible  <bruno@clisp.org>
11828
11829         * build-aux/x-to-1.in: New file, from GNU gettext.
11830
11831 2006-08-22  Bruno Haible  <bruno@clisp.org>
11832
11833         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
11834         <utmpx.h> exists.
11835
11836 2006-08-22  Bruno Haible  <bruno@clisp.org>
11837
11838         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
11839         <utmpx.h> exists.
11840
11841 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11842
11843         BeOS portability.
11844         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
11845         exist.
11846         Problem reported by Bruno Haible.
11847
11848 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11849
11850         Avoid the need for AC_LIBSOURCES in m4 macros.
11851         * modules/acl (EXTRA_DIST): Add acl.h.
11852         * modules/argmatch (Files): Add m4/argmatch.m4.
11853         (configure.ac): Add gl_ARGMATCH.
11854         (EXTRA_DIST): Renamed from lib_SOURCES, for
11855         consistency with the other modules.  Remove argmatch.c.
11856         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
11857         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
11858         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
11859         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
11860         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
11861         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
11862         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
11863         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
11864         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
11865         * modules/closeout (EXTRA_DIST): Add closeout.h.
11866         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
11867         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
11868         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
11869         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
11870         dirname.h; remove basename.c and stripslash.c.
11871         * modules/exclude (EXTRA_DIST): Add exclude.h.
11872         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
11873         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
11874         * modules/file-type (EXTRA_DIST): Add file-type.h.
11875         * modules/filemode (EXTRA_DIST): Add filemode.h.
11876         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
11877         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11878         * modules/fpending (EXTRA_DIST): Add __fpending.h.
11879         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
11880         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
11881         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
11882         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
11883         * modules/getdate (EXTRA_DIST): Add getdate.c.
11884         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
11885         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
11886         * modules/getpass (EXTRA_DIST): Add getpass.h.
11887         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
11888         * modules/group-member (EXTRA_DIST): Add group-member.h.
11889         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
11890         * modules/hash (EXTRA_DIST): Add hash.h.
11891         * modules/human (EXTRA_DIST): Add human.h.
11892         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
11893         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
11894         * modules/lchown (EXTRA_DIST): Add lchown.h.
11895         * modules/long-options (EXTRA_DIST): Add long-options.h.
11896         * modules/lstat (EXTRA_DIST): Add lstat.h.
11897         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
11898         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
11899         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
11900         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
11901         * modules/memxor (EXTRA_DIST): Add memxor.h.
11902         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
11903         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
11904         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
11905         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
11906         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
11907         * modules/physmem (EXTRA_DIST): Add physmem.h.
11908         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
11909         * modules/posixver (EXTRA_DIST): Add posixver.h.
11910         * modules/quote (EXTRA_DIST): Add quote.h.
11911         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
11912         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
11913         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
11914         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
11915         regex_internal.h regexec.c.
11916         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
11917         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
11918         * modules/same (EXTRA_DIST): Add same.h.
11919         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
11920         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
11921         * modules/savedir (EXTRA_DIST): Add savedir.h.
11922         * modules/sha1 (EXTRA_DIST): Add sha1.h.
11923         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
11924         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
11925         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
11926         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
11927         * modules/strdup (EXTRA_DIST): Add strdup.h.
11928         * modules/strftime (EXTRA_DIST): Add strftime.h.
11929         * modules/strndup (EXTRA_DIST): Add strndup.h.
11930         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
11931         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
11932         * modules/time_r (EXTRA_DIST): Add time_r.h.
11933         * modules/timespec (EXTRA_DIST): Add timespec.h.
11934         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11935         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
11936         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
11937         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
11938         * modules/userspec (EXTRA_DIST): Add userspec.h.
11939         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
11940         * modules/utimens (EXTRA_DIST): Add utimens.h.
11941         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
11942         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
11943         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
11944         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
11945         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
11946         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
11947         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
11948         * modules/yesno (EXTRA_DIST): Add yesno.h.
11949
11950 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11951
11952         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
11953
11954         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
11955         * m4/dev-ino.m4, same-inode.m4: Remove.
11956
11957         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
11958         * m4/acl.m4 (AC_FUNC_ACL):
11959         * m4/backupfile.m4 (gl_BACKUPFILE):
11960         * m4/c-strtod.m4 (gl_C99_STRTOLD):
11961         * m4/canon-host.m4 (gl_CANON_HOST):
11962         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
11963         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
11964         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
11965         * m4/cloexec.m4 (gl_CLOEXEC):
11966         * m4/close-stream.m4 (gl_CLOSE_STREAM):
11967         * m4/closeout.m4 (gl_CLOSEOUT):
11968         * m4/dirfd.m4 (gl_FUNC_DIRFD):
11969         * m4/dirname.m4 (gl_DIRNAME):
11970         * m4/exclude.m4 (gl_EXCLUDE):
11971         * m4/exitfail.m4 (gl_EXITFAIL):
11972         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
11973         * m4/file-type.m4 (gl_FILE_TYPE):
11974         * m4/filemode.m4 (gl_FILEMODE):
11975         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
11976         * m4/fpending.m4 (gl_FUNC_FPENDING):
11977         * m4/fprintftime.m4 (gl_FPRINTFTIME):
11978         * m4/fts.m4 (gl_FUNC_FTS):
11979         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
11980         * m4/getdate.m4 (gl_GETDATE):
11981         * m4/gethrxtime.m4 (gl_GETHRXTIME):
11982         * m4/getpagesize.m4 (gl_GETPAGESIZE):
11983         * m4/getpass.m4 (gl_FUNC_GETPASS):
11984         * m4/gettime.m4 (gl_GETTIME):
11985         * m4/getugroups.m4 (gl_GETUGROUPS):
11986         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
11987         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
11988         * m4/hard-locale.m4 (gl_HARD_LOCALE):
11989         * m4/hash.m4 (gl_HASH):
11990         * m4/idcache.m4 (gl_IDCACHE):
11991         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
11992         * m4/lchown.m4 (gl_FUNC_LCHOWN):
11993         * m4/long-options.m4 (gl_LONG_OPTIONS):
11994         * m4/lstat.m4 (gl_FUNC_LSTAT):
11995         * m4/md5.m4 (gl_MD5):
11996         * m4/memcasecmp.m4 (gl_MEMCASECMP):
11997         * m4/memcoll.m4 (gl_MEMCOLL):
11998         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
11999         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
12000         * m4/memxor.m4 (gl_MEMXOR):
12001         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
12002         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
12003         * m4/modechange.m4 (gl_MODECHANGE):
12004         * m4/mountlist.m4 (gl_MOUNTLIST):
12005         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
12006         * m4/openat.m4 (gl_FUNC_OPENAT):
12007         * m4/pathmax.m4 (gl_PATHMAX):
12008         * m4/physmem.m4 (gl_PHYSMEM):
12009         * m4/posixtm.m4 (gl_POSIXTM):
12010         * m4/posixver.m4 (gl_POSIXVER):
12011         * m4/quote.m4 (gl_QUOTE):
12012         * m4/quotearg.m4 (gl_QUOTEARG):
12013         * m4/readtokens.m4 (gl_READTOKENS):
12014         * m4/readutmp.m4 (gl_READUTMP):
12015         * m4/regex.m4 (gl_REGEX):
12016         * m4/safe-read.m4 (gl_SAFE_READ):
12017         * m4/safe-write.m4 (gl_SAFE_WRITE):
12018         * m4/same.m4 (gl_SAME):
12019         * m4/save-cwd.m4 (gl_SAVE_CWD):
12020         * m4/savedir.m4 (gl_SAVEDIR):
12021         * m4/settime.m4 (gl_SETTIME):
12022         * m4/sha1.m4 (gl_SHA1):
12023         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
12024         * m4/stat-macros.m4 (gl_STAT_MACROS):
12025         * m4/stat-time.m4 (gl_STAT_TIME):
12026         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
12027         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
12028         * m4/strdup.m4 (gl_FUNC_STRDUP):
12029         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
12030         * m4/strndup.m4 (gl_FUNC_STRNDUP):
12031         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
12032         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
12033         * m4/time_r.m4 (gl_TIME_R):
12034         * m4/timespec.m4 (gl_TIMESPEC):
12035         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
12036         * m4/unlinkdir.m4 (gl_UNLINKDIR):
12037         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
12038         * m4/userspec.m4 (gl_USERSPEC):
12039         * m4/utimecmp.m4 (gl_UTIMECMP):
12040         * m4/utimens.m4 (gl_UTIMENS):
12041         * m4/xalloc.m4 (gl_XALLOC):
12042         * m4/xgetcwd.m4 (gl_XGETCWD):
12043         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
12044         * m4/xreadlink.m4 (gl_XREADLINK):
12045         * m4/xstrtod.m4 (gl_XSTRTOD):
12046         * m4/yesno.m4 (gl_YESNO):
12047         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12048         to get the necessary .h files and whatnot.
12049
12050 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
12051             Bruno Haible  <bruno@clisp.org>
12052
12053         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
12054         /bin/sh understanding of '!' conditional negation.
12055
12056 2006-08-21  Jim Meyering  <jim@meyering.net>
12057
12058         * modules/openat (Depends-on): Really alphabetize.
12059
12060         * modules/acl (Depends-on): Add error and quote.
12061
12062         * check-module (find_included_lib_files): Add at-func.c to the
12063         ok-to-include-more-than-once white list.
12064
12065         * modules/openat (Depends-on): Add lstat.  Alphabetize.
12066
12067 2006-08-21  Bruno Haible  <bruno@clisp.org>
12068
12069         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12070         Emit a pkgdata_DATA variable only if some snippets add contents to it.
12071         Reported by Martin Lambers <marlam@marlam.de>.
12072
12073 2006-08-21  Bruno Haible  <bruno@clisp.org>
12074
12075         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
12076         specify an installation location, don't emit a noinst_LIBRARIES or
12077         noinst_LTLIBRARIES assignment.
12078
12079 2006-08-21  Bruno Haible  <bruno@clisp.org>
12080
12081         BeOS portability.
12082         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
12083         BeOS has mbrtowc() but no <wctype.h>.
12084
12085 2006-08-21  Bruno Haible  <bruno@clisp.org>
12086
12087         BeOS portability.
12088         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
12089         exist.
12090
12091 2006-08-21  Bruno Haible  <bruno@clisp.org>
12092
12093         BeOS portability.
12094         * lib/mbchar.h: Include <wctype.h> only if it exists.
12095
12096 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12097
12098         Remove files that are no longer needed by their respective modules.
12099         * m4/obstack.m4: Remove.
12100         * m4/strerror_r.m4: Remove.
12101         * m4/uint32_t.m4: Remove.
12102         * m4/uintptr_t.m4: Remove.
12103         * m4/ullong_max.m4: Remove.
12104         * m4/xstrtoimax.m4: Remove.
12105         * m4/xstrtoumax.m4: Remove.
12106
12107         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
12108         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
12109         dependencies now capture this.
12110
12111         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
12112         Do not use AC_LIBSOURCES, since gnulib modules now do this.
12113         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
12114         * m4/human.m4 (gl_HUMAN): Likewise.
12115         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
12116         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
12117
12118         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
12119
12120         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
12121         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
12122         stdint.
12123         * m4/human.m4 (gl_HUMAN): Likewise.
12124         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
12125         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
12126         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12127         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12128         * m4/xstrtol (gl_XSTRTOL): Likewise.
12129
12130         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
12131         AC_TYPE_LONG_LONG_INT.
12132         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12133         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
12134         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
12135         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12136
12137         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
12138         on stdbool.
12139
12140         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
12141         (gl_PREREQ_XSTRTOUL): Remove.
12142
12143         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
12144
12145         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
12146         mode.
12147
12148 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12149
12150         Add and change modules to make it easier for coreutils to use
12151         gnulib-tool.
12152         * modules/backupfile (Files): Remove m4/d-ino.m4.
12153         (Depends-on): Add d-ino.
12154         * modules/cycle-check (Depends-on): Add stdint.
12155         (lib_SOURCES): Add cycle-check.h.
12156         * modules/d-ino: New module.
12157         * modules/d-type: New module.
12158         * modules/error (Files): Remove m4/strerror_r.m4.
12159         * modules/filemode (Files): Add m4/st_dm_mode.m4.
12160         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
12161         m4/inttypes_h.m4, m4/uintmax_t.m4.
12162         (Depends-on): Add stdint.
12163         (lib_SOURCES): Add fsusage.h.
12164         * modules/getcwd (Files): Remove d-ino.m4.
12165         (Depends-on): Add d-ino.
12166         * modules/getndelim2 (Depends-on): Add stdint.
12167         * modules/glob (Files): Remove m4/d-type.m4.
12168         (Depends-on): Add d-type.
12169         * modules/host-os: New module.
12170         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
12171         m4/inttypes_h.m4, m4/uintmax_t.m4.
12172         * Depends-on: Add stdint.
12173         (lib_SOURCES): Add human.h.
12174         * modules/inttostr (Files): Remove m4/intmax_t.m4,
12175         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
12176         m4/uintmax_t.m4, m4/ulonglong.m4.
12177         (Depends-on): Add stdint.
12178         (EXTRA_DIST): Add inttostr.h.
12179         * modules/lchmod: New module.
12180         * modules/link-follow: New module.
12181         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
12182         (Depends-on): Add lchmod.
12183         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
12184         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
12185         (Depends-on): Add stdint.
12186         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
12187         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
12188         (Depends-on): Add stdint.
12189         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
12190         * modules/perl: New module.
12191         * modules/regex (Depends-on): Add stdint.
12192         * modules/rmdir-errno: New module.
12193         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12194         m4/intmax_t.m4.
12195         (Depends-on): Add stdint.
12196         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12197         m4/uintmax_t.m4.
12198         (Depends-on): Add stdint.
12199         * modules/unlink-busy: New module.
12200         * modules/utimecmp (Depends-on): Add stdint.
12201         * modules/uptime: New module.
12202         * modules/winsz-ioctl: New module.
12203         * modules/winsz-termios: New module.
12204         * modules/xnanosleep (Depends-on): Add nanosleep.
12205         * modules/ullong_max: Remove.
12206         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
12207         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
12208         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
12209         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
12210         (Depends-on): Add inttypes.
12211         (lib_SOURCES): Add xstrtol.h.
12212         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
12213         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
12214         * MODULES.html.sh: Move 'assert' into the assert section.
12215         Move 'dummy' into the linking section.
12216         Remove ullong_max.
12217         Add section for compatibility checks for POSIX:2001 functions,
12218         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
12219         winsz-ioctl, and winsz-termios into it.
12220         Add lchmod.
12221         Add top-level Misc section and put host-os, perl, and uptime
12222         into it.
12223
12224 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12225
12226         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
12227         now assume the stdint module.  Do not include inttypes.h.
12228         * lib/fsusage.h: Likewise.
12229         * lib/getndelim2.c: Likewise.
12230         * lib/human.h: Likewise.
12231         * lib/inttostr.h: Likewise.
12232         * lib/obstack.c: Likewise.
12233         * lib/regex_internal.h: Likewise.
12234         * lib/tempname.c: Likewise.
12235         * lib/utimecmp.c: Likewise.
12236         * lib/xstrtol.h: Likewise.
12237
12238         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
12239
12240         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
12241         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
12242         * lib/xtime.h: Likewise.
12243
12244 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12245
12246         * modules/openat (Files): Add lib/fchmodat.c.
12247         Fixes problem reported by Jay Youngman.
12248
12249 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12250
12251         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
12252         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
12253
12254 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
12255             Bruno Haible  <bruno@clisp.org>
12256
12257         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
12258         and is a script that invokes bison. Tighten the code. Add comments.
12259
12260 2006-08-18  Jim Meyering  <jim@meyering.net>
12261
12262         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
12263         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
12264         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
12265         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
12266
12267 2006-08-18  Bruno Haible  <bruno@clisp.org>
12268
12269         * modules/bison-i18n: New file.
12270         * MODULES.html.sh (Internationalization functions): Add it.
12271
12272 2006-08-18  Bruno Haible  <bruno@clisp.org>
12273
12274         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
12275         sys/statvfs.h. When getmntinfo was found, check its declaration and
12276         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
12277
12278 2006-08-18  Bruno Haible  <bruno@clisp.org>
12279
12280         * m4/bison-i18n.m4: New file, from bison.
12281
12282 2006-08-18  Bruno Haible  <bruno@clisp.org>
12283
12284         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
12285         (ME_DUMMY): Treat "kernfs" as a dummy.
12286         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
12287
12288 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12289
12290         Update from coreutils.
12291
12292         2006-08-15  Jim Meyering  <jim@meyering.net>
12293
12294         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
12295
12296         2006-01-17  Jim Meyering  <jim@meyering.net>
12297
12298         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
12299
12300         2006-01-11  Jim Meyering  <jim@meyering.net>
12301
12302         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
12303         Check for the lchmod function.
12304
12305 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12306
12307         Update from coreutils.
12308
12309         * lib/__fpending.h: Add copyright notice.
12310         * lib/fprintftime.h: Likewise.
12311         * lib/savedir.c: Use (C) in copyright notice.
12312         * lib/savedir.h: Likewise.
12313
12314         2006-08-15  Jim Meyering  <jim@meyering.net>
12315
12316         * lib/at-func.c: New file, with the logic of all emulated at-functions.
12317         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
12318         in support of the EXPECTED_ERRNO macro.
12319         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
12320         definitions.  Instead, define the appropriate symbols and include
12321         "at-func.c".
12322         * lib/mkdirat.c (mkdirat): Likewise.
12323         * lib/fchmodat.c (fchmodat): Likewise.
12324         (ENOSYS): Remove definition.
12325         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
12326         it.  Don't include "unistd--.h" -- it wasn't ever used.
12327
12328         2006-01-17  Jim Meyering  <jim@meyering.net>
12329
12330         Rewrite fts.c not to change the current working directory,
12331         by using openat, fstatat, fdopendir, etc..
12332
12333         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
12334         (HAVE_OPENAT_SUPPORT): Define.
12335         [_LIBC] (fchdir): Don't undef or define; no longer used.
12336         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
12337         Now, this `function' always succeeds, and consumes its file descriptor
12338         parameter -- so callers must not close such FDs.  Update callers.
12339         (diropen_fd, opendirat, cwd_advance_fd): New functions.
12340         (diropen): Add parameter, SP.  Adjust all callers.
12341         Implement using diropen_fd, rather than open.
12342         (fts_open): Initialize new member, fts_cwd_fd.
12343         Remove fts_rft-setting code.
12344         (fts_close): Close fts_cwd_fd, if necessary.
12345         (__opendir2): Define in terms of opendir or opendirat,
12346         depending on whether the FST_NOCHDIR flag is set.
12347         (fts_build): Since fts_safe_changedir consumes its FD, and since
12348         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
12349         and close the dup'd file descriptor upon failure.
12350         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
12351         (fts_safe_changedir): Tweak semantics to reflect that this function
12352         now calls cwd_advance_fd and hence consumes its FD argument.
12353         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
12354         [struct FTS] (fts_rft): Remove now-unused member.
12355         [struct FTS] (fts_cycle.state): Improve comment.
12356
12357         * lib/openat.c (openat_needs_fchdir): New function.
12358         * lib/openat.h (openat_needs_fchdir): Declare it.
12359
12360 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12361
12362         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
12363         Problem and fix reported by Pádraig Brady in
12364         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
12365
12366 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12367
12368         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
12369
12370 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12371
12372         * lib/memcoll.c (memcoll): Optimize for the common case where the
12373         arguments are bytewise equal.
12374
12375 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12376
12377         * doc/regexprops-generic.texi: Add a copyright notice.
12378
12379 2006-08-15  Bruno Haible  <bruno@clisp.org>
12380
12381         * modules/tmpdir (License): Change to LGPL.
12382
12383 2006-08-15  Bruno Haible  <bruno@clisp.org>
12384
12385         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
12386         module.
12387
12388 2006-08-14  Simon Josefsson  <jas@extundo.com>
12389
12390         * config/srclist.txt: Add gnupload.
12391
12392 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12393
12394         Change copyright notice from LGPL 2 to GPL 2, since that's the
12395         standard form used in the gnulib repository.
12396         * tests/test-lock.c: Likewise.
12397         * tests/test-stdint.c: Likewise.
12398         * tests/test-tls.c: Likewise.
12399
12400         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
12401         prelude-manager.  User shorter URLs for GNU projects, without '?'.
12402         Add copyright notice.
12403
12404         * check-module: Add copyright notice.  Output a copyright
12405         notice if "--version" is specified.
12406         * modules/COPYING: New file.
12407         * tests/test-getaddrinfo.c: Add copyright notice.
12408         * tests/test-verify.c: Likewise.
12409
12410 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12411
12412         Change copyright notice from LGPL 2 to GPL 2, since that's the
12413         standard form used in the gnulib repository.
12414         * lib/lock.c: LGPL -> GPL.
12415         * lib/lock.h: Likewise.
12416         * lib/strnlen1.c: Likewise.
12417         * lib/strnlen1.h: Likewise.
12418         * lib/tls.c: Likewise.
12419         * lib/tls.h: Likewise.
12420         * lib/tmpdir.c: Likewise.
12421
12422         * lib/TODO: Remove; this belongs only in coreutils.
12423
12424 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12425
12426         Add copyright notices to long-enough files that lack them, since
12427         otherwise the files aren't clearly free.  Use the same notice that
12428         getdate.texi already uses.
12429         * doc/alloca-opt.texi: Add copyright notice.
12430         * doc/alloca.texi: Likewise.
12431         * doc/ctime.texi: Likewise.
12432         * doc/functions.texi: Likewise.
12433         * doc/gcd.texi: Likewise.
12434         * doc/gnulib-tool.texi: Likewise.
12435         * doc/inet_ntoa.texi: Likewise.
12436         * doc/visibility.texi: Likewise.
12437
12438         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
12439         * doc/quote.texi: Add copyright notice.
12440
12441         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
12442         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
12443         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
12444         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
12445         is now obsolete, and give a pointer to the Sun list.
12446         Add copyright notice.
12447
12448 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12449
12450         * config/srclistvars.sh: Add copyright notice.
12451
12452 2006-08-14  Eric Blake  <ebb9@byu.net>
12453
12454         Import the following change from libc:
12455
12456         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
12457
12458         Upstream bug 2997.
12459         * lib/misc/error.c: Add space between program name and message if file
12460         name is missing.
12461
12462 2006-08-12  Karl Berry  <karl@gnu.org>
12463
12464         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
12465         remove, these originate in gnulib now.
12466
12467 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12468
12469         * doc/Makefile (standards.info standards.html standards.dvi):
12470         Also depend on make-stds.texi.
12471
12472 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12473
12474         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
12475         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
12476
12477         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
12478         in wchar_t.  Problem reported by Eric Blake.
12479
12480         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
12481         LEN is smaller than SIZE.  Suggested by Bruno Haible.
12482         Also, help the compiler to keep LEN in a register.
12483
12484 2006-08-11  Eric Blake  <ebb9@byu.net>
12485
12486         * users.txt: Sort.  Add tar.
12487
12488 2006-08-11  Bruno Haible  <bruno@clisp.org>
12489
12490         * users.txt: New file.
12491
12492 2006-08-11  Bruno Haible  <bruno@clisp.org>
12493
12494         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
12495         before <wchar.h>. Needed for OSF/1 and BSD/OS.
12496
12497 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12498
12499         * modules/snprintf (Depends-on): Remove minmax.
12500         (Maintainer): Add self and Bruno.
12501
12502 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12503
12504         * lib/.cppi-disable: Add snprintf.h, socket_.h.
12505         * lib/snprintf.c: Include <errno.h> and <limits.h>.
12506         (EOVERFLOW): Define if the system does not.
12507         Do not include "minmax.h"; it wasn't used.
12508         (snprintf): Don't assume size_t promotes to an unsigned type.
12509         Fix bug when generated string was too long for the buffer: the
12510         buffer's contents are supposed to be the initial prefix of the
12511         output.  Don't assume vasnprintf returns EOVERFLOW if the size
12512         exceeds INT_MAX; do the check ourselves.
12513
12514         Import the following changes from libc:
12515
12516         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
12517
12518         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
12519         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
12520         set wc to the byte which couldn't be converted.
12521         (re_string_reconstruct): Don't clear valid_raw_len before calling
12522         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
12523         tip_context using re_string_context_at.
12524
12525         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
12526
12527         * lib/posix/regex.h: g++ still cannot handled [restrict].
12528
12529         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
12530
12531         * lib/posix/regex.h: Remove special handling for VMS.
12532
12533 2006-08-10  Jim Meyering  <jim@meyering.net>
12534
12535         * modules/same-inode: New module.
12536         * modules/dev-ino: New module.
12537         * modules/cycle-check: Depend on these modules, rather than simply
12538         including their .h files.
12539         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
12540         required via m4/cycle-check.m4.
12541         * modules/same: Depend on new same-inode module, rather than
12542         including same-inode.h.
12543         * modules/chdir-safer: New file.
12544
12545         * modules/chown (Depends-on): Add stat-macros.
12546
12547 2006-08-10  Jim Meyering  <jim@meyering.net>
12548
12549         * m4/cycle-check.m4: New file.
12550         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
12551         * m4/dev-ino.m4, m4/same-inode.m4: New files.
12552
12553 2006-08-10  Eric Blake  <ebb9@byu.net>
12554
12555         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
12556         in from original proposal.
12557
12558 2006-08-10  Eric Blake  <ebb9@byu.net>
12559         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12560
12561         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
12562         namespace.
12563
12564 2006-08-10  Bruno Haible  <bruno@clisp.org>
12565
12566         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
12567         as well.
12568
12569 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12570
12571         Sync from coreutils.
12572
12573         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
12574
12575         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
12576         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
12577
12578 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12579
12580         * modules/restrict: Remove; no longer needed now that we assume
12581         Autoconf 2.59 or later.
12582         * MODULES.html.sh: Remove 'restrict'.
12583         * modules/argp (Depends-on): Remove 'restrict'.
12584         * modules/base64 (Depends-on): Likewise.
12585         * modules/gc (Depends-on): Likewise.
12586         * modules/getaddrinfo (Depends-on): Likewise.
12587         * modules/glob (Depends-on): Likewise.
12588         * modules/inet_ntop (Depends-on): Likewise.
12589         * modules/inet_pton (Depends-on): Likewise.
12590         * modules/memxor (Depends-on): Likewise.
12591         * modules/regex (Depends-on): Likewise.
12592         * modules/strtok_r (Depends-on): Likewise.
12593         * modules/time_r (Depends-on): Likewise.
12594
12595 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12596
12597         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
12598         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
12599         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
12600         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
12601         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
12602         * m4/memxor.m4 (gl_MEMXOR): Likewise.
12603         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
12604         gl_C_RESTRICT replaced by AC_C_RESTRICT.
12605
12606         Merge from coreutils.
12607         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
12608         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
12609         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
12610         * m4/time_r.m4 (gl_TIME_R): Likewise.
12611
12612 2006-08-09  Karl Berry  <karl@gnu.org>
12613
12614         * config/srclist.txt: no more gettext-tools, per Bruno.
12615
12616 2006-08-08  Eric Blake  <ebb9@byu.net>
12617
12618         * modules/verror: New module.
12619         * MODULES.html.sh: Document it.
12620
12621 2006-08-08  Eric Blake  <ebb9@byu.net>
12622
12623         * lib/verror.h, lib/verror.c: New files.
12624
12625 2006-08-08  Eric Blake  <ebb9@byu.net>
12626
12627         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
12628         verror_at_line output complies with GNU Coding Standards even when
12629         file is NULL.
12630
12631 2006-08-07  Bruno Haible  <bruno@clisp.org>
12632
12633         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
12634         versions of AIX.
12635         Reported by Ralf Wildenhues.
12636
12637 2006-08-07  Bruno Haible  <bruno@clisp.org>
12638
12639         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
12640         in an AC_DEFUN. Needed so that the autoconf snippets can use
12641         AC_REQUIRE.
12642
12643 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12644
12645         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12646         Initialize pkgdata_DATA.
12647         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
12648         overriding it.
12649
12650 2006-08-06  Eric Blake  <ebb9@byu.net>
12651
12652         * lib/error.h: Fold in some upstream changes from glibc.
12653         * lib/error.c: Likewise.
12654
12655 2006-08-04  Bruno Haible  <bruno@clisp.org>
12656
12657         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12658         Make the mostlyclean-local rule depend on mostlyclean-generic.
12659         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
12660
12661 2006-07-31  Bruno Haible  <bruno@clisp.org>
12662
12663         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
12664         <stdlib.h>, <string.h>.
12665
12666 2006-07-30  Bruno Haible  <bruno@clisp.org>
12667
12668         * modules/readlink (License): Change to LGPL.
12669
12670 2006-07-30  Bruno Haible  <bruno@clisp.org>
12671
12672         * modules/javaversion (Makefile.am): Distribute javaversion.java and
12673         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
12674         set PKGDATADIR to point to it.
12675
12676 2006-07-30  Bruno Haible  <bruno@clisp.org>
12677
12678         * modules/csharpexec (configure.ac): Comment out macro invocation.
12679         * modules/javaexec (configure.ac): Likewise.
12680         * modules/javacomp-script (configure.ac): Likewise.
12681
12682         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
12683
12684 2006-07-30  Bruno Haible  <bruno@clisp.org>
12685
12686         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
12687         linked-list.
12688
12689 2006-07-30  Bruno Haible  <bruno@clisp.org>
12690
12691         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
12692
12693 2006-07-30  Bruno Haible  <bruno@clisp.org>
12694
12695         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12696         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
12697         get removed.
12698
12699 2006-07-29  Bruno Haible  <bruno@clisp.org>
12700
12701         Make it possible for gnulib-tool to work with locally modified or
12702         augmented gnulib repositories.
12703         * gnulib-tool (func_usage): Document --local-dir option.
12704         (local_gnulib_dir): New variable.
12705         Handle --local-dir option.
12706         (func_lookup_file): New function.
12707         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
12708         (func_get_description, func_get_filelist, func_get_description,
12709         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
12710         func_get_automake_snippet, func_get_include_directive,
12711         func_get_license, func_get_maintainer): Use func_lookup_file.
12712         (func_import, func_create_testdir): Use func_lookup_file.
12713
12714 2006-07-29  Bruno Haible  <bruno@clisp.org>
12715
12716         * modules/setenv (Depends-on): Add unistd.
12717
12718 2006-07-29  Bruno Haible  <bruno@clisp.org>
12719
12720         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
12721
12722 2006-07-29  Bruno Haible  <bruno@clisp.org>
12723
12724         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
12725
12726 2006-07-29  Bruno Haible  <bruno@clisp.org>
12727
12728         * gnulib-tool (import, update): If there is no Makefile.am, look at
12729         aclocal.m4, instead of bailing out.
12730
12731 2006-07-29  Bruno Haible  <bruno@clisp.org>
12732
12733         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
12734         Categorize the options by when they are useful.
12735
12736 2006-07-29  Bruno Haible  <bruno@clisp.org>
12737
12738         * gnulib-tool (func_usage): Document option --no-libtool.
12739         Handle option --no-libtool.
12740         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
12741         for changed semantics of $libtool variable.
12742         (func_import): Likewise. If libtool is not used, show this through
12743         an option --no-libtool.
12744         (func_create_testdir): Update.
12745
12746 2006-07-29  Bruno Haible  <bruno@clisp.org>
12747
12748         * gnulib-tool (func_import): Extend error message about missing
12749         --doc-base.
12750
12751 2006-07-29  Bruno Haible  <bruno@clisp.org>
12752
12753         * gnulib-tool (func_import): Don't create the $docbase directory if
12754         there is no file to store there.
12755
12756 2006-07-29  Bruno Haible  <bruno@clisp.org>
12757
12758         * gnulib-tool (autoconf_minversion): If a --dir option is given and
12759         relevant, look for configure.ac there, not in the current directory.
12760         Also use a simple search for AC_PREREQ, not "autoconf --trace".
12761
12762 2006-07-29  Bruno Haible  <bruno@clisp.org>
12763
12764         * gnulib-tool (SORT): New variable.
12765         (func_usage): Undocument --assume-autoconf option.
12766         Remove --assume-autoconf option handling.
12767         (autoconf_minversion): Determine from the contents of configure.ac.
12768         (func_import): Remove autoconf_minversion handling.
12769         Suggested by Eric Blake.
12770
12771 2006-07-29  Bruno Haible  <bruno@clisp.org>
12772
12773         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
12774
12775 2006-07-29  Bruno Haible  <bruno@clisp.org>
12776
12777         * config/srclist.txt (*setenv.[ch]): Remove rules.
12778
12779 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12780
12781         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
12782
12783 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12784
12785         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
12786         arpa/inet.h.
12787
12788 2006-07-28  Simon Josefsson  <jas@extundo.com>
12789
12790         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
12791         * modules/inet_pton (Depends-on): Likewise.
12792
12793 2006-07-28  Simon Josefsson  <jas@extundo.com>
12794
12795         * m4/netinet_in_h.m4: New file.
12796
12797 2006-07-28  Simon Josefsson  <jas@extundo.com>
12798
12799         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
12800         #include's.
12801
12802 2006-07-28  Simon Josefsson  <jas@extundo.com>
12803
12804         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
12805         #include's.
12806
12807 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
12808
12809         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
12810         setgid on directories only if they set these bits.
12811         * lib/modechange.h: Remove obsolete comment about masks.
12812
12813 2006-07-28  Eric Blake  <ebb9@byu.net>
12814
12815         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
12816         macro expansion.
12817
12818 2006-07-28  Bruno Haible  <bruno@clisp.org>
12819
12820         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
12821
12822 2006-07-28  Bruno Haible  <bruno@clisp.org>
12823
12824         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
12825
12826 2006-07-28  Bruno Haible  <bruno@clisp.org>
12827
12828         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
12829         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
12830         Define fallbacks.
12831         Avoids link error on FreeBSD 4.x.
12832         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12833
12834         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
12835         encoding.
12836         * lib/mbswidth.c (iswcntrl): Likewise.
12837
12838 2006-07-27  Bruno Haible  <bruno@clisp.org>
12839
12840         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
12841         test.
12842
12843 2006-07-27  Bruno Haible  <bruno@clisp.org>
12844
12845         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
12846         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
12847         defined.
12848
12849 2006-07-26  Eric Blake  <ebb9@byu.net>
12850
12851         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
12852
12853 2006-07-26  Eric Blake  <ebb9@byu.net>
12854
12855         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
12856         like mingw that lack mkstemp.
12857         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
12858         avoid compilation warning on mingw.
12859
12860 2006-07-26  Bruno Haible  <bruno@clisp.org>
12861
12862         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
12863         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
12864         INT_FAST*_MIN, INTPTR_MIN.
12865
12866 2006-07-25  Bruno Haible  <bruno@clisp.org>
12867
12868         * modules/version-etc (Depends-on): Add stdarg.
12869
12870 2006-07-25  Bruno Haible  <bruno@clisp.org>
12871
12872         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
12873         complex commands.
12874
12875 2006-07-25  Bruno Haible  <bruno@clisp.org>
12876
12877         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
12878         defined in <stdarg.h> or config.h.
12879
12880 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12881
12882         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
12883         (gl_STDIO_SAFER): Remove.
12884
12885 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12886
12887         * MODULES.html.sh (File stream based Input/Output):
12888         Add fopen-safer, tmpfile-safer; remove stdio-safer.
12889         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
12890         * modules/fopen-safer, modules/tmpfile-safer: New files.
12891         * modules/stdio-safer: Remove.
12892
12893 2006-07-24  Bruno Haible  <bruno@clisp.org>
12894
12895         * modules/tmpdir: New file.
12896         * MODULES.html.sh (File system functions): Add it.
12897
12898 2006-07-24  Bruno Haible  <bruno@clisp.org>
12899
12900         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
12901         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
12902
12903 2006-07-24  Bruno Haible  <bruno@clisp.org>
12904
12905         * modules/clean-temp: New file.
12906
12907 2006-07-24  Bruno Haible  <bruno@clisp.org>
12908
12909         * m4/tmpdir.m4: New file, from GNU gettext.
12910
12911 2006-07-24  Bruno Haible  <bruno@clisp.org>
12912
12913         * lib/tmpdir.h: New file, from GNU gettext.
12914         * lib/tmpdir.c: New file, from GNU gettext.
12915
12916 2006-07-24  Bruno Haible  <bruno@clisp.org>
12917
12918         * lib/clean-temp.h: New file, from GNU gettext.
12919         * lib/clean-temp.c: New file, from GNU gettext.
12920
12921 2006-07-23  Eric Blake  <ebb9@byu.net>
12922
12923         * modules/stdio-safer (Files): Add tmpfile-safer.c.
12924         (Depends-on): Add binary-io.
12925
12926 2006-07-23  Eric Blake  <ebb9@byu.net>
12927
12928         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
12929
12930 2006-07-23  Eric Blake  <ebb9@byu.net>
12931
12932         * lib/tmpfile-safer.c: New file.
12933         * lib/stdio-safer.h (fopen_safer): Add prototype.
12934         * lib/stdio--.h (tmpfile): Make safer.
12935
12936 2006-07-23  Bruno Haible  <bruno@clisp.org>
12937
12938         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
12939         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
12940         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
12941         gl_linked_remove_at): Use it.
12942
12943 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12944         and Simon Josefsson <jas@extundo.com>
12945
12946         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
12947
12948         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
12949
12950 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12951
12952         * modules/close-stream: New file.
12953         * modules/closeout (Description): Make it clear that it exits
12954         with a diagnostic on error.
12955         (Depends-on): Add close-stream.  Remove fpending, stdbool.
12956         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
12957
12958 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12959
12960         * m4/close-stream.m4: New file.
12961
12962 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12963
12964         * lib/close-stream.c, lib/close-stream.h: New files.
12965
12966 2006-07-22  Bruno Haible  <bruno@clisp.org>
12967
12968         Merge from GNU gettext 0.15.
12969
12970         2006-05-01  Bruno Haible  <bruno@clisp.org>
12971
12972                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
12973
12974         2006-07-22  Bruno Haible  <bruno@clisp.org>
12975
12976                 * modules/javaversion: New file.
12977                 * MODULES.html.sh (Java): Add javaversion.
12978
12979         2006-03-12  Bruno Haible  <bruno@clisp.org>
12980
12981                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
12982
12983         2005-12-04  Bruno Haible  <bruno@clisp.org>
12984
12985                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
12986                 (untested).
12987
12988         2006-06-21  Bruno Haible  <bruno@clisp.org>
12989
12990                 Avoid warnings from recent versions of mcs.
12991                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
12992                 -o, -L, -r any more. Use options documented since mcs-1.0
12993                 instead. Similarly for -g.
12994
12995         2005-12-04  Bruno Haible  <bruno@clisp.org>
12996
12997                 * build-aux/csharpcomp.sh.in: Suffix for resources is
12998                 .resources, not .resource.
12999
13000         2005-07-09  Bruno Haible  <bruno@clisp.org>
13001
13002                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
13003                 add a .dll suffix.
13004                 Reported by Mark Junker <mjscod@gmx.de>.
13005
13006         2006-07-22  Bruno Haible  <bruno@clisp.org>
13007
13008                 * modules/gettext: Upgrade to gettext-0.15.
13009                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
13010                 m4/visibility.m4.
13011                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
13012
13013 2006-07-22  Bruno Haible  <bruno@clisp.org>
13014
13015         Merge from GNU gettext 0.15.
13016
13017         2006-03-25  Bruno Haible  <bruno@clisp.org>
13018
13019                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
13020
13021         2006-07-21  Bruno Haible  <bruno@clisp.org>
13022
13023                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
13024                 "1.1".
13025
13026         2006-05-09  Bruno Haible  <bruno@clisp.org>
13027
13028                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
13029                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
13030                 for the conftestver execution.
13031
13032         2006-05-01  Bruno Haible  <bruno@clisp.org>
13033
13034                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
13035                 optional target-version argument. Verify that the compiler
13036                 groks source of the specified source-version, or add -source
13037                 option as necessary. Verify that the compiler produces
13038                 bytecode in the specified target-version, or add -target and
13039                 -source options as necessary. Make the result of the test
13040                 available as variable CONF_JAVAC. Also log error output in
13041                 config.log.
13042
13043         2006-03-11  Bruno Haible  <bruno@clisp.org>
13044
13045                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
13046
13047         2006-05-09  Bruno Haible  <bruno@clisp.org>
13048
13049                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
13050                 CLASSPATH_SEPARATOR to a semicolon.
13051
13052         2006-03-12  Bruno Haible  <bruno@clisp.org>
13053
13054                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
13055                 available as variable CONF_JAVA, for subsequent autoconf
13056                 tests. Also log error output in config.log.
13057
13058         2006-07-19  Bruno Haible  <bruno@clisp.org>
13059
13060                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
13061                 that getline works on glibc2 systems. Needed to avoid trouble
13062                 in relocatable.c.
13063                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
13064
13065         2005-12-04  Bruno Haible  <bruno@clisp.org>
13066
13067                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
13068                 launcher (untested).
13069
13070         2005-12-04  Bruno Haible  <bruno@clisp.org>
13071
13072                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
13073
13074         2006-07-22  Bruno Haible  <bruno@clisp.org>
13075
13076                 * gettext.m4: Update from GNU gettext-0.15.
13077                 * nls.m4: Likewise.
13078                 * po.m4: Likewise.
13079                 * inttypes-pri.m4: Likewise.
13080                 * inttypes-h.m4: Renamed from inttypes.m4.
13081                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
13082
13083 2006-07-22  Bruno Haible  <bruno@clisp.org>
13084
13085         Merge from GNU gettext 0.15.
13086
13087         2005-07-05  Bruno Haible  <bruno@clisp.org>
13088
13089                 * printf-args.c (printf_fetchargs): Work around broken
13090                 definition of wint_t on mingw.
13091
13092         2005-02-12  Bruno Haible  <bruno@clisp.org>
13093
13094                 * xallocsa.h: Add extern "C" for C++.
13095
13096         2006-05-17  Bruno Haible  <bruno@clisp.org>
13097
13098                 Cygwin portability.
13099                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
13100
13101         2006-04-30  Bruno Haible  <bruno@clisp.org>
13102
13103                 * progreloc.c: Include <mach-o/dyld.h> if available.
13104                 (find_executable): Use _NSGetExecutablePath when possible.
13105
13106         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
13107
13108                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
13109                 function.
13110
13111         2005-12-29  Bruno Haible  <bruno@clisp.org>
13112
13113                 * progreloc.c (set_program_name_and_installdir): Fix
13114                 compilation error.
13115
13116         2005-12-04  Bruno Haible  <bruno@clisp.org>
13117
13118                 Cygwin portability.
13119                 * progreloc.c: Include <windows.h> also on Cygwin.
13120                 (find_executable): Add support for Cygwin.
13121                 (set_program_name_and_installdir): Handle also platforms with
13122                 nonempty EXEEXT.
13123
13124         2006-07-11  Bruno Haible  <bruno@clisp.org>
13125
13126                 * javacomp.c: Fix a comment.
13127                 Reported by Jim Meyering.
13128
13129         2006-04-30  Bruno Haible  <bruno@clisp.org>
13130
13131                 * javacomp.h (compile_java_class): Add source_version,
13132                 target_version arguments.
13133                 * javacomp.c: Rewritten to choose only a compiler that
13134                 respects the specified source_version and target_version.
13135
13136         2006-06-27  Bruno Haible  <bruno@clisp.org>
13137
13138                 Assume correct S_ISDIR macro.
13139                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
13140
13141         2006-07-22  Bruno Haible  <bruno@clisp.org>
13142
13143                 * javaversion.h: New file, from GNU gettext.
13144                 * javaversion.c: New file, from GNU gettext.
13145                 * javaversion.java: New file, from GNU gettext.
13146                 * javaversion.class: New file, from GNU gettext.
13147
13148         2006-05-17  Bruno Haible  <bruno@clisp.org>
13149
13150                 Cygwin portability.
13151                 * javaexec.c (execute_java_class): Test for jview program
13152                 also on Cygwin.
13153
13154         2006-04-09  Bruno Haible  <bruno@clisp.org>
13155
13156                 * fatal-signal.c: Don't include string.h.
13157                 (at_fatal_signal): Use a copying loop instead of memcpy.
13158
13159         2005-12-04  Bruno Haible  <bruno@clisp.org>
13160
13161                 * csharpexec.c: Add support for 'clix' launcher (untested).
13162                 (execute_csharp_using_sscli): New function.
13163                 (execute_csharp_program): Call it.
13164
13165         2006-06-21  Bruno Haible  <bruno@clisp.org>
13166
13167                 Avoid warnings from recent versions of mcs.
13168                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
13169                 -o, -L, -r any more. Use options documented since mcs-1.0
13170                 instead. Similarly for -g.
13171
13172         2005-07-09  Bruno Haible  <bruno@clisp.org>
13173
13174                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
13175                 add a .dll suffix.
13176                 Reported by Mark Junker <mjscod@gmx.de>.
13177
13178         2006-06-17  Bruno Haible  <bruno@clisp.org>
13179
13180                 * config.charset: Update for NetBSD 3.0.
13181
13182         2006-05-17  Bruno Haible  <bruno@clisp.org>
13183
13184                 Cygwin portability.
13185                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
13186
13187         2006-05-16  Bruno Haible  <bruno@clisp.org>
13188
13189                 * localcharset.c [CYGWIN]: Include <windows.h>.
13190                 (get_charset_aliases): For Cygwin, return the same CPxxx
13191                 aliases list as under WIN32.
13192                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
13193                 the environment variables. Fall back to GetACP().
13194
13195         2006-04-05  Bruno Haible  <bruno@clisp.org>
13196
13197                 * config.charset: Update Juan Manuel Guerrero's address.
13198
13199         2005-02-12  Bruno Haible  <bruno@clisp.org>
13200
13201                 * allocsa.h: Add extern "C" for C++.
13202
13203         2005-02-10  Bruno Haible  <bruno@clisp.org>
13204
13205                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
13206                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
13207
13208         2006-07-22  Bruno Haible  <bruno@clisp.org>
13209
13210                 * gettext.h: Update to GNU gettext-0.15.
13211
13212 2006-07-22  Bruno Haible  <bruno@clisp.org>
13213
13214         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
13215         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
13216         lib-prefix.m4, longdouble.m4, ssize_t.m4.
13217
13218 2006-07-21  Eric Blake  <ebb9@byu.net>
13219
13220         * modules/stdlib-safer: New file.
13221         * MODULES.html.sh (File stream based Input/Output): Add
13222         stdlib-safer.
13223
13224 2006-07-21  Eric Blake  <ebb9@byu.net>
13225
13226         * lib/stdlib-safer.h: New file from coreutils, required by
13227         stdlib--.h.
13228
13229 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
13230
13231         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
13232
13233 2006-07-20  Bruno Haible  <bruno@clisp.org>
13234
13235         * gnulib-tool: Recognize new option --assume-autoconf.
13236         (autoconf_minversion): New variable.
13237         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
13238
13239 2006-07-20  Bruno Haible  <bruno@clisp.org>
13240
13241         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
13242
13243 2006-07-19  Derek R. Price  <derek@ximbiot.com>
13244
13245         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
13246         Reindent and repaginate.
13247
13248 2006-07-19  Derek Price  <derek@ximbiot.com>
13249
13250         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
13251         Correct grammar.
13252
13253 2006-07-17  Bruno Haible  <bruno@clisp.org>
13254
13255         * modules/list: New file.
13256         * modules/array-list: New file.
13257         * modules/carray-list, modules/carray-list-tests: New files.
13258         * modules/linked-list, modules/linked-list-tests: New files.
13259         * modules/avltree-list, modules/avltree-list-tests: New files.
13260         * modules/rbtree-list, modules/rbtree-list-tests: New files.
13261         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
13262         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
13263         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
13264         * modules/oset: New file.
13265         * modules/array-oset: New file.
13266         * modules/avltree-oset, modules/avltree-oset-tests: New files.
13267         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
13268         * tests/test-carray_list.c: New file.
13269         * tests/test-linked_list.c: New file.
13270         * tests/test-avltree_list.c: New file.
13271         * tests/test-rbtree_list.c: New file.
13272         * tests/test-linkedhash_list.c: New file.
13273         * tests/test-avltreehash_list.c: New file.
13274         * tests/test-rbtreehash_list.c: New file.
13275         * tests/test-avltree_oset.c: New file.
13276         * tests/test-rbtree_oset.c: New file.
13277         * MODULES.html.sh (Container data structures): New section.
13278
13279 2006-07-17  Bruno Haible  <bruno@clisp.org>
13280
13281         * m4/gl_list.m4: New file.
13282
13283 2006-07-17  Bruno Haible  <bruno@clisp.org>
13284
13285         * lib/gl_list.h: New file.
13286         * lib/gl_list.c: New file.
13287         * lib/gl_array_list.h: New file.
13288         * lib/gl_array_list.c: New file.
13289         * lib/gl_carray_list.h: New file.
13290         * lib/gl_carray_list.c: New file.
13291         * lib/gl_linked_list.h: New file.
13292         * lib/gl_linked_list.c: New file.
13293         * lib/gl_anylinked_list1.h: New file.
13294         * lib/gl_anylinked_list2.h: New file.
13295         * lib/gl_avltree_list.h: New file.
13296         * lib/gl_avltree_list.c: New file.
13297         * lib/gl_anyavltree_list1.h: New file.
13298         * lib/gl_anyavltree_list2.h: New file.
13299         * lib/gl_rbtree_list.h: New file.
13300         * lib/gl_rbtree_list.c: New file.
13301         * lib/gl_anyrbtree_list1.h: New file.
13302         * lib/gl_anyrbtree_list2.h: New file.
13303         * lib/gl_anytree_list1.h: New file.
13304         * lib/gl_anytree_list2.h: New file.
13305         * lib/gl_linkedhash_list.h: New file.
13306         * lib/gl_linkedhash_list.c: New file.
13307         * lib/gl_anyhash_list1.h: New file.
13308         * lib/gl_anyhash_list2.h: New file.
13309         * lib/gl_avltreehash_list.h: New file.
13310         * lib/gl_avltreehash_list.c: New file.
13311         * lib/gl_rbtreehash_list.h: New file.
13312         * lib/gl_rbtreehash_list.c: New file.
13313         * lib/gl_anytreehash_list1.h: New file.
13314         * lib/gl_anytreehash_list2.h: New file.
13315
13316         * lib/gl_oset.h: New file.
13317         * lib/gl_oset.c: New file.
13318         * lib/gl_array_oset.h: New file.
13319         * lib/gl_array_oset.c: New file.
13320         * lib/gl_avltree_oset.h: New file.
13321         * lib/gl_avltree_oset.c: New file.
13322         * lib/gl_rbtree_oset.h: New file.
13323         * lib/gl_rbtree_oset.c: New file.
13324         * lib/gl_anytree_oset.h: New file.
13325
13326 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13327
13328         * m4/mkancesdirs.m4: New file.
13329         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
13330         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
13331         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
13332         it.
13333
13334 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13335
13336         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
13337         * lib/mkancesdirs.h: New files.
13338         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
13339         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
13340         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
13341         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
13342         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
13343         callers changed.  Revamp internals significantly, by not
13344         attempting to create directories that are temporarily more
13345         permissive than the final results.  Do not attempt to use
13346         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
13347         This removes some race conditions, fixes some bugs, and simplifies
13348         things.  Use new dirchownmod function to do owner and mode changes.
13349         * lib/mkdir-p.h: Likewise.
13350         * lib/modechange.c (octal_to_mode): New function.
13351         (struct mode_change): New member mentioned.
13352         (make_node_op_equals): New arg mentioned.  All callers changed.
13353         (mode_compile): Keep track of which mode bits the user has explicitly
13354         mentioned.
13355         (mode_adjust): New arg DIR, so that we implement the X op correctly.
13356         New arg PMODE_BITS, to keep track of which mode bits the user
13357         mentioned; it treats S_ISUID and S_ISGID speciall.
13358         All callers changed.
13359         * lib/modechange.h: Likewise.
13360
13361 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13362
13363         * MODULES.html.sh: Add mkancestors.
13364         * modules/mkancesdirs: New module.
13365         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
13366         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
13367         The chdir-safer and afs files are now orphans; I'll remove them
13368         unless someone speaks up.
13369         Add lib/dirchownmod.c, lib/dirchownmod.h.
13370         (Depends-on): Remove alloca, chown, save-cwd, dirname.
13371         Add lchown, mkancesdirs.
13372         (Maintainer): Add self.
13373
13374 2006-07-15  Karl Berry  <karl@gnu.org>
13375
13376         * gnulib-tool: help message wording/arrangement.
13377
13378 2006-07-14  Simon Josefsson  <jas@extundo.com>
13379
13380         * doc/gnulib.texi (Libtool and Windows): New section.
13381
13382 2006-07-12  Simon Josefsson  <jas@extundo.com>
13383
13384         * modules/gendocs (License): Fix license, approved by Karl.
13385
13386 2006-07-12  Eric Blake  <ebb9@byu.net>
13387
13388         * MODULES.html.sh: Add gendocs.
13389
13390 2006-07-11  Eric Blake  <ebb9@byu.net>
13391
13392         * modules/fdl: New module, to install doc/fdl.texi.
13393         * MODULES.html.sh: Add new section for documentation modules.
13394         * gnulib-tool: Avoid space-tab.
13395         (--doc-base): New option, to manage files from doc.
13396
13397 2006-07-11  Eric Blake  <ebb9@byu.net>
13398
13399         * m4/absolute-header.m4: Fix comments to match recent change.
13400
13401 2006-07-11  Eric Blake  <ebb9@byu.net>
13402
13403         * gnulib-tool: List --doc-base before --tests-base.
13404
13405 2006-07-11  Derek R. Price  <derek@ximbiot.com>
13406
13407         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
13408
13409 2006-07-11  Bruno Haible  <bruno@clisp.org>
13410
13411         * README: Mention where to put documentation.
13412
13413 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13414
13415         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
13416
13417 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13418
13419         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
13420         to stdint.m4.
13421
13422 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13423
13424         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
13425         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
13426         "no/such/file/stdint.h" when there is no such file, so that
13427         the resulting C code can be parsed by dodgy compilers.
13428         Problems reported by Bob Proulx.
13429
13430 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13431
13432         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
13433         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13434         macros into the GNU _D_EXACT_NAMLEN.
13435         * lib/savedir.c:  Likewise.
13436         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
13437
13438 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13439         and Paul Eggert  <eggert@cs.ucla.edu>
13440
13441         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
13442         * m4/savedir.m4:
13443         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13444         macros into the GNU _D_EXACT_NAMLEN.
13445
13446 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13447
13448         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
13449         around the absolute name, to work around a problem with the HP-UX
13450         11.23 native C compiler, reported by Bob Proulx.
13451
13452 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13453
13454         * doc/maintain.texi, make-stds.texi: Sync from
13455         <http://savannah.gnu.org/projects/gnustandards>.
13456
13457 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13458
13459         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
13460
13461 2006-07-09  Jim Meyering  <jim@meyering.net>
13462
13463         * m4/glob.m4: Remove a doubled word in a comment.
13464
13465 2006-07-09  Jim Meyering  <jim@meyering.net>
13466
13467         * lib/argp-pv.c: Remove a doubled word in a comment.
13468         * lib/check-version.c (check_version): Likewise.
13469         * lib/javacomp.c (compile_java_class): Likewise.
13470
13471 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13472
13473         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
13474         for the benefit of people using Autoconf 2.60.  If you want to
13475         support older Autoconf versions you can copy m4/onceonly_2_57.m4
13476         (or m4/onceonly.m4, if pre-2.57) manually.
13477
13478 2006-07-08  Jim Meyering  <jim@meyering.net>
13479
13480         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
13481         comment.
13482         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
13483         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
13484         comment.
13485
13486 2006-07-08  Jim Meyering  <jim@meyering.net>
13487
13488         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
13489
13490 2006-07-07  Simon Josefsson  <jas@extundo.com>
13491
13492         * tests/test-crc.c: Change expected crc value, the test vector
13493         were probably computed using the old broken crc.c?
13494
13495 2006-07-06  Simon Josefsson  <jas@extundo.com>
13496
13497         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
13498         now the canonical place for the M4 file).
13499
13500         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
13501         from the sys_socket dependency now.
13502
13503         * modules/inet_pton (Files): Ditto.
13504
13505         * modules/inet_ntop (Files): Ditto.
13506
13507 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13508
13509         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
13510         not gl_PREREQ_GETUSERSHELL.
13511
13512 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13513
13514         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
13515         with only one argument, for Autoconf 2.60.
13516         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
13517         expand to nothing, so add a shell command to avoid syntax error.
13518         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
13519
13520 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13521
13522         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
13523
13524 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13525
13526         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
13527         no longer needed.  Check for isblank decl.
13528         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
13529         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
13530         of existence.
13531
13532 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13533
13534         * lib/getloadavg.c: Use __VMS, not VMS.
13535         * lib/getopt.c: Likewise.
13536         * lib/getpagesize.h: Likewise.
13537         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
13538         and probably does not work.
13539
13540 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13541
13542         * lib/.cppi-disable: Add wcwidth.
13543         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
13544         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
13545         (ISGRAPH): Remove.  All uses changed to isgraph.
13546         (FOLD) [!defined _LIBC]: Remove special case.
13547         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
13548         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
13549         HAVE_ISBLANK.
13550         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
13551         case.
13552
13553 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
13554
13555         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
13556         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
13557         brackets.  Other minor changes to suppress some compiler
13558         warnings.
13559
13560 2006-07-06  Derek R. Price  <derek@ximbiot.com>
13561         and Paul Eggert  <eggert@cs.ucla.edu>
13562
13563         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
13564         of invoking obsolescent AC_HEADER_DIRENT macro.
13565         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
13566         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
13567         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
13568         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
13569         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
13570         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13571         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
13572         * m4/readdir.m4: Remove; no longer needed.
13573
13574 2006-07-06  Derek R. Price  <derek@ximbiot.com>
13575         and Paul Eggert  <eggert@cs.ucla.edu>
13576
13577         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
13578         Don't worry about this obsolete case any more.
13579         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
13580         directories.
13581         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
13582         worry about this obsolete case any more.
13583         * lib/fts.c: Likewise.
13584         * lib/getcwd.c: Likewise.
13585         * lib/glob.h: Likewise.
13586         * lib/savedir.c: Likewise.
13587
13588 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13589
13590         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
13591         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
13592         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
13593         needed.
13594         All uses removed.
13595         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13596         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
13597         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
13598         needed.
13599         * m4/getdate.m4 (gl_GETDATE): Likewise.
13600         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
13601         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
13602         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
13603         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13604         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
13605         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
13606         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
13607         needed.
13608
13609 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13610
13611         * lib/memcasecmp.c: Include <limits.h>.
13612         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
13613         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
13614         Don't assume isdigit succeeds only on '0' through '9'.
13615
13616 2006-07-05  Eric Blake  <ebb9@byu.net>
13617
13618         * modules/getaddrinfo (Depends-on): Add snprintf.
13619
13620 2006-07-05  Eric Blake  <ebb9@byu.net>
13621
13622         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
13623         to avoid 'header present but could not be compiled' on cygwin.
13624
13625 2006-07-05  Eric Blake  <ebb9@byu.net>
13626
13627         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
13628         missing from netdb.h.
13629         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
13630
13631 2006-07-05  Derek R. Price  <derek@ximbiot.com>
13632
13633         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
13634         no longer needed.
13635         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
13636         * m4/getdate.m4 (gl_GETDATE): Likewise.
13637         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
13638         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
13639         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
13640         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13641         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
13642
13643 2006-07-05  Derek R. Price  <derek@ximbiot.com>
13644
13645         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
13646         All uses of is_space replaced by isspace.
13647         * lib/exit.h: Don't talk about STDC_HEADERS.
13648         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
13649         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
13650         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
13651         replaced by isprint etc.
13652         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
13653         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13654         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
13655         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
13656         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
13657         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13658
13659 2006-07-05  Bruno Haible  <bruno@clisp.org>
13660
13661         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
13662         the function exists, before testing against AIX.
13663         Reported by Martin Lambers <marlam@marlam.de>.
13664
13665 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13666
13667         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
13668         From Mark D. Baushke.
13669
13670 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13671
13672         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
13673         to the absolute name, not just one, to bypass Sun C 5.8's
13674         "warning: #include of /usr/include/... may be non-portable".
13675
13676 2006-07-04  Eric Blake  <ebb9@byu.net>
13677
13678         * modules/dirname-tests: New test module.
13679         * tests/test-dirname.c: New file, replacing dirname.c
13680         TEST_DIRNAME section that was recently deleted.
13681
13682 2006-07-04  Bruno Haible  <bruno@clisp.org>
13683
13684         Assume ANSI C header files and <ctype.h> functions.
13685         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
13686         (mbsnwidth): Use isprint, iscntrl instead.
13687
13688 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13689
13690         Merge from coreutils.
13691         * MODULES.html.sh: Add xstrtold.
13692         * modules/xstrtold: New file.
13693         * modules/cycle-check (Files): Add lib/same-inode.h.
13694         * modules/dirname (Files): Add m4/double-slash-root.m4.
13695         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
13696         * modules/mkdir-p (Files): Add lib/same-inode.h.
13697         * modules/same (Files): Add lib/same-inode.h.
13698
13699 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13700
13701         * m4/absolute-header.m4: Renamed from full-header-path.m4.
13702         This is to keep the terminology clean; POSIX talks about
13703         "absolute pathnames", not "full pathnames", but the GNU
13704         Coding Standards say to use "path" for something else;
13705         so use "absolute" to keep both sides happy.
13706         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
13707         Set gl_absolute_header, not gl_full_header_path.
13708         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
13709         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
13710         All uses changed.
13711
13712         Merge from coreutils.
13713
13714         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13715
13716         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
13717         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
13718         want to require the building of c-strtod.o.
13719         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
13720         needs -lm directly.
13721         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
13722
13723         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13724
13725         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
13726         --as-needed option if available.  Problem reported by Albert Chin in
13727         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
13728         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
13729         cc merely issues a bunch of annoying warnings for --as-needed
13730         (this problem was reported by Bob Proulx).  Also, try linking with
13731         -lm to detect a bug in binutils 2.16 (this problem was reported
13732         by Ralf Wildenhues).
13733
13734         2006-06-18  Jim Meyering  <jim@meyering.net>
13735
13736         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
13737         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
13738         macro.
13739         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
13740         also check for glibc-2.4's abort-inducing bug.
13741
13742         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
13743         Low-probability clean-up should be to use rmdir to get rid of
13744         the just-created directory, not unlink.
13745
13746         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
13747         configure fail, and request a bug report to inform us about it.
13748         Add a comment that, barring reports to the contrary, in 2007 we'll
13749         assume ftruncate is universally available.
13750
13751         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13752
13753         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
13754
13755         2006-03-12  Jim Meyering  <jim@meyering.net>
13756
13757         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
13758         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
13759         * m4/same.m4 (gl_SAME): Likewise.
13760         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
13761
13762         2006-03-11  Eric Blake  <ebb9@byu.net>
13763
13764         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
13765         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
13766         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
13767         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
13768
13769 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13770
13771         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
13772         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
13773         reported by Mark D. Baushke, one in
13774         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
13775
13776         Merge from coreutils.
13777
13778         * lib/.cppi-disable: Add stdint_.h.
13779         * lib/.cvsignore: Add stdint.h.
13780
13781         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13782
13783         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
13784         both double and long double versions.
13785         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
13786         * lib/xstrtold.c: New file.
13787         * lib/xstrtod.h (xstrtold): New decl.
13788
13789         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13790
13791         * lib/filemode.c (setst): Remove.
13792         (strmode): Rewrite to avoid setst.  This makes the code shorter,
13793         (arguably) clearer, and the generated code is a bit smaller on my
13794         Debian GNU/Linux stable x86 host.
13795
13796         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13797
13798         * lib/filemode.c: Include "filemode.h" first, to test the interface.
13799         Assume that filemode.h includes sys/types.h and sys/stat.h.
13800         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
13801         (ftypelet): Reorder to put common cases first, for efficiency.
13802         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
13803         to do 'M'.
13804         (strmode): Renamed from mode_string, and now stores 12 bytes instead
13805         of 10, for compatibility with FreeBSD.  All callers changed.
13806         (filemodestring): Now stores 12 bytes instead of 10, and sets file
13807         types that can't be deduced solely from st_mode.  First arg is now a
13808         const pointer.
13809         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
13810         (strmode): Renamed from mode_string.
13811         (filemodestring): New decl.
13812         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
13813         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
13814         needed.
13815         (S_ISPORT, S_ISWHT): New macros, if not already defined.
13816
13817         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13818
13819         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
13820         fsusage.h now does that.  Include fsusage.h first, to test interface.
13821         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
13822         at most one method (the old code could have generated decls that
13823         didn't conform to C89, not that this was ever exercised).
13824         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
13825
13826         2006-03-19  Jim Meyering  <jim@meyering.net>
13827
13828         Work even in a chroot where d_ino values for entries in "/"
13829         don't match the stat.st_ino values for the same names.
13830         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
13831         number, iterate through all entries again, using lstat instead.
13832         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
13833         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
13834
13835         * lib/getcwd.c (__getcwd): Clarify a comment.
13836         Use memcpy in place of a call to strcpy.
13837
13838         2006-03-12  Jim Meyering  <jim@meyering.net>
13839
13840         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
13841         matches that of the current directory (which we're about to chdir ".."
13842         out of), then save the dev-ino of the parent, instead.
13843
13844         * lib/same-inode.h (SAME_INODE): New file/macro.
13845         * lib/chdir-safer.c (SAME_INODE): Remove definition.
13846         Include "same-inode.h", instead.
13847         * lib/same.c: Likewise.
13848         * lib/cycle-check.h: Include "same-inode.h".
13849         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
13850         * lib/cycle-check.c (SAME_INODE): Remove definition.
13851         * lib/root-dev-ino.h: Include "same-inode.h".
13852
13853         2006-03-11  Eric Blake  <ebb9@byu.net>
13854
13855         * lib/same.c (same_name): s/base_name/last_component/
13856         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
13857         * lib/filenamecat.c (file_name_concat): Likewise.
13858
13859         2006-03-11  Eric Blake  <ebb9@byu.net>,
13860                     Paul Eggert  <eggert@cs.ucla.edu>
13861
13862         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
13863         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
13864         drive prefix.
13865         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
13866         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
13867         (last_component): New method.
13868         * lib/dirname.c (dir_len): Determine when drive letters need a
13869         subsequent slash.  Preserve // when it is special.
13870         (dir_name): Don't append dot when drive letter is absolute.
13871         [TEST_DIRNAME]: Move into a full-blown gnulib test.
13872         * lib/basename.c (base_name): New semantics - malloc the result.
13873         Preserve // when it is special.  Preserve relative files that look
13874         like drive letters.
13875         (base_len): Preserve // when it is special.
13876         (last_component): New method, similar to old base_name semantics.
13877         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
13878         base_name.  Strip redundant slashes from ///.
13879
13880 2006-07-03  Jim Meyering  <jim@meyering.net>
13881
13882         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
13883         macro is used before the first cycle_check call.
13884
13885 2006-07-03  Eric Blake  <ebb9@byu.net>
13886
13887         * modules/dirname (Depends-on): Add xstrndup.
13888
13889 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13890
13891         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
13892         test cases, so that config.log is a bit easier to follow.
13893
13894 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13895
13896         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
13897         both are 64 bits, since this seems to be the tradition, and this
13898         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
13899         we ever run into a host that prefers long long to long in this
13900         case, we'll need another configure-time test.  Problem reported by
13901         Jim Meyering.
13902
13903 2006-07-02  Eric Blake  <ebb9@byu.net>
13904
13905         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
13906
13907 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13908
13909         * modules/inttypes (Depends-on): No longer depends on stdint.
13910         * modules/stdint (Description): Say more about assumptions.
13911         Say that the fast types might differ.  Say macros are used.
13912         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
13913         (Makefile.am): Revise list of substituted symbols to match
13914         new stdint.m4.
13915         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
13916         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
13917         * tests/test-stdint.c (verify_same_types)
13918         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
13919         the code conforms to C99/C89.
13920         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
13921         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
13922
13923 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13924
13925         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
13926         but fix a bug, by requiring at least 64 bits.
13927         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
13928         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
13929         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
13930         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
13931
13932         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
13933         changes.  Make 2.59 a prerequisite.  Check and substitute for
13934         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
13935         inttypes.h.  Do not use special include files; just use the
13936         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
13937         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
13938         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
13939         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
13940         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
13941         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
13942         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
13943         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
13944         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
13945         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
13946         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
13947         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
13948         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
13949         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
13950         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
13951         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
13952         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
13953         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
13954         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
13955         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
13956         WINT_MAX.  Check for C99 conformance more strictly, by detecting
13957         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
13958         not check for things that C99 does not require, e.g., int8_t.  If
13959         a test isn't needed unless <stdint.h> isn't working, and is
13960         unlikely to be needed for any other reason, then don't do it
13961         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
13962         size_t, since we assume C89 freestanding at least.  Do not check
13963         for sig_atomic_t, wchar_t, or wint_t, since the code now does
13964         the right thing even if the types are not defined.  Instead use:
13965         (gl_STDINT_TYPE_PROPERTIES): New macro.
13966         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
13967         testing whether <sys/types.h> clashes, as Autoconf does this for
13968         us now.  All uses removed.
13969         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
13970         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
13971         (gl_CHECK_TYPE_SAME):
13972         Remove; no longer needed.
13973         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
13974         exists, since we'll return 0 anyway in that case.
13975         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
13976
13977 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13978
13979         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
13980         possible collision with system files.
13981         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
13982         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
13983         WCHAR_MIN and WCHAR_MAX in this case.
13984         (<stddef.h>): Do not include; no longer needed.
13985         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
13986         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
13987         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
13988         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
13989         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
13990         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
13991         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
13992         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
13993         !defined(__c99))]: Include in this case too, since it's harmless
13994         now.
13995         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
13996         dangerous to do so.
13997         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
13998         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
13999         (_STDINT_MIN, _STDINT_MAX): New macros.
14000         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
14001         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
14002         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
14003         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
14004         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
14005         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
14006         macros, not typedefs; this simplifies things quite a bit.
14007         Use long int for all types narrower than int64_t.
14008         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
14009         Define in terms of long long int or int64_t or long int,
14010         not int64_t or int32_t.  This saves some compile-time testing.
14011         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
14012         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
14013         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
14014         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
14015         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
14016         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
14017         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
14018         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
14019         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
14020         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
14021         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14022         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14023         undef any previous version and define our own version, for
14024         simplicity and consistency with the new macros for types.
14025         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14026         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14027         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
14028         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
14029         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
14030         @WINT_T_SUFFIX@ to keep things simple here.
14031         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
14032         Simplify by assuming typical 8/16/32/64 host, since we're
14033         already doing that elsewhere anyway.
14034         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
14035         and assume long long int is 64 bits if available.  This
14036         speeds up 'configure'.
14037
14038 2006-07-01  Eric Blake  <ebb9@byu.net>
14039
14040         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
14041         Reported by Andreas Buening.
14042
14043 2006-07-01  Eric Blake  <ebb9@byu.net>
14044
14045         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
14046
14047 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14048
14049         * lib/getaddrinfo.c: fixed typo
14050
14051 2006-06-29  Jim Meyering  <jim@meyering.net>
14052
14053         * modules/strftime (Maintainer): Add my name, since with the
14054         FPRINTFTIME changes strftime.c has forked from glibc.
14055
14056 2006-06-29  Eric Blake  <ebb9@byu.net>
14057
14058         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
14059
14060 2006-06-29  Eric Blake  <ebb9@byu.net>
14061
14062         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
14063
14064 2006-06-29  Eric Blake  <ebb9@byu.net>
14065
14066         * lib/stat_.h: New file.
14067
14068 2006-06-29  Eric Blake  <ebb9@byu.net>
14069
14070         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
14071         unused static function.
14072
14073 2006-06-29  Eric Blake  <ebb9@byu.net>
14074
14075         * doc/functions.texi (Function Portability): Document missing lstat
14076         on mingw.
14077
14078 2006-06-29  Eric Blake  <ebb9@byu.net>
14079
14080         * MODULES.html.sh: Add sys_stat.
14081         * modules/sys_stat: New module.
14082         * modules/mkstemp (Depends-on): Add sys_stat.
14083
14084 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14085
14086         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
14087
14088 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14089
14090         * m4/c-bs-a.m4: Removed.
14091
14092 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14093
14094         * lib/strftime.c: Assume strftime() exists.
14095
14096 2006-06-29  Derek Price  <derek@ximbiot.com>
14097
14098         * modules/c-bs-a: Removed - \a is C89.
14099         * MODULES.html.sh: Remove c-bs-a.
14100
14101 2006-06-29  Bruno Haible  <bruno@clisp.org>
14102
14103         * modules/wcwidth (License): Change to LGPL.
14104
14105 2006-06-28  Simon Josefsson  <jas@extundo.com>
14106
14107         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
14108         on _WIN32.
14109
14110         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
14111         getnameinfo.
14112
14113 2006-06-28  Simon Josefsson  <jas@extundo.com>
14114
14115         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
14116
14117 2006-06-28  Simon Josefsson  <jas@extundo.com>
14118
14119         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
14120         functions there.  It will succeed on Windows XP, but on Windows
14121         2000 and (presumably) earlier, it will fail, and use the internal
14122         re-implementation.
14123         (use_win32_p): New function.
14124         (getaddrinfo): Use strtoul on servname, to support numeric ports.
14125         Support AI_NUMERICSERV to disable getservbyname.
14126         (getnameinfo): New function, only supports
14127         NI_NUMERICHOST|NI_NUMERICSERV for now.
14128
14129         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
14130         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
14131         getnameinfo.
14132
14133 2006-06-28  Eric Blake  <ebb9@byu.net>
14134
14135         * modules/wcwidth: New file.
14136         * modules/mbchar (Depends-on): Add wcwidth.
14137         * modules/mbswidth (Depends-on): Add wcwidth.
14138         * MODULES.html.sh: Add wcwidth.
14139
14140 2006-06-28  Eric Blake  <ebb9@byu.net>
14141
14142         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
14143         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
14144
14145 2006-06-28  Eric Blake  <ebb9@byu.net>
14146
14147         * lib/xvasprintf.h: Fix comments.
14148
14149 2006-06-28  Eric Blake  <ebb9@byu.net>
14150
14151         * lib/mbchar.h (wcwidth): Include wcwidth.h.
14152         * lib/mbswidth.c (wcwidth): Move from here...
14153         * lib/wcwidth.h: ...to this new file.
14154
14155 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14156
14157         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
14158
14159         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
14160         it's obsolete.
14161         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
14162
14163 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14164
14165         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
14166         Autoconf 2.60 says this stuff was obsolete.
14167
14168 2006-06-28  Bruno Haible  <bruno@clisp.org>
14169
14170         * modules/wcwidth (Files): Add m4/wchar_t.m4.
14171
14172 2006-06-28  Bruno Haible  <bruno@clisp.org>
14173
14174         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
14175         gt_TYPE_WCHAR_T.
14176
14177 2006-06-28  Bruno Haible  <bruno@clisp.org>
14178
14179         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
14180         declaration for wcwidth.
14181         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
14182
14183 2006-06-28  Bruno Haible  <bruno@clisp.org>
14184
14185         * lib/mkdtemp.c [MINGW]: Include <io.h>.
14186         (mkdir): Define using _mkdir.
14187
14188 2006-06-28  Bruno Haible  <bruno@clisp.org>
14189
14190         * lib/getaddrinfo.h: Fix POSIX URL.
14191         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
14192         _WIN32.
14193         (use_win32_p): Make static.
14194         (getaddrinfo): Reject service name if it is empty or does not consist
14195         solely of decimal digits, or if its value is > 65535.
14196         (getnameinfo): Remove useless casts.
14197
14198 2006-06-27  Simon Josefsson  <jas@extundo.com>
14199
14200         * modules/sys_select: New file, suggested by Bruno Haible, Paul
14201         Eggert and Martin Lambers.
14202
14203 2006-06-27  Simon Josefsson  <jas@extundo.com>
14204
14205         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
14206         Eggert and Martin Lambers.
14207
14208 2006-06-27  Bruno Haible  <bruno@clisp.org>
14209
14210         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
14211         result to 0, not to empty.
14212         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
14213
14214 2006-06-27  Bruno Haible  <bruno@clisp.org>
14215
14216         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
14217
14218 2006-06-26  Simon Josefsson  <jas@extundo.com>
14219
14220         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
14221         present.
14222
14223 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
14224
14225         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
14226         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
14227         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
14228
14229 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
14230
14231         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
14232
14233 2006-06-26  Bruno Haible  <bruno@clisp.org>
14234
14235         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
14236
14237 2006-06-26  Bruno Haible  <bruno@clisp.org>
14238
14239         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
14240
14241 2006-06-26  Bruno Haible  <bruno@clisp.org>
14242
14243         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
14244         SGI C compiler in pre-C99 mode.
14245         Suggested by Mark D. Baushke and Larry Jones.
14246
14247 2006-06-26  Bruno Haible  <bruno@clisp.org>
14248
14249         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
14250         WCHAR_MAX.
14251         Reported by Mark D. Baushke and Larry Jones.
14252
14253 2006-06-26  Bruno Haible  <bruno@clisp.org>
14254
14255         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
14256         in pre-C99 mode.
14257         Suggested by Mark D. Baushke and Larry Jones.
14258
14259 2006-06-23  Simon Josefsson  <jas@extundo.com>
14260             Bruno Haible  <bruno@clisp.org>
14261
14262         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
14263         Emit mostlyclean-local rule.
14264         (func_emit_tests_Makefile_am): Likewise.
14265         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
14266
14267 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
14268
14269         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
14270
14271 2006-06-23  Bruno Haible  <bruno@clisp.org>
14272
14273         * tests/test-stdint.c: Update to match ISO C 99 Technical
14274         Corrigendum 1.
14275
14276 2006-06-23  Bruno Haible  <bruno@clisp.org>
14277
14278         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
14279
14280 2006-06-23  Bruno Haible  <bruno@clisp.org>
14281
14282         * lib/stdint_.h: Treat IRIX like OpenBSD.
14283
14284 2006-06-23  Bruno Haible  <bruno@clisp.org>
14285
14286         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
14287         ISO C 99 Technical Corrigendum 1.
14288
14289 2006-06-22  Simon Josefsson  <jas@extundo.com>
14290
14291         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
14292         MinGW.
14293
14294 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14295
14296         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
14297         needed.  Some compiler complained about some of them.  Problem reported
14298         by Larry Jones in
14299         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
14300
14301 2006-06-21  Simon Josefsson  <jas@extundo.com>
14302
14303         * tests/test-getaddrinfo.c: New file.
14304
14305         * modules/getaddrinfo-tests: New file.
14306
14307         * MODULES.html.sh: Add inet_pton.
14308
14309         * modules/inet_pton: New file.
14310
14311 2006-06-21  Simon Josefsson  <jas@extundo.com>
14312
14313         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
14314         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
14315         of using the (limited) gnulib implementation on Windows XP.
14316
14317         * m4/inet_pton.m4: New file.
14318
14319 2006-06-21  Simon Josefsson  <jas@extundo.com>
14320
14321         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
14322         variable.
14323
14324         * lib/socket_.h: Don't define WINVER.
14325
14326         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
14327         slightly modified to work in gnulib.
14328
14329 2006-06-21  Simon Josefsson  <jas@extundo.com>
14330
14331         * doc/gnulib.texi (Windows sockets): Add.
14332
14333 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
14334
14335         * lib/read-file.c (fread_file): Start with buffer allocation of
14336         0 bytes rather than 1 byte; this simplifies the code.
14337         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
14338         code to free buffer and save/restore errno.
14339         (internal_read_file): Remove unused local.
14340
14341 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
14342
14343         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
14344         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
14345         Problem reported by Denis Excoffier in
14346         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
14347
14348 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14349
14350         * modules/sys_socket, modules/socklen: Include sys/types since
14351         FreeBSD 4.x's sys/socket.h needs it.
14352
14353 2006-06-19  Simon Josefsson  <jas@extundo.com>
14354
14355         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
14356
14357 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14358
14359         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
14360
14361 2006-06-19  Bruno Haible  <bruno@clisp.org>
14362
14363         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
14364         and FULL_PATH_INTTYPES_H in angle brackets.
14365         Reported by Mark D. Baushke <mdb@gnu.org>.
14366
14367 2006-06-17  Eric Blake  <ebb9@byu.net>
14368
14369         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
14370         errno.
14371
14372 2006-06-17  Bruno Haible  <bruno@clisp.org>
14373
14374         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
14375         <sys/inttypes.h>.
14376
14377 2006-06-17  Bruno Haible  <bruno@clisp.org>
14378
14379         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
14380         whether errno is declared. Assume <errno.h> declares errno.
14381
14382 2006-06-17  Bruno Haible  <bruno@clisp.org>
14383
14384         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
14385
14386 2006-06-17  Bruno Haible  <bruno@clisp.org>
14387
14388         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
14389         problem on Solaris 2.5.1.
14390
14391 2006-06-16  Eric Blake  <ebb9@byu.net>
14392
14393         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
14394         * lib/unicodeio.c [!defined errno]: Likewise.
14395         * lib/strtol.c [!defined errno]: Likewise.
14396         * lib/strtod.c [!defined errno]: Likewise.
14397
14398 2006-06-15  Eric Blake  <ebb9@byu.net>
14399
14400         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
14401
14402 2006-06-15  Eric Blake  <ebb9@byu.net>
14403
14404         * config/srclist.txt (ssize_t.m4): Lose sync.
14405
14406 2006-06-15  Bruno Haible  <bruno@clisp.org>
14407
14408         * modules/stdint (Files): Include m4/full-header-path.m4,
14409         m4/size_max.m4, m4/wchar_t.m4.
14410         (Makefile.am): Many more substitutions.
14411         * modules/stdint-tests: New file.
14412         * tests/test-stdint.c: New file.
14413
14414 2006-06-15  Bruno Haible  <bruno@clisp.org>
14415
14416         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
14417         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
14418         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
14419         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
14420         gl_CHECK_TYPE_SAME): New macros.
14421
14422 2006-06-15  Bruno Haible  <bruno@clisp.org>
14423
14424         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
14425
14426 2006-06-15  Bruno Haible  <bruno@clisp.org>
14427
14428         * lib/stdint_.h: Rewritten to be fully auto-configured.
14429         Fixes bug on HP-UX/IA64.
14430
14431 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
14432
14433         * lib/getdate.y (__attribute__): Don't define if already defined.
14434         Problem reported by Larry Jones.
14435         * lib/utimens.c (__attribute__): Likewise.
14436
14437 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
14438
14439         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
14440         reported by Andreas Schwab.
14441
14442 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14443             Bruno Haible  <bruno@clisp.org>
14444
14445         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
14446         check for the declaration of strnlen and a run test that exposes the
14447         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
14448         rpl_strndup.
14449
14450 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14451             Bruno Haible  <bruno@clisp.org>
14452
14453         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
14454
14455 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14456
14457         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
14458         compile test, for Tru64 4.0D.
14459
14460 2006-05-28  Karl Berry  <karl@gnu.org>
14461
14462         * config/srclist.txt (printf-args.c): lose sync.
14463
14464 2006-05-26  Martin Lambers  <marlam@marlam.de>
14465
14466         * lib/getpass.c: Updates the test for the native W32 API, and adds
14467         missing includes, thus fixing compilation warnings.
14468
14469 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14470
14471         * lib/exclude.c (exclude_fnmatch): New function.
14472         (excluded_file_name): Call exclude_fnmatch.
14473         * lib/exclude.h (excluded_file_name): New prototype
14474
14475 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
14476
14477         * lib/tempname.c (small_open, large_open): New macros.
14478         (__open, __open64) [!_LIBC]: Remove.
14479         (__gen_tempname): Use small_open and large_open instead of __open
14480         and __open64.  This fixes a portability bug on HP-UX 11.11i
14481         reported by Simon Wing-Tang in
14482         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
14483
14484 2006-05-24  Bruno Haible  <bruno@clisp.org>
14485
14486         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
14487         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
14488         Reported by Thorsten Maerz <torte@netztorte.de> via
14489         Aaron Stone <aaron@serendipity.cx>.
14490
14491 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14492
14493         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
14494         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
14495         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
14496         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
14497         not really conditional on the cache.
14498         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
14499
14500 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14501
14502         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
14503         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
14504         (my_usleep): Don't mishandle maximum value.
14505
14506 2006-05-19  Jim Meyering  <jim@meyering.net>
14507
14508         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
14509
14510 2006-05-17  Bruno Haible  <bruno@clisp.org>
14511
14512         Cygwin portability.
14513         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
14514
14515 2006-05-17  Bruno Haible  <bruno@clisp.org>
14516
14517         * lib/stdint_.h: Fix recognition of Cygwin.
14518
14519 2006-05-15  Bruno Haible  <bruno@clisp.org>
14520
14521         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
14522         on libtool patch by Ralf Wildenhues.
14523
14524 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14525
14526         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
14527         test for C99 conformance; (bool) 0.5 is an integer constant
14528         expression, but (bool) -0.5 is not.  Problem reported by Fedor
14529         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
14530
14531 2006-05-11  Simon Josefsson  <jas@extundo.com>
14532
14533         * m4/xvasprintf.m4: Fix obvious typo.
14534
14535 2006-05-11  Jim Meyering  <jim@meyering.net>
14536
14537         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
14538         James Lemley.
14539
14540 2006-05-10  Simon Josefsson  <jas@extundo.com>
14541
14542         * lib/md4.c: Typo fix, update copyright years.
14543         (K1, K2): Don't use L because it turn computations into 64-bit on
14544         64-bit platforms.
14545
14546 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
14547
14548         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
14549         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
14550         unwanted sign propagation, e.g., on hosts with 64-bit int.
14551         There still are some problems with reeelly weird theoretical hosts
14552         (e.g., 33-bit int) but it's not worth worrying about now.
14553         * lib/sha1.c (rol): Likewise.
14554         (K1, K2, K3, K4): Remove unnecessary L suffix.
14555
14556 2006-05-10  Bruno Haible  <bruno@clisp.org>
14557
14558         * lib/des.c: Cast to avoid warnings.
14559
14560 2006-05-09  Bruno Haible  <bruno@clisp.org>
14561
14562         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
14563         (Depends-on): Depend also on xsize, stdarg.
14564         (configure.ac): Add gl_XVASPRINTF.
14565
14566 2006-05-09  Bruno Haible  <bruno@clisp.org>
14567
14568         * m4/xvasprintf.m4: New file.
14569
14570 2006-05-09  Bruno Haible  <bruno@clisp.org>
14571
14572         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
14573         (EOVERFLOW): Define fallback value.
14574         (xstrcat): New function.
14575         (xvasprintf): Recognize the special case of a string concatenation.
14576
14577 2006-05-08  Eric Blake  <ebb9@byu.net>
14578
14579         * gnulib-tool (func_version): Base copyright year on CVS date.
14580         (func_emit_copyright_notice): New function.
14581         (func_emit_lib_Makefile_am): Use it.
14582         (func_emit_tests_Makefile_am): Likewise.
14583         (func_import): Likewise.
14584
14585 2006-05-08  Bruno Haible  <bruno@clisp.org>
14586
14587         * modules/stdarg: New file.
14588         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
14589
14590 2006-05-08  Bruno Haible  <bruno@clisp.org>
14591
14592         * m4/stdarg.m4: New file, from GNU gettext.
14593
14594 2006-05-08  Bruno Haible  <bruno@clisp.org>
14595
14596         * config/srclist.txt (build-aux/config.rpath): different from latest
14597         release.
14598
14599 2006-05-08  Bruno Haible  <bruno@clisp.org>
14600
14601         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
14602
14603 2006-05-05  Jim Meyering  <jim@meyering.net>
14604
14605         * m4/warning.m4: New file, derived from bison's file by the same name.
14606
14607 2006-05-03  Bruno Haible  <bruno@clisp.org>
14608
14609         * lib/stdint_.h: Shorter URL.
14610         * lib/inttypes.h: Likewise.
14611
14612 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14613
14614         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
14615
14616 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14617
14618         * lib/verify.h: Document the internals better.  Most of this change
14619         was written by Bruno Haible.
14620
14621 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14622
14623         * doc/verify.texi: New file, partly based on a proposal by
14624         Bruno Haible.
14625
14626 2006-05-02  Bruno Haible  <bruno@clisp.org>
14627
14628         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
14629         test from here...
14630         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
14631
14632 2006-04-29  Bruno Haible  <bruno@clisp.org>
14633
14634         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
14635         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
14636
14637 2006-04-29  Bruno Haible  <bruno@clisp.org>
14638
14639         * gnulib-tool: Make --update option actually work.
14640
14641 2006-04-29  Bruno Haible  <bruno@clisp.org>
14642
14643         * doc/gcd.texi: New file.
14644         * doc/gnulib.texi: Include it.
14645
14646 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
14647
14648         * lib/getdate.y (get_date): When adding relative date, start with the
14649         initial time, not with the result of the first mktime call.
14650
14651 2006-04-25  Bruno Haible  <bruno@clisp.org>
14652
14653         * gnulib-tool (func_import): Output the include directives in three
14654         blocks, sorted separately.
14655         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14656
14657 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14658
14659         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
14660         to define main with arguments, for C++.  Reported by Eric Blake.
14661         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
14662         Prefer 'int main ()' to 'int main (void)', for C++.
14663         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
14664         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
14665         for 'main', for C99 and C++.
14666
14667 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14668
14669         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
14670         Don't assume that exit status -1 is valid.
14671         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14672         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
14673         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
14674         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
14675         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
14676         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
14677         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
14678         functions can be used without declaring them, or that you can
14679         exit with status -1.
14680         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
14681
14682 2006-04-24  Karl Berry  <karl@gnu.org>
14683
14684         * config/srclist.txt (longdouble.m4): sync lost.
14685
14686 2006-04-24  Eric Blake  <ebb9@byu.net>
14687
14688         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
14689
14690 2006-04-24  Bruno Haible  <bruno@clisp.org>
14691
14692         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
14693         poll() implementation in AIX.
14694         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14695
14696 2006-04-24  Bruno Haible  <bruno@clisp.org>
14697
14698         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
14699         assigned exactly once.
14700
14701 2006-04-23  Claudio Fontana  <claudio@gnu.org>
14702             Bruno Haible  <bruno@clisp.org>
14703
14704         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
14705         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
14706         for AM_CPPFLAGS.
14707
14708 2006-04-23  Bruno Haible  <bruno@clisp.org>
14709
14710         * modules/copy-file: Depend on unistd.
14711         * modules/execute: Likewise.
14712         * modules/fatal-signal: Likewise.
14713         * modules/findprog: Likewise.
14714         * modules/mkdtemp : Likewise.
14715         * modules/pipe: Likewise.
14716         * modules/wait-process: Likewise.
14717
14718 2006-04-23  Bruno Haible  <bruno@clisp.org>
14719
14720         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
14721         condition was already detected.
14722         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14723
14724 2006-04-23  Bruno Haible  <bruno@clisp.org>
14725
14726         * lib/copy-file.c: Include <unistd.h> unconditionally.
14727         * lib/execute.c: Likewise.
14728         * lib/fatal-signal.c: Likewise.
14729         * lib/findprog.c: Likewise.
14730         * lib/mkdtemp.c: Likewise.
14731         * lib/pipe.h: Likewise.
14732         * lib/pipe.c: Likewise.
14733         * lib/wait-process.h: Likewise.
14734
14735 2006-04-23  Bruno Haible  <bruno@clisp.org>
14736
14737         * gnulib-tool (func_usage): Fix --import description. Document
14738         --update.
14739         (func_import): Create temporary file in a temporary directory, if
14740         --dry-run is specified. Silence errors from 'grep' when there are no
14741         m4 files in $m4dir.
14742         (func_create_testdir): Silence errors from 'grep' when there are no
14743         m4 files in $m4dir.
14744         Reported by Karl Berry <karl@freefriends.org>.
14745
14746 2006-04-20  Bruno Haible  <bruno@clisp.org>
14747
14748         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
14749         one argument, so that the code will be portable to Autoconf 2.60.
14750         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
14751         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
14752         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
14753
14754 2006-04-19  Derek Price  <derek@ximbiot.com>
14755             Eric Blake  <ebb9@byu.net>
14756
14757         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
14758         rather than "/full/path.h".  Update comment to match.  Shorten &
14759         generalize m4_translit call via AS_TR_CPP.
14760
14761 2006-04-19  Derek Price  <derek@ximbiot.com>
14762             Eric Blake  <ebb9@byu.net>
14763
14764         * lib/inttypes.h: Correct grammar in comment.
14765
14766 2006-04-18  Derek Price  <derek@ximbiot.com>
14767             Paul Eggert  <eggert@cs.ucla.edu>
14768
14769         * modules/inttypes: New file.
14770         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
14771
14772 2006-04-18  Derek Price  <derek@ximbiot.com>
14773             Paul Eggert  <eggert@cs.ucla.edu>
14774
14775         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
14776         New files.
14777
14778 2006-04-18  Derek Price  <derek@ximbiot.com>
14779             Paul Eggert  <eggert@cs.ucla.edu>
14780
14781         * lib/inttypes.h: New file.
14782         * lib/strtoimax.c: Assume <inttypes.h>.
14783
14784 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
14785
14786         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
14787         isn't mounted.  Problem reported by Kir Kolyshkin.
14788
14789 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14790
14791         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
14792         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
14793         Derek R. Price.
14794         * lib/regex.h (RE_DUP_MAX): Update comment to match current
14795         implementation.
14796
14797 2006-04-12  Eric Blake  <ebb9@byu.net>
14798
14799         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
14800         is now done automatically by the corresponding Autoconf macro.
14801
14802 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
14803
14804         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
14805         time_r.h.
14806
14807 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14808
14809         Merge regex changes from libc, removing some of our
14810         POSIX-conformance changes that were rejected and redoing them in a
14811         less-intrusive way.
14812
14813         * lib/regcomp.c (re_compile_internal, init_dfa):
14814         Length arg is now size_t, not Idx.  All uses changed.
14815         (peek_token): Forward decl now says internal_function.
14816         (__re_error_msgid, __re_error_msgid_idx):
14817         Now static rather than extern with attribute_hidden.
14818         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
14819         For some reason libc prefers K&R style defns for external functions.
14820         (regerror) [!defined _LIBC]: Likewise.
14821         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
14822         (seek_collating_symbol_entry, lookup_collation_sequence_value):
14823         (build_range_exp, build_collating_symbol):
14824         Use K&R-style defn.
14825         (re_compile_fastmap): Use '\0' to memset, not 0.
14826         (utf8_sb_map): Make the calculations more obvious.
14827         (init_dfa, parse_bracket_exp, build_charclass_op):
14828         Call calloc and cast result, as glibc does.
14829         (init_word_char, fetch_token, peek_token, peek_token_bracket):
14830         (build_range_exp, build_collating_symbol):
14831         Now internal functions.
14832
14833         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
14834
14835         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
14836         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
14837         Don't depend on VMS; depend on __VMS instead, for POSIX
14838         namespace cleanness.
14839         (regoff_t): Define to ssize_t, not long int.
14840
14841         Remove the REG_ macros named below.  Instead, make the old names
14842         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
14843         __USE_GNU_REGEX.
14844         (REG_BACKSLASH_ESCAPE_IN_LISTS):
14845         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
14846         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
14847         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
14848         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
14849         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
14850         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
14851         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
14852         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
14853         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
14854         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
14855         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
14856         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
14857         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
14858         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
14859         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
14860         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
14861         (REG_NREGS):
14862         Remove.  All uses replaced by the old RE_* names.
14863         (RE_BACKSLASH_ESCAPE_IN_LISTS):
14864         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
14865         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
14866         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
14867         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
14868         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
14869         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
14870         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
14871         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
14872         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
14873         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
14874         Don't bother having these macros be independent of each others'
14875         values, since they no longer exist in the POSIX name space.
14876
14877         Rename the following member names back to their old names,
14878         unless !__USE_GNU_REGEX.  All uses changed back.
14879         (buffer): Renamed from re_buffer.
14880         (allocated): Renamed from re_allocated.
14881         (used): Renamed from re_used.
14882         (syntax): Renamed from re_syntax.
14883         (fastmap): Renamed from re_fastmap.
14884         (translate): Renamed from re_translate.
14885         (can_be_null): Renamed from re_can_be_null.
14886         (regs_allocated): Renamed from re_regs_allocated.
14887         (fastmap_accurate): Renamed from re_fastmap_accurate.
14888         (no_sub): Renamed from re_no_sub.
14889         (not_bol): Renamed from re_not_bol.
14890         (not_eol): Renamed from re_not_eol.
14891         (newline_anchor): Renamed from re_newline_anchor.
14892         (num_regs): Renamed from rm_num_regs.
14893         (start): Renamed from rm_start.
14894         (end): Renamed from rm_end.
14895
14896         (free_state): Move up a bit.
14897
14898         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
14899         #define to be empty.
14900         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
14901         when that is what is intended.
14902         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
14903         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
14904         (MAX): New macro.
14905         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
14906         All uses changed back to re_malloc, etc.  It's now the caller's
14907         responsibility to check for overflow; all callers changed.
14908         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
14909         (re_x2nrealloc): Remove.
14910         (free_state): Remove decl.
14911
14912         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
14913         (re_set_registers, re_exec):
14914         Use K&R-style defn.
14915
14916         2006-01-31  Roland McGrath  <roland@redhat.com>
14917
14918         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
14919         Reported by Mike Frysinger <vapier@gentoo.org>.
14920
14921         2006-01-15  Andreas Jaeger  <aj@suse.de>
14922
14923         [BZ #1950]
14924         * lib/regex_internal.c (re_string_reconstruct): Adjust for
14925         build_wcs_upper_buffer change.
14926         (build_wcs_upper_buffer): Change return type.
14927
14928         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
14929
14930         * lib/regex_internal.h: Include <stdint.h> if available.
14931
14932         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
14933
14934         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
14935
14936         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
14937
14938         * lib/regcomp.c: Adjust for changed secondary hash function.
14939
14940         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
14941
14942         * lib/regex.h: Pretty printing.
14943         Clean up namespace a bit.
14944
14945         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
14946
14947         * lib/regexec.c (update_cur_sifted_state, check_arrival,
14948         check_arrival_add_next_nodes): Avoid using uninitialized variable.
14949
14950         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14951                     Ulrich Drepper  <drepper@redhat.com>
14952
14953         [BZ #1302]
14954         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
14955         changed.
14956         (bitset_word_t): Renamed from bitset_word.  All uses changed.
14957
14958         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
14959
14960         [BZ #281]
14961         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
14962         * lib/regcomp.c: Remove unnecessary uses of
14963         unsigned RE_TRANSLATE_TYPE.
14964         * lib/regex_internal.h: Likewise.
14965         * lib/regex_internal.c: Likewise.
14966         * lib/regexec.c: Likewise.
14967         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
14968
14969         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
14970
14971         * lib/regexec.c (find_recover_state): Remove unnecessary
14972         initialization.
14973         (transit_state_bkref): Make DFA a const pointer.
14974         (get_subexp): Likewise.
14975         (check_arrival): Likewise.
14976         (update_cur_sifted_state): Likewise.
14977         (re_search_internal): Likewise.
14978         (prune_impossible_nodes): Likewise.
14979         (acquire_init_state_context): Likewise.
14980         (proceed_next_node): Likewise.
14981         (set_regs): Likewise.
14982         (free_fail_stack_return): Likewise.
14983         (check_arrival_expand_ecl): Mark DFA parameter as const.
14984         (check_arrival_expand_ecl_sub): Likewise.
14985         (check_subexp_limits): Likewise.
14986         (sub_epsilon_src_nodes):  Likewise.
14987         (add_epsilon_src_nodes):  Likewise.
14988         (merge_state_array): Likewise.
14989         (update_regs): Likewise.
14990         (build_trtable): Likewise.
14991         (sift_states_backward): Mark MCTX parameter as const.
14992         (build_sifted_states): Likewise.
14993         (update_cur_sifted_state): Likewise.
14994         (sift_states_mkref): Likewise.
14995         (check_arrival_expand_ecl): Mark eclosure as const.
14996         (check_dst_limits_calc_pos_1): Likewise.
14997         * lib/regex_internal.h (re_match_context_t): Make dfa a const
14998         pointer.
14999
15000         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
15001
15002         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
15003         (transit_state_sb): Likewise.
15004         (transit_state_mb): Likewise.
15005         (sift_states_iter_mb): Likewise.
15006         (check_arrival_add_next_nodes): Likewise.
15007         (check_node_accept_bytes): Change first parameter to pointer-to-const.
15008         [_LIBC] (re_search_2_stub): Use mempcpy.
15009
15010         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
15011         mbrtowc for very simple UTF-8 case.
15012
15013         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
15014         a pointer-to-const.
15015         (re_acquire_state_context): Likewise.
15016         * lib/regex_internal.h: Adjust prototypes.
15017
15018         * lib/regex.c: Prevent using C++ compilers.
15019
15020         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
15021         (re_acquire_state_context): Likewise.
15022
15023 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15024
15025         * modules/regex (Depends-on): Add ssize_t.
15026
15027 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15028
15029         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
15030         translation table.
15031
15032 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15033
15034         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
15035
15036 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
15037             Bruno Haible  <bruno@clisp.org>
15038
15039         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
15040         <sys/types.h> and <inttypes.h>.
15041
15042 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15043
15044         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
15045         `__error_t_defined', so argp.h will not typedef the former.
15046
15047 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
15048
15049         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
15050         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
15051         glibc names.  Even if glibc is changed to conform to POSIX, the
15052         traditional names will be available anyway, since regex depends on
15053         the extensions module.  Also, fix a longstanding typo in the
15054         implementation of Spencer ERE test #75 from grep 2.3.  Problems
15055         reported by Emanuele Giaquinta.  Also, change sense of cached
15056         variable, so that the message makes sense.
15057
15058 2006-03-24  Simon Josefsson  <jas@extundo.com>
15059
15060         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
15061         including some doc fixes.
15062         (base64_encode_alloc): Fix +1 bug on allocation failures.
15063
15064 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15065
15066         * lib/base64.c (base64_encode): Do not read past end of array with
15067         unsanitized input on systems with CHAR_BIT > 8.
15068
15069 2006-03-24  Eric Blake  <ebb9@byu.net>
15070
15071         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
15072
15073 2006-03-22  Karl Berry  <karl@gnu.org>
15074
15075         * config/srclist.txt (*setenv.[ch]): get from coreutils.
15076         * config/srclistvars.sh (COREUTILS): new var.
15077
15078 2006-03-17  Jim Meyering  <jim@meyering.net>
15079
15080         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
15081         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
15082
15083 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15084
15085         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
15086         no longer needs it.  Instead, check that regoff_t is as least
15087         as wide as ptrdiff_t.
15088
15089         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
15090         so that our regex.h stays compatible with the installed regex.
15091         This is helpful for installers who configure --without-included-regex.
15092         Problem reported by Emanuele Giaquinta.
15093
15094 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15095
15096         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
15097         Typedef to long int, not to off_, as POSIX will likely change
15098         in that direction.
15099
15100 2006-03-15  Eric Blake  <ebb9@byu.net>
15101
15102         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
15103
15104 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15105
15106         * lib/argp-help.c (validate_uparams): Fix typo
15107         * lib/argp-parse.c (argp_default_options): Consistently begin help
15108         messages with a lowercase letter.
15109
15110 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
15111
15112         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
15113         overrun buffers and shouldn't be used (much as gets shouldn't be
15114         used).
15115         * lib/time_r.c (asctime_r, ctime_r): Likewise.
15116
15117 2006-03-08  Simon Josefsson  <jas@extundo.com>
15118
15119         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
15120         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15121
15122 2006-03-08  Simon Josefsson  <jas@extundo.com>
15123
15124         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
15125         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15126
15127 2006-03-08  Simon Josefsson  <jas@extundo.com>
15128
15129         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
15130         signal that configure disabled the device.
15131
15132 2006-03-08  Simon Josefsson  <jas@extundo.com>
15133
15134         * build-aux/maint.mk: Fix refresh-po, to handle no translated
15135         languages.
15136
15137 2006-03-07  Simon Josefsson  <jas@extundo.com>
15138
15139         * modules/getopt (Depends-on): Add unistd.
15140
15141         * modules/unistd: New file.
15142
15143 2006-03-07  Simon Josefsson  <jas@extundo.com>
15144
15145         * modules/gc-random: New file.
15146
15147 2006-03-07  Simon Josefsson  <jas@extundo.com>
15148
15149         * m4/unistd_h.m4: New file.
15150
15151 2006-03-07  Simon Josefsson  <jas@extundo.com>
15152
15153         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
15154         test to be side-effect free by storing the result in the cache
15155         variable gl_cv_lib_readline, and moving the assignment of
15156         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
15157         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15158
15159 2006-03-07  Simon Josefsson  <jas@extundo.com>
15160
15161         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
15162         error on missing devices (the functions will return an error).
15163
15164         * m4/gc.m4: Move random stuff to gc-random.m4
15165
15166 2006-03-07  Simon Josefsson  <jas@extundo.com>
15167
15168         * lib/unistd_.h: New file.
15169
15170 2006-03-07  Simon Josefsson  <jas@extundo.com>
15171
15172         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
15173
15174 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15175
15176         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
15177         Problem reported by Juan Manuel Guerrero.
15178
15179 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15180
15181         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
15182         the unistd module.
15183         * lib/getlogin_r.c: Likewise.
15184         * lib/getlogin_r.h: Likewise.
15185         * lib/glob.c: Likewise.
15186         * lib/pagealign_alloc.c: Likewise.
15187         * lib/unistd_.h: Remove; no longer needed.
15188
15189 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15190
15191         * MODULES.html.sh (Support for systems lacking POSIX:2001):
15192         Add unistd.
15193         * modules/c-stack (Depends-on): Add unistd.
15194         * modules/getlogin_r: Likewise.
15195         * modules/glob: Likewise.
15196         * modules/pagealign_alloc: Likewise.
15197         * modules/unistd (Files): Remove lib/unistd_.h.
15198         (EXTRA_DIST): Remove.
15199         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
15200         need unistd_.h.
15201         (MOSTLYCLEANFILES): Remove unistd.h-t.
15202
15203 2006-03-03  Simon Josefsson  <jas@extundo.com>
15204
15205         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
15206
15207 2006-03-03  Simon Josefsson  <jas@extundo.com>
15208
15209         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
15210         libidn and bison.
15211
15212 2006-03-03  Simon Josefsson  <jas@extundo.com>
15213
15214         * build-aux/maint.mk: Add indent target.
15215
15216 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
15217
15218         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
15219         our replacement poll.h in any case, to avoid a differing
15220         declaration from a system header.  Seen on AIX.
15221
15222 2006-03-01  Simon Josefsson  <jas@extundo.com>
15223
15224         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
15225         <kasal@ucw.cz>.
15226
15227 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15228
15229         * modules/gettime (Depends-on): Add extensions module.
15230         * modules/nanosleep (Depends-on): Likewise.
15231         * modules/settime (Depends-on): Likewise.
15232
15233 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15234
15235         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
15236         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
15237         pedantically.
15238         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15239         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
15240
15241         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
15242         not "==".  Reported by Ralf Wildenhues.
15243
15244 2006-03-01  Karl Berry  <karl@gnu.org>
15245
15246         * doc/Copyright/request-*: new files, synced from gnuorg.
15247
15248 2006-03-01  Karl Berry  <karl@gnu.org>
15249
15250         * config/srclist.txt (Copyright/*): new entries.
15251
15252 2006-02-28  Simon Josefsson  <jas@extundo.com>
15253
15254         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
15255
15256 2006-02-27  Simon Josefsson  <jas@extundo.com>
15257
15258         * lib/base64.h: Indent #define's.  From Jim Meyering
15259         <jim@meyering.net>.
15260
15261 2006-02-27  Jim Meyering  <jim@meyering.net>
15262
15263         Revert the change of 2006-02-24, so these files can continue
15264         to be sync'd from gettext.
15265         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
15266         of `config.h'.
15267
15268 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15269
15270         * modules/intprops: New file.
15271         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
15272         Add intprops.
15273         * modules/getloadavg (Files): Remove lib/intprops.h.
15274         (Depends-on): Add intprops.
15275         * modules/human: Likewise.
15276         * modules/inttostr: Likewise.
15277         * modules/openat: Likewise.
15278         * modules/sig2str: Likewise.
15279         * modules/userspec: Likewise.
15280         * modules/utimecmp: Likewise.
15281         * modules/xnanosleep: Likewise.
15282         * modules/xstrtol: Likewise.
15283
15284 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
15285
15286         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
15287         * modules/lock-tests (TESTS): Use $(EXEEXT).
15288         * modules/tls-tests: Likewise.
15289         * modules/argp-tests: Likewise.
15290         (check_PROGRAMS): New var, replacing...
15291         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
15292
15293 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15294
15295         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
15296         `config.h'.
15297
15298 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
15299
15300         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
15301
15302 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15303
15304         Sync from coreutils.
15305         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
15306         gl_CHDIR_SAFER.
15307
15308 2006-02-22  Jim Meyering  <jim@meyering.net>
15309
15310         Sync from coreutils.
15311         * m4/chdir-safer.m4: New file.
15312
15313 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
15314
15315         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
15316         AT_FDCWD exceeds INT_MAX.
15317         * lib/openat.h (AT_FDCWD): Likewise.
15318
15319 2006-02-17  Eric Blake  <address@hidden>
15320
15321         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
15322
15323 2006-02-16  Simon Josefsson  <jas@extundo.com>
15324
15325         * modules/getaddrinfo (Depends-on): Add sys_socket.
15326
15327 2006-02-15  Simon Josefsson  <jas@extundo.com>
15328
15329         * build-aux/maint.mk: Add dsyntax-check rule.
15330
15331 2006-02-15  Eric Blake  <ebb9@byu.net>
15332
15333         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
15334         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
15335         'present but cannot compile' warnings on cygwin.
15336         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
15337         use ws2tcpip.h if sys/socket.h works.
15338         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
15339         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
15340
15341 2006-02-14  Simon Josefsson  <jas@extundo.com>
15342
15343         * modules/maintainer-makefile (Files): Rename.
15344
15345         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
15346         and (the local) Makefile.cfg to maint-cfg.mk.
15347
15348         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
15349         to the latter.
15350
15351         * modules/maintainer-makefile: New module.
15352
15353         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
15354         severaly stripped to make it possible to build it up from scratch
15355         with reliable tests.
15356
15357         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
15358         fixes to permit overriding the default actions when configure and
15359         makefile are not available.
15360
15361 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
15362
15363         Sync from coreutils.
15364         * modules/lstat (Depends-on): Don't depend on xalloc.
15365         (License): Change from GPL to LGPL, since this is now simply a
15366         replacement for a libc function.
15367
15368 2006-02-14  Jim Meyering  <jim@meyering.net>
15369
15370         Sync from coreutils.
15371
15372         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
15373         failure on deficient systems, and simplify gnulib lgpl dependencies.
15374         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
15375         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
15376
15377         * lib/xalloc-die.c: Remove unused definition of N_.
15378
15379 2006-02-14  Jim Meyering  <jim@meyering.net>
15380
15381         Sync from coreutils.
15382         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
15383         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
15384         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
15385         double-quote uses of that variable, to accommodate the rare case in
15386         which getmntent is available in none of the libraries checked.  This
15387         happens at least on FreeBSD 5.0.
15388
15389 2006-02-13  Simon Josefsson  <jas@extundo.com>
15390
15391         * gnulib-tool (Usage): Fix --import, from
15392         karl@freefriends.org (Karl Berry).
15393
15394 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15395
15396         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
15397
15398 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
15399
15400         * lib/argp-namefrob.h: Restore changes accidentally lost during the
15401         "autoupdate" on 2005-12-12.
15402
15403 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15404
15405         * modules/closeout (Depends-on): Remove atexit.
15406
15407 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15408
15409         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
15410         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
15411
15412 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
15413
15414         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
15415         __EXTENSIONS__ if this causes compilation to fail.  Problem
15416         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
15417         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
15418
15419 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
15420
15421         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
15422         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
15423         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
15424         All uses changed.
15425
15426 2006-01-26  Simon Josefsson  <jas@extundo.com>
15427
15428         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
15429         prototype is visible on mingw32.
15430
15431         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
15432         for mingw32.
15433
15434         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
15435         mingw32).
15436
15437 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
15438
15439         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
15440         attempt to open for write; this always fails, at least on POSIX
15441         hosts.  This reinstates the 2006-01-09 change, which was
15442         inadvertently removed.
15443
15444 2006-01-26  Bruno Haible  <bruno@clisp.org>
15445
15446         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
15447         Reported by Paul Eggert.
15448
15449 2006-01-26  Bruno Haible  <bruno@clisp.org>
15450             Paul Eggert  <eggert@cs.ucla.edu>
15451
15452         * lib/stdbool_.h (_Bool)
15453         [(! (defined __cplusplus || defined __BEOS__)
15454           && !defined __GNUC__
15455           && !(defined __HP_cc || defined __xlc__
15456                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
15457                || defined __sgi))]:
15458         #define to signed char in these cases too; this simplifies
15459         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
15460         etc., separately) and makes it more conservative.
15461
15462 2006-01-25  Simon Josefsson  <jas@extundo.com>
15463
15464         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
15465         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
15466         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
15467
15468 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15469
15470         * lib/argp-namefrob.h: Bugfix. Remove stray #
15471
15472 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
15473
15474         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
15475         so that we test the test.
15476         Check for yet another HP-UX cc bug involving *bool |= bool.
15477
15478 2006-01-25  Karl Berry  <karl@gnu.org>
15479
15480         * config/srclist.txt (vasnprintf.c): sync lost.
15481
15482 2006-01-25  Jim Meyering  <jim@meyering.net>
15483
15484         Sync from the stable (b5) branch of coreutils:
15485
15486         * lib/fts.c (fts_children): Don't let close() clobber errno from
15487         failed fchdir().
15488
15489         * lib/fts.c (fts_stat): When following a symlink-to-directory,
15490         don't necessarily interpret stat-fails+lstat-succeeds as indicating
15491         a dangling symlink.  That can also happen at least for ELOOP.
15492         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
15493         FYI, this bug predates the inclusion of fts.c in coreutils.
15494
15495         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
15496         in their own block, so pre-c99 compilers don't object.
15497
15498         Avoid the double-free (first in fts_read, second in fts_close) that
15499         would occur when an `active' directory is made inaccessible (e.g.,
15500         via chmod a-x) during a traversal.
15501         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15502         before returning.  Reproduce this failure by
15503         mkdir -p a/b; cd a; chmod a-x . b
15504         Reported by Stavros Passas.
15505
15506 2006-01-25  Jim Meyering  <jim@meyering.net>
15507
15508         * lib/fileblocks.c: Remove more useless parentheses.
15509         * lib/readutmp.h: Likewise.
15510
15511 2006-01-25  Bruno Haible  <bruno@clisp.org>
15512
15513         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
15514         warnings.
15515         Reported by Paul Eggert.
15516
15517 2006-01-25  Bruno Haible  <bruno@clisp.org>
15518
15519         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
15520         rid of a trap command. For Solaris sh.
15521         Reported by Mark D. Baushke <mdb@gnu.org>.
15522
15523 2006-01-24  Simon Josefsson  <jas@extundo.com>
15524
15525         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
15526         Bruno.
15527
15528 2006-01-24  Karl Berry  <karl@gnu.org>
15529
15530         * config/srclist.txt (argp-namefrob.h): sync lost.
15531
15532 2006-01-24  Jim Meyering  <jim@meyering.net>
15533
15534         * modules/openat (Files): Add lib/intprops.h.
15535         From Mark D. Baushke.
15536
15537 2006-01-24  Jim Meyering  <jim@meyering.net>
15538
15539         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
15540         Reported by Mark D. Baushke.
15541
15542 2006-01-24  Jim Meyering  <jim@meyering.net>
15543
15544         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
15545
15546 2006-01-24  Bruno Haible  <bruno@clisp.org>
15547
15548         * modules/strnlen (Maintainer): Change from glibc to all.
15549
15550 2006-01-24  Bruno Haible  <bruno@clisp.org>
15551
15552         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
15553         Patch by Paul Eggert.
15554
15555 2006-01-24  Bruno Haible  <bruno@clisp.org>
15556
15557         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
15558         already has it.
15559         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
15560         2005-11-26.
15561
15562         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
15563         'signed char' to avoid problems with the built-in _Bool type.
15564         Reported by Paul Eggert on 2005-11-26.
15565
15566 2006-01-24  Bruno Haible  <bruno@clisp.org>
15567
15568         * gnulib-tool (func_import): Avoid constructing complicated sed
15569         expressions inside backquote.
15570         Report and solution by Mark D. Baushke <mdb@gnu.org>.
15571
15572 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
15573
15574         These changes imported from libc.
15575         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
15576         test and two separate function calls.
15577         * lib/strndup.c (__strndup): Add libc_hidden_def.
15578
15579 2006-01-23  Simon Josefsson  <jas@extundo.com>
15580
15581         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
15582         Remove the test_*_SOURCES variable: automake infers it by default.
15583         * modules/tls-tests: Likewise.
15584
15585 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15586
15587         Work around porting bugs reported by Dieter in
15588         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
15589         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
15590         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
15591         Include "getopt.h" first, to check interface.
15592         (getenv): Declare only if defined HAVE_DECL_GETENV &&
15593         !HAVE_DECL_GETENV.
15594         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
15595         (__strndup): Revert to K&R-style function dfns, the glibc style.
15596         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
15597         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
15598         Include strnlen.h first, to get prototype properly.
15599         (strnlen): Renamed from __strnlen.
15600         Remove weak alias.
15601
15602 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15603
15604         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
15605
15606 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15607
15608         * config/srclist.txt: Adjust to reflect glibc reorganization.
15609         This affects only comments.
15610
15611 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
15612
15613          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
15614          Reported by Bruce Korb <bkorb@gnu.org>.
15615
15616 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
15617
15618         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
15619         to pacify gcc -Wswitch-default.
15620
15621 2006-01-22  Bruno Haible  <bruno@clisp.org>
15622
15623         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
15624         temporary buffer for sprintf, take into account the precision also
15625         for 'd', 'i', 'u', 'o', 'x', 'X'.
15626
15627 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15628
15629         * modules/argp-tests: New module
15630         * tests/test-argp.c: New file
15631         * tests/test-argp-2.sh: New file
15632
15633 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15634
15635         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
15636         (__argp_base_name): Removed
15637         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
15638         typo.
15639         (__argp_base_name): Provide macro definition or extern declaration
15640         depending on the configuration
15641
15642 2006-01-20  Simon Josefsson  <jas@extundo.com>
15643
15644         * modules/inet_ntop (Depends-on): Depend on sys_socket.
15645
15646 2006-01-20  Simon Josefsson  <jas@extundo.com>
15647
15648         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
15649
15650 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15651
15652         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
15653         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
15654         Suggested by Bruno Haible.
15655
15656 2006-01-20  Karl Berry  <karl@gnu.org>
15657
15658         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
15659         until changes propagate, I guess.
15660
15661 2006-01-19  Simon Josefsson  <jas@extundo.com>
15662
15663         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
15664
15665 2006-01-19  Simon Josefsson  <jas@extundo.com>
15666
15667         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
15668
15669 2006-01-19  Simon Josefsson  <jas@extundo.com>
15670
15671         * gnulib-tool: Set check_PROGRAMS.
15672
15673         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15674         modules/des-tests, modules/gc-arcfour-tests,
15675         modules/gc-arctwo-tests, modules/gc-des-tests,
15676         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15677         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15678         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15679         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15680         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15681         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
15682         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
15683         test_*_SOURCES.
15684
15685 2006-01-18  Simon Josefsson  <jas@extundo.com>
15686
15687         * modules/socklen (Depends-on): Depend on sys_socket.
15688
15689 2006-01-18  Simon Josefsson  <jas@extundo.com>
15690
15691         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15692         modules/des-tests, modules/gc-arcfour-tests,
15693         modules/gc-arctwo-tests, modules/gc-des-tests,
15694         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15695         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15696         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15697         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15698         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15699         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
15700         $(EXEEXT) to automake TESTS variable, for mingw32.
15701
15702 2006-01-17  Simon Josefsson  <jas@extundo.com>
15703
15704         * modules/socklen (Include): Need sys/socket.h.
15705
15706 2006-01-17  Bruno Haible  <bruno@clisp.org>
15707
15708         * modules/ssize_t (Include): Add <sys/types.h>.
15709
15710 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
15711
15712         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
15713         it's not portable and it doesn't work with cross-compiles.
15714         Problem reported by Bruno Haible.  Fix missing-$ typo in
15715         'test "gl_cv_ignore_unused_libraries" ...' that prevented
15716         -zignore from being used with Sun's C compiler.
15717
15718 2006-01-12  Simon Josefsson  <jas@extundo.com>
15719
15720         * lib/base64.c: Fix warning, reported by Bruno Haible
15721         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
15722
15723 2006-01-12  Bruno Haible  <bruno@clisp.org>
15724
15725         * modules/ldd: New file.
15726         * build-aux/ldd.sh.in: New file.
15727         * MODULES.html.sh (Support for building libraries and executables): Add
15728         ldd.
15729
15730 2006-01-12  Bruno Haible  <bruno@clisp.org>
15731
15732         * m4/ldd.m4: New file.
15733
15734 2006-01-12  Bruno Haible  <bruno@clisp.org>
15735
15736         * gnulib-tool (func_import, func_create_testdir): Don't go into an
15737         endless loop while replacing $auxdir with build-aux.
15738
15739 2006-01-11  Simon Josefsson  <jas@extundo.com>
15740
15741         * lib/stdint_.h (SIZE_MAX): Add missing (.
15742
15743 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
15744
15745         Sync from coreutils.
15746         * lib/md5.c: Fix commentary typos.
15747         (alignof, UNALIGNED_P): No need for a GCC-specific version.
15748         * lib/md5.h (__attribute__): Remove; unused.
15749         * lib/sha1.c: Fix commentary to match md5 better.
15750         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
15751         so that we don't need to worry about alignment.  All uses changed.
15752         This merges the 2005-10-28 md5 change into sha1.
15753
15754 2006-01-11  Jim Meyering  <jim@meyering.net>
15755
15756         Sync from coreutils.
15757         * lib/md5.c (OP): Fix spacing.
15758
15759 2006-01-11  Bruno Haible  <bruno@clisp.org>
15760
15761         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15762         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
15763         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
15764
15765 2006-01-11  Bruno Haible  <bruno@clisp.org>
15766
15767         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15768         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
15769         the "early" section as well.
15770
15771 2006-01-11  Bruno Haible  <bruno@clisp.org>
15772
15773         Avoid "ar: no archive members specified" error on MacOS X.
15774         * gnulib-tool (func_modules_add_dummy): New function.
15775         (func_import, func_create_testdir): Invoke it.
15776
15777 2006-01-11  Bruno Haible  <bruno@clisp.org>
15778
15779         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
15780         with $auxdir in AC_CONFIG_FILES statements.
15781
15782 2006-01-11  Bruno Haible  <bruno@clisp.org>
15783
15784         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
15785         Initialize also noinst_HEADERS to empty.
15786
15787 2006-01-11  Bruno Haible  <bruno@clisp.org>
15788
15789         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
15790         variables.
15791         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
15792         autoreconf.
15793
15794 2006-01-11  Bruno Haible  <bruno@clisp.org>
15795
15796         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
15797         overridable by the user.
15798         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15799
15800 2006-01-10  Simon Josefsson  <jas@extundo.com>
15801
15802         * modules/sys_socket: New file.
15803
15804 2006-01-10  Simon Josefsson  <jas@extundo.com>
15805
15806         * m4/sys_socket_h.m4: New file.
15807
15808 2006-01-10  Simon Josefsson  <jas@extundo.com>
15809
15810         * lib/socket_.h: New file.
15811
15812 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15813
15814         * modules/readutmp (Maintainer): Add myself.
15815
15816 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15817
15818         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
15819         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
15820         People who are still concerned with buggy memcmp implementations
15821         can invoke gl_FUNC_MEMCMP themselves.
15822
15823 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15824
15825         * lib/regex_internal.h (BITSET_WORD_BITS):
15826         Work around a bug in 64-bit PGC (before version 6.1-2), where the
15827         preprocessor mishandles large unsigned values as if they were signed.
15828         Problem reported by Claudio Fontana in
15829         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
15830
15831 2006-01-10  Jim Meyering  <jim@meyering.net>
15832
15833         Avoid the double-free (first in fts_read, second in fts_close) that
15834         would occur when an `active' directory is made inaccessible (e.g.,
15835         via chmod a-x) during a traversal.
15836         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15837         before returning.  Reproduce this failure by
15838         mkdir -p a/b; cd a; chmod a-x . b
15839         Reported by Stavros Passas.
15840
15841         Sync from coreutils.
15842         * lib/sha1.c: Tweak grammar in a comment.
15843
15844 2006-01-10  Jim Meyering  <jim@meyering.net>
15845
15846         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
15847         Patch by Joerg Sonnenberger.
15848
15849 2006-01-10  Bruno Haible  <bruno@clisp.org>
15850
15851         * modules/readutmp: Depend on module free.
15852         * modules/strtok_r: Depend on module restrict.
15853
15854 2006-01-10  Bruno Haible  <bruno@clisp.org>
15855
15856         * modules/gettext (configure.ac): Add an invocation of
15857         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
15858
15859 2006-01-10  Bruno Haible  <bruno@clisp.org>
15860
15861         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
15862         Reported by Werner Lemberg <wl@gnu.org>.
15863
15864 2006-01-10  Bruno Haible  <bruno@clisp.org>
15865
15866         * lib/localcharset.c: Update from GNU gettext.
15867
15868 2006-01-10  Bruno Haible  <bruno@clisp.org>
15869
15870         * lib/argp.h (__const): Remove macro. Use const instead.
15871         * lib/argp-fmtstream.h (__const): Likewise.
15872         * lib/glob_.h (__const): Remove macro.
15873         * lib/glob-libc.h: Use const instead of __const.
15874
15875 2006-01-10  Bruno Haible  <bruno@clisp.org>
15876
15877         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
15878         variable.
15879         Needed to avoid an automake error regarding the 'gettext' module.
15880
15881 2006-01-09  Simon Josefsson  <jas@extundo.com>
15882
15883         * modules/inet_ntop (Depends-on): Add restrict.
15884
15885 2006-01-09  Simon Josefsson  <jas@extundo.com>
15886
15887         * modules/gc-rijndael-tests (License): Put under LGPL.
15888
15889         * modules/gc-des-tests (License): Likewise.
15890
15891         * modules/gc-arcfour-tests (License): Likewise.
15892
15893         * modules/gc-arctwo-tests (License): Likewise.
15894
15895         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
15896
15897         * modules/gc-hmac-sha1-tests (Files): Likewise.
15898
15899         * modules/gc-hmac-md5-tests (License): Likewise.
15900
15901         * modules/gc-sha1-tests (License): Likewise.
15902
15903         * modules/gc-md5-tests (License): Likewise.
15904
15905         * modules/gc-md4-tests (License): Likewise.
15906
15907         * modules/gc-md2-tests (License): Likewise.
15908
15909         * modules/gc-tests (License): Likewise.
15910
15911         * modules/des-tests (License): Likewise.
15912
15913         * modules/md4-tests (License): Likewise.
15914
15915         * modules/md2-tests (License): Likewise.
15916
15917 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15918
15919         Sync from coreutils:
15920
15921         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
15922         * modules/lib-ignore: New file.
15923         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
15924         chdir-safer.m4, lchmod.m4.
15925         * modules/openat: Add mkdirat.c, openat-priv.h.
15926
15927 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15928
15929         Sync from coreutils.
15930         * m4/lib-ignore.m4: New file.
15931         * m4/lchmod.m4: New file.
15932
15933 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15934
15935         Sync from coreutils.
15936         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
15937         for write access: POSIX says that must fail.
15938         * lib/fts.c (diropen): Likewise.
15939         * lib/save-cwd.c (save_cwd): Likewise.
15940         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
15941         well, for minor improvements on hosts that lack O_DIRECTORY.
15942         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
15943         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
15944         Fall back on chown if open failed with EACCES.
15945
15946         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
15947         Report an error at compile-time if only a 1-second nominal clock
15948         resolution is found.
15949
15950         * lib/lchmod.h: New file.
15951         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
15952         (make_dir_parents): Use lchown rather than chown, and
15953         lchmod rather than chmod.
15954
15955         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
15956         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
15957         "proc" reported by n0dalus.
15958
15959         * lib/mountlist.c: Include <limits.h>.
15960         (dev_from_mount_options)
15961         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
15962         New function.  It no longer assumes "dev=" has the System V meaning
15963         on Linux (since it doesn't).  It also parses "dev=" more carefully.
15964         (read_file_system_list)
15965         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
15966         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
15967         dev= in that case.
15968
15969         * lib/posixtm.h (PDS_PRE_2000): New macro.
15970         * lib/posixtm.c (year): Arg is now syntax_bits rather than
15971         allow_century.  All usages changed.  Reject dates outside the range
15972         1969-1999 if PDS_PRE_2000 is used.
15973
15974 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15975
15976         Sync from coreutils.
15977         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
15978         (Time of day items): Mention the possibility of leap seconds.
15979         Problem reported by Dr. David Alan Gilbert.
15980
15981 2006-01-09  Jim Meyering  <jim@meyering.net>
15982
15983         Sync from coreutils.
15984
15985         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
15986
15987         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
15988
15989         * lib/modechange.c (mode_compile): Reject an invalid mode string
15990         that starts with an octal digit.  From Andreas Gruenbacher.
15991
15992         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
15993         and dup to open_safer and dup_safer, respectively.
15994         (openat_permissive): Fix typo in comment.
15995
15996         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
15997         "gettext.h"; either no longer needed or are guaranteed by openat.h.
15998         (_): Remove; no longer needed.
15999         (openat): Renamed from rpl_openat; no need for rpl_openat
16000         since openat.h renames openat for us.
16001         Replace most of the body with a call to openat_permissive,
16002         to avoid duplicate code.
16003         Port to (probably hypothetical) environments were mode_t is
16004         wider than int.
16005         (openat_permissive): Require mode arg, so that we can check
16006         types better.  Put it just after flags.  Change cwd failure
16007         indicator from pointer-to-bool to pointer-to-errno-value.
16008         All callers changed.
16009         Invoke openat_save_fail and/or openat_restore_fail if
16010         cwd_errno is null, so that openat can call us.
16011         (openat_permissive, fdopendir, fstatat, unlinkat):
16012         Simplify errno handling to avoid some duplicate code,
16013         as it's OK to set errno on success.
16014         * lib/openat.h: Revamp code so that function macros depend on
16015         __OPENAT_PREFIX only, not also on AT_FDCWD.
16016         (openat_ro): Remove.  Caller changed to use openat_permissive.
16017         (openat_permissive): Now a macro, if not a function.
16018         (openat_restore_fail, openat_save_fail): Now always functions,
16019         since mkdirat needs them even if __OPENAT_PREFIX is defined.
16020
16021         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
16022         and openat.c.
16023         * lib/mkdirat.c: Include openat-priv.h.
16024         Remove definitions of macros defined therein.
16025         * lib/openat.c: Likewise.
16026
16027         * lib/mkdirat.c (mkdirat): New file and function.
16028         * lib/openat.h (mkdirat): Declare.
16029
16030         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
16031
16032         * lib/openat.h (openat_permissive): Declare.
16033         (openat_ro): Define.
16034
16035         * lib/openat.c (EXPECTED_ERRNO): New macro.
16036         (openat_permissive): New function -- used in remove.c rewrite.
16037         (all functions): Set errno just before returning, only if there
16038         was an actual failure.
16039         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
16040
16041         Emulate openat-family functions using Linux's procfs, if possible.
16042         Idea and some code based on Ulrich Drepper's glibc changes.
16043
16044         * lib/openat.c: (BUILD_PROC_NAME): New macro.
16045         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
16046         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
16047         before falling back on save_cwd and restore_cwd.
16048         (fdopendir, fstatat, unlinkat): Likewise.
16049
16050         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
16051         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
16052
16053         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
16054         as second argument to va_arg.  Otherwise, some versions of gcc
16055         warn that `if this code is reached, the program will abort'.
16056
16057 2006-01-09  Jim Meyering  <jim@meyering.net>
16058
16059         Sync from coreutils.
16060         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
16061         Require openat-priv.h.
16062
16063 2006-01-09  Bruno Haible  <bruno@clisp.org>
16064
16065         * modules/strnlen (Include): Use strnlen.h.
16066
16067 2006-01-09  Bruno Haible  <bruno@clisp.org>
16068
16069         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
16070
16071 2006-01-09  Bruno Haible  <bruno@clisp.org>
16072
16073         * lib/sysexit_.h (EX_OK): New macro.
16074         Suggested by Martin Lambers <marlam@marlam.de>.
16075
16076 2006-01-09  Bruno Haible  <bruno@clisp.org>
16077
16078         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
16079         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
16080
16081 2006-01-09  Bruno Haible  <bruno@clisp.org>
16082
16083         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
16084         numbers.
16085
16086 2006-01-09  Bruno Haible  <bruno@clisp.org>
16087
16088         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
16089         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
16090         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
16091         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
16092
16093 2006-01-09  Bruno Haible  <bruno@clisp.org>
16094
16095         * build-aux/javacomp.sh.in: New file, moved from lib/.
16096         * modules/javacomp-script (Files): Update.
16097         (configure.ac): Add AC_CONFIG_FILES invocation.
16098         (EXTRA_DIST): Remove variable.
16099
16100         * build-aux/javaexec.sh.in: New file, moved from lib/.
16101         * modules/javaexec (Files): Update.
16102         (configure.ac): Add AC_CONFIG_FILES invocation.
16103         (EXTRA_DIST): Remove javaexec.sh.in.
16104
16105         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
16106         * modules/csharpcomp-script (Files): Update.
16107         (configure.ac): Add AC_CONFIG_FILES invocation.
16108         (EXTRA_DIST): Remove variable.
16109
16110         * build-aux/csharpexec.sh.in: New file, moved from lib/.
16111         * modules/csharpexec (Files): Update.
16112         (configure.ac): Add AC_CONFIG_FILES invocation.
16113         (EXTRA_DIST): Remove csharpexec.sh.in.
16114
16115 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16116
16117         Sync from coreutils.
16118
16119         Add POSIX ACL support
16120         * lib/acl.h (copy_acl, set_acl): Add declarations.
16121         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
16122         systems other than Linux.
16123         (chmod_or_fchmod): New function: use fchmod when possible,
16124         and chmod otherwise.
16125         (file_has_acl): Add a POSIX ACL implementation, with a
16126         Linux-specific subcase.
16127         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
16128         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
16129         acls are unsupported.
16130         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
16131         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
16132         are unsupported.
16133
16134 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16135
16136         Sync from coreutils.
16137         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
16138
16139 2006-01-07  Bruno Haible  <bruno@clisp.org>
16140
16141         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
16142         gl_EARLY.
16143
16144 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16145
16146         * lib/strftime.c (tzname): Don't declare if it is already #defined.
16147         Problem reported for Mingw by Mark Junker.
16148
16149 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16150
16151         * README: Gnulib normally doesn't generate a tarball.
16152
16153 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
16154
16155         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
16156         long int, not int, for nanosecond counts, so that people who are
16157         used to POSIX struct timespec won't be surprised.  Reported by Jim
16158         Meyering.
16159
16160 2005-12-28  Bruno Haible  <bruno@clisp.org>
16161
16162         * build-aux/config.rpath: Update from GNU gettext.
16163
16164 2005-12-16  Jim Meyering  <jim@meyering.net>
16165
16166         * modules/fprintftime: New module.
16167         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
16168
16169 2005-12-16  Jim Meyering  <jim@meyering.net>
16170
16171         * m4/fprintftime.m4: New file.
16172
16173 2005-12-16  Jim Meyering  <jim@meyering.net>
16174
16175         * lib/fprintftime.c, lib/fprintftime.h: New files.
16176
16177 2005-12-15  Simon Josefsson  <jas@extundo.com>
16178
16179         * modules/socklen (configure.ac): Fix M4 macro name, to align with
16180         new m4/socklen.m4.
16181
16182 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16183
16184         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
16185         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
16186
16187 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16188
16189         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
16190         * lib/argp-help.c (fill_in_uparams): Check if the constructed
16191         struct uparams is valid. Fall back to the default values if it is
16192         not.
16193
16194 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16195
16196         * modules/argp (Files): Add argp-pin.c
16197         (Depends-on): dirname
16198         (lib_SOURCES): Add argp-pin.c
16199
16200 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16201
16202         * m4/argp.m4:  Check if program_invocation_name and
16203         program_invocation_short_name are declared and define appropriate
16204         macros if they are not.
16205
16206 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16207
16208         * lib/argp-help.c (__argp_base_name): New function
16209         (__argp_short_program_name): Rewrite using __argp_base_name
16210         * lib/argp-namefrob.h: Define program_invocation_name and
16211         program_invocation_short_name if requested
16212         (__argp_base_name): Add prototype
16213         * lib/argp-parse.c (argp_def): Use gettext wrappers
16214         (argp_default_parser): Use __argp_base_name
16215         * lib/argp-pin.c: New file. Defines program_invocation_name and
16216         program_invocation_short_name on systems that lack them.
16217
16218 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16219
16220         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
16221         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16222         porting problem reported by Georg Schwarz in
16223         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16224
16225 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16226
16227         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
16228         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16229         porting problem reported by Georg Schwarz in
16230         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16231
16232 2005-12-05  Bruno Haible  <bruno@clisp.org>
16233
16234         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
16235         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
16236         Reported by Mark Junker <mjscod@gmx.de>.
16237
16238 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
16239
16240         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
16241         Use implementation from Albert Chin, with some
16242         comments/corrections by Stepan Kasal and myself.
16243
16244 2005-12-02  Bruno Haible  <bruno@clisp.org>
16245
16246         * gnulib-tool (func_import): Accept GPLed build tool modules when
16247         --lgpl is given.
16248         * modules/csharpcomp-script: New file.
16249         * modules/csharpcomp: Depend on it.
16250         * modules/javacomp-script: New file.
16251         * modules/javacomp: Depend on it.
16252         Suggested by Simon Josefsson.
16253
16254 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
16255
16256         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
16257         statement, to work around an HP-UX 10.20 compiler bug reported by
16258         Peter O'Gorman.
16259
16260 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16261
16262         * modules/savedir (Depends-on): Add openat.
16263
16264 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16265
16266         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
16267         (uintmax_t) [defined uintmax_t]: Do not declare.
16268         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
16269         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
16270         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
16271         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
16272         sake of portability to weird hosts that C allows (though we don't
16273         know of any practical examples).
16274
16275         * lib/savedir.h (fdsavedir): New decl.
16276         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
16277         contains most of the former guts of savedir.
16278         (savedir): Use savedirstream.
16279         Include "openat.h".
16280
16281 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16282
16283         * modules/obstack (Files): Add m4/ulonglong.m4.
16284         Problem reported by Davide Angelocola.
16285
16286 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
16287
16288         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
16289         coreutils no longer futzes with rounding modes.
16290
16291 2005-11-14  Jim Meyering  <jim@meyering.net>
16292
16293         * lib/mkstemp-safer.c: Include <config.h>, required for possible
16294         replacement of mkstemp.
16295
16296 2005-11-10  Simon Josefsson  <jas@extundo.com>
16297
16298         * lib/readline.c: Remove EOL.
16299
16300 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16301
16302         * modules/gethrxtime (Depends-on): Add gettime.
16303
16304 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16305
16306         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
16307         or gettimeofday; no longer needed.
16308
16309 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16310
16311         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
16312         time business.
16313         (gethrxtime) [! (HAVE_NANOUPTIME
16314         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
16315         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
16316         our own approximation.
16317
16318 2005-11-08  Eric Blake  <ebb9@byu.net>
16319
16320         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16321
16322 2005-11-08  Eric Blake  <ebb9@byu.net>
16323
16324         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16325
16326 2005-11-04  Bruno Haible  <bruno@clisp.org>
16327
16328         * gnulib-tool: Implement --update mode.
16329
16330 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16331
16332         Fix porting problem reported by Theodoros V. Kalamatianos.
16333         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
16334         Don't assume that futimes failing means we must fail.
16335
16336 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16337
16338         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
16339         variables to suggest the intended function of the PATH_MAX check.
16340
16341 2005-10-30  Kean Johnston  <jkj@sco.com>
16342
16343         Trivial changes to support SCO systems.
16344         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
16345         as PATH_MAX.
16346         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
16347         where __ptr is null when no I/O is pending.
16348
16349 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16350
16351         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
16352         leave errno alone.  Problem reported by Dmitry V. Levin.
16353
16354 2005-10-28  Simon Josefsson  <jas@extundo.com>
16355
16356         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
16357         Test more.
16358
16359         * tests/test-gc-md2.c, tests/test-md2.c: New files.
16360
16361         * modules/md2, modules/md2-tests: New files.
16362
16363 2005-10-28  Simon Josefsson  <jas@extundo.com>
16364
16365         * m4/inet_ntop.m4: More tests.
16366
16367         * m4/gc-md2.m4, md2.m4: New file.
16368
16369 2005-10-28  Simon Josefsson  <jas@extundo.com>
16370
16371         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
16372         "restrict" keywords, as per POSIX.  Protect the function
16373         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
16374         Don't use K&R prototypes.  Check the sprintf return values.
16375         Re-define EAFNOSUPPORT if not present.  Indent.
16376
16377         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
16378         suggested by Bruno Haible <bruno@clisp.org>.
16379
16380         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
16381
16382         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
16383
16384         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
16385         libgcrypt).
16386
16387         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
16388
16389         * lib/md2.h, lib/md2.c: New files.
16390
16391 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
16392
16393         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
16394         errno alone.  Problem reported by Frederic Jolliton.
16395
16396 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
16397
16398         * modules/verify (License): Change from GPL to LGPL.  This is a
16399         tiny module and there are apparently near-equivalents that are
16400         under the BSD license.
16401
16402 2005-10-24  Simon Josefsson  <jas@extundo.com>
16403
16404         * modules/sha1: Relicense to LGPL.
16405
16406 2005-10-24  Simon Josefsson  <jas@extundo.com>
16407
16408         * lib/md4.h: Shrink buffer size, now that we changed the type.
16409
16410 2005-10-23  Simon Josefsson  <jas@extundo.com>
16411
16412         * gnulib-tool (func_import): Fix --tests-base.
16413
16414 2005-10-22  Simon Josefsson  <jas@extundo.com>
16415
16416         * modules/arcfour (Depends-on): Need stdint.
16417
16418 2005-10-22  Simon Josefsson  <jas@extundo.com>
16419
16420         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
16421         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
16422
16423 2005-10-22  Simon Josefsson  <jas@extundo.com>
16424
16425         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
16426         suggested by Bruno Haible <bruno@clisp.org>.
16427
16428 2005-10-22  Simon Josefsson  <jas@extundo.com>
16429
16430         * lib/crc.h: Include stddef.h, for size_t.
16431
16432 2005-10-22  Simon Josefsson  <jas@extundo.com>
16433
16434         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
16435         arcfour_context struct (simplify test vector testing in GNU
16436         Shishi).
16437
16438 2005-10-21  Simon Josefsson  <jas@extundo.com>
16439
16440         * modules/des, modules/des-tests: New files.
16441
16442         * modules/gc-des, modules/gc-des-tests: New files.
16443
16444         * tests/test-des.c, tests/test-gc-des.c: New file.
16445
16446 2005-10-21  Simon Josefsson  <jas@extundo.com>
16447
16448         * modules/arctwo, modules/arctwo-tests: New files.
16449
16450         * tests/test-arctwo.c: New file.
16451
16452         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
16453
16454         * tests/test-gc-arctwo.c: New file.
16455
16456 2005-10-21  Simon Josefsson  <jas@extundo.com>
16457
16458         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
16459         Bruno Haible <bruno@clisp.org>.
16460
16461         * m4/gc-des.m4: New file.
16462
16463 2005-10-21  Simon Josefsson  <jas@extundo.com>
16464
16465         * m4/arctwo.m4: New file.
16466
16467         * m4/gc-arctwo.m4: New file.
16468
16469 2005-10-21  Simon Josefsson  <jas@extundo.com>
16470
16471         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
16472         block.
16473
16474 2005-10-21  Simon Josefsson  <jas@extundo.com>
16475
16476         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
16477         <bruno@clisp.org>.
16478
16479         * lib/hmac-sha1.c (hmac_sha1): Likewise.
16480
16481         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
16482         Bruno Haible <bruno@clisp.org>.
16483
16484         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
16485         <bruno@clisp.org>.
16486
16487 2005-10-21  Simon Josefsson  <jas@extundo.com>
16488
16489         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
16490
16491 2005-10-21  Simon Josefsson  <jas@extundo.com>
16492
16493         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
16494
16495 2005-10-21  Simon Josefsson  <jas@extundo.com>
16496
16497         * lib/des.h, lib/des.c: New files.
16498
16499         * lib/gc-gnulib.c: Support DES.c
16500
16501 2005-10-21  Simon Josefsson  <jas@extundo.com>
16502
16503         * lib/arctwo.h, lib/arctwo.c: New files.
16504
16505         * lib/gc-gnulib.c: Support ARCTWO.
16506
16507 2005-10-21  Simon Josefsson  <jas@extundo.com>
16508
16509         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
16510         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16511
16512 2005-10-21  Simon Josefsson  <jas@extundo.com>
16513
16514         * gnulib-tool (func_import, func_create_testdir): Define automake
16515         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
16516         Makefile.am snippet),
16517         suggested by Bruno Haible <bruno@clisp.org>.
16518
16519         * modules/gc (Makefile.am): Use it.
16520
16521 2005-10-21  Bruno Haible  <bruno@clisp.org>
16522
16523         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
16524         patch.
16525
16526 2005-10-19  Simon Josefsson  <jas@extundo.com>
16527
16528         * tests/test-gc-rijndael.c: New file.
16529
16530         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
16531
16532 2005-10-19  Simon Josefsson  <jas@extundo.com>
16533
16534         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
16535         interface too.
16536
16537 2005-10-19  Simon Josefsson  <jas@extundo.com>
16538
16539         * tests/test-gc-arcfour.c: New file.
16540
16541         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
16542
16543 2005-10-19  Simon Josefsson  <jas@extundo.com>
16544
16545         * modules/gc-md4, modules/gc-md4-tests: New file.
16546
16547         * tests/test-gc-md4.c: New file.
16548
16549 2005-10-19  Simon Josefsson  <jas@extundo.com>
16550
16551         * m4/gc-md4.m4: New file.
16552
16553 2005-10-19  Simon Josefsson  <jas@extundo.com>
16554
16555         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
16556         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
16557         <kasal@ucw.cz>.
16558
16559 2005-10-19  Simon Josefsson  <jas@extundo.com>
16560
16561         * m4/gc-arcfour.m4: New file.
16562
16563         * m4/gc-rijndael.m4: New file.
16564
16565 2005-10-19  Simon Josefsson  <jas@extundo.com>
16566
16567         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
16568
16569 2005-10-19  Simon Josefsson  <jas@extundo.com>
16570
16571         * lib/gc-gnulib.c: Support ARCFOUR.
16572
16573 2005-10-19  Simon Josefsson  <jas@extundo.com>
16574
16575         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
16576         support.
16577
16578         * lib/gc.h: Add ECB enum type.
16579
16580         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
16581
16582 2005-10-18  Simon Josefsson  <jas@extundo.com>
16583
16584         * tests/test-md5.c: New file.
16585
16586         * modules/md5-tests: New file.
16587
16588 2005-10-18  Simon Josefsson  <jas@extundo.com>
16589
16590         * tests/test-md4.c: New file.
16591
16592         * modules/md4, modules/md4-tests: New files.
16593
16594 2005-10-18  Simon Josefsson  <jas@extundo.com>
16595
16596         * m4/md4.m4: New file.
16597
16598 2005-10-18  Simon Josefsson  <jas@extundo.com>
16599
16600         * lib/md4.h, lib/md4.c: New files, based on md5.?.
16601
16602 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
16603
16604         * gnulib-tool (func_create_testdir): Omit the second check whether
16605         BUILT_SOURCES in nonempty.
16606
16607 2005-10-17  Simon Josefsson  <jas@extundo.com>
16608
16609         * tests/test-rijndael.c: New file.
16610
16611 2005-10-17  Simon Josefsson  <jas@extundo.com>
16612
16613         * modules/sha1: Depend on stdint instead of md5.
16614
16615         * modules/md5: Depend on stdint, remove uint32_t.
16616
16617 2005-10-17  Simon Josefsson  <jas@extundo.com>
16618
16619         * modules/gc-sha1-tests: New file.
16620
16621         * tests/test-gc-sha1.c: New file.
16622
16623 2005-10-17  Simon Josefsson  <jas@extundo.com>
16624
16625         * m4/md5.m4: Remove call to uint32_t.m4.
16626
16627 2005-10-17  Simon Josefsson  <jas@extundo.com>
16628
16629         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
16630
16631         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
16632         md5.h.
16633
16634         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
16635
16636         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
16637
16638 2005-10-17  Simon Josefsson  <jas@extundo.com>
16639
16640         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
16641
16642 2005-10-17  Simon Josefsson  <jas@extundo.com>
16643
16644         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
16645
16646 2005-10-17  Simon Josefsson  <jas@extundo.com>
16647
16648         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
16649
16650         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
16651
16652 2005-10-17  Bruno Haible  <bruno@clisp.org>
16653
16654         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
16655         that it can also be used in a test.
16656
16657 2005-10-16  Bruno Haible  <bruno@clisp.org>
16658
16659         * gnulib-tool (func_emit_tests_Makefile_am): Also define
16660         TESTS_ENVIRONMENT, so that individual tests can augment it.
16661
16662         * gnulib-tool (func_create_testdir): Use an intermediate target for
16663         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
16664         macros, like $(ALLOCA_H), which cannot be passed through the command
16665         line.
16666
16667 2005-10-15  Simon Josefsson  <jas@extundo.com>
16668
16669         * modules/rijndael-tests: New file.
16670
16671         * modules/rijndael: New file.
16672
16673 2005-10-15  Simon Josefsson  <jas@extundo.com>
16674
16675         * m4/rijndael.m4: New file.
16676
16677 2005-10-15  Simon Josefsson  <jas@extundo.com>
16678
16679         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
16680
16681         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
16682
16683 2005-10-14  Simon Josefsson  <jas@extundo.com>
16684
16685         * tests/test-arcfour.c: New file.
16686
16687         * modules/arcfour, modules/arcfour-tests: New files.
16688
16689 2005-10-14  Simon Josefsson  <jas@extundo.com>
16690
16691         * m4/arcfour.m4: New file.
16692
16693 2005-10-14  Simon Josefsson  <jas@extundo.com>
16694
16695         * lib/arcfour.h, lib/arcfour.c: New files.
16696
16697 2005-10-14  Roland McGrath  <roland@redhat.com>
16698
16699         Import from libc.  [BZ #1331]
16700         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
16701         macro argument.
16702         Reported by Matej Vela <vela@debian.org>.
16703
16704 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16705
16706         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
16707         include <wchar.h>; no longer needed.
16708
16709 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16710
16711         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
16712
16713 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
16714         and  Ulrich Drepper  <drepper@redhat.com>
16715
16716         Import from libc.
16717         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
16718         instead of inline stream orientation test and two separate
16719         function calls.  Pay no attention to USE_IN_LIBIO.
16720
16721 2005-10-13  Simon Josefsson  <jas@extundo.com>
16722
16723         * modules/gc-hmac-md5-tests: New file.
16724
16725         * tests/test-gc-hmac-sha1.c: New file.
16726
16727         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
16728
16729         * modules/gc-hmac-md5-tests: New file.
16730
16731         * tests/test-gc-md5.c: New file.
16732
16733         * modules/gc-md5-tests: New file.
16734
16735 2005-10-13  Simon Josefsson  <jas@extundo.com>
16736
16737         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
16738         Move memory allocation outside of loop.
16739
16740 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
16741
16742         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
16743         intermediate directory is in a read-only file system.  Problem
16744         reported by Eric Blake.
16745
16746 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
16747
16748         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
16749
16750 2005-10-12  Simon Josefsson  <jas@extundo.com>
16751
16752         * tests/test-hmac-sha1.c: New file.
16753
16754         * modules/hmac-sha1-tests: New file.
16755
16756         * modules/hmac-sha1: New file.
16757
16758 2005-10-12  Simon Josefsson  <jas@extundo.com>
16759
16760         * modules/gc-sha1: New file.
16761
16762 2005-10-12  Simon Josefsson  <jas@extundo.com>
16763
16764         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
16765
16766         * tests/test-gc-pbkdf2-sha1.c: New file.
16767
16768 2005-10-12  Simon Josefsson  <jas@extundo.com>
16769
16770         * modules/gc-md5, modules/gc-hmac-md5: New files.
16771
16772         * modules/gc (Files): Remove md5, memxor and hmac files.
16773
16774 2005-10-12  Simon Josefsson  <jas@extundo.com>
16775
16776         * m4/gc-pbkdf2-sha1.m4: New file.
16777
16778         * m4/gc-hmac-sha1.m4: New file.
16779
16780         * m4/gc-sha1: New file.
16781
16782         * m4/hmac-sha1.m4: New file.
16783
16784 2005-10-12  Simon Josefsson  <jas@extundo.com>
16785
16786         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
16787
16788         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
16789
16790 2005-10-12  Simon Josefsson  <jas@extundo.com>
16791
16792         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
16793         suggested by Bruno Haible <bruno@clisp.org>.
16794
16795 2005-10-12  Simon Josefsson  <jas@extundo.com>
16796
16797         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
16798
16799 2005-10-12  Simon Josefsson  <jas@extundo.com>
16800
16801         * lib/gc-pbkdf2-sha1.c: New file.
16802
16803         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
16804
16805 2005-10-12  Simon Josefsson  <jas@extundo.com>
16806
16807         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
16808
16809         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
16810
16811 2005-10-12  Simon Josefsson  <jas@extundo.com>
16812
16813         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
16814         GC_USE_HMAC_MD5, respectively.
16815
16816         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
16817         (gc_md5): Fix typo.
16818
16819         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
16820
16821         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
16822
16823         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
16824
16825 2005-10-12  Bruno Haible  <bruno@clisp.org>
16826
16827         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
16828         Reported by Stepan Kasal <kasal@ucw.cz>.
16829
16830 2005-10-11  Simon Josefsson  <jas@extundo.com>
16831
16832         * tests/test-crc.c: New file.
16833
16834         * modules/crc, modules/crc-tests: New files.
16835
16836 2005-10-11  Simon Josefsson  <jas@extundo.com>
16837
16838         * m4/crc.m4: New file.
16839
16840 2005-10-11  Simon Josefsson  <jas@extundo.com>
16841
16842         * lib/gc.h: Add gc_hash and gc_hash_buffer.
16843
16844         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
16845
16846         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
16847
16848 2005-10-11  Simon Josefsson  <jas@extundo.com>
16849
16850         * lib/crc.h, lib/crc.c: New files.
16851
16852         * lib/gc.h (gc_hash_buffer): Add doc.
16853
16854 2005-10-11  Bruno Haible  <bruno@clisp.org>
16855
16856         * modules/c-strcasestr: New file.
16857         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
16858
16859 2005-10-11  Bruno Haible  <bruno@clisp.org>
16860
16861         * modules/c-strcase: New file.
16862         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
16863
16864 2005-10-11  Bruno Haible  <bruno@clisp.org>
16865
16866         * lib/strcasecmp.c: Include limits.h.
16867         (strcasecmp): Avoid integer overflow on exotic platforms.
16868         * lib/strncasecmp.c: Include limits.h.
16869         (strncasecmp): Avoid integer overflow on exotic platforms.
16870         Reported by Paul Eggert.
16871
16872 2005-10-11  Bruno Haible  <bruno@clisp.org>
16873
16874         * lib/c-strcasestr.h: New file, from GNU gettext.
16875         * lib/c-strcasestr.c: New file, from GNU gettext.
16876
16877 2005-10-11  Bruno Haible  <bruno@clisp.org>
16878
16879         * lib/c-strcase.h: New file, from GNU gettext.
16880         * lib/c-strcasecmp.c: New file, from GNU gettext.
16881         * lib/c-strncasecmp.c: New file, from GNU gettext.
16882
16883 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16884
16885         * modules/mempcpy (License): GPL -> LGPL.
16886         * modules/strchrnul (License): Likewise.
16887         * modules/sysexits (License): Likewise.
16888
16889 2005-10-08  Simon Josefsson  <jas@extundo.com>
16890
16891         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
16892
16893 2005-10-07  Simon Josefsson  <jas@extundo.com>
16894
16895         * m4/memxor.m4: Remove gl_C_RESTRICT call.
16896
16897 2005-10-06  Simon Josefsson  <jas@extundo.com>
16898
16899         * tests/test-hmac-md5.c: New file.
16900
16901         * modules/hmac-md5-tests: New file.
16902
16903         * modules/hmac-md5: New file.
16904
16905 2005-10-06  Simon Josefsson  <jas@extundo.com>
16906
16907         * m4/hmac-md5.m4: New file.
16908
16909         * m4/memxor.m4: Require gl_C_RESTRICT.
16910
16911 2005-10-06  Simon Josefsson  <jas@extundo.com>
16912
16913         * lib/memxor.c (memxor): Avoid casts and warnings.
16914
16915 2005-10-06  Simon Josefsson  <jas@extundo.com>
16916
16917         * lib/hmac-md5.c: New file.
16918
16919         * lib/hmac.h: New file.
16920
16921 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16922
16923         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
16924         promotes to int, not unsigned int, to catch the AIX 5.3
16925         compiler bug.
16926
16927 2005-10-05  Simon Josefsson  <jas@extundo.com>
16928
16929         * modules/memxor: New file.
16930
16931         * modules/iconv (Files): Move config.rpath to havelib, it is used
16932         there.
16933
16934         * modules/havelib (Files): Add config.rpath.
16935
16936 2005-10-05  Simon Josefsson  <jas@extundo.com>
16937
16938         * m4/memxor.m4: New file.
16939
16940 2005-10-05  Simon Josefsson  <jas@extundo.com>
16941
16942         * lib/memxor.c (memxor): Fix compiler error.
16943
16944         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
16945         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
16946
16947         * lib/memxor.h, lib/memxor.c: New files.
16948
16949         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
16950         we assume all systems have it, suggested by Jim Meyering
16951         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
16952         any systems lack sys/socket.h; mingw32 is known to lack it, but we
16953         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
16954         same reasons.
16955
16956 2005-10-05  Simon Josefsson  <jas@extundo.com>
16957
16958         * config/srclist.txt: Add glibc bug 1423 for md5.h.
16959
16960 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
16961
16962         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
16963         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
16964         needed, since the source code now assumes these .h files.
16965
16966 2005-10-05  Derek Price  <derek@ximbiot.com>
16967
16968         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
16969
16970 2005-10-05  Bruno Haible  <bruno@clisp.org>
16971
16972         * modules/stdint (License): Change to LGPL.
16973
16974 2005-10-04  Simon Josefsson  <jas@extundo.com>
16975
16976         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
16977         D. Baushke" <mdb@gnu.org>.
16978
16979 2005-10-04  Bruno Haible  <bruno@clisp.org>
16980
16981         * lib/verify.h (verify_true): Provide alternative definition for C++.
16982
16983 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
16984
16985         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
16986         (SSIZE_MAX): New macro, if not already defined.
16987         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
16988         than 2 GiB.
16989
16990 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16991
16992         Sync from coreutils.
16993         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
16994         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
16995         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
16996         ULLONG_MAX doesn't work with 2.7.2.1.
16997
16998 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16999
17000         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
17001         From Ben Pfaff.
17002
17003         * modules/exclude (Depends-on): Depend on verify.
17004         * modules/strtoimax (Depends-on): Likewise.
17005         * modules/utimecmp (Depends-on): Likewise.
17006
17007 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17008
17009         * lib/exclude.c: Include verify.h.
17010         (verify): Remove.  All callers changed to use verify.h's version.
17011         * lib/strtoimax.c: Likewise.
17012         * lib/utimecmp.c: Likewis.e
17013
17014         Sync from coreutils.
17015         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
17016         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
17017         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
17018         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
17019         bother returning ENOSYS if settimeofday or stime fails; just let
17020         them return whatever errno they want to return.
17021         * lib/utimens.c: Include unistd.h, for dup2.
17022         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
17023         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
17024
17025 2005-10-02  Jim Meyering  <jim@meyering.net>
17026
17027         Sync from coreutils.
17028         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
17029         from glibc-2.2.5 that fails for read-only files.
17030
17031 2005-10-02  Jim Meyering  <jim@meyering.net>
17032
17033         Sync from coreutils.
17034         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
17035         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
17036         `#if HAVE_CONFIG_H'.
17037         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
17038         Remove AT_FDCWD test.
17039         Do not consume the fd unless successful.
17040         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
17041         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
17042         block, so that we don't even try to compile it if settimeofday is
17043         available.  This works around a compilation failure on OSF1 V5.1,
17044         due to stime requiring a `long int*' while tv_sec is `int'.
17045
17046 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
17047
17048         Sync from coreutils.
17049         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
17050         against `yes', rather than just testing for nonempty.
17051
17052 2005-10-01  Simon Josefsson  <jas@extundo.com>
17053
17054         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
17055         and Darwin.
17056
17057         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
17058         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
17059         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
17060         freeaddrinfo and gai_strerror are declared by the POSIX headers.
17061         Check if struct addrinfo is declared.
17062
17063 2005-10-01  Simon Josefsson  <jas@extundo.com>
17064
17065         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
17066         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
17067         AI_* and EAI_* definitions.  Protect function declarations.
17068
17069 2005-10-01  Jim Meyering  <jim@meyering.net>
17070
17071         Sync from coreutils.
17072
17073         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
17074         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
17075         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
17076         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17077         in the inet and nsl libraries.  Required on Solaris 5.7.
17078
17079 2005-10-01  Jim Meyering  <jim@meyering.net>
17080
17081         Sync from coreutils.
17082         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17083         in the inet and nsl libraries.  Required on Solaris 5.7.
17084
17085 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
17086
17087         * lib/getdelim.c (getdelim): Remove unused variables.
17088
17089 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
17090
17091         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
17092         so that the code works even with ancient cpp.  Portability problem
17093         with GCC 2.7.2.1 reported by Thomas M.Ott.
17094
17095 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
17096
17097         * modules/regex (Depends-on): Add strcase.
17098
17099         * modules/gethostname (Licence): Change from GPL to LGPL, since
17100         gethostname.c is a trivial implementation of a standard library
17101         function.
17102         * modules/poll (License): Change from GPL to LGPL, since it's
17103         derived from LGPL code.
17104
17105 2005-09-27  Jim Meyering  <jim@meyering.net>
17106
17107         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
17108         HAVE_CONFIG_H.
17109
17110         * lib/intprops.h (signed_type_or_expr__): Define.
17111         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
17112         for unsigned types.
17113
17114 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
17115
17116         * lib/verify.h (verify_expr): Remove, replacing with:
17117         (verify_true): New macro that returns true instead of void.
17118         (verify_type__): Remove.
17119         (verify): Use verify_true rather than verify_type__.
17120
17121 2005-09-26  Bruno Haible  <bruno@clisp.org>
17122
17123         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
17124         is necessary.
17125         (lib_SOURCES): Remove mbchar.c.
17126         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
17127         (Files): Add m4/mbrtowc.m4.
17128         * modules/mbiter: Likewise.
17129         * modules/mbuiter: Likewise.
17130
17131 2005-09-26  Bruno Haible  <bruno@clisp.org>
17132
17133         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
17134         compile mbchar.c if they are not both present.
17135         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
17136         * m4/mbiter.m4 (gl_MBITER): Likewise.
17137         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
17138         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
17139         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
17140
17141 2005-09-25  Jim Meyering  <jim@meyering.net>
17142
17143         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
17144         also uses socklen_t.
17145
17146 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
17147
17148         * lib/utimens.c (ENOSYS): Define if not already defined.
17149         (futimens): Support having a null PATH if the file descriptor
17150         is nonnegative.
17151
17152         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
17153         Remove.
17154         (__attribute): Define to empty unless GCC 3.1 or later.
17155         This works around a core dump on OpenBSD 3.4, which has GCC
17156         2.95.3, which dumps core when given __attribute__(()).  It also
17157         simplifies other tests, since we really don't want to bother with
17158         worrying about which ancient version of GCC supported what.
17159         Original problem reported by Yoann Vandoorselaere, with part of
17160         the fix suggested by Derek Price.
17161
17162 2005-09-24  Jim Meyering  <jim@meyering.net>
17163
17164         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
17165         so we can once again use a positive bitfield width of 1 -- now we
17166         don't have to explain why we were using a bitfield width of 2.
17167
17168 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17169
17170         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
17171         and similarly for the other external symbols.  Problem reported
17172         by James Gallager.
17173
17174         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
17175         bug reported by Jim Meyering.
17176
17177         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
17178         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
17179         not needed, since socklen is a prerequisite module.
17180
17181 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17182
17183         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
17184         Problem reported by Eric Blake.
17185         (getaddrinfo): Initialize se so that it's not garbage.
17186         Redo internal storage allocation so that it doesn't make unportable
17187         assumptions about alignment.
17188         Fix a memory leak.
17189
17190         * lib/utimens.c (futimens): Use futimesat if available.
17191         Prefer it to futimes since it doesn't have the futimes bug.
17192
17193         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
17194         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
17195         Instead, declare a function that returns a pointer to an array,
17196         and use verify_type__ to declare the size of the array.
17197         Problem and germ of a solution reported by Bruno Haible.
17198         (verify_type__): Use 2, not 1, for bitfield size, to avoid
17199         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
17200
17201 2005-09-23  Jim Meyering  <jim@meyering.net>
17202
17203         Sync from coreutils.
17204         Correct build failure (socklen_t not defined) on at least
17205         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
17206         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
17207
17208 2005-09-23  Jim Meyering  <jim@meyering.net>
17209
17210         * modules/getaddrinfo (Depends-on): Add socklen.
17211
17212 2005-09-23  Bruno Haible  <bruno@clisp.org>
17213
17214         * tests/test-verify.c: New file.
17215
17216 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17217
17218         Sync from coreutils.
17219
17220         * modules/argmatch (Depends-on): Add verify.
17221         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
17222         unistd-safer.
17223         * modules/save-cwd (Depends-on): Likewise.
17224
17225         * modules/openat (Files): Add lib/openat-die.c.
17226         (Depends-on): Remove error, exitfail.
17227         Add dirname.
17228
17229         * modules/verify: New file.
17230         * MODULES.html.sh (Diagnostics <assert.h>): New section,
17231         with "verify" module.
17232
17233 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17234
17235         Sync from coreutils.
17236
17237         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
17238         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
17239         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
17240         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
17241         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
17242         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
17243         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
17244         Don't bother checking for string.h, stdlib.h, unistd.h.
17245         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
17246         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
17247         module's job.
17248         * m4/jm-macros.m4 (gl_MACROS): Likewise.
17249         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
17250
17251         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
17252         (gl_GETDATE): Use it.
17253
17254         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
17255
17256 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17257
17258         Sync from coreutils.
17259
17260         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
17261         stat-time.h.
17262         * lib/argmatch.h: Include verify.h
17263         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
17264         (ARGMATCH_ASSERT): Remove; unused.
17265         * lib/canonicalize.c: Assume STDC_HEADERS.
17266         * lib/exclude.c: Include "strcase.h".
17267         * lib/regex_internal.h [!defined _LIBC]: Likewise.
17268         * lib/getusershell.c: Include stdio--.h rather than stdio.h
17269         and stdio-safer.h.
17270         (getusershell): Call fopen, not fopen_safer.
17271         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
17272         Do not include unistd-safer.h.
17273         (save_cwd): Don't call fd_safer; no longer needed
17274         now that we include fcntl--.h.
17275
17276         * lib/getdate.y (relative_time): New type.
17277         (RELATIVE_TIME_0): New constant.
17278         (parser_control): Use relative_time instead of doing it ourselves.
17279         (%union): Add new relative_time rel member.
17280         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
17281         Now typeless.
17282         (relunit, relunit_snumber): Now of type rel.
17283         (zone, rel, relunit, get_date): Adjust to above changes.
17284
17285         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
17286         Do not include unistd-safer.h.
17287         (getloadavg): Don't call fd_safer; no longer needed
17288         now that we include fcntl--.h.
17289
17290         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
17291         (make_dir_parents): Treat ENOSYS like EEXIST.
17292
17293         Improve quality of diagnostics on restore_cwd failure.
17294         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
17295         (make_dir_parents): Last arg is now int * (for errno), not bool *.
17296         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
17297         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
17298         each time through the loop.  Do not diagnose restore_cwd failure;
17299         that is the caller's job (and perhaps the caller does not care).
17300
17301         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
17302         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
17303         If the file already exists but is not a directory, don't bother
17304         to try to make its parents.
17305         Close potential file descriptor leak if we can't chdir("/") (!).
17306         Don't always return true if chdir($PWD) fails; return true only
17307         if the requested action was done successfully (except for the
17308         chdir($PWD)).
17309         Don't log final directory unless we actually made it.
17310         Refactor to avoid duplicate code to fix up permissions.
17311         Don't attempt to fix up parent permissions if chdir($PWD) fails.
17312
17313         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
17314         to make it a bit faster and (I hope) clearer.
17315         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
17316         Fix bug in formats like %2N.
17317
17318         * lib/verify.h: New file.
17319
17320 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17321
17322         Sync from coreutils.
17323         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
17324
17325 2005-09-22  Jim Meyering  <jim@meyering.net>
17326
17327         Sync from coreutils.
17328
17329         * m4/lstat.m4 (gl_FUNC_LSTAT):
17330         Use AC_LIBSOURCES to require lstat.c and lstat.h.
17331         Remove obsolete comment.
17332         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
17333         * m4/xstrtod.m4: Likewise.
17334
17335         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
17336
17337 2005-09-22  Jim Meyering  <jim@meyering.net>
17338
17339         Sync from coreutils.
17340
17341         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
17342
17343         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
17344         the .tm_year member, since otherwise gcc-4.0 would now warn about
17345         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
17346
17347         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
17348         order to avoid an unsuppressible warning from gcc on 64-bit systems.
17349
17350         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
17351         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
17352         when run in a time zone for which daylight savings time is in effect
17353         for the starting date.
17354
17355         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
17356         stop us from restricting permissions of just-created absolute-named
17357         directories.
17358         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
17359         to restore initial working directory.
17360         * lib/mkdir-p.c (make_dir_parents): New parameter:
17361         different_working_dir, to tell caller if/when we change the working
17362         directory and are unable to return to the initial one.
17363         * lib/mkdir-p.h (make_dir_parents): Update prototype.
17364         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
17365         `return false'.  This fixes a bug introduced on 2004-07-30.
17366
17367         * lib/openat.c (fdopendir): Be sure to close the supplied
17368         file descriptor before returning.  This makes our replacement
17369         implementation a little closer to Solaris's, where fdopendir
17370         ties the file descriptor to the returned DIR* pointer.
17371         * lib/openat.c (unlinkat): New function.
17372         * lib/openat.h (unlinkat): Add prototype.
17373         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
17374         (openat_restore_fail): Rename from openat_restore_die.
17375         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
17376
17377         Provide an alternative to exiting immediately upon save_cwd or
17378         restore_cwd failure.  Now, an application can arrange e.g.,
17379         to perform a longjump in that case.
17380         * lib/openat.c: Include dirname.h.
17381         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
17382         (rpl_openat, fdopendir, fstatat): Call openat_save_die
17383         and openat_restore_die rather than calling error directly.
17384         Don't include "error.h" or "exitfail.h"; they're no longer needed.
17385
17386         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
17387         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
17388         define.
17389
17390         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
17391         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
17392                             int utc, int nanoseconds);
17393         Background:
17394         date should not have to allocate a megabyte of virtual memory to
17395         handle a format argument like +%1048575T.  When implemented with
17396         strftime, it must allocate such a buffer, use strftime to fill it
17397         in, print it, then free it.
17398         With fprintftime, it simply prints everything and exits.
17399         With no need for memory allocation, that's one fewer way to fail.
17400         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
17401         optional field width, not before, so we accept %9:z, not %:9z.
17402         (my_strftime): Be sure to use L_('x') for literals.
17403
17404         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
17405         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
17406         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
17407         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
17408         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
17409         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
17410         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
17411         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
17412         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
17413         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
17414         * lib/xgethostname.c, lib/xreadlink.c:
17415         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
17416
17417         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
17418         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
17419         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
17420         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
17421         and don't include <sys/file.h>).
17422
17423 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
17424
17425         Sync from coreutils.
17426
17427         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
17428         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
17429         [!LDAV_DONE]: Avoid unused variable warning.
17430
17431 2005-09-21  Bruno Haible  <bruno@clisp.org>
17432
17433         * lib/unicodeio.h (unicode_to_mb): New declaration.
17434
17435 2005-09-20  Derek Price  <derek@ximbiot.com>
17436
17437         * lib/getaddrinfo.c: Don't include <netdb.h> included from
17438         getaddrinfo.h.
17439
17440 2005-09-20  Bruno Haible  <bruno@clisp.org>
17441
17442         * gnulib-tool: Remove trailing slashes from the values specified for
17443         --source-base, --m4-base, --tests-base, --aux-dir.
17444         Suggested by Simon Josefsson <jas@extundo.com>.
17445
17446 2005-09-20  Bruno Haible  <bruno@clisp.org>
17447
17448         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
17449         func_modules_to_filelist, func_import, func_create_testdir): Make all
17450         sorting results locale-independent, so that gnulib-cache.m4 doesn't
17451         change when gnulib-tool is invoked in a different locale.
17452
17453 2005-09-19  Simon Josefsson  <jas@extundo.com>
17454
17455         * m4/socklen.m4: Fix typo.
17456
17457 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
17458
17459         Use a consistent style for including <config.h>.
17460         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
17461         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
17462         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
17463         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
17464         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
17465         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
17466         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
17467         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
17468         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
17469         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
17470         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
17471         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
17472         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
17473         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
17474         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
17475         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
17476         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
17477         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
17478         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
17479         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
17480         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
17481         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
17482         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
17483         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
17484         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
17485         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
17486         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
17487         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
17488         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
17489         lib/xstrtoumax.c, lib/yesno.c:
17490         Standardize inclusion of config.h.
17491         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
17492         lib/inttostr.h:  Removed inclusion of config.h from header files.
17493         * lib/inttostr.c:  Adjusted in-tree users.
17494         * lib/timespec.h: Remove superfluous warning to include config.h.
17495         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
17496         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
17497         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
17498         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
17499         config.h with HAVE_CONFIG_H.
17500
17501 2005-09-19  Jim Meyering  <jim@meyering.net>
17502
17503         * modules/pathmax (License): Change to LGPL.
17504
17505 2005-09-19  Derek Price  <derek@ximbiot.com>
17506
17507         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
17508
17509 2005-09-19  Bruno Haible  <bruno@clisp.org>
17510
17511         * gnulib-tool (import): Provide default for --tests-base.
17512
17513 2005-09-19  Bruno Haible  <bruno@clisp.org>
17514
17515         * doc/quote.texi: New file, extracted from gnulib.texi.
17516         * doc/ctime.texi: New file, extracted from gnulib.texi.
17517         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
17518         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
17519         * doc/gnulib.texi: Include them.
17520
17521 2005-09-18  Bruno Haible  <bruno@clisp.org>
17522
17523         Portability fix.
17524         * gnulib-tool (func_readlink): New function.
17525         (func_ln_if_changed): Use it.
17526
17527 2005-09-18  Bruno Haible  <bruno@clisp.org>
17528
17529         * gnulib-tool: Support --with-tests also with --import.
17530         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
17531         (func_import): Use variables $testsbase and $inctests. Emit a
17532         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
17533         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
17534         SUBDIRS += $testsdir.
17535         (func_create_testdir): Update.
17536
17537 2005-09-18  Bruno Haible  <bruno@clisp.org>
17538
17539         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
17540         instead of $dry_run.
17541         (func_cp_if_changed, func_mv_if_changed): Remove functions.
17542         (func_ln_if_changed): Don't handle dry-run here.
17543         (func_import): In dry-run mode, detect more precisely which actions
17544         would be performed, and don't use "...ing" verbs.
17545
17546 2005-09-18  Bruno Haible  <bruno@clisp.org>
17547
17548         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
17549         (func_import): Use join on two temporary files instead of three nested
17550         loops, in order to determine which files are new or old.
17551
17552 2005-09-18  Bruno Haible  <bruno@clisp.org>
17553
17554         * gnulib-tool (func_import): Comment out code that spits out the
17555         new files with --dry-run.
17556
17557 2005-09-18  Bruno Haible  <bruno@clisp.org>
17558
17559         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
17560
17561 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17562
17563         * lib/stat-time.h: New file.
17564         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
17565         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
17566         in a different way.
17567         (timespec_cmp): New function.
17568         * lib/utimecmp.c: Include stat-time.h.
17569         (SYSCALL_RESOLUTION): Depend on whether various struct stat
17570         members exist, not on the obsolescent ST_MTIM_NSEC.
17571         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
17572
17573 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17574
17575         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
17576
17577 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17578
17579         * MODULES.html.sh (File system functions): Add stat-time.
17580         * modules/stat-time: New file.
17581         * modules/timespec (Files): Remove m4/st_mtim.m4; this
17582         is now done in a different way, by the stat-time module.
17583         * modules/utimecmp (Depends-on): Add stat-time.
17584
17585 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
17586
17587         * m4/st_mtim.m4: Remove.  Superseded by...
17588         * m4/stat-time.m4: New file.
17589         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
17590         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
17591
17592 2005-09-15  Derek Price  <derek@ximbiot.com>
17593
17594         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
17595
17596 2005-09-15  Derek Price  <derek@ximbiot.com>
17597
17598         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
17599         * lib/regex_internal.c: Ditto, using this...
17600         (__GNUC_PREREQ): ...new macro.
17601         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
17602         using...
17603         (__GNUC_PREREQ): ...this new macro.
17604
17605         * lib/strstr.h: Include string.h. Define strstr as a macro here.
17606
17607 2005-09-15  Derek Price  <derek@ximbiot.com>
17608             Paul Eggert  <eggert@cs.ucla.edu>
17609
17610         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
17611         changes, consolidating in...
17612         * lib/regex_internal.h: ...this file.
17613
17614 2005-09-13  Jim Meyering  <jim@meyering.net>
17615
17616         * lib/canon-host.c: Filter through gnu indent and reword comments
17617         slightly.
17618         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
17619
17620 2005-09-13  Derek Price  <derek@ximbiot.com>
17621
17622         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
17623         failure.
17624         Reported by Jim Meyering  <jim@meyering.net>.
17625
17626 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
17627
17628         * lib/base64.c: Typo.
17629         (base64_encode): Put b64str in initialized data section.
17630
17631 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
17632
17633         Merge glibc and coreutils changes into gnulib, plus a few
17634         extra fixes.
17635         * lib/md5.c: Use #error rather than a string.
17636         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
17637         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
17638         (__attribute__): Define to empty for non recent-GCC.
17639         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
17640         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
17641         Renamed from their non-__ counterparts, with new macros replacing
17642         them if not _LIBC.  Add __THROW attribute.
17643         (rol): Remove.
17644         (struct md5_ctx): Align buffer if using GCC.
17645         * lib/sha1.h (struct sha1_ctx): Likewise.
17646         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
17647         The old name was backwards.
17648         (NOTSWAP): Remove; not used.
17649         (rol): New macro, moved here from md5.h.
17650         (sha1_process_block): Remove a FIXME that doesn't make sense.
17651
17652 2005-09-12  Derek Price  <derek@ximbiot.com>
17653
17654         Return usable errors from canon-host.
17655         * lib/canon-host.h: New file.
17656         * lib/canon-host.c (canon_host): Wrap...
17657         (canon_host_r): ...this new function, which now relies exclusively on
17658         getaddrinfo.
17659         (ch_strerror): New function.
17660         (last_cherror): New global.
17661         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
17662         interface.
17663         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
17664         void *.
17665         (freeaddrinfo): Free ai->ai_canonname when set.
17666
17667 2005-09-12  Derek Price  <derek@ximbiot.com>
17668
17669         Make canon-host require getaddrinfo.
17670         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
17671         AC_LIBSOURCE canon-host.h.  Call...
17672         (gl_PREREQ_CANON_HOST): ...this new function, which requires
17673         gl_GETADDRINFO.
17674         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
17675
17676 2005-09-12  Derek Price  <derek@ximbiot.com>
17677
17678         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
17679         LGPL.
17680         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
17681
17682 2005-09-12  Derek Price  <derek@ximbiot.com>
17683
17684         * lib/gai_strerror.c: Include config.h when available.  Include
17685         getaddrinfo.h before other headers to test interface.
17686         Reported by Larry Jones <lawrence.jones@ugs.com>.
17687
17688 2005-09-12  Derek Price  <derek@ximbiot.com>
17689             Paul Eggert  <eggert@cs.ucla.edu>
17690
17691         * modules/glob (Files): Add glob-libc.h.
17692
17693 2005-09-12  Derek Price  <derek@ximbiot.com>
17694             Paul Eggert  <eggert@cs.ucla.edu>
17695
17696         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
17697         glob_.h, glob-libc.h.
17698         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
17699
17700 2005-09-12  Derek Price  <derek@ximbiot.com>
17701             Paul Eggert  <eggert@cs.ucla.edu>
17702
17703         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
17704         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
17705         protecting things that should be done only in gnulib contexts.
17706         * lib/glob_.h: New file, containing only the glob things needed for
17707         gnulib.
17708         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
17709         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
17710         (glob, globfree, glob_pattern_p): Now defined simply in terms of
17711         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
17712         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
17713         and to respect the namespace rules better.
17714
17715 2005-09-08  Simon Josefsson  <jas@extundo.com>
17716
17717         * modules/socklen: New file.
17718
17719 2005-09-08  Simon Josefsson  <jas@extundo.com>
17720
17721         * m4/socklen.m4: New file.
17722
17723 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17724
17725         * modules/utimens (Files): Add m4/utimbuf.m4, since
17726         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
17727         Reported by Sergey Poznyakoff.
17728
17729 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17730
17731         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
17732         definitions, since that's the preferred style in glibc.
17733         Fix a minor spacing issue, and update copyright notice to match
17734         glibc's.
17735
17736 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17737
17738         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
17739
17740 2005-09-06  Simon Josefsson  <jas@extundo.com>
17741
17742         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
17743         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
17744
17745 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17746
17747         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
17748         warning.
17749
17750 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17751
17752         * config/srclist.txt: Add glibc bug 1302.
17753
17754 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
17755
17756         Change bitset word type from unsigned int to unsigned long int,
17757         as this has better performance on typical 64-bit hosts.
17758         Port bitset code to hosts with unusual word sizes.
17759         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
17760         (build_collating_symbol):
17761         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
17762         argument is a bitset.  This is merely a style issue, but it makes
17763         it clearer that an entire array is expected.
17764         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
17765         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
17766         Port to the case where bitset_word is not the same as unsigned int.
17767         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17768         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
17769         Likewise.
17770         * lib/regexec.c (check_dst_limits_calc_pos_1,
17771         check_subexp_matching_top):
17772         (build_trtable, group_nodes_into_DFAstates):
17773         Likewise.
17774         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
17775         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
17776         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
17777         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
17778         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
17779         * lib/regcomp.c (optimize_subexps, lower_subexp):
17780         Work even if bitset_word has holes in its bitwise representation.
17781         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
17782         * lib/regexec.c (check_dst_limits_calc_pos_1,
17783         check_subexp_matching_top):
17784         Likewise.
17785         * lib/regex_internal.c (re_string_reconstruct):
17786         Don't assume UCHAR_MAX == 255.
17787         * lib/regex_internal.h (bitset_set_all): Likewise.
17788         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
17789         All uses changed.
17790         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
17791         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
17792         All uses changed.
17793         (BITSET_WORD_MAX): New macro.
17794         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
17795         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
17796         (bitset_empty, bitset_copy):
17797         Prefer sizeof (bitset) to multiplying it out ourselves.
17798         (bitset_not_merge): Remove; unused.
17799         (bitset_contain): Return bool, not unsigned int with one bit on.
17800         All callers changed.
17801         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
17802         alignment than re_node_set; do this by defining a new internal
17803         type struct dests_alloc and using it to allocate memory.
17804
17805 2005-09-05  Bruno Haible  <bruno@clisp.org>
17806
17807         * gnulib-tool (func_import): Fix comparison in handling of symbolic
17808         links.
17809
17810 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
17811
17812         * modules/size_max (Makefile.am): Add size_max.h
17813
17814 2005-09-04  Derek Price  <derek@ximbiot.com>
17815
17816         * gnulib-tool (func_import): Fix reversed $symbolic logic.
17817
17818 2005-09-03  Simon Josefsson  <jas@extundo.com>
17819
17820         * gnulib-tool: Fix typo.
17821
17822 2005-09-03  Simon Josefsson  <jas@extundo.com>
17823
17824         * config/srclist.txt: Add glibc bug 1293.
17825
17826 2005-09-03  Derek Price  <derek@ximbiot.com>
17827
17828         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
17829         From Larry Jones <lawrence.jones@ugs.com>.
17830
17831 2005-09-02  Simon Josefsson  <jas@extundo.com>
17832
17833         * modules/socklen: New file.
17834
17835 2005-09-02  Simon Josefsson  <jas@extundo.com>
17836
17837         * modules/havelib: New module.
17838
17839         * modules/gettext, modules/iconv, modules/lock, modules/readline:
17840         Use havelib.
17841
17842 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17843
17844         Check for arithmetic overflow when calculating sizes, to prevent
17845         some buffer-overflow issues.  These patches are conservative, in the
17846         sense that when I couldn't determine whether an overflow was possible,
17847         I inserted a run-time check.
17848         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
17849         macros.
17850         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
17851         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
17852         (re_xnrealloc, re_x2nrealloc): New inline functions.
17853         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
17854         parse_bracket_exp):
17855         (build_equiv_class, build_charclass): Check for arithmetic overflow
17856         in size expression calculations.
17857         * lib/regex_internal.c (re_string_realloc_buffers):
17858         (build_wcs_upper_buffer, re_node_set_add_intersect):
17859         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
17860         (re_dfa_add_node, register_state): Likewise.
17861         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
17862         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
17863         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
17864         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
17865
17866 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17867
17868         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17869         m4/ulonglong.m4.  Problem reported by Martin Lambers.
17870
17871 2005-09-02  Bruno Haible  <bruno@clisp.org>
17872
17873         Support for lib vs. lib64 distinction on biarch platforms.
17874         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
17875         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
17876         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
17877
17878 2005-09-02  Bruno Haible  <bruno@clisp.org>
17879
17880         * gnulib-tool (import): In the other first-use case, provide defaults
17881         as well.
17882
17883 2005-09-02  Bruno Haible  <bruno@clisp.org>
17884
17885         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
17886         patches not yet found in the latest gettext release.
17887
17888 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17889
17890         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
17891         to avoid a collision with bits/local_lim.h in glibc.
17892         All uses changed.  Problem reported by Dmitry V. Levin in
17893         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
17894
17895         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
17896         bugs in int versus size_t comparisons.
17897         (re_string_context_at): Fix bug where the code assumed that
17898         Idx is signed.
17899
17900         Use bool where appropriate.
17901         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
17902         All callers changed.
17903         (calc_eclosure_iter): Likewise, for ROOT arg.
17904         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
17905         (build_charclass_op): Likewise, for NON_MATCH arg.
17906         * lib/regex_internal.c (re_string_allocate, re_string_construct):
17907         (re_string_construct_common): Likewise, for ICASE arg.
17908         * lib/regexec.c (re_search_2_stub, re_search_stub):
17909         Likewise, for RET_LEN arg.
17910         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
17911         (set_regs): Likewise, for FL_BACKTRACK arg.
17912         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
17913         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
17914         (calc_eclosure_iter, parse_bracket_exp):
17915         Use bool for internal variables that are booleans.
17916         * lib/regexec.c (re_search_internal, check_matching,
17917         proceed_next_node):
17918         (set_regs, build_sifted_states, sift_states_bkref):
17919         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
17920         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
17921         (find_collation_sequence_value):
17922         Likewise.
17923         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
17924         (re_node_set_compare):
17925         Return bool, not int. All callers changed.
17926         * lib/regexec.c (check_halt_node_context, check_dst_limits):
17927         (build_trtable, check_node_accept): Likewise.
17928         * lib/regex_internal.h: Include stdbool.h.
17929
17930         Fix bugs uncovered when converting to bool.
17931         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
17932         failure instead of charging ahead blindly.
17933         * lib/regex_internal.c (register_state): Likewise.
17934         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
17935         for freeing internal storage.
17936         (group_nodes_into_DFA_states): Use unsigned int, not int, for
17937         bitset pieces used as boolean, to avoid undefined behavior
17938         on hosts that do int overflow checking.
17939
17940 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17941
17942         * config/srclist.txt: Add glibc bugs 1285-1287.
17943
17944 2005-09-01  Jim Meyering  <jim@meyering.net>
17945
17946         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
17947         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
17948         Require gl_STAT_MACROS, too.
17949
17950 2005-09-01  Bruno Haible  <bruno@clisp.org>
17951
17952         * gnulib-tool (import): In the first-use case, provide defaults.
17953
17954 2005-09-01  Bruno Haible  <bruno@clisp.org>
17955
17956         * gnulib-tool (func_import): Remove the .tmp files.
17957
17958 2005-09-01  Bruno Haible  <bruno@clisp.org>
17959
17960         * gnulib-tool (func_import): Fix handling of symbolic links.
17961
17962 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17963
17964         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
17965         old glibc regex code mishandles strings longer than 2**31 bytes.
17966         This patch fixes this when the regex code is used in gnulib
17967         (i.e., outside glibc).
17968
17969         This patch should not affect the use of the regex code inside
17970         glibc.  No doubt this problem also needs to be handled for glibc
17971         as well, but the result will be an incompatible change to the
17972         glibc ABI, and the old ABI will have to be supported too.  That
17973         can be the the subject for another patch.
17974
17975         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
17976         governing whether the rest of this patch is active.  By default,
17977         the macro is disabled and the patch has no effect.
17978         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
17979         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
17980         (struct re_pattern_buffer, re_search, re_search_2, re_match):
17981         (re_match_2, re_set_registers): Use the new types.
17982         * lib/regex_internal.h (Idx, re_hashval_t): New types.
17983         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
17984         New macros.
17985         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
17986         (re_string_context_at, bin_tree_t, re_dfastate_t):
17987         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
17988         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
17989         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
17990         (re_string_char_size_at, re_string_wchar_at):
17991         (re_string_elem_size_at):
17992         Use the new types and macros to port to 64-bit hosts.
17993         Use unsigned types for internal values, so that the code
17994         mostly works even for arrays larger than SSIZE_MAX.
17995         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
17996         (search_duplicated_node, calc_eclosure_iter, fetch_number):
17997         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
17998         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
17999         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
18000         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
18001         (calc_inveclosure, parse_dup_op, build_range_exp):
18002         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
18003         (fetch_number, create_token_tree, mark_opt_subexp):
18004         Likewise.
18005         * lib/regex_internal.c (re_string_construct_common,
18006         create_ci_newstate):
18007         (create_cd_newstate, re_string_allocate, re_string_construct):
18008         (re_string_realloc_buffers, build_wcs_upper_buffer):
18009         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18010         (re_string_reconstruct, re_string_peek_byte_case):
18011         (re_string_fetch_byte_case, re_string_context_at):
18012         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18013         (re_node_set_init_copy, re_node_set_add_intersect):
18014         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18015         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18016         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18017         (re_acquire_state, re_acquire_state_context, register_state):
18018         Likewise.
18019         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
18020         search_cur_bkref_entry):
18021         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
18022         (re_search_internal, re_search_2_stub, re_search_stub)
18023         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
18024         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
18025         (update_cur_sifted_state, check_dst_limits):
18026         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18027         (check_subexp_limits, sift_states_bkref, merge_state_array):
18028         (check_subexp_matching_top, get_subexp, get_subexp_sub):
18029         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
18030         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18031         (expand_bkref_cache, check_node_accept_bytes):
18032         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
18033         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
18034         (acquire_init_state_context, check_halt_node_context):
18035         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
18036         (sift_states_backward, clean_state_log_if_needed):
18037         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
18038         (find_recover_state, transit_state_sb, transit_state_mb):
18039         (transit_state_bkref, build_trtable, match_ctx_clean):
18040         Likewise.
18041         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
18042         to work around an assumption that REG_MISSING is negative.
18043
18044         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
18045         (seek_collating_symbol_entry) [defined _LIBC]:
18046         (lookup_collation_sequence_value) [defined _LIBC]:
18047         (build_range_exp, build_collating_symbol) [defined _LIBC]:
18048         Use prototypes rather than old-style function definitions.
18049         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
18050         (transit_state_sb) [0]:
18051         (find_collation_sequence_value) [defined _LIBC]: Likewise.
18052
18053         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
18054         rm_eo.
18055
18056         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
18057         (optimize_subexps, lower_subexp):
18058         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
18059         since the signed shift might overflow.  Use 1u<<31 instead.
18060         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18061         Likewise.
18062         * lib/regexec.c (check_dst_limits_calc_pos_1,
18063         check_subexp_matching_top): Likewise.
18064
18065         * lib/regcomp.c (optimize_subexps, lower_subexp):
18066         Use CHAR_BIT rather than 8, for clarity.
18067         * lib/regexec.c (check_dst_limits_calc_pos_1):
18068         (check_subexp_matching_top): Likewise.
18069         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
18070         have to worry about portability issues when shifting it left.
18071         Remove no-longer-needed test for table_size > 0.
18072         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
18073         in a word, as the resulting behavior is undefined.
18074         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
18075         in one case, a <= should have been an <, and in another case the
18076         whole test was missing.
18077         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
18078         the standard name CHAR_BIT.
18079         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
18080         this is not true on one's complement and signed-magnitude hosts.
18081
18082         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
18083         next_last_offset.
18084         (struct re_dfa_t): Remove unused member states_alloc.
18085         * lib/regcomp.c (init_dfa): Don't initialize unused members.
18086
18087 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18088
18089         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
18090         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
18091         and large-file glibc and in 32-bit large-file Solaris.
18092
18093 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18094
18095         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
18096         lengths fit in regoff_t; this isn't true if regoff_t is the same
18097         width as size_t.
18098         * lib/regex.c (re_search_internal): 5th arg is LAST_START
18099         (= START + RANGE) instead of RANGE.  This avoids overflow
18100         problems when regoff_t is the same width as size_t.
18101         All callers changed.
18102         (re_search_2_stub): Check for overflow when adding the
18103         sizes of the two strings.
18104         (re_search_stub): Check for overflow when adding START
18105         to RANGE; if it occurs, substitute the extreme value.
18106
18107 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18108
18109         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
18110
18111 2005-08-31  Jim Meyering  <jim@meyering.net>
18112
18113         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
18114         a pointer-to-const.
18115         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
18116         (register_state): Likewise.
18117         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
18118         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18119         (group_nodes_into_DFAstates): Likewise.
18120
18121 2005-08-31  Jim Meyering  <jim@meyering.net>
18122
18123         * check-module: Add a FIXME comment.
18124
18125 2005-08-31  Eric Blake  <ebb9@byu.net>
18126
18127         * modules/unistd-safer (Files): Add unistd--.h.
18128         * modules/stdio-safer (Files): Add stdio--.h.
18129
18130 2005-08-31  Derek Price  <derek@ximbiot.com>
18131
18132         * lib/getdelim.c (getdelim): Return EOF on EOF.
18133         Reported by Larry Jones <lawrence.jones@ugs.com>.
18134
18135 2005-08-31  Bruno Haible  <bruno@clisp.org>
18136
18137         Avoid unnecessary diffs in the generated lib/Makefile.am.
18138         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
18139         the generated files.
18140         (func_import): Don't set cmd.
18141
18142 2005-08-31  Bruno Haible  <bruno@clisp.org>
18143
18144         * lib/strstr.c: Include <stddef.h>, for NULL.
18145         * lib/strcasestr.c: Likewise.
18146         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
18147
18148 2005-08-31  Bruno Haible  <bruno@clisp.org>
18149
18150         * gnulib-tool: New option --macro-prefix.
18151         (func_import): Use macro_prefix.
18152         (import): Handle option --macro-prefix.
18153
18154 2005-08-31  Bruno Haible  <bruno@clisp.org>
18155
18156         * gnulib-tool (import): Rename most ac_* variables to cached_*.
18157         Also use new variables cached_lgpl, cached_libtool.
18158
18159 2005-08-31  Bruno Haible  <bruno@clisp.org>
18160
18161         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
18162         always instantiating them.
18163
18164 2005-08-31  Bruno Haible  <bruno@clisp.org>
18165
18166         * gnulib-tool (func_import): Read the previous cached settings
18167         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
18168         earlier added by gnulib but are now dropped. Warn when a gnulib file
18169         overwrites a non-gnulib file.
18170
18171 2005-08-31  Bruno Haible  <bruno@clisp.org>
18172
18173         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
18174         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
18175         projects that don't keep autogenerated files in CVS. Put into
18176         actioncmd only the specified modules, not the transitive closure.
18177
18178 2005-08-31  Bruno Haible  <bruno@clisp.org>
18179
18180         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
18181         Create directories that shall be filled.
18182         (import): Don't look for gl_* macros in configure.ac. Recurse across
18183         all directories containing a gnulib-cache.m4 files, if meaningful.
18184
18185 2005-08-31  Bruno Haible  <bruno@clisp.org>
18186
18187         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
18188         (import): Set seen_libtool when we see gl_LIBTOOL.
18189
18190 2005-08-31  Bruno Haible  <bruno@clisp.org>
18191
18192         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
18193         declaration macro definitions from generated gnulib.m4.
18194
18195 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
18196
18197         * lib/iconvme.h: Add prototype for iconv_alloc.
18198
18199 2005-08-29  Simon Josefsson  <jas@extundo.com>
18200
18201         * lib/iconvme.c: Fix errno.
18202
18203 2005-08-29  Bruno Haible  <bruno@clisp.org>
18204
18205         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
18206         that it works when the directory contains spaces.
18207
18208 2005-08-29  Bruno Haible  <bruno@clisp.org>
18209
18210         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
18211
18212 2005-08-29  Bruno Haible  <bruno@clisp.org>
18213
18214         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
18215         Emit more advice.
18216
18217 2005-08-29  Bruno Haible  <bruno@clisp.org>
18218         and Stepan Kasal  <kasal@ucw.cz>
18219
18220         * check-module: If more parameters are given, check each of them
18221         separately; add more exceptions, as noted by Jim Meyering.
18222         (check_module): New procedure.
18223         (%exempt_header): Now contains all exceptions.
18224
18225 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
18226
18227         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
18228
18229 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18230
18231         * lib/iconvme.c: Split iconv_string into iconv_alloc.
18232
18233 2005-08-28  Bruno Haible  <bruno@clisp.org>
18234
18235         * m4/gnulib-tool.m4: New file.
18236
18237 2005-08-27  Jim Meyering  <jim@meyering.net>
18238
18239         * modules/unistd-safer (Files): Add pipe-safer.c.
18240         * modules/fcntl-safer (Files): Add creat-safer.c.
18241
18242 2005-08-27  Jim Meyering  <jim@meyering.net>
18243
18244         * m4/stdlib-safer.m4: New file.  From coreutils.
18245         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
18246         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
18247         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
18248         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
18249         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
18250
18251 2005-08-27  Jim Meyering  <jim@meyering.net>
18252
18253         * lib/fopen-safer.c: Merge minor changes from coreutils.
18254         * lib/dup-safer.c: Likewise.
18255         * lib/fd-safer.c: Likewise.
18256
18257         Merge from coreutils.
18258         * lib/stdio--.h: New file.
18259         * lib/stdlib--.h: New file.
18260         * lib/mkstemp-safer.c: New file.
18261
18262         GNU tar needs these.
18263         * lib/pipe-safer.c: New file.
18264         * lib/creat-safer.c: New file.
18265         * lib/fcntl--.h (creat): Define to creat_safer.
18266         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
18267         * lib/unistd--.h (pipe): Define to pipe_safer.
18268         * lib/unistd-safer.h: Declare pipe_safer.
18269
18270 2005-08-26  Simon Josefsson  <jas@extundo.com>
18271
18272         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
18273         Haible <bruno@clisp.org>.
18274
18275 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
18276
18277         * lib/regex_internal.h: Remove all references to
18278         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
18279         or better.
18280         (bitset_not, bitset_merge, bitset_not_merge):
18281         (bitset_mask, re_string_allocate, re_string_construct):
18282         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
18283         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
18284         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
18285         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
18286         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18287         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18288         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
18289         (re_acquire_state_context):
18290         Remove unnecessary forward decls.
18291         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
18292         Put __attribute at function definition,
18293         now that the function decl has been removed.
18294         * lib/regex_internal.c (re_string_peek_byte_case):
18295         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
18296         Likewise.
18297
18298 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
18299
18300         * m4/regex.m4: Add AC_PREREQ(2.50).
18301         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
18302
18303 2005-08-25  Simon Josefsson  <jas@extundo.com>
18304
18305         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
18306         __fsetlocking.
18307
18308 2005-08-25  Simon Josefsson  <jas@extundo.com>
18309
18310         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
18311         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
18312         GLIBC specific code.
18313
18314 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18315
18316         Make regex safe for g++.  This fixes one real bug (an "err"
18317         that should have been "*err").  g++ problem reported by
18318         Sam Steingold.
18319         * lib/regex_internal.h (re_calloc): New macro, consistent with
18320         re_malloc etc.  All callers of calloc changed to use re_calloc.
18321         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
18322         not int.  All callers changed.
18323         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
18324         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
18325         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
18326         (find_recover_state): Change "err" to "*err"; this fixes what
18327         appears to be a real bug.
18328         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
18329         versus int.
18330
18331 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18332
18333         * modules/regex (Depends-on): Add malloc, since the code
18334         assumes that !malloc(0) means failure.
18335
18336 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18337
18338         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
18339
18340         alloca modernization/simplification for regex.
18341         * lib/regex.c: Remove portability cruft for alloca.  This no longer
18342         needs to be at the start of the file, and can be moved into
18343         regex_internal.h and simplified.
18344         * lib/regex_internal.h: Include <alloca.h>.
18345         (__libc_use_alloca) [!defined _LIBC]: New macro.
18346         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
18347         now works outside glibc.
18348
18349 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18350
18351         * config/srclist.txt: Add glibc bugs 1241, 1245.
18352
18353 2005-08-25  Jim Meyering  <jim@meyering.net>
18354
18355         * lib/open-safer.c: Include <config.h>.
18356         Otherwise, we'd lose LARGEFILE support in any file using
18357         e.g. "fcntl--.h"
18358
18359 2005-08-25  Bruno Haible  <bruno@clisp.org>
18360
18361         * m4/minmax.m4: Require autoconf 2.52.
18362         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
18363         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
18364         alternatives of translit over the alphabet.
18365         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
18366
18367 2005-08-24  Simon Josefsson  <jas@extundo.com>
18368
18369         * tests/test-getpass.c: New file.
18370
18371 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18372
18373         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
18374         for GNU regex features.
18375
18376 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18377
18378         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
18379         * lib/regex.h (regerror): Likewise.
18380
18381         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
18382         requires this.  (The code never needed it.)
18383
18384         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
18385         All uses of recently-renamed identifiers changed to use the new,
18386         POSIX-compliant names.  The code will build and run just fine
18387         without these changes, but it's better to eat our own dog food
18388         and use the standard-conforming names.
18389
18390         * lib/regex.h: Fix a multitude of POSIX name space violations.
18391         These changes have an effect only for programs that define
18392         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
18393         do not change anything for programs compiled in the normal way.
18394         Also, there is no effect on the ABI.
18395
18396         (_REGEX_SOURCE): New macro.
18397         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
18398         defined and _GNU_SOURCE is not; this fixes a name space violation.
18399
18400         Rename the following macros to obey POSIX requirements.
18401         The old names are still visible as macros if _REGEX_SOURCE is defined.
18402         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
18403         RE_BACKSLASH_ESCAPE_IN_LISTS.
18404         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
18405         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
18406         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
18407         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
18408         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
18409         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
18410         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
18411         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
18412         (REG_INTERVALS): renamed from RE_INTERVALS.
18413         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
18414         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
18415         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
18416         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
18417         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
18418         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
18419         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
18420         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
18421         RE_UNMATCHED_RIGHT_PAREN_ORD.
18422         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
18423         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
18424         (REG_DEBUG): renamed from RE_DEBUG.
18425         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
18426         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
18427         unusual, since we can't clash with the POSIX REG_ICASE.
18428         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
18429         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
18430         (REG_NO_SUB): renamed from RE_NO_SUB.
18431         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
18432         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
18433         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
18434         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
18435         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
18436         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
18437         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
18438         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
18439         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
18440         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
18441         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
18442         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
18443         RE_SYNTAX_POSIX_MINIMAL_BASIC.
18444         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
18445         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
18446         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
18447         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
18448         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
18449         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
18450         (REG_FIXED): Renamed from REGS_FIXED.
18451         (REG_NREGS): Renamed from RE_NREGS.
18452
18453         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
18454         of other REG_* macros, since POSIX says the user is allowed to
18455         #undef these macros selectively.
18456
18457         (reg_errcode_t): Update comment stating what other tables need
18458         to be consistent.
18459
18460         Rename the following enum values to obey POSIX requirements.
18461         The old names are still visible as macros.
18462         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
18463         is not defined, since GNU is supposed to be a superset of POSIX as
18464         much as possible, and since we want reg_errcode_t to be a signed
18465         type for implementation consistency.
18466         (_REG_NOERROR): Renamed from REG_NOERROR.
18467         (_REG_NOMATCH): Renamed from REG_NOMATCH.
18468         (_REG_BADPAT): Renamed from REG_BADPAT.
18469         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
18470         (_REG_ECTYPE): Renamed from REG_ECTYPE.
18471         (_REG_EESCAPE): Renamed from REG_EESCAPE.
18472         (_REG_ESUBREG): Renamed from REG_ESUBREG.
18473         (_REG_EBRACK): Renamed from REG_EBRACK.
18474         (_REG_EPAREN): Renamed from REG_EPAREN.
18475         (_REG_EBRACE): Renamed from REG_EBRACE.
18476         (_REG_BADBR): Renamed from REG_BADBR.
18477         (_REG_ERANGE): Renamed from REG_ERANGE.
18478         (_REG_ESPACE): Renamed from REG_ESPACE.
18479         (_REG_BADRPT): Renamed from REG_BADRPT.
18480         (_REG_EEND): Renamed from REG_EEND.
18481         (_REG_ESIZE): Renamed from REG_ESIZE.
18482         (_REG_ERPAREN): Renamed from REG_ERPAREN.
18483         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
18484         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
18485         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
18486         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
18487
18488         (_REG_RE_NAME, _REG_RM_NAME): New macros.
18489         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
18490         changed.  But support the old name if the new one is not defined
18491         and if _REGEX_SOURCE.
18492
18493         Change the following member names in struct re_pattern_buffer.
18494         The old names are still supported if !_REGEX_SOURCE.
18495         The new names are always supported, regardless of _REGEX_SOURCE.
18496         (re_buffer): Renamed from buffer.
18497         (re_allocated): Renamed from allocated.
18498         (re_used): Renamed from used.
18499         (re_syntax): Renamed from syntax.
18500         (re_fastmap): Renamed from fastmap.
18501         (re_translate): Renamed from translate.
18502         (re_can_be_null): Renamed from can_be_null.
18503         (re_regs_allocated): Renamed from regs_allocated.
18504         (re_fastmap_accurate): Renamed from fastmap_accurate.
18505         (re_no_sub): Renamed from no_sub.
18506         (re_not_bol): Renamed from not_bol.
18507         (re_not_eol): Renamed from not_eol.
18508         (re_newline_anchor): Renamed from newline_anchor.
18509
18510         Change the following member names in struct re_registers.
18511         The old names are still supported if !_REGEX_SOURCE.
18512         The new names are always supported, regardless of _REGEX_SOURCE.
18513         (rm_num_regs): Renamed from num_regs.
18514         (rm_start): Renamed from start.
18515         (rm_end): Renamed from end.
18516
18517         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
18518         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
18519         Prepend __ to parameter names.
18520
18521         Undo yesterday's changes.
18522
18523 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18524
18525         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
18526         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
18527         lib/regex.c.
18528
18529 2005-08-24  Jim Meyering  <jim@meyering.net>
18530
18531         Sync from coreutils.
18532         * m4/fcntl-safer.m4: New file.
18533
18534         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
18535         and object files for this module.
18536
18537 2005-08-24  Jim Meyering  <jim@meyering.net>
18538
18539         Sync from coreutils.
18540         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
18541
18542 2005-08-24  Jim Meyering  <jim@meyering.net>
18543
18544         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
18545         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
18546
18547 2005-08-24  Jim Meyering  <jim@meyering.net>
18548
18549         * modules/fcntl-safer: New module.
18550         * modules/fts (Depends-on): Add fcntl-safer.
18551         * MODULES.html.sh (File descriptor based Input/Output):
18552         Add fcntl-safer.
18553
18554 2005-08-24  Bruno Haible  <bruno@clisp.org>
18555
18556         Support for unit test modules.
18557         * modules/README: Mention tests modules.
18558         * modules/TEMPLATE-TESTS: New file.
18559         * gnulib-tool: New options --extract-tests-module, --with-tests and
18560         --tests-base (unused for the moment).
18561         (testsbase, inctests): New variables.
18562         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
18563         (func_verify_module): Exclude TEMPLATE-TESTS.
18564         (func_verify_nontests_module, func_verify_tests_module): New functions.
18565         (func_get_dependencies): Add implicit dependency for tests modules.
18566         (func_get_tests_module): New function.
18567         (func_modules_transitive_closure): When --with-tests was specified,
18568         include the unit tests as well, unless explicitly avoided.
18569         (func_emit_lib_Makefile_am): Ignore the tests modules here.
18570         (func_emit_tests_Makefile_am): New function.
18571         (func_create_testdir): When --with-tests was specified, emit a
18572         tests/ directory.
18573         * MODULES.html.sh (Future developments): Update.
18574
18575 2005-08-24  Bruno Haible  <bruno@clisp.org>
18576
18577         * modules/tls-tests: New file.
18578         * tests/test-tls.c: New file, from GNU gettext.
18579
18580 2005-08-24  Bruno Haible  <bruno@clisp.org>
18581
18582         * modules/lock-tests: New file.
18583         * tests/test-lock.c: New file, from GNU gettext.
18584
18585 2005-08-24  Bruno Haible  <bruno@clisp.org>
18586
18587         * lib/lock.h: Add multiple inclusion guard.
18588         * lib/tls.h: Add multiple inclusion guard.
18589
18590 2005-08-24  Bruno Haible  <bruno@clisp.org>
18591
18592         * gnulib-tool: Add support for the --aux-dir option to
18593         --create-testdir, --create-megatestdir, --test, --megatest.
18594         (func_create_testdir, func_create_megatestdir): Optionally emit a
18595         AC_CONFIG_AUX_DIR directive.
18596         (create-testdir, create-megatestdir, test, megatest): Provide a
18597         default value for $auxdir.
18598
18599 2005-08-24  Bruno Haible  <bruno@clisp.org>
18600
18601         * gnulib-tool (import): Use compound statement instead of subshell
18602         where possible.
18603
18604 2005-08-24  Bruno Haible  <bruno@clisp.org>
18605
18606         * gnulib-tool (import): Change --aux-dir default to "build-aux".
18607
18608 2005-08-24  Bruno Haible  <bruno@clisp.org>
18609
18610         * gnulib-tool (func_version): Update.
18611
18612 2005-08-24  Bruno Haible  <bruno@clisp.org>
18613
18614         * gnulib-tool (func_import, func_create_testdir,
18615         func_create_megatestdir): Quote all autoconf macro arguments.
18616
18617 2005-08-24  Bruno Haible  <bruno@clisp.org>
18618
18619         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
18620         option --force, because --force causes the aclocal.m4 of each
18621         subdirectory to be newer than the corresponding config.h.in.
18622
18623 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18624
18625         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
18626         All contents moved to gl_REGEX.
18627         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
18628         assume that it does.
18629
18630 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18631
18632         * lib/regex.h (REG_NOSYS)
18633         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
18634         Define, since POSIX requires it as of 2001.
18635         (_REG_ENOSYS)
18636         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
18637         New private symbol, used to keep the enum signed in all cases.
18638         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
18639         Youngman in
18640         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
18641
18642         * lib/regex_internal.c (re_string_skip_chars, register_state):
18643         (calc_state_hash):
18644         Remove forward decls; no longer needed now that we use prototypes.
18645         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
18646         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
18647         (clean_state_log_if_needed): Likewise.
18648
18649 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18650
18651         * config/srclist.txt: Add glibc bugs 1231-1233.
18652
18653 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18654
18655         Fix problems reported by Sam Steingold in
18656         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
18657         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
18658         assumed that reg_errcode_t is a signed type, which is not
18659         necessarily true if _XOPEN_SOURCE is not defined.
18660         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
18661         since some compilers warn about it otherwise.
18662
18663 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18664
18665         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
18666         (init_word_char, create_initial_state, duplicate_node_closure):
18667         (fetch_token, peek_token_bracket, build_range_exp):
18668         (build_collating_symbol): Remove forward decls; no longer needed
18669         now that we use prototypes.
18670
18671         * lib/regcomp.c:
18672         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
18673         (re_compile_fastmap_iter, regcomp, regerror, regfree):
18674         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
18675         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
18676         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
18677         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
18678         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
18679         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
18680         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
18681         (build_range_exp, build_collating_symbol, parse_bracket_exp):
18682         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
18683         (build_charclass, build_charclass_op, fetch_number, create_tree):
18684         (create_token_tree, mark_opt_subexp, duplicate_tree):
18685         Use prototypes rather than old-style definitions.
18686
18687         * lib/regex_internal.c:
18688         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
18689         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
18690         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18691         (re_string_reconstruct, re_string_peek_byte_case):
18692         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
18693         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18694         (re_node_set_init_copy, re_node_set_add_intersect):
18695         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18696         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18697         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18698         (re_acquire_state, re_acquire_state_context, register_state):
18699         (create_ci_newstate, create_cd_newstate, free_state):
18700         Likewise.
18701         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
18702         re_search_2):
18703         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
18704         (re_search_internal, prune_impossible_nodes):
18705         (acquire_init_state_context, check_matching, static):
18706         (check_halt_node_context, check_halt_state_context, proceed_next_node):
18707         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
18708         (update_regs, sift_states_backward, build_sifted_states):
18709         (clean_state_log_if_needed, merge_state_array):
18710         (update_cur_sifted_state, add_epsilon_src_nodes):
18711         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
18712         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
18713         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
18714         (find_recover_state, check_subexp_matching_top, transit_state_mb):
18715         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
18716         (check_arrival, check_arrival_add_next_nodes):
18717         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18718         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18719         (check_node_accept_bytes, check_node_accept, extend_buffers):
18720         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
18721         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
18722         (sift_ctx_init):
18723         Likewise.
18724
18725         * lib/regex_internal.h:
18726         (re_string_allocate, re_string_construct, re_string_reconstruct):
18727         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
18728         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
18729         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
18730         (re_string_context_at, re_string_peek_byte_case):
18731         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
18732         is defined, since we now use prototypes always.
18733
18734         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
18735         C89 or better.  All uses removed.
18736
18737 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18738
18739         * config/srclist.txt: Add glibc bugs 1220-1227.
18740
18741 2005-08-20  Jim Meyering  <jim@meyering.net>
18742
18743         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
18744         of unused local, dfa.
18745
18746 2005-08-20  Bruno Haible  <bruno@clisp.org>
18747
18748         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
18749
18750 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18751
18752         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
18753         (re_node_set_insert_last, re_dfa_add_node):
18754         Rename local variables to avoid GCC shadowing warnings.
18755
18756 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18757
18758         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
18759         [defined lint]: Suppress bogus uninitialized-variable warnings.
18760
18761         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
18762         and let the caller return REG_ESPACE if out of space.  This
18763         removes an uninitialied-variable warning with GCC 4.0.1, and also
18764         avoids taking the address of a local variable.  All callers
18765         changed.
18766
18767 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18768
18769         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
18770         $LIBCSRC/posix/regexec.c.
18771         Add glibc bug 1217 for regcomp.c.
18772
18773 2005-08-19  Jim Meyering  <jim@meyering.net>
18774
18775         * lib/regexec.c (proceed_next_node): Redo local variables to
18776         avoid GCC shadowing warnings.
18777
18778 2005-08-18  Bruno Haible  <bruno@clisp.org>
18779
18780         * lib/strstr.c (strstr): Fix return value in multibyte case.
18781         * lib/strcasestr.c (strcasestr): Likewise.
18782
18783 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18784
18785         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
18786
18787 2005-08-17  Jim Meyering  <jim@meyering.net>
18788
18789         Make the %s format (seconds since the epoch) work for a negative
18790         number and when used with a zero-padded field width, e.g. %015s.
18791
18792         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
18793         label so that it precedes the code to set `digits'.  Otherwise,
18794         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
18795         print `00-22'.  Now, it prints `-0022', as it should.
18796
18797 2005-08-17  Bruno Haible  <bruno@clisp.org>
18798
18799         * modules/strstr (Files): Add m4/mbrtowc.m4.
18800         (Depends-on): Add mbuiter.
18801
18802 2005-08-17  Bruno Haible  <bruno@clisp.org>
18803
18804         * modules/strcasestr: New file.
18805         * MODULES.html.sh (String handling, based on ANSI C 89): Add
18806         strcasestr.
18807
18808 2005-08-17  Bruno Haible  <bruno@clisp.org>
18809
18810         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
18811
18812 2005-08-17  Bruno Haible  <bruno@clisp.org>
18813
18814         * modules/mbuiter: New file.
18815         * MODULES.html.sh (Extended multibyte and wide character utilities):
18816         Add mbuiter.
18817
18818 2005-08-17  Bruno Haible  <bruno@clisp.org>
18819
18820         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
18821         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
18822
18823 2005-08-17  Bruno Haible  <bruno@clisp.org>
18824
18825         * m4/strcasestr.m4: New file.
18826
18827 2005-08-17  Bruno Haible  <bruno@clisp.org>
18828
18829         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
18830         * lib/strstr.c: Completely rewritten, with multibyte locale support.
18831
18832 2005-08-17  Bruno Haible  <bruno@clisp.org>
18833
18834         * lib/strcasestr.h: New file.
18835         * lib/strcasestr.c: New file.
18836
18837 2005-08-17  Bruno Haible  <bruno@clisp.org>
18838
18839         * lib/strcasecmp.c: Use mbuiter.h.
18840
18841 2005-08-17  Bruno Haible  <bruno@clisp.org>
18842
18843         * lib/mbuiter.h: New file.
18844
18845 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
18846
18847         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
18848         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
18849         and gl_GETOPT are both invoked via different paths (as happens
18850         with GNU tar CVS because it uses both argp and getopt), the former
18851         wins.
18852
18853 2005-08-16  Bruno Haible  <bruno@clisp.org>
18854
18855         * modules/tls: New file.
18856         * MODULES.html.sh (Multithreading): Add tls.
18857
18858 2005-08-16  Bruno Haible  <bruno@clisp.org>
18859
18860         * modules/strnlen1: New file.
18861         * MODULES.html.sh (String handling): Add strnlen1.
18862
18863 2005-08-16  Bruno Haible  <bruno@clisp.org>
18864
18865         * modules/strcase (Files): Add m4/mbrtowc.m4.
18866         (Depends-on): Add strnlen1, mbchar.
18867
18868 2005-08-16  Bruno Haible  <bruno@clisp.org>
18869
18870         * modules/mbiter: New file.
18871         * MODULES.html.sh (Extended multibyte and wide character utilities):
18872         Add mbiter.
18873
18874 2005-08-16  Bruno Haible  <bruno@clisp.org>
18875
18876         * modules/mbfile: New file.
18877         * MODULES.html.sh (Extended multibyte and wide character utilities):
18878         Add mbfile.
18879
18880 2005-08-16  Bruno Haible  <bruno@clisp.org>
18881
18882         * modules/mbchar: New file.
18883         * MODULES.html.sh (Extended multibyte and wide character utilities):
18884         New section.
18885
18886 2005-08-16  Bruno Haible  <bruno@clisp.org>
18887
18888         * m4/tls.m4: New file, from GNU gettext.
18889
18890 2005-08-16  Bruno Haible  <bruno@clisp.org>
18891
18892         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
18893         always.
18894         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
18895
18896 2005-08-16  Bruno Haible  <bruno@clisp.org>
18897
18898         * m4/mbiter.m4: New file.
18899
18900 2005-08-16  Bruno Haible  <bruno@clisp.org>
18901
18902         * m4/mbfile.m4: New file.
18903
18904 2005-08-16  Bruno Haible  <bruno@clisp.org>
18905
18906         * m4/mbchar.m4: New file.
18907
18908 2005-08-16  Bruno Haible  <bruno@clisp.org>
18909
18910         * lib/tls.h: New file, from GNU gettext.
18911         * lib/tls.c: New file, from GNU gettext.
18912
18913 2005-08-16  Bruno Haible  <bruno@clisp.org>
18914
18915         * lib/strnlen1.h: New file.
18916         * lib/strnlen1.c: New file.
18917
18918 2005-08-16  Bruno Haible  <bruno@clisp.org>
18919
18920         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
18921         (mbi_init): Update.
18922         (mbi_avail, mbi_advance): Let the iteration end before the terminating
18923         NUL byte, not after it.
18924
18925 2005-08-16  Bruno Haible  <bruno@clisp.org>
18926
18927         * lib/strcase.h (strcasecmp): Add note in comments.
18928         * lib/strncasecmp.c: Use code from strcasecmp.c.
18929         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
18930         (strcasecmp): Work correctly in multibyte locales.
18931
18932 2005-08-16  Bruno Haible  <bruno@clisp.org>
18933
18934         * lib/mbiter.h: New file.
18935
18936 2005-08-16  Bruno Haible  <bruno@clisp.org>
18937
18938         * lib/mbfile.h: New file.
18939
18940 2005-08-16  Bruno Haible  <bruno@clisp.org>
18941
18942         * lib/mbchar.h: New file.
18943         * lib/mbchar.c: New file.
18944
18945 2005-08-16  Bruno Haible  <bruno@clisp.org>
18946
18947         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
18948         the valid ones. Makes the comparison operations transitive:
18949         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
18950         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
18951
18952 2005-08-15  Simon Josefsson  <jas@extundo.com>
18953
18954         * modules/ssize_t (License): Change to 'unlimited'.
18955
18956         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
18957
18958 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
18959
18960         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
18961         Add comments for each pending glibc patch.
18962
18963 2005-08-15  Bruno Haible  <bruno@clisp.org>
18964
18965         * lib/regex.h (__restrict_arr): Don't define to __restrict if
18966         __cplusplus is defined.
18967
18968 2005-08-14  Jim Meyering  <jim@meyering.net>
18969
18970         Sync from coreutils.
18971
18972         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
18973         Use the hash-table-based cycle-detection code not just when
18974         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
18975         Reported by James Youngman in
18976         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
18977         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
18978         FTS_TIGHT_CYCLE_CHECK.
18979         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
18980         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
18981         once again.
18982         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
18983         * lib/fts.c (fd_safer): Remove decl.
18984         Include fcntl--.h rather than unistd-safer.h
18985         (fts_safe_changedir): Don't call fd_safer; no longer needed
18986         now that we include fcntl--.h.
18987
18988 2005-08-12  Simon Josefsson  <jas@extundo.com>
18989
18990         * modules/getndelim2: Use ssize_t module.
18991         * modules/getnline: Likewise.
18992         * modules/safe-read: Likewise.
18993         * modules/xreadlink: Likewise.
18994
18995         * modules/ssize_t: New file.
18996
18997 2005-08-12  Simon Josefsson  <jas@extundo.com>
18998
18999         * m4/readline.m4: Look for termcap, curses or ncurses if required.
19000
19001 2005-08-12  Simon Josefsson  <jas@extundo.com>
19002
19003         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19004         ssize_t.
19005
19006 2005-08-12  Simon Josefsson  <jas@extundo.com>
19007
19008         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
19009         readline, getdelim and check_version.
19010         (Support for systems lacking ISO C 99: Sizes of integer types):
19011         Add size_max.
19012
19013 2005-08-12  Bruno Haible  <bruno@clisp.org>
19014
19015         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
19016
19017 2005-08-11  Simon Josefsson  <jas@extundo.com>
19018
19019         * modules/readline: New file.
19020
19021         * modules/strnlen (Files): Add strnlen.h.
19022
19023 2005-08-11  Simon Josefsson  <jas@extundo.com>
19024
19025         * m4/readline.m4: New file.
19026
19027 2005-08-11  Simon Josefsson  <jas@extundo.com>
19028
19029         * lib/readline.h, readline.c: New file.
19030
19031 2005-08-11  Simon Josefsson  <jas@extundo.com>
19032
19033         * doc/gnulib.texi (Initial import, Finishing touches): Mention
19034         gl_AVOID.
19035
19036 2005-08-11  Bruno Haible  <bruno@clisp.org>
19037
19038         * lib/strnlen.h (strnlen): Change parameter name to match comment.
19039
19040 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
19041
19042         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
19043
19044 2005-08-10  Simon Josefsson  <jas@extundo.com>
19045
19046         * tests/test-iconvme.c: New file.
19047
19048 2005-08-10  Simon Josefsson  <jas@extundo.com>
19049
19050         * m4/strnlen.m4: New file.
19051
19052         * m4/strndup.m4: Don't check for strnlen declaration, done in
19053         strnlen.m4.
19054
19055 2005-08-10  Simon Josefsson  <jas@extundo.com>
19056
19057         * lib/strndup.c: Use strnlen.h.
19058
19059         * lib/strnlen.h: New file.
19060
19061 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
19062
19063         * README: Typos.
19064
19065 2005-08-02  Simon Josefsson  <jas@extundo.com>
19066
19067         * modules/readline: New file.
19068
19069 2005-08-02  Simon Josefsson  <jas@extundo.com>
19070
19071         * modules/getdelim: New file.
19072
19073         * modules/getline: Rewrite, don't use getndelim2.
19074
19075 2005-08-02  Simon Josefsson  <jas@extundo.com>
19076
19077         * m4/getline.m4: Separate out getdelim stuff into separate module.
19078
19079         * m4/getdelim.m4: New file.
19080
19081 2005-08-02  Simon Josefsson  <jas@extundo.com>
19082
19083         * lib/getline.h, getline.c: Rewrite.
19084
19085         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
19086
19087 2005-07-31  Bruno Haible  <bruno@clisp.org>
19088
19089         * lib/lock.h (gl_lock_initializer): New macro.
19090         (gl_lock_define_initialized): Use it.
19091         (gl_rwlock_initializer): New macro.
19092         (gl_rwlock_define_initialized): Use it.
19093         (gl_recursive_lock_initializer): New macro.
19094         (gl_recursive_lock_define_initialized): Use it.
19095
19096 2005-07-30  Karl Berry  <karl@gnu.org>
19097
19098         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
19099         Report from Ben Pfaff, regarding getopt.
19100
19101 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
19102
19103         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
19104         normal way.
19105         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
19106         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
19107         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
19108         (gl_GETOPT): Use the new macros.  Most of the implementation
19109         is moved to the new macros.  This is for programs like Emacs
19110         that don't want all the functionality of gl_GETOPT.
19111
19112 2005-07-26  Bruno Haible  <bruno@clisp.org>
19113
19114         * m4/lock.m4: Update from GNU gettext.
19115
19116 2005-07-26  Bruno Haible  <bruno@clisp.org>
19117
19118         * lib/lock.h: Update from GNU gettext.
19119         * lib/lock.c: Update from GNU gettext.
19120
19121 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
19122
19123         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
19124         obsolescent AC_TRY_RUN.  Include the default includes files, for
19125         'exit'.
19126
19127 2005-07-24  Bruno Haible  <bruno@clisp.org>
19128
19129         * modules/visibility: New file.
19130         * MODULES.html.sh (Misc): Add visibility.
19131
19132 2005-07-24  Bruno Haible  <bruno@clisp.org>
19133
19134         * m4/visibility.m4: New file.
19135
19136 2005-07-24  Bruno Haible  <bruno@clisp.org>
19137
19138         * doc/visibility.texi: New file.
19139
19140 2005-07-22  Bruno Haible  <bruno@clisp.org>
19141
19142         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
19143         $(ALLOCA_H), redundant through BUILT_SOURCES.
19144         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
19145         redundant through BUILT_SOURCES.
19146         * modules/byteswap (Makefile.am): Remove explicit dependency on
19147         $(BYTESWAP_H), redundant through BUILT_SOURCES.
19148         * modules/fnmatch (Makefile.am): Remove explicit dependency on
19149         $(FNMATCH_H), redundant through BUILT_SOURCES.
19150         * modules/getopt (Makefile.am): Remove explicit dependency on
19151         $(GETOPT_H), redundant through BUILT_SOURCES.
19152         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
19153         redundant through BUILT_SOURCES.
19154         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
19155         redundant through BUILT_SOURCES.
19156         * modules/stdbool (Makefile.am): Remove explicit dependency on
19157         $(STDBOOL_H), redundant through BUILT_SOURCES.
19158         * modules/stdint (Makefile.am): Remove explicit dependency on
19159         $(STDINT_H), redundant through BUILT_SOURCES.
19160         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
19161         Remove explicit dependency on $(SYSEXITS_H).
19162         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
19163
19164 2005-07-18  Simon Josefsson  <jas@extundo.com>
19165
19166         * lib/check-version.c (check_version): Accept identical versions too.
19167
19168 2005-07-18  Bruno Haible  <bruno@clisp.org>
19169
19170         * modules/lock: New file.
19171         * MODULES.html.sh (Multithreading): New section.
19172
19173 2005-07-18  Bruno Haible  <bruno@clisp.org>
19174
19175         * m4/lock.m4: New file, from GNU gettext.
19176
19177 2005-07-18  Bruno Haible  <bruno@clisp.org>
19178
19179         * lib/lock.h: New file, from GNU gettext.
19180         * lib/lock.c: New file, from GNU gettext.
19181
19182 2005-07-18  Bruno Haible  <bruno@clisp.org>
19183
19184         * lib/lock.h (gl_once_t): New type.
19185         (gl_once_define, gl_once): New macros.
19186         * lib/lock.c (fresh_once): New variable.
19187         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
19188         functions.
19189
19190 2005-07-16  Simon Josefsson  <jas@extundo.com>
19191
19192         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
19193         workaround, suggested by Bruno.
19194
19195 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19196
19197         * modules/xalloc (Depends-on): Add xalloc-die.
19198         * modules/xvasprintf (Depends-on): Add xalloc-die.
19199
19200 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19201
19202         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
19203         with a minor change.
19204
19205 2005-07-15  Bruno Haible  <bruno@clisp.org>
19206
19207         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
19208         When using lib/poll.c, define poll as rpl_poll.
19209
19210 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
19211
19212         * modules/argp (Depends-on): Remove unlocked-io.
19213
19214 2005-07-14  Derek Price  <derek@ximbiot.com>
19215
19216         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
19217         for glob symlink bug.
19218
19219 2005-07-14  Bruno Haible  <bruno@clisp.org>
19220
19221         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
19222         Instead, test for *_unlocked function declarations directly.
19223
19224 2005-07-11  Simon Josefsson  <jas@extundo.com>
19225
19226         * modules/size_max: New file.
19227
19228         * modules/xsize: Depend on size_max module for size_max.m4.
19229
19230 2005-07-11  Simon Josefsson  <jas@extundo.com>
19231
19232         * lib/size_max.h: New file.
19233
19234 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
19235
19236         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
19237         copyright symbol and the year.
19238         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
19239         (version_etc_va): Use parameterized copyright notice.
19240         Reword to conform to the current GNU coding standards.
19241
19242 2005-07-11  Karl Berry  <karl@gnu.org>
19243
19244         * doc/gnulib.texi (Quoting): new node.
19245         (Initial import): more info, from Patrice.
19246
19247 2005-07-11  Bruno Haible  <bruno@clisp.org>
19248
19249         * gnulib-tool (func_usage): Document option --avoid.
19250         (Command line options): Handle --avoid.
19251         (func_acceptable): New function.
19252         (func_modules_transitive_closure): Use it.
19253
19254 2005-07-11  Bruno Haible  <bruno@clisp.org>
19255
19256         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
19257         Reported by Jim Meyering.
19258
19259 2005-07-10  Bruno Haible  <bruno@clisp.org>
19260
19261         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
19262         Needed when size_t is smaller than 'unsigned int'.
19263         Reported by Paul Eggert.
19264
19265 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19266
19267         * modules/argp (Depends-on): Add unlocked-io
19268
19269 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19270
19271         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
19272         block of defines.
19273
19274 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
19275
19276         * config/srclist.txt: Comment out regcomp.c, since we have a porting
19277         fix now.
19278
19279 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
19280         and Paul Eggert  <eggert@cs.ucla.edu>
19281
19282         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
19283         in wint_t, not wchar_t.  Remove now-unnecessary cast.
19284
19285 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19286
19287         * modules/regex (Files): Add lib/regex_internal.c,
19288         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
19289         (Depends-on): Add extensions.
19290         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
19291
19292 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19293
19294         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
19295         pathconf.
19296         * m4/same.m4 (gl_SAME): Likewise.
19297         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
19298
19299         * m4/regex.m4: Adjust to new libc regex implementation.
19300         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
19301         all the .c and .h parts of (the new) regex.
19302         Quote the m4 stuff better.
19303         Check for RE_ICASE bug of old gnulib.
19304         Check for REG_STARTEND of recent libc.
19305         Rename local variables from jm_* to gl_*.
19306         Quote operand of "test -f".
19307         Say "recent enough" version of libc, not "version 2".
19308         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
19309         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
19310         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
19311         Remove check for btowc, isascii.
19312         Require AM_LANGINFO_CODESET.
19313
19314 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19315
19316         * lib/regex.c, regex.h: Sync from libc.
19317         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
19318         * lib/regexec.c:
19319         New files, synced from libc, except that regex_internal.h
19320         currently has a small porting fix.
19321
19322 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19323
19324         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
19325         regex_internal.c, regexec.c.
19326         Add regex_internal.h too, but as a comment, since the libc version
19327         is currently broken in gnulib mode.
19328
19329 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
19330
19331         Support programs like Emacs that use gnulib but not gettext.
19332         * MODULES.html.sh (Internationalization functions): Add gettext-h.
19333         * modules/gettext-h: New file.
19334         * modules/gettext (Files): Remove lib/gettext.h.
19335         (Depends-on): Add gettext-h.
19336         (Makefile.am): Remove lib_SOURCES.
19337         * modules/argmatch, modules/c-stack, modules/closeout:
19338         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
19339         * modules/execute, modules/file-type, modules/getaddrinfo:
19340         * modules/getopt, modules/human, modules/javacomp:
19341         * modules/javaexec, modules/mkdir-p, modules/obstack:
19342         * modules/openat, modules/pagealign_alloc, modules/pipe:
19343         * modules/quotearg, modules/regex, modules/rpmatch:
19344         * modules/unicodeio, modules/userspec, modules/version-etc:
19345         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
19346         * modules/xsetenv:
19347         Depend on gettext-h, not gettext.
19348
19349 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
19350
19351         * gnulib-tool (func_import): Add support for 'public domain' license.
19352         * modules/alloca, modules/atexit, modules/memmove:
19353         Now public domain, not GPL.
19354         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
19355         * modules/realloc, modules/strerror, modules/strtod:
19356         Now LGPL, not GPL.
19357
19358 2005-07-05  Bruno Haible  <bruno@clisp.org>
19359
19360         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
19361         autoconf CVS. Needed for mingw.
19362
19363 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19364
19365         Remove the dependency of the strftime module on the tzset module.
19366         * modules/strftime (Depends-on): Remove dependency on tzset.
19367
19368 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19369
19370         Remove the dependency of the strftime module on the tzset module.
19371         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
19372         gl_FUNC_TZSET_CLOBBER.
19373
19374 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19375
19376         Remove the dependency of the strftime module on the tzset module.
19377         * lib/strftime.c (my_strftime)
19378         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
19379         Copy the input structure, to work around some of the bug with
19380         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
19381         Solaris releases, you should also use the tzset module, but we won't
19382         require it as a dependency any more since we don't want LGPLed code
19383         to depend on GPLed code.
19384
19385 2005-07-02  Jim Meyering  <jim@meyering.net>
19386
19387         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
19388         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
19389         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
19390         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
19391
19392 2005-07-02  Jim Meyering  <jim@meyering.net>
19393
19394         * lib/backupfile.c (backup_args): Change a `0' to NULL.
19395
19396 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
19397
19398         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
19399         declares only 'struct timespec;' (!).
19400
19401 2005-07-01  Jim Meyering  <jim@meyering.net>
19402
19403         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
19404         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
19405         * lib/save-cwd.c, tempname.c:
19406         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
19407         and don't include <sys/file.h>).
19408
19409 2005-06-29  Jim Meyering  <jim@meyering.net>
19410
19411         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
19412         type name.  Use the variable name instead.
19413         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
19414         Likewise.
19415
19416 2005-06-28  Simon Josefsson  <jas@extundo.com>
19417
19418         * modules/check-version (Files): Add check-version.m4.
19419
19420 2005-06-28  Simon Josefsson  <jas@extundo.com>
19421
19422         * m4/check-version.m4: New file, suggested by Jim Meyering
19423         <jim@meyering.net>.
19424
19425 2005-06-28  Simon Josefsson  <jas@extundo.com>
19426
19427         * lib/check-version.h, lib/check-version.c: New files.
19428
19429 2005-06-28  Simon Josefsson  <jas@extundo.com>
19430
19431         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
19432         collision with global variable.  Better indentation.  Don't
19433         increment buffer pointer beyond buffer end.  Based on comments
19434         from Paul Eggert <eggert@cs.ucla.edu>.
19435
19436         * lib/base64.h: Indent.
19437
19438 2005-06-28  Simon Josefsson  <jas@extundo.com>
19439
19440         * doc/gnulib.texi (Library version handling): New section.
19441
19442 2005-06-28  Jim Meyering  <jim@meyering.net>
19443
19444         * check-module (find_included_lib_files): Hard-code another
19445         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
19446         but modules/fts-lgpl (correctly) does not list those files.
19447
19448         * modules/canonicalize (Files): Add lib/pathmax.h.
19449
19450 2005-06-25  Simon Josefsson  <jas@extundo.com>
19451
19452         * modules/check-version: New file.
19453
19454 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
19455
19456         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
19457         initializer of struct addrinfo, as an indication that we don't
19458         care how many members the structure has.
19459
19460 2005-06-24  Derek Price  <derek@ximbiot.com>
19461         and Bruno Haible  <bruno@clisp.org>
19462
19463         Remove stat module & update lstat.
19464         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
19465         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
19466         * m4/stat.m4: Remove this file.
19467
19468 2005-06-24  Derek Price  <derek@ximbiot.com>
19469         and Bruno Haible  <bruno@clisp.org>
19470
19471         Remove stat module & update lstat.
19472         * lib/stat.c: Remove this file...
19473         (slash_aware_lstat): ...moving this content and its support...
19474         * lib/lstat.c (rpl_lstat): ...into here.
19475         * lib/lstat.h: New file.
19476
19477 2005-06-24  Derek Price  <derek@ximbiot.com>
19478         and Bruno Haible  <bruno@clisp.org>
19479
19480         Remove stat module & update lstat.
19481         * config/srclist.txt (libc sources): Remove stat.
19482
19483 2005-06-24  Derek Price  <derek@ximbiot.com>
19484         and Bruno Haible  <bruno@clisp.org>
19485
19486         Remove stat module & update lstat.
19487         * MODULES.html.sh (stat): Remove.
19488         * MODULES.html: Regenerated.
19489         * modules/lstat (Description): Correct function name.
19490         (Files): Add "lstat.h".
19491         (Depends-on): Remove stat, add xalloc, stat-macros.
19492         * modules/stat: Remove this file.
19493         (Include): Add "lstat.h", remove <sys/stat.h>.
19494
19495 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
19496
19497         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
19498         (ranged_convert): Don't save conversion in a temporary struct.
19499         This causes a warning with GCC 4.0.0, and anyway in the typical
19500         case it's not worth the extra 100 bytes or so of code.
19501         (ranged_convert, __mktime_internal): When calling a function via a
19502         pointer P, use P () rather than (*P) (), as we now assume C89 or
19503         better.
19504
19505 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19506
19507         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
19508         "who -r" failed to give output.  Problem reported by Tim Waugh.
19509
19510         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
19511         (xcalloc): Use it to avoid needless tests.
19512         Problem reported by Jim Meyering.
19513
19514 2005-06-20  Derek Price  <derek@ximbiot.com>
19515
19516         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
19517         unnecessary for Autoconfs > 2.59c.
19518
19519 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19520
19521         * lib/argp.h (__option_is_short): Check upper limit of
19522         __key. Isprint() requires its argument to have the value
19523         of an unsigned char or EOF.
19524
19525 2005-06-16  Jim Meyering  <jim@meyering.net>
19526
19527         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
19528         when either N or S is zero.
19529
19530 2005-06-16  Derek Price  <derek@ximbiot.com>
19531
19532         * m4/bison.m4: Declare YACC & YFLAGS precious.
19533
19534 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
19535
19536         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
19537         multibyte string or pattern, fall back on unibyte matching.
19538         Problem reported by James Youngman.
19539
19540 2005-06-08  Bruno Haible  <bruno@clisp.org>
19541
19542         * modules/csharpcomp: New file.
19543         * MODULES.html.sh (C#): Add csharpcomp.
19544
19545 2005-06-08  Bruno Haible  <bruno@clisp.org>
19546
19547         * m4/csharpcomp.m4: New file, from GNU gettext.
19548
19549 2005-06-08  Bruno Haible  <bruno@clisp.org>
19550
19551         * lib/csharpcomp.h: New file, from GNU gettext.
19552         * lib/csharpcomp.c: New file, from GNU gettext.
19553         * lib/csharpcomp.sh.in: New file, from GNU gettext.
19554
19555 2005-06-08  Bruno Haible  <bruno@clisp.org>
19556
19557         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
19558         warning on mingw.
19559
19560 2005-06-07  Derek Price  <derek@ximbiot.com>
19561
19562         Sync from CVS.
19563         * lib/glob_.h: Indent nested #ifdef.
19564
19565 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19566
19567         Sync from coreutils.
19568         Use "file name" when talking about file names, instead of "filename"
19569         or "path", as per the GNU coding standards.
19570         * lib/mkdir-p.c: Renamed from makepath.c.
19571         (make_dir_parents): Renamed from make_path.  All callers changed.
19572         * lib/mkdir-p.h: Likewise.  All includers changed.
19573         * lib/filenamecat.c: Renamed from path-concat.c.
19574         (file_name_concat): Renamed from path_concat.  All callers changed.
19575         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
19576         * lib/filenamecat.h: Likewise.  All includers changed.
19577         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
19578         in comments or local variable names.
19579         * lib/basename.c: Likewise.
19580         * lib/canonicalize.c, canonicalize.h: Likewise.
19581         * lib/dirname.c, dirname.h: Likewise.
19582         * lib/euidaccess.c: Likewise.
19583         * lib/exclude.c: Likewise
19584         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
19585         * lib/fsusage.c, fsuage.h: Likewise.
19586         * lib/fts.c, fts_.h: Likewise.
19587         * lib/getcwd.c: Likewise.
19588         * lib/getloadavg.c: Likewise.
19589         * lib/mkstemp.c: Likewise.
19590         * lib/mountlist.c, mountlist.h: Likewise.
19591         * lib/openat.c, openat.h: Likewise.
19592         * lib/readlink-stub.c: Likewise.
19593         * lib/readutmp.c, readutmp.h: Likewise.
19594         * lib/rename.c: Likewise.
19595         * lib/rmdir.c: Likewise.
19596         * lib/same.c: Likewise.
19597         * lib/savedir.c: Likewise.
19598         * lib/stripslash.c: Likewise.
19599         * lib/tempname.c: Likewise.
19600         * lib/xreadlink.c: Likewise.
19601         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
19602         All uses changed.
19603         * lib/exclude.h: Likewise.
19604
19605         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
19606         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19607         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
19608         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19609         * lib/pathmax.h: Include <limits.h> unconditionally, since other
19610         files have been getting away with it for years (MORE/BSD 4.3
19611         is extinct now).
19612         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
19613         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19614
19615         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
19616         Define to 256, not 255, as per modern POSIX.
19617
19618 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19619
19620         Sync from coreutils.
19621         Use "file name" when talking about file names, instead of "filename"
19622         or "path", as per the GNU coding standards.
19623         * MODULES.html.sh: mkdir-p renamed from makepath.
19624         filenamecat renamed from path-concat.
19625         * modules/filenamecat: Renamed from modules/path-concat.
19626         (Files): filenamecat.h and filenamecat.c renamed from
19627         path-concat.h and path-concat.c.
19628         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
19629         (Include): filenamecat.h, not path-concat.h.
19630         * modules/mkdir-p: Renamed from modules/makepath.
19631         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
19632         makepath.c.
19633         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
19634         (Include): mkdir-p.h, not makepath.h.
19635
19636 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19637
19638         Sync from coreutils.
19639         * m4/mkdir-p.m4: Renamed from makepath.m4.
19640         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
19641         Rename files from makepath.c to mkdir-p.c, and from
19642         makepath.h to mkdir-p.h.
19643         * m4/filenamecat.m4: Renamed from path-concat.m4.
19644         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
19645         Rename files from path-concat.c to filenamecat.c,
19646         and from path-concat.h to filenamecat.h.
19647         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
19648         "file name" in local variables or comments.
19649         * m4/rename.m4: Likewise.
19650
19651 2005-06-01  Bruno Haible  <bruno@clisp.org>
19652
19653         * modules/csharpexec: New file.
19654         * MODULES.html.sh (C#): New section.
19655
19656 2005-06-01  Bruno Haible  <bruno@clisp.org>
19657
19658         * m4/csharp.m4: New file, from GNU gettext.
19659         * m4/csharpexec.m4: New file, from GNU gettext.
19660
19661 2005-06-01  Bruno Haible  <bruno@clisp.org>
19662
19663         * lib/csharpexec.h: New file, from GNU gettext.
19664         * lib/csharpexec.c: New file, from GNU gettext.
19665         * lib/csharpexec.sh.in: New file, from GNU gettext.
19666
19667 2005-05-31  Derek Price  <derek@ximbiot.com>
19668             Paul Eggert  <eggert@cs.ucla.edu>
19669
19670         Sync from cvs.
19671         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19672
19673 2005-05-31  Derek Price  <derek@ximbiot.com>
19674             Paul Eggert  <eggert@cs.ucla.edu>
19675
19676         Sync from cvs.
19677         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19678
19679 2005-05-29  Derek Price  <derek@ximbiot.com>
19680
19681         * config/srclist.txt (glob_.h, glob.c): Add these files.
19682
19683 2005-05-29  Derek Price  <derek@ximbiot.com>
19684
19685         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
19686         * modules/glob: New file.
19687         * modules/getlogin_r: Add link to POSIX spec in description.
19688
19689 2005-05-29  Derek Price  <derek@ximbiot.com>
19690             Paul Eggert  <eggert@cs.ucla.edu>
19691
19692         * m4/glob.m4: New file.
19693
19694 2005-05-29  Derek Price  <derek@ximbiot.com>
19695             Paul Eggert  <eggert@cs.ucla.edu>
19696
19697         * lib/glob_.h, lib/glob.c: New files.
19698
19699 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19700
19701         * modules/fts (Files): Remove m4/inttypes-pri.m4.
19702         * modules/fts-lgpl (Depends-on): Remove gettext.
19703
19704 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19705
19706         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
19707         and don't require gt_INTTYPES_PRI.
19708
19709 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19710
19711         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
19712
19713         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
19714         the configuration hassle isn't worth it.
19715         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
19716         (LONGEST_MODIFIER, PRIuMAX): Remove.
19717
19718 2005-05-27  Bruno Haible  <bruno@clisp.org>
19719
19720         * lib/getlogin_r.h: Remove second include of <stddef.h>.
19721
19722 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
19723
19724         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
19725         _POSIX_PTHREAD_SEMANTICS for Solaris.
19726
19727 2005-05-25  Derek Price  <derek@ximbiot.com>
19728
19729         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
19730
19731 2005-05-25  Derek Price  <derek@ximbiot.com>
19732             Paul Eggert  <eggert@cs.ucla.edu>
19733
19734         * modules/getlogin_r, m4/getlogin_r.m4: New files.
19735         * lib/getlogin_r.c, getlogin_r.h: New files.
19736
19737 2005-05-25  Bruno Haible  <bruno@clisp.org>
19738             Derek Price  <derek@ximbiot.com>
19739
19740         * lib/getlogin_r.h: Simplify API documentation.
19741
19742 2005-05-23  Derek Price  <derek@ximbiot.com>
19743
19744         * modules/minmax (Files): Add m4/minmax.m4.
19745         (configure.ac): Add gl_MINMAX.
19746
19747 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
19748
19749         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
19750         so that unistd-safer.h (GPL'ed code) need not be included.
19751
19752 2005-05-22  Bruno Haible  <bruno@clisp.org>
19753
19754         * m4/minmax.m4: New file.
19755         Based on a patch by Derek Price <derek@ximbiot.com>.
19756
19757 2005-05-22  Bruno Haible  <bruno@clisp.org>
19758
19759         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
19760         (INT64_MIN): Fix definition.
19761         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
19762
19763         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
19764         NEED_SIGNED_INT_TYPES.
19765
19766         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
19767         HAVE_SYSTEM_INTTYPES.
19768
19769 2005-05-22  Bruno Haible  <bruno@clisp.org>
19770
19771         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
19772         Also include <sys/param.h> if it defines MIN, MAX.
19773         Based on a patch by Derek Price <derek@ximbiot.com>.
19774
19775 2005-05-21  Jim Meyering  <jim@meyering.net>
19776
19777         * modules/fts (Files): Add m4/inttypes-pri.m4.
19778         (Depends-on): Add lstat and remove gettext.  Alphabetize.
19779
19780 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19781
19782         New fts module.
19783         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
19784         (setup_dir, free_dir): New functions.
19785         (enter_dir, leave_dir): Define trivial
19786         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
19787         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
19788         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
19789         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
19790         Move to fts-cycle.c.
19791         (fts_open): Use setup_dir.
19792         (fts_close): Use free_dir.
19793         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
19794         This adds a label and some gotos, but the alternatives were messier.
19795         Check for memory allocation failure when entering a dir.
19796         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
19797         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
19798         (FTS): New member fts_cycle, that is a union that contains the
19799         old active_dir_ht and cycle_state.  All uses changed to mention
19800         fts_cycle.ht and fts_cycle.state.
19801         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
19802         fts.c, with the following changes:
19803         (setup_dir, free_dir): New functions.
19804         (enter_dir): Now returns bool.  Return true if successful, false
19805         if memory exhausted.  All callers changed.
19806         Do not bother partly cleaning up on
19807         memory allocation failure; that is free_dir's job.
19808         However, free ad if hash_insert fails, to avoid memory leak.
19809         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
19810         fts->fts_options to see which union member to use.
19811
19812 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19813
19814         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
19815         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
19816
19817 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19818
19819         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
19820
19821 2005-05-20  Jim Meyering  <jim@meyering.net>
19822
19823         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
19824         Now a macro, to pacify GCC.
19825
19826 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19827
19828         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
19829         of -1.
19830
19831 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19832
19833         * lib/chown.c (rpl_chown): Return -1 on failure.
19834
19835 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19836
19837         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
19838         Don't check for stddef.h.
19839         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
19840         don't use its results.
19841         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
19842         since we include them unconditionally.  Don't require
19843         AM_STDBOOL_H, since stdbool is a prerequisite.
19844         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
19845         since we assume C89 or better.
19846         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
19847         as we don't use their results.
19848         Don't check for fchdir, memmove, memset, strrchr, as we use
19849         them unconditionally.
19850         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
19851         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
19852
19853 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19854
19855         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
19856         Include <stddef.h> unconditionally, since we assume C89 now.
19857         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
19858         * lib/fts.c: Include fts_.h first, to check interface.
19859         Do not include intprops.h; no longer needed.
19860         Include cycle-check.h and hash.h, since fts_.h no longer does.
19861         Remove unnecessary casts of closedir to void.
19862         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
19863         decide whether to decrement nlinks.
19864         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
19865         (FTS): Use struct hash_table * instead of Hash_table, so that
19866         we no longer need to include hash.h here.
19867
19868 2005-05-18  Jim Meyering  <jim@meyering.net>
19869
19870         * modules/dirfd (License): Change to LGPL.  Most of the code
19871         is already in the public domain.
19872
19873 2005-05-18  Jim Meyering  <jim@meyering.net>
19874
19875         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
19876         Reported by Yoann Vandoorselaere.
19877
19878 2005-05-17  Jim Meyering  <jim@meyering.net>
19879
19880         * m4/fts.m4: New file, from coreutils.
19881
19882 2005-05-17  Jim Meyering  <jim@meyering.net>
19883
19884         * lib/fts.c, lib/fts_.h: New files, from coreutils.
19885
19886 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19887
19888         Sync from coreutils.
19889         * m4/unlinkdir.m4: New file.
19890
19891 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19892
19893         Sync from coreutils.
19894         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
19895         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
19896         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
19897         White space changes only.
19898         * lib/makepath.c (make_path): Port to hosts where leading "//" is
19899         special.
19900         * lib/yesno.c: Include getline.h, not ctype.h.
19901         (yesno): Don't remove leading white space; POSIX doesn't allow it.
19902         Use getline to remove arbitrary restriction on response length.
19903
19904 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19905
19906         * config/srclist-update: Spell out "Street" in FSF postal
19907         mail address; this is the style the FSF seems to prefer.
19908
19909         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
19910         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
19911         this updates FSF postal mail address.
19912
19913         Sync from coreutils.
19914         * modules/unlinkdir: New file.
19915         * modules/yesno (Depends-on): Add getline.
19916         * MODULES.html.sh (File system functions): Add unlinkdir.
19917
19918 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19919
19920         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
19921         lib/strsep.h:
19922         Change the initial comment to refer to GPL, not LGPL.
19923         gnulib-tool will change it to LGPL as needed.
19924
19925         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
19926         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
19927         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
19928         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
19929         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
19930         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
19931         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
19932         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
19933         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
19934         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
19935         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
19936         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
19937         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
19938         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
19939         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
19940         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
19941         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
19942         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
19943         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
19944         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
19945         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
19946         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
19947         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
19948         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
19949         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
19950         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
19951         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
19952         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
19953         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
19954         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
19955         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
19956         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
19957         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
19958         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
19959         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
19960         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
19961         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
19962         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
19963         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
19964         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
19965         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
19966         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
19967         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
19968         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
19969         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
19970         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
19971         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
19972         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
19973         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
19974         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
19975         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
19976         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
19977         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
19978         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
19979         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
19980         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
19981         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
19982         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
19983         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
19984         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
19985         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
19986         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
19987         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
19988         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
19989         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
19990         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
19991         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
19992         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
19993         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
19994         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
19995         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
19996         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
19997         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
19998         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
19999         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
20000         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
20001         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
20002         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
20003         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
20004         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
20005         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
20006         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
20007         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
20008         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
20009         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
20010         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
20011         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
20012         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
20013         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
20014         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
20015         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
20016         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
20017         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
20018         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
20019         lib/yesno.c, lib/yesno.h:
20020         Update FSF postal mail address.
20021
20022 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20023
20024         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
20025         tests/test-memmem.c, tests/test-stpncpy.c:
20026         Update FSF postal mail address.
20027
20028 2005-05-13  Bruno Haible  <bruno@clisp.org>
20029
20030         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
20031         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
20032         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
20033         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
20034         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
20035         Add support for 64-bit integers in the MSVC compiler.
20036
20037 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20038
20039         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
20040
20041 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
20042
20043         * gnulib-tool (func_import): Sort and uniquify recommended includes.
20044
20045 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
20046
20047         * doc/getdate.texi (General date syntax): Don't say that date
20048         date --iso-8601=ns generates acceptable dates; it doesn't yet.
20049         Problem reported by Nic Ferrier.
20050
20051 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20052
20053         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
20054         specified in ai_socktype. Fix invalid ai_protocol
20055         check. ai_protocol is usually set to 0 or depending on
20056         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
20057         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
20058         ai_socktype / ai_protocol in the returned addrinfo structure.
20059
20060 2005-05-10  Simon Josefsson  <jas@extundo.com>
20061
20062         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
20063         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
20064
20065 2005-05-10  Karl Berry  <karl@gnu.org>
20066
20067         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
20068         (from http://www.gnu.org/licenses).
20069         * doc/COPYING.LIB: also rename to COPYING.LESSER.
20070         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
20071         fdl.texi suffices.
20072
20073 2005-05-10  Karl Berry  <karl@gnu.org>
20074
20075         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
20076         (COPYING.DOC): remove.
20077
20078         * config/srclist-update: new FSF address.
20079
20080 2005-05-10  Derek Price  <derek@ximbiot.com>
20081
20082         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
20083         possible.
20084
20085 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20086             Bruno Haible  <bruno@clisp.org>
20087
20088         * modules/inet_ntop: New file.
20089         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20090         inet_ntop.
20091
20092 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20093             Bruno Haible  <bruno@clisp.org>
20094
20095         * m4/inet_ntop.m4: New file.
20096
20097 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20098             Bruno Haible  <bruno@clisp.org>
20099
20100         * lib/inet_ntop.h: New file.
20101         * lib/inet_ntop.c: New file, from glibc with modifications.
20102
20103 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
20104
20105         * modules/time_r (License): Change to LGPL.
20106         * modules/extensions (License): Change to LGPL.  Actually,
20107         the license is more permissive than that, but currently gnulib-tool
20108         doesn't know how to handle more-permissive licenses.
20109
20110         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
20111         Problem reported by Dave Love.
20112
20113 2005-05-08  Jim Meyering  <jim@meyering.net>
20114
20115         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
20116         blank.
20117
20118 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20119
20120         * modules/argmatch (Depends-on): Add stdbool.
20121         * modules/backupfile (Depends-on): Likewise.
20122         * modules/chdir-long (Depends-on): Likewise.
20123         * modules/closeout (Depends-on): Likewise.
20124         * modules/cycle-check (Depends-on): Likewise.
20125         * modules/dirname (Depends-on): Likewise.
20126         * modules/fnmatch (Depends-on): Likewise.
20127         * modules/fsusage (Depends-on): Likewise.
20128         * modules/fwriteerror (Depends-on): Likewise.
20129         * modules/getcwd (Depends-on): Likewise.
20130         * modules/getloadavg (Depends-on): Likewise.
20131         * modules/hard-locale (Depends-on): Likewise.
20132         * modules/makepath (Depends-on): Likewise.
20133         * modules/mountlist (Depends-on): Likewise.
20134         * modules/nanosleep (Depends-on): Likewise.
20135         * modules/posixtm (Depends-on): Likewise.
20136         * modules/quotearg (Depends-on): Likewise.
20137         * modules/readtokens (Depends-on): Likewise.
20138         * modules/readtokens0 (Depends-on): Likewise.
20139         * modules/readutmp (Depends-on): Likewise.
20140         * modules/save-cwd (Depends-on): Likewise.
20141         * modules/strftime (Depends-on): Likewise.
20142         * modules/userspec (Depends-on): Likewise.
20143         * modules/utimecmp (Depends-on): Likewise.
20144         * modules/xgetcwd (Depends-on): Likewise.
20145         * modules/xnanosleep (Depends-on): Likewise.
20146         * modules/xstrtod (Depends-on): Likewise.
20147         * modules/yesno (Depends-on): Likewise.
20148
20149 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
20150
20151         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
20152         needless checks.
20153
20154 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20155
20156         Merge from coreutils.  Among other things,
20157         add bulletproofing for cases where stdin, stdout, or stderr are closed.
20158         * lib/fd-safer.c: New file.
20159         * lib/fcntl-safer.h, open-safer.c: Remove.
20160         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
20161         * lib/dup-safer.c: Include unistd-safer.h first.
20162         Don't include errno.h.
20163         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
20164         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
20165         * lib/file-type.c: Rely on file-type.h change.
20166         * lib/getloadavg.c: Include unistd-safer.h.
20167         (getloadavg): Use safer open.
20168         * lib/getusershell.c: Include "stdio-safer.h".
20169         (getusershell): Use safer fopen.
20170         * lib/long-options.c (long_options): Use NULL rather than 0.
20171         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
20172         'free'.
20173         * lib/modechange.c: Likewise.
20174         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
20175         (MODE_DONE): New constant.
20176         (struct mode_change): Remove 'next' member.
20177         (make_node_op_equals): New function; like the old one of the
20178         same name, except it allocates an array.
20179         (mode_compile, mode_create_from_ref): Use it.
20180         (mode_compile): Allocate result as an array, not a linked list.
20181         Parse octal string ourself, so that we catch mistakes like "+0".
20182         (mode_adjust): Arg is an array, not a linked list.
20183         * lib/modechange.c: Include stat-macros.h, xalloc.h.
20184         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
20185         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
20186         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
20187         Remove.  This is now stat-macros.h's job.
20188         (talloc): Remove.  All callers replaced by xalloc, so that
20189         our invokers don't have to worry about reporting memory failures.
20190         (make_node_op_equals): Remove.
20191         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20192         New constants.
20193         (struct mode_change): Moved here from modechange.h.
20194         (mode_append_entry): Remove.
20195         (mode_compile): Remove MASKED_OPS arg, since it encouraged
20196         apps to have incorrect behavior.  Use simpler algorithm for head
20197         and tail.  Don't futz with umask; that's now the job of mode_adjust.
20198         Detect more invalid usages rather than having somewhat-random behavior.
20199         Don't insert an "a=" action, as that leads to incorrect behavior.
20200         (mode_compile, mode_create_from_ref): Return NULL on error instead
20201         of an enum, since now there's only one way to have an error.  All
20202         callers changed.
20203         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
20204         at the correct time.  Simplify calculation of "+u" and its ilk.
20205         Don't mishandle "+X".
20206         (mode_free): Remove "register" and localize decls.
20207         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20208         (struct mode_change): Move to modechange.c; callers don't
20209         need to see this stuff.
20210         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
20211         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
20212         (mode_change, mode_adjust): Reflect the new signatures noted above.
20213         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
20214         that might redefine system include files.
20215         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
20216         (my_usleep): Use NULL rather than (void *) 0.
20217         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
20218         Use siginterrupt to specify that system calls should be interrupted.
20219         (rpl_nanosleep): Move initialization of suspended closer to call of
20220         my_usleep.
20221         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
20222         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
20223         (desirable_utmp_entry): New function.
20224         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
20225         using x2nrealloc, to simplify logic.
20226         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
20227         size calculation.  Do not assume utmp file is a regular file.
20228         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
20229         (READ_UTMP_CHECK_PIDS): New constant.
20230         * lib/save-cwd.c: Include unistd-safer.h.
20231         (save_cwd): Use fd_safer.
20232         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
20233         [!_LIBC] Include "stat-macros.h" instead.
20234         * lib/unistd-safer.h (fd_safer): New decl.
20235
20236 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20237
20238         * modules/getloadavg (Depends-on): Add unistd-safer.
20239         * modules/getusershell (Depends-on): Add stdio-safer.
20240         * modules/lstat (Depends-on): Remove xalloc.
20241         * modules/mkstemp (Depends-on): Add stat-macros.
20242         * modules/modechange (Depends-on): Remove xstrtol.
20243         Add stat-macros, xalloc.
20244         * modules/save-cwd (Depends-on): Add unistd-safer.
20245         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
20246         * modules/unistd-safer (Files): Add lib/fd-safer.c
20247         (Makefile.am): Remove lib_SOURCES.
20248
20249         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
20250         Remove fcntl-safer; unistd-safer supersedes it.
20251
20252 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20253
20254         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
20255         AC_HEADER_STAT.
20256         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
20257         (gl_PREREQ_CHOWN): Remove.
20258         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
20259         it.  Don't require AC_HEADER_STAT.
20260         (gl_PREREQ_LSTAT): Remove.
20261         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
20262         Don't require AC_HEADER_STAT.
20263         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
20264         (gl_PREREQ_RMDIR): Remove.
20265         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
20266         mention stat-macros.h or AC_HEADER_STAT, since we'll make
20267         the stat-macros module a prerequisite.
20268         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
20269         * m4/filemode.m4 (gl_FILEMODE): Likewise.
20270         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
20271         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
20272         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
20273         variable names.
20274         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
20275         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
20276         variable prefixes.
20277         * m4/fcntl-safer.m4: Remove.
20278         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
20279         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
20280         Invoke gl_PREREQ_FD_SAFER.
20281         (gl_PREREQ_FD_SAFER): New macro.
20282         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
20283         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
20284         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
20285         Remove duplicate call to AC_LIBOBJ(readutmp).
20286         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
20287
20288         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
20289         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
20290
20291 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20292
20293         * MODULES.html.sh (Misc): Add byteswap.
20294
20295 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20296
20297         * modules/getcwd (Depends-on): Add extensions.
20298         * modules/openat (Depends-on): Likewise.
20299
20300 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20301
20302         * modules/byteswap: New file.
20303
20304 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20305
20306         * m4/byteswap.m4: New file.
20307
20308 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20309
20310         * lib/byteswap_.h: New file.
20311
20312 2005-04-25  Karl Berry  <karl@gnu.org>
20313
20314         * m4/gettext.m4: Update from GNU gettext 0.14.4.
20315
20316 2005-04-25  Albert Chin  <china@thewrittenword.com>
20317
20318         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
20319         Toolkit C bug.
20320
20321 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
20322
20323         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
20324         (func_ln_if_changed) Remove forcibly for no error message
20325         in case file does not exist.
20326
20327 2005-04-19  Simon Josefsson  <jas@extundo.com>
20328
20329         * gnulib-tool (Options): Make --symlink mean --symbolic.
20330
20331 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
20332
20333         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
20334
20335 2005-04-16  Simon Josefsson  <jas@extundo.com>
20336
20337         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
20338
20339 2005-04-15  Simon Josefsson  <jas@extundo.com>
20340
20341         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
20342
20343 2005-04-15  Simon Josefsson  <jas@extundo.com>
20344
20345         * gnulib-tool: Rename --symlink to --symbolic.
20346
20347 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
20348
20349         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
20350         symbolic links to files instead of copying/moving.  Add --aux-dir,
20351         specifying directory relative --dir where auxiliary build tools
20352         are placed.
20353
20354 2005-04-14  Bruno Haible  <bruno@clisp.org>
20355
20356         * modules/allocsa (License): Change to LGPL.
20357         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
20358
20359 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
20360
20361         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
20362         that "UTC +1 second" continues to work.  Problem reported
20363         by Dmitry V. Levin.
20364         (relunit_snumber): New rule.
20365         (relunit): Use it.
20366
20367 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
20368
20369         * lib/getdate.y (universal_time_zone_table): New constant.
20370         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
20371         universal_time_zone_table.
20372         (lookup_zone): Prefer universal_time_zone_table to
20373         local_time_zone_table, so that "GMT" time stamps are allowed in
20374         London during the summer.  Problem reported by Ian Abbott.
20375
20376 2005-04-12  Jim Meyering  <jim@meyering.net>
20377
20378         * lib/human.c (humblock): Set *options even when returning due to
20379         xstrtoumax conversion failure.  Thanks to a used-uninitialized
20380         warning from gcc-4.
20381
20382 2005-04-09  Jim Meyering  <jim@meyering.net>
20383
20384         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
20385         -Wuninitialized: initialize tm0.tm_year.
20386
20387 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
20388
20389         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
20390         count, since there's no maximum.  All uses changed.
20391         Add member dsts_seen.
20392         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
20393         not being INT_MAX.
20394         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
20395         Use pc_rels_seen to decide whther a date is absolute.
20396
20397         * lib/getdate.y (number): Don't overwrite year.
20398         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
20399         check.
20400
20401 2005-04-02  Simon Josefsson  <jas@extundo.com>
20402
20403         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
20404         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
20405
20406 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
20407
20408         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
20409         where no absolute path name can be longer than PATH_MAX.
20410
20411 2005-03-27  Jim Meyering  <jim@meyering.net>
20412
20413         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
20414
20415 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
20416
20417         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
20418         "one's complement" -> "ones' complement" in comment, as per Knuth.
20419         "value of type" -> "type or expression" in comment.
20420         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
20421
20422 2005-03-26  Jim Meyering  <jim@meyering.net>
20423
20424         Comment nits.
20425         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
20426         Correct typos: s/or/of/.
20427
20428 2005-03-26  Jim Meyering  <jim@meyering.net>
20429
20430         * modules/check-include-files: Move to ../ and rename to...
20431         * check-module: ...this.
20432
20433 2005-03-25  Jim Meyering  <jim@meyering.net>
20434
20435         * modules/xvasprintf (Files): Add xalloc.h.
20436
20437 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
20438
20439         * modules/gettext (Files): config/config.rpath ->
20440         build-aux/config.rpath
20441         * modules/iconv (Files): Likewise.
20442         Problem reported by Oskar Liljeblad.
20443
20444 2005-03-23  Jim Meyering  <jim@meyering.net>
20445
20446         * modules/check-include-files: New script to check for
20447         missing dependencies, multiple includes, etc.
20448
20449         * modules/c-strtold (Depends-on): Add xalloc.
20450         * modules/c-strtod (Depends-on): Add xalloc.
20451         * modules/hash (Depends-on): Add xalloc.
20452         (Files): Remove lib/xalloc.h.
20453
20454         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
20455         * modules/userspec (Files): Add lib/inttostr.h.
20456
20457 2005-03-23  Jim Meyering  <jim@meyering.net>
20458
20459         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
20460
20461 2005-03-22  Jim Meyering  <jim@meyering.net>
20462
20463         * modules/stat-macros: New module.
20464         * modules/canonicalize, modules/euidaccess, modules/file-type,
20465         * modules/filemode, modules/lchown, modules/makepath,
20466         * modules/rmdir, modules/stat: Depend on new stat-macros module
20467         rather than listing lib/stat-macros.h manually.
20468         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
20469
20470 2005-03-22  Jim Meyering  <jim@meyering.net>
20471
20472         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
20473
20474 2005-03-22  Bruno Haible  <bruno@clisp.org>
20475
20476         * config/srclist.txt: Replace target directory 'config' with
20477         'build-aux'.
20478         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
20479         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
20480         ../build-aux/.
20481
20482 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
20483
20484         * modules/chdir-long (Depends-on): Add mempcpy.
20485
20486         * modules/acl, modules/backupfile, modules/c-strtod,
20487         modules/c-strtold, modules/canon-host, modules/canonicalize,
20488         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
20489         modules/exclude, modules/exitfail, modules/file-type,
20490         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
20491         modules/getdate, modules/getline, modules/getpagesize,
20492         modules/getpass, modules/getugroups, modules/group-member,
20493         modules/hard-locale, modules/hash, modules/human, modules/idcache,
20494         modules/inttostr, modules/long-options, modules/makepath,
20495         modules/md5, modules/memcasecmp, modules/memcoll,
20496         modules/modechange, modules/mountlist, modules/path-concat,
20497         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
20498         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
20499         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
20500         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
20501         modules/strftime, modules/strndup, modules/strverscmp,
20502         modules/timespec, modules/unlocked-io, modules/userspec,
20503         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
20504         modules/yesno:
20505         Remove lib_SOURCES line from Makefile.am section, as this is now
20506         done automatically by the corresponding Autoconf macro.
20507
20508 2005-03-21  Jim Meyering  <jim@meyering.net>
20509
20510         Changes imported from coreutils.
20511
20512         * lib/cycle-check.c: Don't include xalloc.h.
20513
20514         * lib/path-concat.c: Don't include assert.h.
20515         (path_concat): Remove assertion that would have triggered
20516         for ABASE starting with more than one slash.
20517         Reported by Andreas Schwab.
20518
20519         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
20520         properly when ABASE is an absolute file name.
20521         Correct the description of this function.
20522         Include <assert.h>.
20523         Add an assertion and a test driver.
20524         This fixes a bug introduced on 2004-07-02.
20525         Andreas Schwab reported the resulting failure of cp --parents:
20526         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
20527
20528 2005-03-21  Jim Meyering  <jim@meyering.net>
20529
20530         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
20531         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
20532
20533 2005-03-21  Jim Meyering  <jim@meyering.net>
20534         and  Paul Eggert  <eggert@cs.ucla.edu>
20535
20536         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
20537         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
20538         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
20539         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
20540         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
20541         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
20542         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
20543         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
20544         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
20545         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
20546         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
20547         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
20548         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
20549         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
20550         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
20551         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
20552         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
20553         for these modules.
20554
20555 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
20556
20557         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
20558         (which shouldn't happen), generate nothing instead of returning 0
20559         immediately, so that nstrftime (NULL, ...) doesn't return 0.
20560
20561 2005-03-16  Bruno Haible  <bruno@clisp.org>
20562
20563         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
20564         HAVE_LONGLONG_64BIT.
20565
20566 2005-03-16  Bruno Haible  <bruno@clisp.org>
20567
20568         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
20569         HAVE_LONGLONG_64BIT.
20570
20571 2005-03-16  Bruno Haible  <bruno@clisp.org>
20572
20573         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
20574         HAVE_LONGLONG_64BIT.
20575
20576 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
20577
20578         * lib/strftime.c (my_strftime): Prepend space to format so that we can
20579         reliably distinguish strftime failure from empty output on POSIX
20580         hosts.
20581
20582 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
20583
20584         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
20585         (iconv_string): Don't guess a size-zero buffer, as that might cause
20586         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
20587         result would be 'too large', where 'too large' is (heuristically)
20588         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
20589         overflow concerns.  This will prevent some unwanted malloc failures
20590         when the inputs are very large.
20591
20592 2005-03-15  Karl Berry  <karl@gnu.org>
20593
20594         * config/srclist.txt (config.rpath): from gettext.
20595         * config/config.rpath: update.
20596
20597 2005-03-15  Bruno Haible  <bruno@clisp.org>
20598
20599         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
20600         to 'negate'.
20601
20602         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
20603         variable.
20604
20605         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
20606         results.
20607
20608 2005-03-14  Simon Josefsson  <jas@extundo.com>
20609
20610         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
20611         <fx@gnu.org>.
20612
20613 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
20614
20615         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
20616         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
20617         intprops.h.
20618         * lib/strtol.c: Likewise.
20619
20620 2005-03-14  Jim Meyering  <jim@meyering.net>
20621
20622         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
20623         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
20624         to be nonzero so that we (and caller) can detect the difference
20625         between a valid zero-length expansion and an error return, even
20626         when the underlying strftime fails before writing anything into
20627         that location.
20628
20629 2005-03-14  Bruno Haible  <bruno@clisp.org>
20630
20631         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
20632         Update from GNU gettext 0.14.3.
20633
20634 2005-03-10  Jim Meyering  <jim@meyering.net>
20635
20636         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
20637
20638 2005-03-10  Jim Meyering  <jim@meyering.net>
20639
20640         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
20641         so that this module works on systems without fchdir.
20642
20643 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
20644
20645         Factor int-properties macros into a single file, except for
20646         glibc-related files.
20647         * lib/intprops.h: New file.
20648         * lib/getloadavg.c: Include it instead of limits.h.
20649         (INT_STRLEN_BOUND): Remove.
20650         * lib/human.c: Include intprops.h.
20651         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
20652         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
20653         302/1000.
20654         * lib/inttostr.h: Include intprops.h instead of limits.h.
20655         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
20656         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
20657         for consistency with intprops.h.
20658         (time_t_is_integer, twos_complement_arithmetic): Use them.
20659         * lib/sig2str.h: Include <signal.h>, intprops.h.
20660         (INT_STRLEN_BOUND): Remove.
20661         * lib/strftime.c (TYPE_SIGNED): Remove.
20662         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
20663         * lib/strtol.c: Adjust comments to match intprops.h.
20664         * lib/userspec.c: Include intprops.h.
20665         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
20666         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
20667         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
20668         instead of rolling our own expressions.
20669         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
20670
20671         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
20672         instead of int.
20673         (my_strftime): Do not mishandle years close to INT_MAX, by doing
20674         the right thing even if adding 1900 would overflow.  Similarly
20675         for tm_mon + 1 and tm_yday + 1.
20676         Make %Y always equivalent to %C%y, and similarly for %G and %g.
20677         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
20678         (DO_SIGNED_NUMBER): New macro.
20679         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
20680
20681 2005-03-07  Bruno Haible  <bruno@clisp.org>
20682
20683         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
20684
20685 2005-03-07  Bruno Haible  <bruno@clisp.org>
20686
20687         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
20688
20689 2005-03-04  Derek R. Price  <derek@ximbiot.com>
20690
20691         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
20692         (func_import): Only replace files via --import when they have actually
20693         changed.
20694
20695 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20696
20697         * m4/mmap-anon.m4: New file.
20698         * m4/pagealign_alloc.m4: New file.
20699
20700 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20701             Bruno Haible  <bruno@clisp.org>
20702
20703         * modules/pagealign_alloc: New file.
20704         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
20705
20706 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20707             Bruno Haible  <bruno@clisp.org>
20708
20709         * lib/pagealign_alloc.h: New file.
20710         * lib/pagealign_alloc.c: New file.
20711
20712 2005-03-03  Bruno Haible  <bruno@clisp.org>
20713
20714         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
20715         Use an all-permissive copyright notice, recommended by RMS.
20716
20717 2005-03-02  Bruno Haible  <bruno@clisp.org>
20718
20719         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
20720         of AIX, the replacement has to be done only after <string.h> is
20721         included, therefore not in config.h. stpncpy.h does the replacement,
20722         and stpncpy.c uses it.
20723
20724 2005-03-02  Bruno Haible  <bruno@clisp.org>
20725
20726         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
20727         stpncpy.c uses it.
20728
20729 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20730
20731         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
20732         The workaround isn't strictly needed for POSIX conformance, and
20733         it's too much of a pain to configure and maintain.  We'll ask
20734         people to fix their kernels instead.
20735         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
20736         (NANOSLEEP_BUG_WORKAROUND): Remove.
20737         (xnanosleep): Remove the workaround.
20738
20739 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20740
20741         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
20742         Reported by Derek Price.
20743         (Include): Add "timespec.h".
20744
20745         * modules/xnanosleep (Depends-on): Remove gethrxtime.
20746
20747 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20748
20749         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
20750         to detect nanosleep bug.
20751
20752 2005-03-01  Bruno Haible  <bruno@clisp.org>
20753
20754         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
20755
20756 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
20757
20758         * modules/gethrxtime: New file.
20759         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
20760         (Depends-on): Add gethrxtime.
20761         (configure.ac): Add gl_XNANOSLEEP.
20762         (Makefile.am): Remove lib_SOURCES line.
20763
20764 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20765
20766         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
20767         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
20768
20769 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20770
20771         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
20772         * lib/timespec.h (gettime): Return void, since it always
20773         succeeds now.  All uses changed.
20774         * lib/gettime.c (gettime) Likewise.
20775         [HAVE_NANOTIME]: Prefer nanotime.
20776         Assume gettimeofday succeeds, as POSIX requires.
20777         Assime time () succeeds, since other code already does.
20778         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
20779         (timespec_subtract): Remove.
20780         (NANOSLEEP_BUG_WORKAROUND): New constant.
20781         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
20782         things considerably.  Use it only on GNU/Linux hosts, since the
20783         workaround shouldn't be needed elsewhere.
20784
20785 2005-02-24  Bruno Haible  <bruno@clisp.org>
20786
20787         * modules/gettext (Files): Add m4/glibc2.m4.
20788
20789 2005-02-24  Bruno Haible  <bruno@clisp.org>
20790
20791         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
20792         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
20793         * m4/progtest.m4:
20794         Update from GNU gettext 0.14.2.
20795         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
20796
20797 2005-02-24  Bruno Haible  <bruno@clisp.org>
20798
20799         * lib/localcharset.c: Update from GNU gettext 0.14.2.
20800         * lib/config.charset: Update from GNU gettext 0.14.2.
20801
20802 2005-02-24  Bruno Haible  <bruno@clisp.org>
20803
20804         * lib/gettext.h: Update from GNU gettext 0.14.2.
20805
20806 2005-02-23  Simon Josefsson  <jas@extundo.com>
20807
20808         * m4/iconvme.m4: New file.
20809
20810 2005-02-23  Jim Meyering  <jim@meyering.net>
20811
20812         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
20813         change.
20814         Thanks to Bruno Haible for catching it.
20815
20816 2005-02-22  Simon Josefsson  <jas@extundo.com>
20817
20818         * modules/iconvme: New file.
20819
20820         * MODULES.html.sh: Add iconvme.
20821
20822 2005-02-22  Simon Josefsson  <jas@extundo.com>
20823
20824         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
20825
20826 2005-02-22  Simon Josefsson  <jas@extundo.com>
20827
20828         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
20829
20830 2005-02-22  Jim Meyering  <jim@meyering.net>
20831
20832         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
20833         s/ifndef/ifdef/.
20834
20835 2005-02-20  Neil Conway  <neilc@samurai.com>
20836
20837         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
20838         returned by OSX/Darwin if the specified buffer is not large
20839         enough for the hostname.
20840
20841 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20842
20843         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
20844         pass it to _help, otherwise the latter coredumps trying to
20845         dereference state.root_argp.
20846
20847 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20848
20849         * modules/chdir-long (Depends-on): Add memrchr.
20850         * modules/memrchr (Files): Add lib/memrchr.h.
20851         (Include): "memrchr.h".
20852
20853 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20854
20855         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
20856
20857 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20858
20859         * lib/memrchr.h: New file.
20860         * lib/chdir-long.c: Include it.
20861         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
20862         Don't bother including stddef.h.
20863
20864 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
20865
20866         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
20867         inclusion.
20868         Include <sys/types.h>, for dev_t.
20869         (ME_DUMMY, ME_REMOTE): Move from here....
20870         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
20871         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
20872         Dmitry V. Levin.
20873         Include mountlist.h first, to test the interface.
20874
20875 2005-01-29  Bruno Haible  <bruno@clisp.org>
20876
20877         * lib/progname.c (program_name): Initialize.
20878         Needed when linking statically on MacOS X.
20879
20880 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20881
20882         Sync from coreutils.
20883         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
20884         (Depends-on): Add c-strtod.
20885         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
20886
20887 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20888
20889         Sync from coreutils.
20890         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
20891
20892         Remove files that are specific to coreutils.
20893         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
20894
20895 2005-01-28  Bruno Haible  <bruno@clisp.org>
20896
20897         * modules/javacomp: New file.
20898         * MODULES.html.sh (Java): Add javacomp.
20899
20900 2005-01-28  Bruno Haible  <bruno@clisp.org>
20901
20902         * m4/javacomp.m4: New file, from GNU gettext.
20903
20904 2005-01-28  Bruno Haible  <bruno@clisp.org>
20905
20906         * lib/javacomp.sh.in: New file, from GNU gettext.
20907         * lib/javacomp.h: New file, from GNU gettext.
20908         * lib/javacomp.c: New file, from GNU gettext.
20909
20910 2005-01-26  Simon Josefsson  <jas@extundo.com>
20911
20912         * lib/gai_strerror.c: Use GPL in header.
20913
20914 2005-01-26  Bruno Haible  <bruno@clisp.org>
20915
20916         * modules/javaexec: New file.
20917         * MODULES.html.sh (Java): Add javaexec.
20918
20919 2005-01-26  Bruno Haible  <bruno@clisp.org>
20920
20921         * m4/javaexec.m4: New file, from GNU gettext.
20922
20923 2005-01-26  Bruno Haible  <bruno@clisp.org>
20924
20925         * lib/javaexec.sh.in: New file, from GNU gettext.
20926         * lib/javaexec.h: New file, from GNU gettext.
20927         * lib/javaexec.c: New file, from GNU gettext.
20928
20929 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20930
20931         * modules/lchown (Depends-on): Remove lchown.h
20932
20933 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20934
20935         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
20936         must be defined if the header file was not found, in order
20937         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
20938
20939 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20940
20941         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
20942         initializers for struct pentry_state.
20943         (__argp_error): Check return value of __asprintf
20944         (__argp_failure): Translate error message
20945
20946         * lib/argp-parse.c: Removed braces around the expansion of N_()
20947
20948 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
20949
20950         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
20951         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
20952         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
20953         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
20954         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
20955         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
20956         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
20957         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
20958         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
20959         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
20960         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
20961         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
20962         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
20963         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
20964         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
20965         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
20966         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
20967         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
20968         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
20969         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
20970         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
20971         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
20972         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
20973         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
20974         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
20975         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
20976         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
20977         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
20978         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
20979         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
20980         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
20981         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
20982         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
20983         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
20984         xstrtol.m4, xstrtoumax.m4, yesno.m4:
20985         Use an all-permissive copyright notice, recommended by RMS.
20986
20987 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
20988
20989         * modules/chdir-long (Depends-on): Remove mempcpy.
20990
20991 2005-01-21  Jim Meyering  <jim@meyering.net>
20992
20993         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
20994         same value as for Solaris 9.
20995
20996         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
20997         component length.  This included changing the parameter to be
20998         of type `char *' rather than `char const *'.
20999         * lib/chdir-long.h (chdir_long): Update prototype.
21000
21001         * lib/openat.c (fdopendir, fstatat): New functions.
21002         * lib/openat.h: Include headers required for use of DIR and struct
21003         stat.
21004         [AT_SYMLINK_NOFOLLOW]: Define.
21005         (fdopendir, fstatat): Add prototypes.
21006
21007 2005-01-21  Bruno Haible  <bruno@clisp.org>
21008
21009         * modules/classpath: New file.
21010         * MODULES.html.sh (Java): Add classpath.
21011
21012 2005-01-21  Bruno Haible  <bruno@clisp.org>
21013
21014         * lib/classpath.h: New file, from GNU gettext.
21015         * lib/classpath.c: New file, from GNU gettext.
21016
21017 2005-01-20  Simon Josefsson  <jas@extundo.com>
21018
21019         * modules/version-etc-fsf: New file.
21020
21021 2005-01-20  Simon Josefsson  <jas@extundo.com>
21022
21023         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
21024         * lib/version-etc.c: Remove version_etc_copyright.
21025         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
21026         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
21027
21028 2005-01-20  Simon Josefsson  <jas@extundo.com>
21029
21030         * lib/base64.h (isbase64): Add.
21031
21032         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
21033         using a unsigned prototype, don't inline.
21034         (base64_decode): Use it.
21035
21036 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21037
21038         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
21039         it.
21040
21041 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21042
21043         * lib/save-cwd.c (save_cwd): Remove code to support the case
21044         where fchdir is missing or flaky.
21045
21046 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21047
21048         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
21049
21050 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
21051
21052         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
21053         AC_LIBSOURCES now does this.
21054         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
21055         with new ullong_max module.
21056
21057 2005-01-19  Bruno Haible  <bruno@clisp.org>
21058
21059         * modules/sh-quote: New file.
21060         * MODULES.html.sh (Executing programs): Add sh-quote.
21061
21062 2005-01-19  Bruno Haible  <bruno@clisp.org>
21063
21064         * lib/sh-quote.h: New file, from GNU gettext.
21065         * lib/sh-quote.c: New file, from GNU gettext.
21066
21067 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21068
21069         Merge from coreutils.
21070         * m4/ullong_max.m4: New file.
21071         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
21072         (gl_MACROS): Assume localeconv exists.
21073
21074 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21075
21076         Merge changes from coreutils, as described below in several
21077         changelogs dated today.
21078
21079         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
21080         (O_DIRECTORY): Remove; not needed here, since "." must be
21081         a directory.  All uses removed.
21082         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
21083         universal on Suns, and we also need to test for IRIX.
21084         Revamp code to use 'if' rather than '#if'.
21085         Avoid unnecessary comparison of cwd->desc to 0.
21086
21087         * lib/utimens.c (futimens): Robustify the previous patch, by checking
21088         for known valid error numbers rather than observed invalid ones.
21089
21090 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21091
21092         * modules/ullong_max: New file.
21093
21094         * modules/chdir-long, modules/openat: New files.
21095         * modules/save-cwd (Depends-on): Depend on chdir-long.
21096         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
21097
21098 2005-01-18  Jim Meyering  <jim@meyering.net>
21099
21100         Merge from coreutils.
21101         * m4/chdir-long.m4, m4/openat.m4: New files.
21102         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
21103         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
21104         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
21105         is sane and DOES follow symlinks.  Besides, testing 20 different
21106         systems found no broken chown implementations.
21107         Prompted by a change in rsync's copy of this macro.
21108         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
21109
21110         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
21111
21112         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
21113         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
21114         NULL-means-set-to-current-time semantics.
21115         Remove temporary file immediately, rather than waiting
21116         for configure's at-exit trap code to do it.
21117
21118 2005-01-18  Jim Meyering  <jim@meyering.net>
21119
21120         * lib/version-etc.c (version_etc_copyright): Update copyright date.
21121
21122         * lib/utimens.c (futimens): Account for the fact that futimes
21123         can also fail with errno == ENOSYS or errno == ENOENT.
21124         Patch from Dmitry V. Levin.
21125
21126         Change the name of the robust chdir function from chdir to chdir_long.
21127         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
21128         (restore_cwd): Use chdir_long, not chdir.
21129         * lib/chdir-long.c: Renamed from chdir.c.
21130         * lib/chdir-long.h: Renamed from chdir.h.
21131         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
21132         Hurd.
21133
21134 2005-01-18  Bruno Haible  <bruno@clisp.org>
21135
21136         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
21137         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
21138         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
21139         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
21140         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
21141         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
21142         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
21143         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
21144         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
21145         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
21146         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
21147         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
21148         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
21149         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
21150         Use an all-permissive copyright notice, recommended by RMS.
21151
21152 2005-01-18  Bob Proulx  <bob@proulx.com>
21153
21154         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
21155         simplify offsetof() macro construct to avoid compile failure with
21156         native HP-UX 11.0 ANSI C compiler.
21157
21158 2005-01-17  Bruno Haible  <bruno@clisp.org>
21159
21160         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
21161         redundant because stpncpy.m4 takes care of it.
21162
21163 2005-01-17  Bruno Haible  <bruno@clisp.org>
21164
21165         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
21166
21167 2005-01-17  Bruno Haible  <bruno@clisp.org>
21168
21169         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
21170         used.
21171
21172 2005-01-17  Bruno Haible  <bruno@clisp.org>
21173
21174         * lib/fwriteerror.h (fwriteerror): Change specification to include
21175         fclose.
21176         * lib/fwriteerror.c: Include <stdbool.h>.
21177         (fwriteerror): At the end, close the file stream. Record whether
21178         stdout was already closed.
21179
21180 2005-01-17  Bruno Haible  <bruno@clisp.org>
21181
21182         * lib/execute.c (environ): Declare if needed.
21183         * lib/pipe.c (environ): Likewise.
21184         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
21185
21186 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21187
21188         * modules/argp: Depend on vsnprintf
21189
21190 2005-01-10  Jim Meyering  <jim@meyering.net>
21191
21192         * modules/closeout (Depends-on): Add atexit.
21193
21194 2005-01-06  Bruno Haible  <bruno@clisp.org>
21195
21196         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
21197
21198 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
21199
21200         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
21201         definitions to be after all include files, to avoid collisions.
21202         Problem reported by Bob Proulx.
21203
21204 2005-01-04  Jim Meyering  <jim@meyering.net>
21205
21206         Changes imported from coreutils.
21207         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
21208         as the mkstemp template, use a temporary directory and an
21209         8.3-friendly template to avoid trouble on systems like DJGPP.
21210         Reported by Juan M. Guerrero via Stepan Kasal.
21211         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
21212         close. Remove the temporary directory right away, rather than waiting
21213         for configure's at-exit trap code to do it.
21214         Suggestion from Stepan Kasal.
21215
21216 2005-01-01  Simon Josefsson  <jas@extundo.com>
21217
21218         * gnulib-tool: Print #include directives when --import'ing.
21219
21220 2004-12-28  Simon Josefsson  <jas@extundo.com>
21221
21222         * tests/test-base64.c: Include required header files.  Remove
21223         unused variables.
21224
21225 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21226
21227         * modules/error (Depends-on): Remove gettext.
21228
21229 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21230
21231         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
21232         not needed.  This removes a dependency on the gettext module.
21233         [defined _LIBC]: Do not include <libintl.h>; not needed.
21234
21235 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21236
21237         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
21238         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
21239
21240 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21241
21242         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
21243         HAVE_DECL_STRTOLD.
21244
21245 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21246
21247         * modules/getdate (Depends-on): Remove alloca-opt.
21248
21249 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21250
21251         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
21252
21253 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21254
21255         * lib/argp-parse.c: Include <stddef.h>.
21256         (alignof, alignto): New macros.
21257         (parser_init): Don't assume that void * is aligned sufficiently
21258         for struct option.
21259
21260         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
21261         need to extend the stack.
21262         (YYINITDEPTH): New macro, so that the initial stack isn't overly
21263         large.
21264
21265 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21266
21267         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
21268
21269 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21270
21271         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
21272         (2004-10-24) change.  Apparently this was a false alarm.
21273
21274         * modules/getdate: Depend on alloca-opt, not alloca.
21275
21276 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21277
21278         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
21279         Remove now-obsolete comment about AIX.
21280         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
21281         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
21282         (YYMAXDEPTH): New macro.
21283
21284 2004-12-18  Simon Josefsson  <jas@extundo.com>
21285
21286         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
21287
21288 2004-12-18  Bruno Haible  <bruno@clisp.org>
21289
21290         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
21291
21292 2004-12-18  Bruno Haible  <bruno@clisp.org>
21293
21294         * lib/fatal-signal.c (fatal_signals): Make non-const.
21295         (init_fatal_signals): New function.
21296         (uninstall_handlers, install_handlers): Ignore signals that were set to
21297         SIG_IGN.
21298         (at_fatal_signal): Call init_fatal_signals.
21299         (init_fatal_signal_set): Likewise. Ignore signals that were set to
21300         SIG_IGN.
21301         Reported by Paul Eggert.
21302
21303 2004-12-18  Bruno Haible  <bruno@clisp.org>
21304
21305         * doc/alloca.texi: New file.
21306         * doc/alloca-opt.texi: New file.
21307
21308 2004-12-17  Jim Meyering  <jim@meyering.net>
21309
21310         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
21311         Otherwise, install-sh could exit with improper exit status when
21312         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
21313
21314 2004-12-16  Simon Josefsson  <jas@extundo.com>
21315
21316         * tests/test-base64.c: Add license.
21317
21318 2004-12-15  Stepan Kasal  <address@hidden>
21319
21320         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
21321
21322 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
21323
21324         * modules/getcwd (Files): Add m4/d-ino.m4.
21325         Suggested by Mark D. Baushke.
21326
21327 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21328
21329         * lib/getdate.y (textint): New member "negative".
21330         (time_zone_hhmm): New function.
21331         Expect 14 shift-reduce conflicts, not 13.
21332         (o_colon_minutes): New rule.
21333         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
21334         (yylex): Set the "negative" member of signed numbers.
21335
21336 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21337
21338         * doc/getdate.texi (Time of day items, Time zone items):
21339         Describe new formats +00:00, UTC+00:00.
21340
21341 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
21342
21343         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
21344         spurious "-l"s.  Problem reported by Stepan Kasal.
21345
21346 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
21347
21348         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
21349         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
21350
21351 2004-12-04  Simon Josefsson  <jas@extundo.com>
21352
21353         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
21354         Vandoorselaere <yoann@prelude-ids.org>.
21355
21356 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21357
21358         Changes imported from coreutils.
21359         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
21360         exist.
21361         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
21362
21363 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21364
21365         Changes imported from coreutils.
21366         * lib/hard-locale.c: Assume <locale.h> exists.
21367         Include "strdup.h".
21368         (GLIBC_VERSION): New macro.
21369         (hard_locale): Assume setlocale exists.
21370         Rewrite to avoid #ifdef.
21371         Use strdup rather than malloc + strcpy.
21372         * lib/human.c: Assume <locale.h> exists.
21373         (human_readable): Assume localeconv exists.
21374
21375 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21376
21377         * modules/hard-locale (Depends-on): Add strdup.
21378
21379 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
21380
21381         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
21382         convert T2, not T.  (Imported from libc.)
21383
21384 2004-11-30  Simon Josefsson  <jas@extundo.com>
21385
21386         * modules/restrict (License): Change to LGPL.
21387
21388 2004-11-30  Simon Josefsson  <jas@extundo.com>
21389
21390         * m4/restrict.m4: Add copyright and copying conditions.
21391
21392 2004-11-30  Simon Josefsson  <jas@extundo.com>
21393
21394         * m4/base64.m4: New file.
21395
21396 2004-11-30  Simon Josefsson  <jas@extundo.com>
21397
21398         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
21399         base64.
21400
21401         * tests/test-base64.c: New file.
21402
21403         * modules/base64: New file.
21404
21405 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21406
21407         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
21408         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
21409
21410         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
21411
21412 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21413
21414         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
21415         (__getcwd.c): Don't restore errno; glibc doesn't.
21416         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
21417         first, falling back to our code only if its results look suspicious.
21418         Ensure that the resulting buffer is only as large as necessary.
21419
21420         * lib/readutmp.c: Include readutmp.h first.
21421         Include <errno.h>, since readutmp.h no longer does that.
21422         * lib/readutmp.h: Don't include <errno.h>,
21423         <sys/param.h>, <time.h>; not needed to establish interface.
21424         (errno): Remove decl.
21425         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
21426         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
21427         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
21428
21429 2004-11-28  Simon Josefsson  <jas@extundo.com>
21430
21431         * lib/base64.h, base64.c: New file.
21432
21433 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
21434
21435         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
21436
21437 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
21438
21439         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
21440         (Depends-on): Remove pathmax, same.  Add mempcpy.
21441         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
21442         (Makefile.am): Append getcwd.h to lib_SOURCES.
21443         (Include): Add getcwd.h.
21444         (Maintainer): Change from Jim Meyering to "all, glibc",
21445         since getdate now uses intended-for-glibc code.
21446         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
21447         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
21448
21449 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21450
21451         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
21452         HP's ANSI C compiler.
21453         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
21454         Declaring int functions causes warnings on some modern systems and
21455         shouldn't be needed to compile on ancient ones.
21456         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
21457         defined.
21458
21459         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
21460         with the following changes.
21461         (__set_errno): Parenthesize properly.
21462         Include <stdbool.h>.
21463         (MIN, MAX, MATCHING_INO): New macros.
21464         (__getcwd): Define with prototype, not K&R form.
21465         Use heuristics to allocate default buffer on stack if possible.
21466         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
21467         behavior, and to avoid the PATH_MAX limit when computing
21468         ../../../../...
21469         Use MATCHING_INO to compare inode number to file.
21470         Check for arithmetic overflow in size calculations.
21471         Fix bug in reallocation of dot array that caused getcwd to fail
21472         on directories nested deeper than 75.
21473         Be more careful about saving errno on error.
21474         Do not use realloc; use only free+malloc, as this is a bit
21475         more flexible and avoids a needless copy operation.
21476         Do not inspect st_dev and st_ino for symbolic links; POSIX
21477         doesn't specify the latter.
21478         Check for closedir errors.
21479         Avoid needless casts.
21480         Use "#ifdef weak_alias" around weak_alias, to be like other
21481         glibc code.
21482         The following changes to getcwd.c have effect only when used in
21483         gnulib; they have no effect inside glibc proper.
21484         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
21485         as alloca isn't used.
21486         (alloca, __alloca): Likewise.
21487         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
21488         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21489         unconditionally, as gnulib assumes C89 or better.
21490         Do not include <sys/param.h>.
21491         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
21492         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
21493         better.
21494         (NULL) [!defined NULL]: Remove; we assume C89 or better.
21495         Include <dirent.h> in a way that is compatible with modern Autoconf.
21496         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
21497         New macros, if not already defined.
21498         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
21499         Use "_LIBC", not "defined _LIBC", for consistency.
21500         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
21501         a mempcpy module.
21502         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
21503         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
21504         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
21505         credit only to Jim Meyering and adjust the copyright dates.
21506         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
21507         <stdlib.h>, <unistd.h>, "pathmax.h".
21508         Instead, include "xgetcwd.h" (first) and "getcwd.h".
21509         (INITIAL_BUFFER_SIZE): Remove.
21510         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
21511
21512 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21513
21514         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
21515         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
21516         Use the _ONCE methods, for efficiency.
21517         Check for fcntl.h.  In test program, include <errno.h>
21518         and <fcntl.h> if available.  Remove old K&R cruft from
21519         test program.  Check for common errors in GNU/Linux,
21520         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
21521         don't do AC_LIBOBJ, as that's getcwd.m4's job.
21522         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
21523         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
21524         name accordingly.
21525         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
21526         accommodate new getcwd.c.
21527         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
21528         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
21529         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
21530         that's all we need now.
21531
21532 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21533
21534         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
21535         argp-parse.c depends on getopt internals, that means we should
21536         always use our getopt, to be on the safe side.
21537         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
21538         order not to spoil the result of an eventual previous invocation
21539         of gl_GETOPT_SUBSTITUTE.
21540
21541 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21542
21543         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
21544         redefinition warnings. To avoid them, include the defines
21545         in `#if !defined __need_getopt ... #endif'. The only place
21546         where __getopt_argv_const is used is in definitions
21547         of getopt_long and getopt_long_only below, which are as well
21548         protected by `#ifndef __need_getopt'.
21549         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
21550         __need_getopt after including <stdio.h> and <unistd.h> These
21551         headers might have defined it.
21552
21553 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
21554
21555         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
21556
21557 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
21558
21559         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
21560         (futimens): New function, which uses futimes if available.
21561         (futimens, utimens): Support timespec==NULL, with same semantics
21562         as utime and utimens.
21563         * lib/utimens.h (futimens): New decl.
21564
21565 2004-11-23  Jim Meyering  <jim@meyering.net>
21566
21567         * lib/getopt_.h: Remove trailing blanks.
21568
21569 2004-11-23  Jim Meyering  <jim@meyering.net>
21570
21571         * lib/__fpending.c: Add comment.
21572
21573 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
21574
21575         * modules/canonicalize (Depends-on): Add xreadlink.
21576         Problem reported by James Youngman.
21577
21578 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
21579
21580         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
21581         New macros.
21582         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
21583         optopt): Use them instead of invoking ## directly; otherwise, the
21584         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
21585
21586 2004-11-19  Bruno Haible  <bruno@clisp.org>
21587
21588         * lib/strtok_r.c: Move comments from here...
21589         * lib/strtok_r.h: ... to here.
21590
21591 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
21592
21593         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
21594         implementations that mishandle size_t overflow.
21595
21596 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
21597
21598         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
21599         might fail.  Problem reported by Yoann Vandoorselaere.
21600         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
21601         implementations that mishandle size_t overflow.
21602
21603 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21604
21605         * modules/canon-host (Depends-on): Add strdup.
21606
21607 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21608
21609         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
21610
21611 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21612
21613         * lib/canon-host.c: Include "strdup.h".
21614         (canon_host): Use getaddrinfo if available, so that IPv6 works.
21615         Use strdup instead of malloc/strcpy to duplicate strings.
21616
21617         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
21618         (human_space_before_unit): New constant.
21619         * lib/human.c (human_readable): Support it.
21620
21621         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
21622         (xgetcwd): Set errno correctly when failing.
21623         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
21624         the failure is actually due to a PATH_MAX problem.
21625
21626         Further getopt changes to make it more likely that glibc will
21627         buy the changes back.
21628         * lib/getopt.c (POSIXLY_CORRECT): New constant.
21629         (getopt): Use it, so to preserve glibc semantic
21630         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
21631         when compiling for libc.
21632         * lib/getopt_.h (__getopt_argv_const): Bring it back.
21633         (getopt_long, getopt_long_only): Use it.
21634
21635         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21636         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
21637         (getopt): Argv is now char * const *, as per standard.
21638         (_getopt_internal_r, _getopt_internal): Argv is now char **,
21639         not char *__getopt_argv_const *.
21640         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21641         _getopt_long_only_r): Likewise.
21642         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
21643         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21644         _getopt_long_r, _getopt_long_only_r): Likewise.
21645         * lib/getopt_.h (__getopt_argv_const): Remove.
21646         (getopt): Argv is now char * const *, as per standard.
21647
21648         * lib/getdate.y (tORDINAL): New token.
21649         (day, relunit): Allow it for relative times.
21650         (relative_time_table): Use tORDINAL for ordinals.
21651
21652 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21653
21654         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
21655         Document that "second" isn't allowed as an ordinal number.
21656
21657 2004-11-16  Jim Meyering  <jim@meyering.net>
21658
21659         * modules/closeout (Depends-on): Add fpending.
21660
21661 2004-11-15  Jim Meyering  <jim@meyering.net>
21662
21663         * lib/closeout.c: Include "__fpending.h" once again.
21664         Include <stdbool.h>.
21665         (close_stdout): Don't fail just because stdout was closed initially,
21666         since some programs don't write to stdout in the normal course of
21667         operation (other than --version and --help), and we don't want this
21668         function to make e.g. `touch file >&-' fail.
21669         But do fail if it was closed and someone has tried to write to it.
21670         E.g., `printf foo >&-' must fail.
21671
21672 2004-11-13  Jim Meyering  <jim@meyering.net>
21673
21674         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
21675
21676 2004-11-12  Simon Josefsson  <jas@extundo.com>
21677
21678         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
21679         small doc fix is still pending.
21680
21681 2004-11-11  Simon Josefsson  <jas@extundo.com>
21682
21683         * modules/strtok_r: New file.
21684
21685         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21686         strtok_r.
21687
21688 2004-11-11  Simon Josefsson  <jas@extundo.com>
21689
21690         * m4/strtok_r.m4: New file.
21691
21692         * m4/getopt.m4: Replace opterr.
21693
21694 2004-11-11  Simon Josefsson  <jas@extundo.com>
21695
21696         * lib/strtok_r.h, strtok_r.c: New file.
21697
21698 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21699
21700         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
21701         of replacing opterr, getopt, etc.  This should handle the
21702         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
21703
21704 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21705
21706         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
21707         we can stop lying to compilers about the constness of argv when we
21708         are compiled outside glibc.
21709         (getopt, getopt_long, getopt_long_only): Use it.
21710         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21711         _getopt_internal, getopt): Likewise.
21712         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21713         _getopt_long_only_r): Likewise.
21714         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21715         _getopt_long_r, _getopt_long_only_r): Likewise.
21716
21717         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
21718         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
21719         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
21720         the other external symbols.
21721         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
21722         declaration, since the above renaming now works around collisions.
21723
21724 2004-11-11  Jim Meyering  <jim@meyering.net>
21725
21726         * lib/linebreak.c: Remove trailing blanks.
21727         * lib/alloca_.h: Likewise.
21728         * lib/acosl.c: Likewise.
21729         * lib/euidaccess.c: Likewise.
21730         * lib/allocsa.h: Likewise.
21731
21732 2004-11-10  Simon Josefsson  <jas@extundo.com>
21733
21734         * m4/getaddrinfo.m4: New file.
21735
21736 2004-11-10  Simon Josefsson  <jas@extundo.com>
21737
21738         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
21739
21740 2004-11-10  Simon Josefsson  <jas@extundo.com>
21741
21742         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21743         getaddrinfo.
21744
21745         * modules/getaddrinfo: New file.
21746
21747 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21748
21749         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
21750
21751 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21752
21753         * lib/mktime.c (SHR): New macro, which is a portable
21754         substitute for >> that should work even on Crays.
21755         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
21756         Problem reported by Mark D. Baushke in
21757         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
21758         * lib/getdate.y (SHR): Likewise.
21759         (tm_diff): Use it.
21760         * lib/strftime.c (SHR): Likewise.
21761         (tm_diff): Use it.
21762         * lib/quotearg.c (struct quoting_options): Use unsigned int for
21763         quote_these_too, so that right shifts are well defined.  All uses
21764         changed.
21765
21766 2004-11-10  Jim Meyering  <jim@meyering.net>
21767
21768         Ensure that no close failure goes unreported.
21769         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
21770         return early when it seems there's nothing to flush.
21771         Don't include __fpending.h.
21772
21773 2004-11-10  Jim Meyering  <jim@meyering.net>
21774
21775         * modules/closeout (Depends-on): Remove fpending.
21776
21777 2004-11-10  Jim Meyering  <jim@meyering.net>
21778
21779         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
21780
21781 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21782
21783         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
21784         gl_FUNC_STRFTIME.
21785         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
21786         and AC_REQUIRE when possible, to avoid duplicate checks.
21787         Check for <wchar.h>.
21788
21789 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21790
21791         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
21792
21793 2004-11-09  Bruno Haible  <bruno@clisp.org>
21794
21795         * m4/sockpfaf.m4: New file.
21796
21797 2004-11-05  Bruno Haible  <bruno@clisp.org>
21798
21799         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
21800         Reported by Mark D. Baushke <mdb@cvshome.org>.
21801
21802 2004-11-04  Bruno Haible  <bruno@clisp.org>
21803
21804         2004-09-11  Bruno Haible  <bruno@clisp.org>
21805                 * allocsa.valgrind: New file.
21806         2004-02-06  Bruno Haible  <bruno@clisp.org>
21807                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
21808                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
21809                 Reported by Christopher Seip <chris.seip@hp.com>.
21810
21811 2004-11-04  Bruno Haible  <bruno@clisp.org>
21812
21813         * modules/allocsa (Files): Add lib/allocsa.valgrind.
21814         (Makefile.am): Distribute it.
21815
21816 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
21817
21818         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
21819         with errno == ERANGE if the buffer is too small.
21820         Problem reported by Mark D. Baushke.
21821
21822 2004-11-03  Albert Chin  <china@thewrittenword.com>
21823             Paul Eggert  <eggert@cs.ucla.edu>
21824
21825         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
21826         equivalent, substitute $ac_type for equivalent type rather than
21827         blindly using uint32_t *always* which won't work if uint32_t is not
21828         available.  Define _UINT32_T to work around typedef of uint32_t if
21829         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
21830         2.5.1.
21831
21832 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21833
21834         * m4/jm-macros.m4: Sync from coreutils.
21835         (gl_MACROS): Check for mbrlen, for pathchk.
21836         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
21837
21838 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21839
21840         * lib/xreadlink.c (MAXSIZE): New macro.
21841         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
21842         size does not exceed MAXSIZE.  Avoid cast.
21843         As suggested by Mark D. Baushke in
21844         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
21845         if readlink fails with buffer size just under MAXSIZE, try again
21846         with MAXSIZE.
21847
21848 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21849
21850         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
21851
21852 2004-11-02  Derek R. Price  <derek@ximbiot.com>
21853         and  Paul Eggert  <eggert@cs.ucla.edu>
21854
21855         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
21856         (get_date): Overparenthesize to avoid GCC warning.
21857
21858 2004-11-02  Bruno Haible  <bruno@clisp.org>
21859
21860         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
21861         returns void.
21862
21863 2004-11-02  Bruno Haible  <bruno@clisp.org>
21864
21865         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
21866         function returns void.
21867
21868 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21869
21870         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
21871         fflush_unlocked, flockfile, funlockfile, funlockfile,
21872         fputs_unlocked, putc_unlocked.
21873
21874 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21875
21876         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21877         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
21878         already declared.
21879
21880 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21881
21882         * modules/getdate (Files): Add doc/getdate.texi.
21883         (Depends-on): Add setenv, xalloc.
21884
21885 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21886
21887         * lib/getdate.y: Add support for TZ="foo" within a date string.
21888         Fix some bugs near time_t boundaries.  Reject dates with
21889         out-of-range components, e.g., "Sept 31".
21890         Include <stdlib.h>, "setenv.h", "xalloc.h".
21891         (ISDIGIT_LOCALE): Remove; unused.
21892         Note that the TZ and time functions used here are not reentrant.
21893         (mktime_ok, get_tz): New functions.
21894         (TZBUFSIZE): New constant.
21895         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
21896         This requires that we sometimes generate our own TZ="XXX..." setting.
21897
21898 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21899
21900         * doc/getdate.texi: New file, from coreutils with modifications for
21901         the new TZ parsing.
21902
21903 2004-10-27  Derek R. Price  <derek@ximbiot.com>
21904
21905         * lib/mktime.c (not_equal_tm): Remove redundant check.
21906
21907 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21908
21909         * modules/regex (lib_SOURCES): Add regex.c.
21910         Reported by James Youngman in
21911         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
21912
21913 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21914
21915         * lib/getdate.y: Use Bison 1.875 features, and some minor
21916         code cleanups.  This change does not affect semantics.
21917         Don't include <stdlib.h>; no longer needed.
21918         Don't include unlocked-io.h; only the "#if TEST" code uses
21919         stdio, and performance isn't crucial there.
21920         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
21921         Bison 1.875 features as described below.
21922         All uses of "PC." replaced by "pc->".
21923         (YYSTYPE): Add a forward declaration.
21924         (yylex, yyerror): Use full prototypes in forward decls.
21925         Use "%pure-parser" rather than obsolescent "%pure_parser".
21926         Use %parse-param and %lex-param instead of obsolescent
21927         YYPARSE_PARAM and YYLEX_PARAM.
21928         (meridian_table, month_and_day_table, time_units_table,
21929         relative_time_table, time_zone_table, military_table,
21930         lookup_zone, lookup_word, get_date):
21931         Use NULL instead of 0 where appropriate.
21932         (to_hour): Avoid abort (), to avoid a dependency on
21933         stdlib.h.
21934         (yyerror, yylex): Now accepts parser_control * arg.
21935         (main) [TEST]: Use '\0' rather than 0 for char.
21936
21937 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21938
21939         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
21940
21941 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21942
21943         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
21944         It's now the caller's responsibility to handle the case where
21945         !HAVE_GETPAGESIZE && !defined getpagesize.
21946
21947         * lib/mktime.c (leapyear): Arg is long int, not int.
21948
21949 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
21950
21951         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
21952
21953 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
21954
21955         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
21956         missing.  Problem reported by James Youngman.
21957
21958 2004-10-16  Simon Josefsson  <jas@extundo.com>
21959
21960         * gnulib-tool: Fix comments.  Fix parse problem.
21961         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
21962
21963 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
21964
21965         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
21966         implementation of getopt_long.  Problem reported by Alexander Taler in:
21967         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
21968
21969 2004-10-15  Bruno Haible  <bruno@clisp.org>
21970
21971         * gnulib-tool: Untabify. Initialize supplied_libname.
21972         (func_usage): More homogenous output.
21973         (func_modules_transitive_closure, func_modules_to_filelist,
21974         func_emit_lib_Makefile_am): New functions.
21975         (func_import): New function, extracted from big case statement. Use
21976         func_get_license, func_modules_transitive_closure,
21977         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
21978         opt_lgpl. Don't use test -a, as it's not portable.
21979         (func_create_testdir): Use func_modules_transitive_closure,
21980         func_modules_to_filelist, func_emit_lib_Makefile_am.
21981
21982 2004-10-15  Bruno Haible  <bruno@clisp.org>
21983
21984         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
21985
21986 2004-10-15  Bruno Haible  <bruno@clisp.org>
21987
21988         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
21989         the portions belonging to each module.
21990         Suggested by Derek Robert Price <derek@ximbiot.com>.
21991
21992 2004-10-12  Simon Josefsson  <jas@extundo.com>
21993
21994         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21995         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
21996         to real functions.
21997
21998 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21999
22000         * modules/vsnprintf: New file.
22001
22002 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22003
22004         * m4/vsnprintf.m4: New file.
22005
22006 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22007
22008         * lib/vsnprintf.h: New file.
22009         * lib/vsnprintf.c: New file.
22010
22011 2004-10-11  Bruno Haible  <bruno@clisp.org>
22012
22013         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
22014         vsnprintf.
22015
22016 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
22017
22018         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
22019
22020 2004-10-07  Bruno Haible  <bruno@clisp.org>
22021
22022         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
22023         fits into the provided buffer.
22024
22025 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
22026
22027         * lib/diacrit.c, diacrit.h: Add GPL notice.
22028
22029         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
22030         notice.
22031         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
22032         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
22033         This avoids a potential constant-folding bug.
22034
22035 2004-10-05  Bruno Haible  <bruno@clisp.org>
22036
22037         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
22038         for the declaration of strsep.
22039
22040 2004-10-05  Bruno Haible  <bruno@clisp.org>
22041
22042         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
22043
22044 2004-10-04  Simon Josefsson  <jas@extundo.com>
22045
22046         * modules/memmem: New file.
22047         * tests/test-memmem.c: New file.
22048         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
22049
22050 2004-10-04  Simon Josefsson  <jas@extundo.com>
22051
22052         * m4/memmem.m4: New file.
22053
22054 2004-10-04  Simon Josefsson  <jas@extundo.com>
22055
22056         * lib/memmem.h: New file.
22057         * lib/memmem.c: New file, taken from glibc.
22058
22059 2004-10-04  Simon Josefsson  <jas@extundo.com>
22060
22061         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
22062         '#ifdef USE_UNLOCKED_IO'.
22063
22064 2004-10-04  Simon Josefsson  <jas@extundo.com>
22065
22066         * config/srclist.txt: Add memmem from glibc.
22067
22068 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22069
22070         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
22071
22072         * modules/argmatch, modules/argp, modules/closeout, modules/error,
22073         modules/exclude, modules/getdate, modules/getline,
22074         modules/getndelim2, modules/getpass, modules/getpass-gnu,
22075         modules/getusershell, modules/linebuffer, modules/md5,
22076         modules/mountlist, modules/posixtm, modules/readtokens,
22077         modules/readutmp, modules/regex, modules/sha1,
22078         modules/version-etc, modules/yesno:
22079         Remove dependency on unlocked-io.
22080
22081 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22082
22083         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
22084
22085         * m4/unlocked-io.m4: Add copyright notice.
22086         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
22087
22088 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22089
22090         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
22091         * lib/xmalloc.c (xmemdup): Likewise.
22092         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
22093         XFREE): Remove these long-obsolescent macros.
22094         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
22095         * lib/xstrdup.c: Remove.
22096
22097         * lib/regex.c (re_comp): Cast gettext return value to char *,
22098         Problem reported by Martin Neitzel via Mark D. Baushke.
22099
22100 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22101
22102         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
22103         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
22104         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
22105         regex.c, sha1.c, version-etc.c, yesno.c:
22106         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
22107         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
22108         the includer's responsibility.
22109
22110         Sync from coreutils.
22111
22112         * lib/modechange.c (mode_compile): Don't decrement a pointer that
22113         points to the start of a string, as the C Standard says the
22114         resulting behavior is undefined.
22115
22116         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
22117         simple -> simple_backups, numbered_existing ->
22118         numbered_existing_backups, numbered -> numbered_backups
22119         to avoid shadowing problems.  All uses changed.
22120         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
22121         * lib/backupfile.c (check_extension, numbered_backup):
22122         Rename locals to avoid shadowing 'basename'.
22123         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
22124         once.
22125
22126         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
22127         * lib/.cvsignore: Add getopt.h.
22128
22129 2004-10-04  Bruno Haible  <bruno@clisp.org>
22130
22131         * modules/README: New file.
22132         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
22133         not a module.
22134
22135 2004-10-02  Jim Meyering  <jim@meyering.net>
22136
22137         * lib/dirfd.h, getpagesize.h: Add copyright notice.
22138
22139 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22140
22141         * modules/strsep: New file.
22142
22143 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22144
22145         * m4/strsep.m4: New file.
22146
22147 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22148
22149         * lib/strsep.h: New file.
22150         * lib/strsep.c: New file.
22151
22152 2004-10-01  Simon Josefsson  <jas@extundo.com>
22153
22154         * lib/snprintf.c (snprintf): Handle size==0.
22155
22156 2004-10-01  Simon Josefsson  <jas@extundo.com>
22157             Bruno Haible  <bruno@clisp.org>
22158
22159         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
22160         (snprintf): Declare 'args'.
22161
22162 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
22163
22164         * lib/snprintf.c: Remove comments as to why each header is needed.
22165
22166 2004-10-01  Bruno Haible  <bruno@clisp.org>
22167
22168         * MODULES.html.sh: Add strsep.
22169
22170 2004-09-30  Simon Josefsson  <jas@extundo.com>
22171
22172         * modules/snprintf: New file.
22173
22174 2004-09-30  Simon Josefsson  <jas@extundo.com>
22175
22176         * m4/snprintf.m4: New file.
22177
22178 2004-09-30  Simon Josefsson  <jas@extundo.com>
22179
22180         * lib/snprintf.h, lib/snprintf.c: New files.
22181
22182 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22183
22184         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
22185         (hol_entry_help): Never translate an empty string.
22186         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
22187         * lib/argp.h (OPTION_NO_TRANS): New option.
22188
22189 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22190
22191         * modules/argp (Maintainer): Replace Simon Josefsson
22192         by Sergey Poznyakoff.
22193
22194 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22195
22196         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
22197         changes merged back into glibc.
22198
22199 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22200
22201         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
22202
22203 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
22204
22205         * lib/xvasprintf.c: Include xalloc.h.
22206         (xvasprintf): Use xalloc_die, not xmalloc_die.
22207
22208 2004-09-29  Bruno Haible  <bruno@clisp.org>
22209
22210         * modules/alloca-opt: New file, derived from modules/alloca.
22211         * modules/allocsa: Depend on alloca-opt instead of alloca.
22212         * modules/setenv: Likewise.
22213         * modules/vasnprintf: Likewise.
22214         * MODULES.html.sh: Add alloca-opt.
22215
22216 2004-09-28  Simon Josefsson  <jas@extundo.com>
22217
22218         * gnulib-tool: New parameter --lgpl, to asseert that modules are
22219         LGPL, and to replace license template from GPL to LGPL.
22220
22221 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22222
22223         * modules/dummy: Change license to LGPL.
22224
22225 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22226
22227         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
22228
22229 2004-09-24  Simon Josefsson  <jas@extundo.com>
22230
22231         * modules/minmax (License): Change from GPL to LGPL.
22232
22233 2004-09-23  Simon Josefsson  <jas@extundo.com>
22234
22235         * gnulib-tool (--import): Typo.
22236
22237 2004-09-23  Simon Josefsson  <jas@extundo.com>
22238
22239         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
22240
22241 2004-09-22  Bruno Haible  <bruno@clisp.org>
22242
22243         * modules/*: Add 'License' field.
22244         * gnulib-tool: Accept --extract-license option.
22245         (func_get_license): New function.
22246
22247 2004-09-21  Bruno Haible  <bruno@clisp.org>
22248
22249         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
22250         Reported by Simon Josefsson.
22251
22252 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22253
22254         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
22255         gl_AC_TYPE_LONG_LONG.
22256
22257 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22258
22259         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
22260
22261 2004-09-18  Simon Josefsson  <jas@extundo.com>
22262         and  Paul Eggert  <eggert@cs.ucla.edu>
22263
22264         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
22265         calls with autoreconf.  Define GL_LIB.
22266
22267 2004-09-14  Karl Berry  <karl@gnu.org>
22268
22269         * config/srclist.txt: unsync setenv.c, sigh.
22270
22271 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22272
22273         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
22274         Problem reported by Bruno Haible in:
22275         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
22276
22277 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22278
22279         * config/srclist.txt: Comment out argp-pvh.c.
22280
22281 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
22282
22283         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
22284         in case some system header has #define'd it.  Problem reported by
22285         Soeren D. Schulze in
22286         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
22287
22288 2004-09-09  Karl Berry  <karl@gnu.org>
22289
22290         * regex.[ch]: delete from the root.  These were supposed to be
22291                 synced with emacs cvs, but this has not happened for about
22292                 a year, and anyway nothing else uses emacs regex.[ch].
22293                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
22294                 lib/regex[.ch] is untouched.
22295
22296 2004-09-09  Bruno Haible  <bruno@clisp.org>
22297
22298         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
22299
22300 2004-09-09  Bruno Haible  <bruno@clisp.org>
22301
22302         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
22303         modifications.
22304         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
22305
22306 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22307
22308         * modules/xvasprintf: New file.
22309         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
22310
22311 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22312
22313         * lib/xvasprintf.h: New file.
22314         * lib/xvasprintf.c: New file.
22315         * lib/xasprintf.c: New file.
22316
22317 2004-09-08  Bruno Haible  <bruno@clisp.org>
22318
22319         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
22320
22321 2004-09-08  Bruno Haible  <bruno@clisp.org>
22322
22323         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
22324         length is > INT_MAX.
22325         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
22326         more.
22327
22328 2004-09-08  Bruno Haible  <bruno@clisp.org>
22329
22330         * lib/stdint_.h: New file, taken from GNU clisp.
22331
22332 2004-09-08  Bruno Haible  <bruno@clisp.org>
22333             Oskar Liljeblad  <oskar@osk.mine.nu>
22334
22335         * modules/stdint: New file.
22336         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
22337
22338 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22339
22340         Import from coreutils.
22341         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
22342         strings on unbounded length.  alloca's performance benefits aren't
22343         that important here.
22344         (V_STRDUP): Remove.
22345         (parse_with_separator): New function, with most of the internals
22346         of the old parse_user_spec.  Allow user to omit both user and group,
22347         for compatibility with FreeBSD.
22348         Clone only the user name, not the entire spec.
22349         Do not set *uid, *gid unless entirely successful.
22350         Avoid memory leak in some failing cases.
22351         Fix regression for USER.GROUP reported by Dmitry V. Levin in
22352         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
22353         (parse_user_spec): Rewrite to use parse_with_separator.
22354
22355 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22356
22357         * modules/userspec: Don't depend on alloca.
22358
22359 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22360
22361         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
22362
22363 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
22364
22365         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
22366         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
22367         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
22368
22369 2004-08-16  Simon Josefsson  <jas@extundo.com>
22370
22371         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
22372         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
22373         Add --dry-run for --import.
22374         Let user provided command line parameters override configure.ac
22375         settings.
22376
22377 2004-08-12  Simon Josefsson  <jas@extundo.com>
22378
22379         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
22380         as discussed with Paul Eggert in threads rooted at
22381         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
22382         and
22383         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
22384         Before, the test was empty, and relied on ELIDE_CODE in source
22385         code.)
22386         (gl_PREREQ_GETOPT): New macro.
22387         (gl_GETOPT): Use them.
22388
22389 2004-08-12  Simon Josefsson  <jas@extundo.com>
22390
22391         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
22392         * lib/getopt_.h: Renamed from getopt.h.
22393
22394 2004-08-12  Simon Josefsson  <jas@extundo.com>
22395
22396         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
22397         Change default library name from libfoo to libgnu.
22398         Now, if you have a configure.ac that says:
22399                 gl_SOURCE_BASE(gl)
22400                 gl_M4_BASE(gl/m4)
22401                 gl_MODULES(error getopt etcetera)
22402                 gl_INIT
22403         you can import all you need by running:
22404                 ../gnulib/gnulib-tool --import
22405
22406         * modules/getopt (Files): Rename getopt.h to getopt_.h.
22407         (Makefile.am): Rewrite, use logic from argz.
22408         (Include): Use <getopt.h> instead of "getopt.h".
22409
22410 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22411
22412         * modules/argp (Files): Add m4/unlocked-io.m4.
22413         (Depends-on): Add extensions.
22414
22415 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22416
22417         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
22418         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
22419         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
22420         Check for program_invocation_name, program_invocation_short_name,
22421         flockfile, funlockfile, features.h, _getopt_long_only_r.
22422
22423 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22424
22425         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
22426         its complicated substitute.
22427         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
22428         and program_invocation_name.
22429         (__argp_basename) [!_LIBC]: Remove; the only use was
22430         replaced by its body.
22431         (__argp_short_program_name): Change condition from
22432         !defined __argp_short_program_name to
22433         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
22434         to match argp-namefrob.h.
22435         (__argp_failure): Don't assume strerror_r returns char *.
22436         * lib/argp-parse.c (N_): Define unconditionally.
22437         (argp_default_options): Fill out initializers with 0 to avoid
22438         gcc warnings.
22439
22440 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22441
22442         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
22443         getopt1.c.
22444
22445 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22446
22447         Merge from coreutils.
22448
22449         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
22450
22451         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
22452         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
22453
22454 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22455
22456         Merge from coreutils.
22457
22458         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
22459         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
22460         for Reliant Unix 5.43.
22461
22462         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
22463         (union fooround): Use uintmax_t, not long int.
22464         The rest is a merge from libc:
22465         [defined _LIBC]: Include <shlib-compat.h>.
22466         (_obstack) [defined _LIBC]: Remove after 2.3.4.
22467
22468         * lib/settime.c (settime): Recode to avoid warning with
22469         Sun Forte C 6U2.
22470
22471         * lib/strverscmp.c: Convert to UTF-8.
22472
22473 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22474
22475         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
22476         m4/uintmax_t.m4.
22477
22478 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22479
22480         * modules/xalloc-die: New file.
22481         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
22482
22483         * modules/md5 (Files): Add m4/uint32_t.m4.
22484         * modules/sha1: Renamed from modules/sha.
22485         (Files):
22486         Rename lib/sha.h to lib/sha1.h.
22487         Rename lib/sha.c to lib/sha1.c.
22488         Rename m4/sha.m4 to m4/sha1.m4.
22489         (lib_SOURCES): Likewise.
22490         (configure.ac): Rename gl_SHA to gl_SHA1.
22491         (Include): sha.h -> sha1.h.
22492
22493 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22494
22495         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
22496         * m4/sha1.m4: Renamed from sha.m4.
22497         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
22498
22499 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22500
22501         * lib/obstack.h (obstack_empty_p):
22502         Don't assume that chunk->contents is suitably aligned.
22503         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
22504         Likewise. Problem reported by Benno in
22505         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
22506
22507         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
22508         readable.  This could be improved further but it'd take some work.
22509
22510 2004-08-08  Simon Josefsson  <jas@extundo.com>
22511
22512         * modules/xgethostname (Depends-on): Remove exit and error (not
22513         used).
22514
22515         * modules/getpass-gnu: Add getpass.h.
22516         (Depends-on): Add stdbool.
22517         * modules/getpass: Add getpass.h.
22518
22519 2004-08-08  Simon Josefsson  <jas@extundo.com>
22520
22521         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
22522         Check getpass declaration.
22523
22524 2004-08-08  Simon Josefsson  <jas@extundo.com>
22525
22526         * lib/xgethostname.c: Don't include error.h (not used).
22527
22528         * lib/getpass.h: Add.
22529         * lib/getpass.c: Include getpass.h first.
22530
22531 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
22532
22533         * lib/xalloc-die.c: New file.
22534         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
22535         All uses removed.
22536         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
22537         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
22538         xalloc-die.c.
22539         (_, N_, xalloc_die): Move to xalloc-die.c.
22540         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
22541         so that we needn't mess with xalloc_msg_memory_exhausted.
22542
22543         * lib/sha1.h: Renamed from sha.h.
22544         (SHA1_H): Renamed from _SHA_H.
22545         (sha1_ctx): Renamed from sha_ctx.
22546         (sha1_init_ctx): Renamed from sha_init_ctx.
22547         (sha1_process_block): Renamed from sha_process_block.
22548         (sha1_process_bytes): Renamed from sha_process_bytes.
22549         (sha1_finish_ctx): Renamed from sha_finish_ctx.
22550         (sha1_read_ctx): Renamed from sha_read_ctx.
22551         (sha1_stream): Renamed from sha_stream.
22552         (sha1_buffer): Renamed from sha_buffer.
22553         * lib/sha1.c: Likewise; renamed from sha.c.
22554         Do not include <sys/types.h>.
22555         Include <stddef.h> rather than <stdlib.h>.
22556
22557 2004-08-08  Bruno Haible  <bruno@clisp.org>
22558
22559         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
22560         FILESYSTEM_PREFIX_LEN.
22561         * lib/progreloc.c: Likewise.
22562         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
22563
22564 2004-08-06  Simon Josefsson  <jas@extundo.com>
22565
22566         * modules/progname (Depends-on): Don't depend on stdbool.
22567
22568 2004-08-06  Simon Josefsson  <jas@extundo.com>
22569
22570         * modules/getsubopt: New file.
22571         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22572         getsubopt.
22573
22574 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22575
22576         More merge from coreutils.
22577
22578         * m4/utimens.m4, m4/utimecmp.m4: New files.
22579         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
22580         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
22581         prereq.m4, sha.m4: Import changes from coreutils.
22582
22583 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22584
22585         More merge from coreutils.
22586         * modules/raise, modules/readtokens0, modules/utimens:
22587         * modules/utimecmp, module/xnanosleep: New files.
22588         * modules/strftime: Add lib/strftime.h.
22589         Change include from <time.h> to "strftime.h".
22590         * modules/yesno: Add lib/yesno.h.
22591         * modules/backupfile: Remove lib/addext.c.
22592         * modules/euidaccess: Add stat-macros.h.
22593         * modules/canonicalize, modules/euidaccess,
22594         modules/filemode, modules/lchown, modules/makepath,
22595         modules/rmdir, modules/stat: Likewise.
22596
22597 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22598
22599         Merge from tar.
22600         * lib/argp-help.c (make_hol, hol_append): Don't assume that
22601         SIZE_MAX is a valid preprocessor constant.
22602         (__argp_basename): Change from "#ifndef _LIBC"
22603         to "#ifndef __argp_short_program_name", so that
22604         we don't compile these functions for tar.
22605
22606         More merges from coreutils.
22607         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
22608         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
22609         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
22610         * lib/addext.c: Remove; no longer needed.
22611         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
22612         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
22613         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
22614         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
22615         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
22616         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
22617         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
22618         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
22619         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
22620         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
22621         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
22622         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
22623         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
22624         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
22625         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
22626         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
22627         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
22628         Import changes from coreutils.
22629
22630 2004-08-05  Simon Josefsson  <jas@extundo.com>
22631
22632         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
22633
22634 2004-08-05  Simon Josefsson  <jas@extundo.com>
22635
22636         * m4/getsubopt.m4: New file.
22637
22638 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22639
22640         Merge from coreutils.
22641
22642         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
22643         * m4/getcwd-path-max.m4: New files.
22644
22645         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
22646         FILESYSTEM_PREFIX_LEN ->
22647         FILE_SYSTEM_PREFIX_LEN.
22648         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
22649         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
22650         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
22651         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
22652
22653         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
22654         prerequisite modules now handle the DOS stuff.
22655         Don't check for unistd.h.
22656
22657 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22658
22659         Merge from coreutils.
22660
22661         * lib/.gdb-history: Remove; this doesn't belong here.
22662
22663         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
22664         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
22665         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
22666         * lib/getcwd.c: New files.
22667
22668         * lib/dirname.h: Include <stdbool.h>.
22669         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
22670         for consistency with POSIX terminology.  All uses changed.
22671         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
22672         (strip_trailing_slashes): Use bool for booleans.
22673         * lib/stripslash.c (strip_trailing_slashes): Likewise.
22674
22675         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
22676         sometimes returns a positive errno value even when it succeeds.
22677         (print_errno_message) [!LIBC]: Fall back on strerror if
22678         __strerror_r fails.
22679
22680         * lib/path-concat.c (mempcpy): Don't define if a system header defines
22681         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
22682         (longest_relative_suffix): New function.
22683         (path_concat): Use it.  Assume first argument is not NULL.
22684         Port to DOS.  Omit redundant separators.
22685         Report an error instead of returning NULL.
22686         Use mempcpy instead of memcpy.
22687         (xpath_concat): Remove: not declared or used.
22688
22689         * lib/same.h: Include <stdbool.h>
22690         (same_name): Return bool, not int.
22691         * lib/same.c (same_name): Likewise.
22692         (errno): Don't declare; we assume C89 or better now.
22693
22694         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
22695         if not already defined.
22696
22697         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
22698         * lib/dup-safer.c (errno): Likewise.
22699
22700 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22701
22702         Merge from coreutils.
22703         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
22704         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
22705         * modules/path-concat: Don't depend on strdup.
22706
22707 2004-08-03  Simon Josefsson  <jas@extundo.com>
22708
22709         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
22710         * lib/progname.h: Don't include stdbool.h.
22711
22712 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22713
22714         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
22715         * MODULES.html.sh (func_all_modules): Remove fatal.
22716
22717 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22718
22719         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
22720
22721 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22722
22723         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
22724         working.
22725
22726 2004-08-02  Simon Josefsson  <jas@extundo.com>
22727
22728         * lib/getsubopt.h: New file, with comments from Bruno Haible.
22729         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
22730         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
22731
22732 2004-08-01  Simon Josefsson  <jas@extundo.com>
22733
22734         * lib/xgetdomainname.c: Include stdlib.h, for free().
22735
22736 2004-07-19  Bruno Haible  <bruno@clisp.org>
22737
22738         * MODULES.html.sh (func_all_modules): Add dummy.
22739
22740 2004-07-16  Simon Josefsson  <jas@extundo.com>
22741
22742         * modules/dummy: New file.
22743
22744 2004-07-16  Simon Josefsson  <jas@extundo.com>
22745
22746         * lib/dummy.c: New file.
22747
22748 2004-07-16  Bruno Haible  <bruno@clisp.org>
22749
22750         * lib/backupfile.h: Add extern "C" for C++.
22751         * lib/closeout.h: Likewise.
22752         * lib/copy-file.h: Likewise.
22753         * lib/findprog.h: Likewise.
22754         * lib/full-write.h: Likewise.
22755         * lib/pathname.h: Likewise.
22756         * lib/progname.h: Likewise.
22757         * lib/stpcpy.h: Likewise.
22758         * lib/stpncpy.h: Likewise.
22759         * lib/strcase.h: Likewise.
22760         * lib/strstr.h: Likewise.
22761         * lib/xalloc.h: Likewise.
22762
22763         * lib/mbswidth.h: Add extern "C" for C++.
22764         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
22765
22766 2004-07-13  Robert Millan  <robertmh@gnu.org>
22767
22768         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
22769
22770 2004-07-09  Simon Josefsson  <jas@extundo.com>
22771
22772         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
22773         failed without this.)
22774
22775 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22776
22777         * modules/chown (Files): Add lib/fchown-stub.c, since
22778         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
22779
22780 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22781
22782         * lib/fchown-stub.c: New file.
22783
22784 2004-06-24  Jim Meyering  <jim@meyering.net>
22785
22786         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
22787
22788 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22789
22790         * modules/argz: Omit "#include".
22791
22792         * MODULES.html.sh (func_all_modules): Add calloc, to match
22793         2004-06-01 addition of calloc module.
22794
22795 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22796
22797         * m4/argz.m4: New file, which is autoupdated from libtool.
22798
22799 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22800
22801         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
22802         libtool.
22803
22804 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22805
22806         * config/srclist-update: Don't insist on "USA." before the
22807         close-comment, as libtool omits the period and puts the */ on a
22808         separate line.
22809         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
22810         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
22811
22812 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
22813
22814         * modules/argz: New file.
22815         * MODULES.html.sh (func_all_modules): Add argz.
22816
22817 2004-06-12  Jim Meyering  <jim@meyering.net>
22818         and  Paul Eggert  <eggert@cs.ucla.edu>
22819
22820         * modules/hash (Files): Add lib/xalloc.h.
22821         * modules/pipe (Depends-on): Add wait-process.
22822         * modules/stat (Depends-on): Add xalloc.
22823         * modules/userspec (Files): Add lib/userspec.h.
22824         * modules/xstrto
22825
22826         Upgrade from gettext-0.13.
22827         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
22828         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
22829         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
22830
22831 2004-06-10  Jim Meyering  <jim@meyering.net>
22832
22833         * lib/calloc.c: New file.
22834
22835 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
22836
22837         * lib/getdate.y (yylex): Allow space between sign and number.
22838         Problem reported by Dan Jacobson.
22839
22840 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22841
22842         Merge from coreutils CVS.
22843
22844         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
22845         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
22846         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
22847         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
22848         xstrtol.m4: Fix copyright date and/or serial number.
22849
22850         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
22851         See if we need an fchown replacement.
22852         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
22853         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
22854         and use the replacement function if we detect either defect.
22855
22856         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
22857         gl_UTIMECMP.
22858
22859 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22860         and  Jim Meyering  <jim@meyering.net>
22861
22862         Merge from coreutils CVS.
22863
22864         * lib/stat-macros.h: New file, with contents from file-type.h
22865         and coreutils' system.h.
22866         * lib/file-type.c: Include "stat-macros.h".
22867         * lib/file-type.h (file_type): Move all macro definitions to new file,
22868         stat-macros.h.
22869
22870         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
22871         Wrap old code with this conditional.
22872         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
22873         function that does not dereference symlinks.
22874         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
22875
22876         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
22877         dependency problems.
22878         (xreadlink): Accept new arg SIZE, for efficiency.
22879         All decls and uses changed.
22880         * lib/xreadlink.h: Include <stddef.h>, for size_t.
22881
22882         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
22883         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
22884
22885         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
22886         sysexits.h.
22887
22888 2004-06-01  Jim Meyering  <jim@meyering.net>
22889
22890         * m4/calloc.m4: New file.
22891
22892 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
22893
22894         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
22895         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
22896         Also, fix a typo in a diagnostic.
22897
22898 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22899
22900         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
22901         or AC_FUNC_REALLOC.
22902
22903 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22904
22905         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
22906         macros to be defined.
22907         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
22908         the allocator returns NULL because the requested size is zero.
22909
22910 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
22911
22912         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
22913         var.  Add comment explaining why libc still defines it.  This
22914         merges the following patch from glibc:
22915         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
22916
22917 2004-05-20  Andreas Schwab  <schwab@suse.de>
22918
22919         * m4/free.m4: Replace free if it not known to work, not the other
22920         way round.
22921
22922 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
22923
22924         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
22925         present in glibc since revision 1.1 of this file.
22926         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
22927         obstack_alignment_mask, obstack_alloc, obstack_base,
22928         obstack_blank, obstack_blank_fast, obstack_chunk_size,
22929         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
22930         obstack_grow0, obstack_init, obstack_int_grow,
22931         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
22932         obstack_next_free, obstack_object_size, obstack_ptr_grow,
22933         obstack_ptr_grow_fast, obstack_room): Remove declarations of
22934         nonexistent functions.
22935
22936 2004-05-18  Karl Berry  <karl@gnu.org>
22937
22938         * config/srclist.txt: break link for vasnprintf.c.
22939
22940 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22941
22942         Port obstack to the AS/400, where pointers are 16 bytes wide and
22943         you cannot cast an integer to a valid pointer.  This patch is
22944         currently waiting to be integrated into glibc; see
22945         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
22946
22947         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
22948         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
22949         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
22950         (struct obstack): temp member is now a union of a pointer and
22951         an integer, instead of an integer.  All integer uses changed.
22952         This does not affect the physical layout of struct obstack,
22953         except on hosts (like the AS/400) where the size or alignment of
22954         void * is greater than that of ptrdiff_t.
22955         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
22956         __STDC__)]: Store temporary in pointer member of union, not
22957         integer member.
22958         * lib/obstack.c: Include <stddef.h>, for offsetof.
22959         (struct fooalign): Remove; it doesn't need a name.
22960         (union fooround): Change double to long double, and add void *.
22961         (DEFAULT_ALIGNMENT): Use offsetof to compute.
22962         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
22963         not a macro.  Hence the values are always int; so remove all
22964         casts-to-int in uses.
22965
22966 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22967
22968         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
22969         we can get this patch merged into glibc.
22970
22971 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22972             Paul Eggert  <eggert@cs.ucla.edu>
22973
22974         * m4/argp: Depend on alloca.
22975
22976 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22977             Paul Eggert  <eggert@cs.ucla.edu>
22978
22979         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
22980         freecoding.
22981
22982 2004-05-17  Bruno Haible  <bruno@clisp.org>
22983
22984         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
22985         precision that consists of a '.' followed by an empty digit string.
22986         Patch by Tor Lillqvist <tml@iki.fi>.
22987
22988 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22989
22990         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
22991         for backward compatibility with older code.  We need our own
22992         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
22993         it under some other name, and our alloca.h will define it.
22994
22995 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22996             Derek Price  <derek@ximbiot.com>
22997
22998         * lib/alloca.c: Include <alloca.h>, to get our interface.
22999         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
23000         include <alloca.h> first.  Use C89 prototype for alloca; this
23001         requires including <stddef.h> for size_t.  Use extern "C" if C++.
23002         Use #elif for simplicity, since we can assume C89 now.
23003         Don't try to source the system alloca.h since it will not be found
23004         and to prevent recursively including its replacement.
23005         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
23006         * lib/regex.c: Likewise.
23007
23008 2004-05-16  Derek Price  <derek@ximbiot.com>
23009             Paul Eggert  <eggert@cs.ucla.edu>
23010
23011         getline cleanup.  This changes the getndelim2 API: both order of
23012         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
23013         no delimiter).
23014
23015         * lib/getline.c: Don't include stddef.h or stdio.h, since our
23016         interface does that.
23017         (getline): Always use getdelim, so that we don't have two
23018         copies of this code.
23019         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
23020         if available.
23021         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
23022         (GETNDELIM2_MAXIMUM): New macro.
23023         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
23024         instead of the old practice of delim2==0.  All callers changed.
23025         Return -1 on overflow, instead of returning junk.
23026         Do not set *linesize unless allocation succeeds.
23027         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
23028         that we include sys/types.h.
23029         * lib/getnline.h: Likewise.
23030         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
23031         (getndelim2): Reorder arguments.
23032         * lib/getnline.c (getnline, getndelim):
23033         Don't discard the NMAX argument.
23034         (getnline): Invoke getndelim, to avoid code duplication.
23035         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
23036         of (size_t) -1 by callers of the getnline family.
23037
23038 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23039
23040         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
23041         Check for gettimeofday.
23042         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
23043         Check for settimeofday, stime.
23044
23045 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23046
23047         * lib/nanosleep.c (suspended): Change its type from int to
23048         sig_atomic_t volatile.
23049         (first_call): Make it private to rpl_nanosleep, and have it
23050         be zero initially as that's a bit faster.
23051         (my_usleep): Round up fractional times instead of truncating them,
23052         as this is the usual meaning for 'sleep'.
23053
23054         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
23055         doesn't work.
23056         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
23057         (ENOSYS): Define if not defined.
23058         (settime): Fall back on stime if it exists and settimeofday fails.
23059         But don't bother with fallbacks if a method fails with errno == EPERM.
23060
23061 2004-05-11  Jim Meyering  <jim@meyering.net>
23062
23063         Prior to this change, the save_cwd caller required read access to the
23064         current directory on most systems (ones with the fchdir function).
23065
23066         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
23067         fails, try write-only, and finally, resort to using xgetcwd.
23068
23069 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
23070
23071         * lib/obstack.c, obstack.h: Import changes from libc.
23072
23073 2004-04-28  Bruno Haible  <bruno@clisp.org>
23074
23075         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
23076         also implicitly appends .exe to executables.
23077         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
23078         accepts Windows pathnames.
23079         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23080         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23081         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23082         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23083         Reported by Derek Robert Price <derek@ximbiot.com>.
23084
23085 2004-04-21  Karl Berry  <karl@gnu.org>
23086
23087         * config/srclist.txt (localcharset.c): break sync.
23088
23089 2004-04-20  Paul Eggert  <eggert@twinsun.com>
23090
23091         * m4/host-os.m4: Add a copyright notice.
23092
23093 2004-04-20  Jim Meyering  <jim@meyering.net>
23094
23095         Change UTILS_ to gl_ in AC_DEFINE'd names.
23096         Change utils_- and jm_-prefixed variables, too.
23097         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
23098         UTILS_FUNC_MKDIR_TRAILING_SLASH.
23099         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
23100
23101         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
23102         Don't emit trailing blanks.
23103         Also rename jm_-prefixed variables to have gl_ prefix.
23104
23105         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
23106         Also rename jm_-prefixed variables to have gl_ prefix.
23107
23108         * m4/jm-macros.m4: Reflect the renamings.
23109         * m4/prereq.m4: Likewise.
23110
23111 2004-04-20  Jim Meyering  <jim@meyering.net>
23112
23113         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
23114         memory.
23115
23116 2004-04-20  Jim Meyering  <jim@meyering.net>
23117             Bruno Haible  <bruno@clisp.org>
23118
23119         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
23120         memory when realloc fails.
23121
23122 2004-04-19  Jim Meyering  <jim@meyering.net>
23123
23124         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
23125         now that readutmp.c may call `free (0)'.
23126
23127 2004-04-19  Bruno Haible  <bruno@clisp.org>
23128
23129         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
23130         * m4/inttypes_h.m4: Likewise.
23131         * m4/stdint_h.m4: Likewise.
23132         * m4/intmax_t.m4: Likewise.
23133         * m4/uintmax_t.m4: Likewise.
23134
23135 2004-04-18  Jim Meyering  <jim@meyering.net>
23136
23137         * m4/prereq.m4: Don't forbid jm_ prefix.
23138
23139         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
23140         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
23141         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
23142         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
23143         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
23144         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
23145         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
23146         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
23147         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
23148         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
23149         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
23150         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
23151         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
23152         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
23153         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
23154         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
23155         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
23156         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
23157         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
23158
23159 2004-04-18  Jim Meyering  <jim@meyering.net>
23160
23161         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
23162         failure, don't leak memory and do call END_UTMP_ENT.
23163
23164 2004-04-16  Jim Meyering  <jim@meyering.net>
23165
23166         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
23167         coreutils' stat program.
23168         (gl_PREREQ): Don't require jm_PREREQ_STAT.
23169
23170 2004-04-11  Paul Eggert  <eggert@twinsun.com>
23171
23172         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
23173         C89.
23174         (CHAR_BIT): Remove, since we assume C89.
23175         Include <stdint.h> if available, as per current Autoconf CVS advice.
23176
23177 2004-03-31  Jim Meyering  <jim@meyering.net>
23178
23179         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
23180         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
23181         * m4/xalloc.m4: Likewise.
23182
23183 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23184
23185         Merge from coreutils.
23186
23187         * m4/inttostr.m4: New file.
23188         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
23189         Require AM_STDBOOL_H and gl_TIMESPEC instead.
23190         Require gl_CLOCK_TIME.
23191         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
23192
23193 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23194
23195         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
23196         not bool, to be more consistent with Unix conventions.
23197         Suggested by Bruno Haible.
23198
23199         Merge from coreutils.
23200
23201         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
23202         * lib/umaxtostr.c: New files.
23203
23204         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
23205         the usual <time.h> dance.
23206         (get_date): Change signature to support fractional time stamps.
23207         All callers changed.
23208         * lib/getdate.y: Include "getdate.h" first, as we can now
23209         assume C89 and don't need to worry about 'const'.
23210         Similarly, include "unlocked-io.h" near start, not in middle.
23211         Include <limits.h>.
23212         (textint.value): Use long int rather than int.
23213         (textint.digits): Use size_t rather than int.
23214         (BILLION, LOG10_BILLION): New constants.
23215         (parser_control): New member rel_ns.  Members day_ordinal,
23216         time_zone, month, day, hour, minutes, rel_year, rel_month,
23217         rel_day, rel_hour, rel_minutes, rel_seconds
23218         are now long int, not int.  Member seconds is now struct timespec,
23219         not int.  New member timespec_seen.  Members dates_seen, days_seen,
23220         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
23221         not int.
23222         (%union.intval): Now long int, not int.
23223         New member timespec.
23224         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
23225         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
23226         (spec): Now is a timespec or an item list.
23227         (timespec, items): New nonterminals.
23228         (time, rel, relunit, number, get_date):
23229         Add support for fractional seconds.
23230         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
23231         (gmtime, localtime, mktime): Remove decls; not needed with C89.
23232         (to_hour): First arg is now long int, not int.
23233         (to_year): Returns long int, not int.
23234         Don't treat year -70 like 70.
23235         (tm_diff): Returns long int, not int.
23236         (lookup_word): Use bool instead of int when appropriate.
23237         (yylex): Use size_t for count, not int.
23238         Detect overflow when parsing large integer constants.
23239         Add support for fractions.
23240         (get_date): Make pointers 'const' if possible.
23241         Use more-portable code to detect integer overflow.
23242         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
23243         Don't use ctime; it's not reliable if the year has >4 digits.
23244
23245         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
23246         This is for compatibility with BSD.
23247
23248         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
23249         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
23250         From coreutils' system.h.
23251
23252         * lib/userspec.c: Don't include "posixver.h".
23253         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
23254         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
23255         compatible extension.  Simplify code by removing a boolean int
23256         that was always nonzero if a string was nonnull.
23257
23258 2004-03-30  Jim Meyering  <jim@meyering.net>
23259
23260         Merge from coreutils.
23261
23262         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
23263         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
23264         on some systems one must include <grp.h> before it.
23265         Reported by Christian Krackowizer.
23266
23267 2004-03-30  Jim Meyering  <jim@meyering.net>
23268
23269         Merge from coreutils.
23270
23271         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
23272
23273         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
23274         an empty input stream.
23275
23276         * lib/readtokens.c: Include <stdbool.h>.
23277         (readtoken): Use `size_t' rather than int/long.
23278         All callers adjusted.
23279         Use `bool' rather than `int' where appropriate.
23280         Use memset rather than an explicit loop.
23281         Use x2nrealloc rather than xrealloc.
23282         Allow the use of `\0' as a delimiter.
23283         (readtokens): Likewise.
23284         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
23285
23286 2004-03-30  Jim Meyering  <jim@meyering.net>
23287
23288         * m4/realloc.m4: Remove file, since now it does no more than
23289         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
23290         the `configure.ac' section of module/realloc.
23291         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
23292
23293 2004-03-30  Bruno Haible  <bruno@clisp.org>
23294
23295         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
23296         nonnull.
23297
23298 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23299
23300         Merge changes to getloadavg.c from coreutils and Emacs.
23301
23302         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
23303         Define to an expression, not to the empty string.
23304         Include cloexec.h and xalloc.h.
23305         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
23306         Use set_cloexec_flag rather than rolling our own.
23307         * lib/cloexec.c, lib/cloexec.h: New files.
23308
23309 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23310
23311         * m4/cloexec.m4: New file.
23312
23313 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23314
23315         * lib/getopt.h: Sync with libc CVS.
23316
23317 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23318             Bruno Haible  <bruno@clisp.org>
23319
23320         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
23321         mbswidth.
23322
23323 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23324             Bruno Haible  <bruno@clisp.org>
23325
23326         * lib/mbswidth.h: Include <wchar.h> only if
23327         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
23328         <wchar.h>.
23329         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
23330
23331 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23332
23333         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
23334         Sync with libc CVS.
23335         * lib/getopt_int.h: New file, also synced from libc.
23336
23337 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23338
23339         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
23340         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
23341         Bring back getopt.c, getopt.h, getopt1.c.
23342
23343 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23344
23345         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
23346         All uses changed.  Check for sa_sigaction member; this fixes
23347         a bug first reported by Jason Andrade in
23348         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23349
23350 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23351
23352         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
23353         '#if' expressions.  Unlike the code it replaces, it does not
23354         depend on (defined _SC_PAGESIZE).  However, it does depend on
23355         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
23356         first reported by Jason Andrade in
23357         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23358
23359 2004-02-25  Simon Josefsson  <jas@extundo.com>
23360
23361         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
23362
23363 2004-02-25  Simon Josefsson  <jas@extundo.com>
23364
23365         * lib/strdup.h: New file.
23366         * lib/strdup.c: Include it.
23367         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
23368         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
23369
23370 2004-02-23  Karl Berry  <karl@gnu.org>
23371
23372         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
23373         (from fencepost.gnu.org:/gd/gnuorg).
23374
23375 2004-02-23  Karl Berry  <karl@gnu.org>
23376
23377         * config/srclistvars.sh (GNUORG) [karl]: redefine.
23378         * config/srclist.txt: add maintain/standards documents.
23379
23380 2004-02-18  Bruno Haible  <bruno@clisp.org>
23381
23382         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
23383         Reported by Derek Robert Price <derek@ximbiot.com>.
23384
23385 2004-02-16  Karl Berry  <karl@gnu.org>
23386
23387         * config/mkinstalldirs, install-sh: update from automake.
23388
23389 2004-02-06  Karl Berry  <karl@gnu.org>
23390
23391         * m4/po.m4: update from gettext 0.14.1.
23392
23393 2004-02-06  Karl Berry  <karl@gnu.org>
23394
23395         * lib/config.charset: update from gettext 0.14.1.
23396
23397 2004-02-05  Paul Eggert  <eggert@twinsun.com>
23398
23399         Add comments and code, prompted by suggestions from Bruno Haible
23400         for sh-quote.
23401         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
23402         describing the enum quoting_style values.
23403         * lib/quotearg.c (quotearg_alloc): New function.
23404         (quotearg_buffer_restyled): Treat lone { and } as special.
23405         Treat = as special.  Work around bug with older shells
23406         that "see" a '\' that is really the 2nd byte of a multibyte char.
23407         Quote empty string with shell_quoting_style.
23408
23409 2004-02-03  Bruno Haible  <bruno@clisp.org>
23410
23411         * m4/pipe.m4: New file, from GNU gettext.
23412
23413 2004-02-03  Bruno Haible  <bruno@clisp.org>
23414
23415         * lib/pipe.h: New file, from GNU gettext.
23416         * lib/pipe.c: New file, from GNU gettext.
23417
23418 2004-01-27  Bruno Haible  <bruno@clisp.org>
23419
23420         * m4/execute.m4: New file, from GNU gettext.
23421
23422 2004-01-27  Bruno Haible  <bruno@clisp.org>
23423
23424         * lib/execute.h: New file, from GNU gettext.
23425         * lib/execute.c: New file, from GNU gettext.
23426         * lib/w32spawn.h: New file, from GNU gettext.
23427
23428 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23429
23430         Merge from diffutils.
23431
23432         * lib/file-type.c (file_type): Add typed memory objects.
23433         * lib/file-type.h (S_TYPEISTMO): New macro.
23434
23435         * lib/c-stack.h (c_stack_action): Remove argv argument.
23436         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
23437         (die): Don't calculate message unless segv_action returns.
23438         (get_stack_location, min_address_from_argv, max_address_from_argv,
23439         volatile stack_base, volatile_stack_size): Remove.
23440         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
23441         that every segmentation violation is a stack overflow.  (Ouch!)
23442         See Debian bug 136249 (still outstanding) for more info about why
23443         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
23444
23445 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23446
23447         Exit-status fix from coreutils.
23448
23449         Use exit_failure consistently in place of EXIT_FAILURE,
23450         so that program exit statuses are consistent on failure.
23451
23452         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
23453         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
23454         * lib/argmatch.h: Comment fix to match the above.
23455         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
23456         Now a macro referring to exit_failure, instead of a separate
23457         variable.  Include "exitfail.h" to get it.
23458         * lib/xstrtol.h: Include "exitfail.h".
23459         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
23460
23461         * lib/long-options.c (parse_long_options): Use prototype
23462         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
23463         for clarity.
23464
23465 2004-01-21  Jim Meyering  <jim@meyering.net>
23466
23467         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
23468         so as not to conflict with a different-sized __mktime_internal
23469         function in GNU libc.
23470         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
23471         Problem building statically-linked `ls' reported by Michael Brunnbauer.
23472
23473 2004-01-20  Karl Berry  <karl@gnu.org>
23474
23475         * config/config.guess: update from config.
23476
23477         * config/srclistvars.sh: GNUWWWLICENSES for karl.
23478
23479 2004-01-20  Bruno Haible  <bruno@clisp.org>
23480
23481         Safer stack allocation.
23482         * lib/setenv.c: Include allocsa.h.
23483         (alloca): Remove fallback definition.
23484         (freea): Remove macro.
23485         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
23486         instead of freea.
23487
23488 2004-01-20  Bruno Haible  <bruno@clisp.org>
23489
23490         * m4/eealloc.m4: New file, from GNU gettext.
23491
23492 2004-01-20  Bruno Haible  <bruno@clisp.org>
23493
23494         * m4/allocsa.m4: New file, from GNU gettext.
23495
23496 2004-01-20  Bruno Haible  <bruno@clisp.org>
23497
23498         * lib/xallocsa.h: New file, from GNU gettext.
23499         * lib/xallocsa.c: New file, from GNU gettext.
23500
23501 2004-01-20  Bruno Haible  <bruno@clisp.org>
23502
23503         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
23504
23505 2004-01-20  Bruno Haible  <bruno@clisp.org>
23506
23507         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
23508         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
23509         specially.
23510
23511 2004-01-20  Bruno Haible  <bruno@clisp.org>
23512
23513         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
23514         patch.
23515
23516 2004-01-20  Bruno Haible  <bruno@clisp.org>
23517
23518         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
23519
23520 2004-01-20  Bruno Haible  <bruno@clisp.org>
23521
23522         * lib/eealloc.h: New file.
23523
23524 2004-01-20  Bruno Haible  <bruno@clisp.org>
23525
23526         * lib/binary-io.h: Avoid warnings on Cygwin.
23527
23528 2004-01-20  Bruno Haible  <bruno@clisp.org>
23529
23530         * lib/allocsa.h: New file, from GNU gettext.
23531         * lib/allocsa.c: New file, from GNU gettext.
23532
23533 2004-01-18  Karl Berry  <karl@gnu.org>
23534
23535         * doc/gpl.texi, doc/lgpl.texi: new files.
23536
23537 2004-01-18  Karl Berry  <karl@gnu.org>
23538
23539         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
23540         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
23541
23542 2004-01-15  Paul Eggert  <eggert@twinsun.com>
23543
23544         Merge from coreutils.
23545
23546         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
23547         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
23548         (gl_DEFAULT_POSIX2_VERSION): Move
23549         the documentation from 'configure' into 'config.hin',
23550         so that 'configure --help' isn't burdened by it and
23551         we don't have to worry about its formatting there.
23552         Reword the documentation so that it's more succinct
23553         and can be run together into a single paragraph.
23554         * m4/same.m4 (gl_SAME): Check for pathconf.
23555
23556 2004-01-15  Paul Eggert  <eggert@twinsun.com>
23557
23558         Merge from coreutils.
23559
23560         * lib/posixver.c: Include posixver.h.
23561
23562         * lib/same.c: Include <stdbool.h>, <limits.h>.
23563         (_POSIX_NAME_MAX): Define if not defined.
23564         (MIN): New macro.
23565         (same_name): If file names are silently truncated, report
23566         that the file names are the same if they are the same after
23567         the silent truncation.
23568
23569         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
23570         conversion function.
23571         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
23572         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
23573         longer needed.
23574
23575 2004-01-15  Jim Meyering  <jim@meyering.net>
23576
23577         Merge from coreutils.
23578
23579         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
23580         if no library is required.
23581         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
23582         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
23583         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
23584         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
23585         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
23586         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
23587         value, $ac_cv_search_crypt, if it's "none required".
23588         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
23589         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
23590         not gl_FUNC_GETLOADAVG.
23591         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
23592         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
23593
23594 2004-01-15  Jim Meyering  <jim@meyering.net>
23595
23596         Merge from coreutils.
23597
23598         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
23599         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
23600         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
23601
23602         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
23603         optional configure-time default.
23604
23605         * lib/version-etc.c (version_etc_copyright): Update copyright date.
23606
23607         * lib/xreadlink.c (xreadlink): Correct outdated comment.
23608
23609 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
23610
23611         Merge from coreutils.
23612
23613         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
23614         value, $ac_cv_search_nanosleep, if it's "none required".
23615
23616 2004-01-14  Paul Eggert  <eggert@twinsun.com>
23617
23618         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
23619         with like-named macro in fnmatch.c.
23620         (EXT): Use an internal constant instead.
23621
23622         Merge fnmatch patches from glibc.
23623         * lib/fnmatch.c (mbsinit): Remove define.
23624         Add libc_hidden_ver (__fnmatch, fnmatch).
23625         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
23626         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
23627
23628 2004-01-14  Karl Berry  <karl@gnu.org>
23629
23630         * config/install-sh: update from automake.
23631
23632 2004-01-13  Karl Berry  <karl@gnu.org>
23633
23634         * config/install-sh: update from automake.
23635
23636 2004-01-09  Karl Berry  <karl@gnu.org>
23637
23638         * config/install-sh: update from automake.
23639
23640 2004-01-05  Karl Berry  <karl@gnu.org>
23641
23642         * config/config.{sub,guess}: update from config.
23643
23644 2003-12-31  Karl Berry  <karl@gnu.org>
23645
23646         * config/depcomp: update from automake.
23647
23648 2003-12-14  Karl Berry  <karl@gnu.org>
23649
23650         * lib/config.charset: update from gettext-runtime.
23651
23652 2003-12-03  Paul Eggert  <eggert@twinsun.com>
23653
23654         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
23655         Bug reported by Alfred M. Szmidt.
23656
23657 2003-12-03  Bruno Haible  <bruno@clisp.org>
23658
23659         * m4/gettext.m4: Upgrade from gettext-0.13.
23660         * m4/po.m4: Upgrade from gettext-0.13.
23661         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
23662         * m4/intmax.m4: New file, from gettext-0.13.
23663         * m4/printf-posix.m4: New file, from gettext-0.13.
23664
23665 2003-11-29  Karl Berry  <karl@gnu.org>
23666
23667         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
23668
23669 2003-11-25  Paul Eggert  <eggert@twinsun.com>
23670             Bruno Haible  <bruno@clisp.org>
23671
23672         * lib/printf-parse.h: Don't include sys/types.h.
23673         (ARG_NONE): New macro.
23674         (char_directive): Change type of *arg_index fields to size_t.
23675         * lib/printf-parse.c: Don't include sys/types.h.
23676         (SSIZE_MAX): Remove macro.
23677         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
23678         Remove unnecessary overflow check.
23679         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
23680         fields.
23681
23682 2003-11-25  Bruno Haible  <bruno@clisp.org>
23683
23684         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
23685
23686 2003-11-25  Bruno Haible  <bruno@clisp.org>
23687
23688         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
23689         gt_TYPE_SSIZE_T.
23690
23691 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23692
23693         * modules/alloca: Remove dependency on xalloc.
23694
23695 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23696
23697         * lib/alloca.c: Remove dependency on xalloc module.
23698         (xalloc_die): Remove.
23699         (memory_full) [!defined emacs]: New macro.
23700         [!defined emacs]: Don't include xalloc.h.
23701         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
23702         address arithmetic overflows.  Change datatypes a bit to avoid
23703         unnecessary casts.
23704
23705 2003-11-22  Jim Meyering  <jim@meyering.net>
23706
23707         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
23708         s/size/size_t/.
23709
23710 2003-11-21  Karl Berry  <karl@gnu.org>
23711
23712         * config/config.{sub,guess}: update from config.
23713
23714 2003-11-18  Karl Berry  <karl@gnu.org>
23715
23716         * config/config.{sub,guess}: update from config.
23717
23718         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
23719
23720 2003-11-17  Paul Eggert  <eggert@twinsun.com>
23721
23722         * README: Mention that S+T cannot overflow if S is the size of
23723         an existing object and T is sufficiently small.
23724
23725 2003-11-17  Jim Meyering  <jim@meyering.net>
23726
23727         On systems without utime and without a utimes function capable of
23728         dealing with a NULL struct utimbuf* argument, this utime replacement
23729         could -- in unusual circumstances -- leak a file descriptor.
23730         * lib/utime.c: Include <unistd.h> and <errno.h>.
23731         (utime_null): Be sure to close `fd' and to preserve errno.
23732         Reported by Geoff Collyer via Arnold Robbins.
23733
23734 2003-11-17  Bruno Haible  <bruno@clisp.org>
23735
23736         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
23737         (Depends-on): Add xsize.
23738
23739 2003-11-17  Bruno Haible  <bruno@clisp.org>
23740
23741         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
23742
23743 2003-11-17  Bruno Haible  <bruno@clisp.org>
23744
23745         * lib/vasnprintf.c (alloca): Remove fallback definition.
23746         (freea): Remove definition.
23747         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
23748         Reported by Paul Eggert.
23749
23750 2003-11-16  Paul Eggert  <eggert@twinsun.com>
23751             Bruno Haible  <bruno@clisp.org>
23752
23753         Protect against address arithmetic overflow.
23754         * lib/printf-args.h: Include stddef.h.
23755         (arguments): Change type of field 'count' to size_t.
23756         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
23757         'unsigned int' where appropriate.
23758         * lib/printf-parse.h: Include sys/types.h.
23759         (char_directive): Change type of *arg_index fields to ssize_t.
23760         (char_directives): Change type of fields 'count', max_*_length to
23761         size_t.
23762         * lib/printf-parse.c: Include sys/types.h and xsize.h.
23763         (SSIZE_MAX): Define fallback value.
23764         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
23765         instead of 'int' where appropriate. Check a_allocated, d_allocated
23766         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
23767         * lib/vasnprintf.c: Include xsize.h.
23768         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
23769         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
23770         overflow. Avoid wraparound when converting a width or precision from
23771         decimal to binary.
23772
23773 2003-11-16  Bruno Haible  <bruno@clisp.org>
23774
23775         Update from GNU gettext.
23776         * lib/printf-parse.c: Generalize to it can be compiled for wide
23777         strings.
23778         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
23779         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
23780         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
23781         SNPRINTF): New macros.
23782         Don't include <alloca.h> if the file is used inside libintl.
23783         (local_wcslen): New function, for Solaris 2.5.1.
23784         (VASNPRINTF): Use it instead of wcslen.
23785
23786 2003-11-16  Bruno Haible  <bruno@clisp.org>
23787
23788         * lib/xsize.h (xmax): New function.
23789         (xsum, xsum3, xsum4): Declare as "pure" functions.
23790
23791 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23792
23793         * modules/xalloc (Files): Undo latest change, since xalloc.h
23794         no longer needs SIZE_MAX or PTRDIFF_MAX.
23795
23796 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23797
23798         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
23799         gl_PTRDIFF_MAX.
23800
23801 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23802
23803         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
23804         "return", to pacify some unknown compiler.  Problem reported
23805         by Joerg Schilling.
23806
23807 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23808
23809         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
23810         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
23811         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
23812         heuristic is just as accurate as far as we know, and it removes a
23813         dependency on size_max.m4 and ptrdiff_max.m4.
23814
23815 2003-11-11  Bruno Haible  <bruno@clisp.org>
23816
23817         * modules/xsize (Files): Add m4/size_max.m4.
23818         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
23819
23820 2003-11-11  Bruno Haible  <bruno@clisp.org>
23821
23822         * m4/size_max.m4: New file.
23823         * m4/ptrdiff_max.m4: New file.
23824         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
23825         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
23826         (gl_XALLOC): Invoke it.
23827
23828 2003-11-11  Bruno Haible  <bruno@clisp.org>
23829
23830         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
23831         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
23832         defined.
23833
23834 2003-11-10  Paul Eggert  <eggert@twinsun.com>
23835
23836         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
23837         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
23838         rejected some allocations of exactly SIZE_MAX - 2 bytes.
23839         From Bruno Haible.
23840         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
23841         not (size_t) -1, since it's defined here.
23842
23843 2003-11-09  Karl Berry  <karl@gnu.org>
23844
23845         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
23846
23847 2003-11-06  Paul Eggert  <eggert@twinsun.com>
23848
23849         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
23850         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
23851         Reject sizes of exactly SIZE_MAX bytes.
23852         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
23853         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
23854
23855 2003-11-05  Bruno Haible  <bruno@clisp.org>
23856
23857         * lib/xsize.h: Include limits.h, to avoid a possible collision with
23858         SIZE_MAX defined in <limits.h> on Solaris.
23859
23860 2003-11-04  Jim Meyering  <jim@meyering.net>
23861
23862         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
23863         variable names, rather than @VAR@.
23864         * modules/poll: Likewise.
23865
23866 2003-11-04  Bruno Haible  <bruno@clisp.org>
23867
23868         * modules/xsize: New file.
23869         * modules/linebreak: Depend on xsize.
23870         * MODULES.html.sh (func_all_modules): Add xsize.
23871
23872 2003-11-04  Bruno Haible  <bruno@clisp.org>
23873
23874         * m4/xsize.m4: New file.
23875
23876 2003-11-04  Bruno Haible  <bruno@clisp.org>
23877
23878         * lib/xsize.h: New file.
23879         * lib/linebreak.c: Include xsize.h.
23880         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
23881         argument for overflow.
23882         Suggested by Paul Eggert.
23883
23884 2003-11-03  Karl Berry  <karl@gnu.org>
23885
23886         * config/config.{guess,sub}: update from config.
23887
23888 2003-11-03  Jim Meyering  <jim@meyering.net>
23889
23890         * modules/userspec (lib_SOURCES): Add userspec.h.
23891         (Include): Add "userspec.h".
23892         Improve description.
23893
23894 2003-11-03  Jim Meyering  <jim@meyering.net>
23895
23896         * lib/userspec.c: Include "userspec.h".
23897         * lib/userspec.h: New file.
23898
23899 2003-11-03  Bruno Haible  <bruno@clisp.org>
23900
23901         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
23902
23903 2003-11-03  Bruno Haible  <bruno@clisp.org>
23904
23905         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
23906         available, to avoid (extremely rare) race condition.
23907         Suggested by Paul Eggert.
23908
23909 2003-11-02  Karl Berry  <karl@gnu.org>
23910
23911         * config/srclist.txt (vasprintf.c): sync broken, sigh.
23912
23913 2003-10-31  Paul Eggert  <eggert@twinsun.com>
23914
23915         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
23916         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
23917         (read_filesystem_list): Set and use me_type_malloced.
23918         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
23919         whatever the type happens to be), for brevity and consistency.
23920         Check for size calculation overflow on Alphas running OSF/1.
23921
23922 2003-10-31  Jim Meyering  <jim@meyering.net>
23923
23924         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
23925
23926         * lib/linebuffer.c: Include <string.h> for declaration of memset.
23927
23928 2003-10-30  Paul Eggert  <eggert@twinsun.com>
23929             Bruno Haible  <bruno@clisp.org>
23930
23931         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
23932         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
23933
23934 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
23935
23936         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
23937         netbsd*-gnu*.  Suggested by Robert Millan.
23938
23939 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23940
23941         * modules/group-member: Depend on stdbool.
23942
23943 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23944
23945         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
23946
23947 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23948
23949         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
23950         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
23951         after the 'gnu' in these cases.  This fixes some bugs in the
23952         previous change, and is based on suggestions by Robert Millan.
23953
23954 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23955
23956         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
23957         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
23958         no longer needed.
23959         * lib/quotearg.c (quotearg_n_options): Use it.
23960         * lib/group-member.c: Include <stdbool.h>.
23961         (free_group_info): Arg is now const *; don't free arg.
23962         (get_group_info): Now returns bool and accepts struct group_info *,
23963         rather than returning a malloc'ed struct group_info *.
23964         All uses changed.  Check for overflow in internal size calculation.
23965
23966         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
23967         rather than xmalloc/xrealloc.
23968         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
23969         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
23970         conformance bug: the old code used a pointer after freeing the
23971         storage that it addressed.
23972         * lib/hash.c (hash_initialize): Simplify the code by using
23973         xalloc_oversized rather than doing it by hand.
23974         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
23975         the buffer preserved.  Use free and xmalloc instead.
23976         * lib/quotearg.c (quotearg_n_options): Likewise.
23977         Use a simpler test for size overflow.  Don't use xalloc_oversized
23978         because unsigned int might be wider than size_t (!); this suggests
23979         that we should switch from unsigned int to size_t for slot numbers.
23980
23981 2003-10-28  Paul Eggert  <eggert@twinsun.com>
23982
23983         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
23984         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
23985         NetBSD kernels.  Requested by Richard Stallman.
23986
23987 2003-10-27  Paul Eggert  <eggert@twinsun.com>
23988
23989         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
23990         to allocate the returned structure.  Do not allocate a subarray,
23991         as x2nrealloc will do that.
23992         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
23993         instead of xnrealloc.
23994         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
23995
23996 2003-10-27  Bruno Haible  <bruno@clisp.org>
23997
23998         * lib/stdbool_.h: Better support for BeOS.
23999
24000 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24001
24002         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
24003         now uses inline.
24004
24005 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24006
24007         * lib/xalloc.h (xalloc_oversized): New static inline function, for
24008         callers that want to do their own size-overflow checking.  Include
24009         <stdbool.h>, since xalloc_oversized returns bool.
24010         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
24011         to use xalloc_oversized.
24012
24013         Add two functions x2realloc, x2nrealloc, for programs that grow
24014         arrays dynamically by doubling their sizes.
24015         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
24016         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
24017         New functions.
24018
24019         Port to C99 semantics for 'inline' of external functions.
24020         Bug reported by Bruno Haible.
24021         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
24022         with the old contents of xnmalloc.
24023         (xnmalloc, xmalloc): Use it.
24024         (xnrealloc_inline): New static inline function,
24025         with the old contents of xnrealloc.
24026         (xnrealloc, xrealloc): Use it.
24027
24028         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
24029         that.
24030
24031 2003-10-26  Karl Berry  <karl@gnu.org>
24032
24033         * config/srclist.txt (COPYING.DOC): no longer available from
24034         /gd/gnuorg; don't know where the ultimate source is.
24035
24036 2003-10-25  Paul Eggert  <eggert@twinsun.com>
24037
24038         Fix several address-calculation bugs in the hash modules,
24039         plus some minor code cleanup.
24040
24041         * lib/hash.h: Include <stdbool.h>, for bool.
24042         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
24043         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
24044         hash_get_n_entries, hash_get_max_bucket_length,
24045         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
24046         hash_rehash): Use size_t rather than unsigned.
24047         * lib/hash.c (struct hash_table, hash_get_n_buckets,
24048         hash_get_n_buckets_used, hash_get_n_entries,
24049         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
24050         hash_get_entries, hash_do_for_each, hash_string, is_prime,
24051         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
24052         Likewise.
24053         (SIZE_MAX): Define if not defined.
24054         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
24055         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
24056         hash_print):
24057         Use const * when possible.
24058         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
24059         (check_tuning): Fix bug: if tuning parameters were very close to
24060         0 or 1, rounding errors could have caused subscript violations.
24061         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
24062         (hash_initialize): Add 'fail:' label
24063         to free table and return NULL, and use it to simplify code.
24064         Use calloc rather than clearing the storage ourself.
24065         (hash_initialize, hash_rehash): Check for arithmetic overflow in
24066         buffer size calculations.
24067         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
24068         Include <stddef.h>, for size_t.
24069         * lib/hash-pjw.c (hash_pjw): Likewise.
24070         Switch to method described by Bruno Haible.
24071         Include <limits.h>, for CHAR_BIT.
24072         (SIZE_BITS): New macro.
24073
24074 2003-10-23  Paul Eggert  <eggert@twinsun.com>
24075
24076         * m4/getline.m4 (AM_FUNC_GETLINE):
24077         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
24078         hosts.  Problem reported by Derek Robert Price in
24079         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
24080         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
24081         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
24082
24083 2003-10-21  Paul Eggert  <eggert@twinsun.com>
24084
24085         * lib/getndelim2.c (getndelim2): When size calculation overflows,
24086         ceiling the allocation at NMAX bytes rather than silently
24087         discarding input bytes before NMAX is reached.  This makes
24088         a difference only if NMAX exceeds SIZE_MAX / 2.
24089
24090         * lib/obstack.c: Merge from glibc.
24091         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
24092         Add libc_hidden_def (_obstack_newchunk).
24093         (_obstack_free) [! defined _LIBC]: Remove.
24094         [defined _LIBC]: Make a strong alias from obstack_free, rather than
24095         a clone of the function body.
24096         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
24097         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
24098
24099         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
24100         glibc.
24101         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
24102         arg to memcpy.
24103
24104         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
24105         (obstack_ptr_grow_fast, obstack_int_grow_fast):
24106         Don't use lvalue casts, as GCC plans to remove support for them
24107         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
24108         was also present in the non-GCC version, indicating that this
24109         code had always been buggy and had never been widely used.
24110         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
24111         Use the fast variant of each macro, rather than copying the
24112         definiens of the fast variant; that way, we'll be more likely to
24113         catch future bugs in the fast variants.
24114
24115 2003-10-20  Bruno Haible  <bruno@clisp.org>
24116
24117         * modules/wait-process: New file.
24118         * MODULES.html.sh (func_all_modules): Add wait-process.
24119
24120 2003-10-20  Bruno Haible  <bruno@clisp.org>
24121
24122         * m4/wait-process.m4: New file.
24123
24124 2003-10-20  Bruno Haible  <bruno@clisp.org>
24125
24126         * lib/wait-process.h: New file, from GNU gettext.
24127         * lib/wait-process.c: New file, from GNU gettext.
24128
24129 2003-10-19  Jim Meyering  <jim@meyering.net>
24130
24131         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
24132         HPUX 10.20.
24133
24134 2003-10-18  Karl Berry  <karl@gnu.org>
24135
24136         * config/config.guess: update from config.
24137
24138 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24139
24140         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
24141         (getgroups): First arg is int, not size_t.
24142         Don't let 'free' mangle errno.
24143
24144 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24145
24146         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
24147
24148 2003-10-16  Karl Berry  <karl@gnu.org>
24149
24150         * config/config.{guess,sub}: update from config.
24151
24152 2003-10-16  Jim Meyering  <jim@meyering.net>
24153
24154         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
24155         memcpy.
24156
24157 2003-10-15  Paul Eggert  <eggert@twinsun.com>
24158
24159         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
24160         (SIZE_MAX): Remove.
24161         (new_exclude, add_exclude_file): Initial size no longer needs to
24162         be a power of 2.
24163         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
24164         our own address arithmetic overflow checking.
24165
24166         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
24167         (fnmatch): Do not alloca more than 2000 wide characters;
24168         instead, use malloc for large buffers.
24169         Check for address arithmetic overflow, and return -1
24170         with errno set to ENOMEM in that case.
24171         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
24172         (NEW_PATTERN): Do not alloca more than 8000 bytes;
24173         instead, return -1.  Check for address arithmetic overflow.
24174
24175 2003-10-14  Paul Eggert  <eggert@twinsun.com>
24176
24177         Handle invalid suffixes and overflow independently, so that
24178         callers can treat them independently as needed.  Fix some bugs in
24179         suffix handling, e.g., "100k@" was not diagnosed as an invalid
24180         suffix for a human-readable blocksize.  The major caller-visible
24181         change is the addition of a new
24182         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
24183         that both overflow and suffix chars were found.
24184
24185         * lib/human.c (humblock): Don't check separately for invalid suffix
24186         char; that is xstrtoumax's job (now that its bug is fixed).
24187         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
24188         INTMAX_MAX]: New macros.
24189         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
24190         TYPE_MAXIMUM): New macros.
24191         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
24192         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
24193         if overflow occurs, as it's what __strtol does and it's more useful
24194         in practice.
24195         (__xstrtol): If __strtol reports some error other than ERANGE,
24196         reflect it to the caller as LONGINT_INVALID.  If it reports
24197         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
24198         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
24199         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
24200         value.
24201         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
24202         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
24203         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
24204         [defined UINTMAX_MAX]: New macros.
24205
24206 2003-10-14  Bruno Haible  <bruno@clisp.org>
24207
24208         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
24209
24210 2003-10-14  Bruno Haible  <bruno@clisp.org>
24211
24212         * m4/sig_atomic_t: New file, from GNU gettext.
24213         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
24214
24215 2003-10-14  Bruno Haible  <bruno@clisp.org>
24216
24217         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
24218         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
24219         Also use volatile where needed.
24220
24221 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24222
24223         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
24224         Change maintainer from Bruno Haible to 'all'.
24225
24226 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24227
24228         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
24229
24230 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24231
24232         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
24233         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
24234         and define in terms of the other primitives.
24235         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
24236         (SIZE_MAX): Define if not already defined.
24237         (array_size_overflow): New function.
24238         (xalloc_die): Abort instead of exiting if 'error' returns.
24239         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
24240         (xmalloc, xrealloc): Use them.
24241         (xcalloc): Check for address arithmetic overflow.
24242         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
24243         a bit faster than strcpy.
24244
24245 2003-10-10  Simon Josefsson  <jas@extundo.com>
24246
24247         * modules/argp (Depends-on): Add restrict and strcase.
24248
24249 2003-10-10  Simon Josefsson  <jas@extundo.com>
24250
24251         * m4/argp.m4: Add AC_C_INLINE.
24252
24253 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24254
24255         Merge getpass from libc, plus a few fixes.
24256
24257         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
24258         Include <stdbool.h>.
24259         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
24260         __fsetlocking to empty.
24261         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
24262         do include <bits/libc-lock.h>.
24263         Do not include <fcntl.h>; not needed.
24264         [_LIBC]: Include <wchar.h>.
24265         (NOTCANCEL_MODE): New macro.
24266         (flockfile, funlockfile) [_LIBC]: New macros.
24267         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
24268         [!_LIBC]: New macros.
24269         (call_fclose): New function.
24270         (getpass): Use it.  Save tty stream separately; this simplifies the
24271         code and makes it more reliable if stdin happens to equal stdout.
24272         Invoke __fsetlocking on tty.
24273         Handle thread cancellation if needed.
24274         Namespace cleanup (use __tcgetattr, __getline).
24275         Use bool for Booleans.
24276         [USE_IN_LIBIO]: Handle wide streams.
24277         [!_LIBC]: Unconditionally do the fseek, since we don't know what
24278         stream might go where.
24279
24280         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
24281         doesn't have to include <stdio.h> before us.
24282         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
24283         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
24284         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
24285         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
24286         if not declared, so that we can use getpass.c code from libc without
24287         rewriting it.
24288         (flockfile, ftrylockfile, funlockfile): New macros.
24289
24290 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24291
24292         * modules/getpass: Depend on stdbool.
24293
24294 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24295
24296         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
24297
24298 2003-10-07  Karl Berry  <karl@gnu.org>
24299
24300         * config/config.{guess,sub}: update from config.
24301
24302 2003-10-06  Jim Meyering  <jim@meyering.net>
24303             Bruno Haible  <bruno@clisp.org>
24304
24305         This lets translators provide better translations for the
24306         "Written by ..." part of --version output.
24307         * lib/version-etc.h: Include stdarg.h.
24308         (version_etc_copyright): Declare as readonly.
24309         (version_etc): Make this function variadic with a NULL-terminated list
24310         of author name strings.
24311         (version_etc_va): New declaration.
24312         * lib/version-etc.c: Include stdarg.h, stdlib.h.
24313         (version_etc_copyright): Declare as readonly.
24314         (version_etc_va): New function. Provide a different translatable string
24315         for each possible number of authors < 10. Abbreviate when there are 10
24316         authors or more.
24317         (version_etc): Make this function variadic. Call version_etc_va.
24318         Suggestion from Gary V. Vaughan.
24319
24320         * lib/long-options.h (parse_long_options): Change prototype: the
24321         authors string is moved to the end and becomes variadic.
24322         * lib/long-options.c: Include stdarg.h.
24323         (parse_long_options): Make this function variadic, too.
24324         Call version_etc_va, not version_etc.
24325
24326 2003-10-06  Bruno Haible  <bruno@clisp.org>
24327
24328         * modules/version-etc-2: Remove file.
24329         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
24330
24331 2003-10-06  Bruno Haible  <bruno@clisp.org>
24332
24333         * modules/fatal-signal: New file.
24334         * MODULES.html.sh (func_all_modules): Add fatal-signal.
24335
24336 2003-10-06  Bruno Haible  <bruno@clisp.org>
24337
24338         * m4/fatal-signal.m4: New file.
24339         * m4/signalblocking.m4: New file, from GNU gettext.
24340
24341 2003-10-06  Bruno Haible  <bruno@clisp.org>
24342
24343         * lib/version-etc-2.h: Remove file.
24344         * lib/version-etc-2.c: Remove file.
24345
24346 2003-10-06  Bruno Haible  <bruno@clisp.org>
24347
24348         * lib/fatal-signal.h: New file, from GNU gettext.
24349         * lib/fatal-signal.c: New file, from GNU gettext.
24350
24351 2003-10-05  Paul Eggert  <eggert@twinsun.com>
24352
24353         * README: Rework advice for preventing empty .o files.
24354         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
24355         not <sys/types.h>.
24356
24357 2003-10-04  Karl Berry  <karl@gnu.org>
24358
24359         * lib/argp*: update from libc.
24360
24361 2003-10-04  Karl Berry  <karl@gnu.org>
24362
24363         * config/config.{guess,sub}: update from config.
24364
24365 2003-10-02  Bruno Haible  <bruno@clisp.org>
24366
24367         * modules/lchown (Include): Add lchown.h.
24368         * modules/time_r (Include): Use "..." syntax.
24369         * modules/xgetdomainname (Include): Add xgetdomainname.h.
24370
24371 2003-10-01  Simon Josefsson  <jas@extundo.com>
24372
24373         * MODULES.html.sh (func_all_modules): Move gethostname from section
24374         'based on' to section 'lacking' POSIX:2001.
24375
24376 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
24377
24378         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
24379         to output mode on the same stream.
24380
24381 2003-09-29  Paul Eggert  <eggert@twinsun.com>
24382
24383         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
24384         Fix arg typo in previous patch.
24385
24386 2003-09-28  Jim Meyering  <jim@meyering.net>
24387
24388         * lib/error.c: Correct cpp indentation.
24389
24390 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24391
24392         * modules/free: New file.
24393
24394 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24395
24396         * m4/free.m4: New file.
24397
24398 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24399
24400         * lib/minmax.h (MIN, MAX)
24401         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
24402         Omit the special code that used __typeof__, since we worry that
24403         it could be more trouble than it's worth.  See:
24404         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
24405         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
24406
24407         * lib/free.c: New file.
24408
24409 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
24410
24411         Trivial fixes to Makefile.am parts of module listings.
24412         * modules/strstr: Append strstr.h to lib_SOURCES.
24413         * modules/strcase: Likewise, for strcase.h.
24414
24415 2003-09-27  Karl Berry  <karl@gnu.org>
24416
24417         * config/mkinstalldirs: update from automake.
24418
24419 2003-09-26  Paul Eggert  <eggert@twinsun.com>
24420
24421         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
24422         (error_tail): Do not loop, reallocating temporary buffer, since
24423         the output cannot contain more wide characters than the input
24424         contains bytes, the size must be big enough already.  This avoids
24425         one potential size overflow calculation.  Check for size overflow
24426         when calculating temporary buffer size.  Free temporary buffer
24427         when done, if it was allocated with malloc; this plugs a memory
24428         leak.  Remove casts from void * to pointers, that are no longer
24429         needed now that we're assuming C89 or better.
24430
24431         Merge error changes from glibc.
24432
24433         * lib/error.c, error.h: Update copyright notice header to match glibc.
24434         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
24435         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
24436         Disable cancellation while printing error.
24437         * lib/error.h: Prepend __ to parameter names.
24438
24439 2003-09-26  Jim Meyering  <jim@meyering.net>
24440
24441         * lib/error.c (error_tail): Move some declarations
24442         into inner scope where the local variables are used.
24443
24444 2003-09-26  Bruno Haible  <bruno@clisp.org>
24445
24446         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
24447         stpncpy().
24448         Don't define stpncpy through config.h; it's now done through stpncpy.h.
24449
24450 2003-09-26  Bruno Haible  <bruno@clisp.org>
24451
24452         * lib/stpncpy.h (gnu_stpncpy): New declaration.
24453         (stpncpy): Define as alias for gnu_stpncpy.
24454         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
24455
24456 2003-09-25  Simon Josefsson  <jas@extundo.com>
24457
24458         * lib/xgetdomainname.h: New file.
24459         * lib/xgetdomainname.c: New file.
24460
24461 2003-09-25  Simon Josefsson  <jas@extundo.com>
24462             Bruno Haible  <bruno@clisp.org>
24463
24464         * modules/getdomainname: New file.
24465         * modules/xgetdomainname: New file.
24466         * MODULES.html.sh (func_all_modules): Add getdomainname,
24467         xgetdomainname.
24468
24469 2003-09-25  Simon Josefsson  <jas@extundo.com>
24470             Bruno Haible  <bruno@clisp.org>
24471
24472         * m4/getdomainname.m4: New file.
24473
24474 2003-09-25  Simon Josefsson  <jas@extundo.com>
24475             Bruno Haible  <bruno@clisp.org>
24476
24477         * lib/getdomainname.h: New file.
24478         * lib/getdomainname.c: New file.
24479
24480 2003-09-25  Karl Berry  <karl@gnu.org>
24481
24482         * lib/argp-fmtstream.c, argp-help.c: update from libc.
24483
24484 2003-09-25  Karl Berry  <karl@gnu.org>
24485
24486         * config/install-sh: update from automake.
24487
24488 2003-09-25  Bruno Haible  <bruno@clisp.org>
24489
24490         * modules/version-etc-2: New file, from modules/version-etc with
24491         modifications.
24492         * MODULES.html.sh (func_all_modules): Add version-etc-2.
24493
24494 2003-09-25  Bruno Haible  <bruno@clisp.org>
24495
24496         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
24497         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
24498
24499 2003-09-24  Simon Josefsson  <jas@extundo.com>
24500
24501         * modules/xgethostname: Add xgethostname.h.
24502
24503 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24504
24505         * lib/linebuffer.c (freebuffer): Don't free the argument, just
24506         the buffer associated with the argument.  Bug reported by
24507         Simon Josefsson.
24508
24509 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24510
24511         * README: Document assumptions that 'int' is at least 32 bits
24512         wide, that integer arithmetic is 2's complement without overflow,
24513         that there are no holes in integer values, that adding sizes of
24514         two nonoverlapping objects can't overflow, and that all-bits-zero
24515         yields scalar zero.  Fix spelling and capitalization typos.
24516
24517 2003-09-19  Karl Berry  <karl@gnu.org>
24518
24519         * lib/argp.h: update from libc.
24520
24521 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24522
24523         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
24524         to avoid spurious warnings like "AC_RUN_IFELSE was called before
24525         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
24526
24527 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24528
24529         * gnulib-tool: Use "test -h", not "test -L", for portability
24530         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
24531         (tags_regexp): Remove, since \| doesn't conform to POSIX.
24532         (sed_extract_prog): Issue s commands one-by-one, rather than
24533         using \| in one s command.
24534
24535 2003-09-16  Paul Eggert  <eggert@twinsun.com>
24536
24537         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
24538         input error, instead of returning NULL the next time we are called
24539         (and therefore losing track of errno).
24540
24541 2003-09-16  Bruno Haible  <bruno@clisp.org>
24542
24543         * gnulib-tool (func_create_testdir): Warn about duplicated
24544         dependencies.
24545
24546 2003-09-15  Paul Eggert  <eggert@twinsun.com>
24547
24548         * modules/argmatch, modules/fatal, modules/obstack,
24549         modules/xalloc, modules/xgethostname: Sort dependencies by
24550         importance, not alphabetically.
24551
24552 2003-09-15  Paul Eggert  <eggert@twinsun.com>
24553
24554         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
24555         fails, so that the caller gets the proper errno.
24556
24557         * lib/readutmp.c (read_utmp): Likewise.
24558         Check for fstat error.  Close stream and free storage
24559         when failing.
24560
24561 2003-09-14  Karl Berry  <karl@gnu.org>
24562
24563         * config/srclist.txt (strdup.c): disable for c89 changes.
24564
24565 2003-09-14  Jim Meyering  <jim@meyering.net>
24566
24567         * lib/getloadavg.c: Correct cpp indentation.
24568         * lib/strdup.c: Likewise.
24569         * lib/vasnprintf.c: Likewise.
24570
24571 2003-09-14  Bruno Haible  <bruno@clisp.org>
24572
24573         * modules/fwriteerror: New file.
24574         * MODULES.html.sh (func_all_modules): Add fwriteerror.
24575
24576 2003-09-14  Bruno Haible  <bruno@clisp.org>
24577
24578         * lib/fwriteerror.h: New file.
24579         * lib/fwriteerror.c: New file.
24580
24581 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24582
24583         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
24584         modules/xgethostname, modules/xalloc: Depend on exit.
24585
24586 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24587
24588         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
24589
24590         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
24591         and AC_MINIX, too, so that their extensions are available.
24592
24593         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
24594         This macro has been superseded by gl_BACKUPFILE.
24595
24596         More patches to assume C89 or better.
24597
24598         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
24599
24600         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
24601         unconditionally.
24602         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
24603         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
24604         Include <string.h>, <stdlib.h> unconditionally.
24605         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
24606         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
24607         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
24608         headers or for string.h.
24609         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
24610         or strtoul.
24611
24612         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
24613         headers.
24614         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
24615         * m4/userspec.m4 (gl_USERSPEC): Likewise.
24616         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
24617         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
24618         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
24619         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
24620         memcpy, memset.
24621         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
24622         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
24623         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
24624         strtol.
24625         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
24626         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
24627         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
24628         strtoul.
24629
24630 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24631
24632         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
24633         * lib/obstack.c [!defined _LIBC]: Likewise.
24634         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
24635         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
24636         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
24637
24638         More changes to assume C89 or better.
24639
24640         * lib/error.c (error_tail): Assume vprintf.
24641
24642         * lib/argmatch.c (getenv): Remove decl.
24643         * lib/progreloc.c (get_full_program_name): Define via prototype.
24644         * lib/setenv.c (clearenv): Likewise.
24645         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
24646         needed.
24647         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
24648         (malloc, memcpy): Remove decls.
24649         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
24650         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
24651         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24652         (memcpy): Remove macro.
24653         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
24654         (__P): Remove.  All uses removed.
24655         (PTR): Remove.  All uses changed to void *.
24656         (CHAR_BIT, NULL): Remove.
24657         (spaces, zeros, memset_space, memset_zero)
24658         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
24659         Remove.
24660         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
24661         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
24662         Define with prototype.
24663         Remove now-unnecessary prototype decl.
24664         (extra_args_spec): Assume ANSI C.  All uses changed.
24665         (extra_args_spec_iso): Remove.
24666         (my_strftime, emacs_strftimeu): Define via prototype.
24667         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
24668         unconditionally.
24669         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
24670         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
24671         (strtoul, strtol): Remove decls.
24672         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
24673         LONG_MAX): Remove.
24674         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24675         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
24676         (LOCALE_PARAM_PROTO): New macro.
24677         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
24678         (INTERNAL (strtol), strtol): Define with a prototype.
24679         (PARAMS): Remove.  All uses removed.
24680         * lib/tempname.c: Include <string.h> unconditionally.
24681         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
24682         * lib/xgethostname.c (main): Define with a prototype.
24683         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
24684         Include <stdlib.h> unconditionally.
24685         (calloc, malloc, realloc, free): Remove decls.
24686         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
24687         Include <stdlib.h> unconditionally.  Sort include file names.
24688         (strtod): Remove.
24689         (xstrtod): Define with a prototype.
24690         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
24691         (strtol, strtoul): Remove decls.
24692
24693 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24694
24695         More patches to assume C89 or better.
24696         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
24697         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
24698         string.h, memchr, STDC_HEADERS.
24699
24700 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24701
24702         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
24703         Include <stdlib.h>, <string.h> unconditionally.
24704         Remove now-unnecessary cast to char *.
24705         * lib/strnlen.c: Include <string.h> unconditionally.
24706         * lib/yesno.c (yesno): Define with a prototype.
24707
24708 2003-09-11  Bruno Haible  <bruno@clisp.org>
24709
24710         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
24711
24712 2003-09-10  Jim Meyering  <jim@meyering.net>
24713
24714         * lib/error.c: Correct indentation of cpp directives.
24715
24716 2003-09-10  Bruno Haible  <bruno@clisp.org>
24717
24718         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
24719         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
24720         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
24721         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
24722         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
24723         <stdlib.h> and <string.h> checks.
24724         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
24725         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
24726
24727 2003-09-10  Bruno Haible  <bruno@clisp.org>
24728
24729         * lib/strcspn.c: Include <string.h> unconditionally.
24730         * lib/strpbrk.c: Include <string.h> unconditionally.
24731         * lib/strstr.c: Include <string.h> unconditionally.
24732         * lib/unicodeio.c: Include <string.h> unconditionally.
24733         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
24734         * lib/unsetenv.c: Likewise.
24735         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
24736         * lib/yesno.c: Include <stdlib.h> unconditionally.
24737         (rpmatch): Add prototype.
24738
24739 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24740
24741         More patches to assume C89 or better.
24742         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
24743         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
24744         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
24745         or for string.h.
24746         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
24747         stdlib.h.
24748         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
24749         C headers.
24750         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
24751         string.h.
24752         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
24753         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
24754         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
24755         or for string.h.
24756         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
24757         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
24758         C headers.
24759         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
24760         memcpy.
24761         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
24762         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
24763         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
24764         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
24765         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
24766         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
24767         string.h, free.
24768         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
24769         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
24770         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
24771         C headers, or for string.h.
24772         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
24773         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
24774         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
24775         headers, memory.h, stdlib.h, string.h, strings.h.
24776         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
24777         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
24778         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
24779         strchr.
24780         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
24781         headers, memory.h, string.h.
24782         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
24783         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
24784         free.
24785         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
24786         headers.
24787         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
24788         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
24789         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
24790         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
24791         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
24792
24793 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24794
24795         More K&R removal.
24796
24797         * lib/acosl.c (main): Use a prototype.
24798         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
24799         tanl.c: Likewise.
24800
24801         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
24802
24803         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
24804         (getopt, etopt_long, getopt_long_only, _getopt_internal)
24805         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
24806         with a prototype.
24807         * lib/getopt.c (const): Remove macro.
24808         Include <string.h> unconditionally.
24809         (my_index): Remove; all uses changed to strchr.
24810         (strlen): Remove decl.
24811         (exchange): Remove forward decl; no longer needed.
24812         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
24813         Define with prototype.
24814         * lib/getopt1.c (const): Remove macro.
24815         (getopt_long, getopt_long_only, main): Define with prototype.
24816
24817         * lib/getugroups.c: Include <string.h> unconditionally.
24818
24819         * lib/getusershell.c: Include <stdlib.h> unconditionally.
24820         (getusershell, setusershell, endusershell, readname, main):
24821         Define with prototypes.
24822
24823         * lib/group-member.c: Include group-member.h first.
24824         Include <stdlib.h> unconditionally.
24825
24826         * lib/hard-locale.c: Include hard-locale.h first.
24827         Include <stdlib.h>, <string.h> unconditionally.
24828
24829         * lib/hash.c (free, malloc): Remove decls.
24830         Include <stdlib.h> unconditionally.
24831
24832         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
24833         (getenv): Do not declare.
24834
24835         * lib/idcache.c: Include <string.h> unconditionally.
24836
24837         * lib/long-options.c: Include long-options.h first, to test interface.
24838         Include <stdlib.h> unconditionally.
24839
24840         * lib/makepath.c: Include makepath.h first, to test interface.
24841         Include <stdlib.h> and <string.h> unconditionally.
24842
24843         * lib/linebuffer.c: Include <stdlib.h>.
24844         (free): Remove decl.
24845
24846         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
24847         stddef.h. rpl_malloc returns void *, not char *.
24848         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
24849         prototype.
24850
24851         * lib/md5.h: Include <limits.h> unconditionally.
24852         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
24853         (__P): Remove; all uses removed.
24854         * lib/md5.c: Include "md5.h" first.
24855         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
24856         md5_buffer, md5_process_bytes, md5_process_block):
24857         Define with prototypes.
24858         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
24859         * lib/sha.c: Include "sha.h" first.
24860         Include <stdlib.h>, <string.h> unconditionally.
24861
24862         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
24863         * lib/memcmp.c (__ptr_t): Likewise.
24864         * lib/memrchr.c (__ptr_t): Likewise.
24865         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
24866         Include <string.h> unconditionally.
24867         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
24868         * lib/memchr.c: Include <stdlib.h> unconditionally.
24869         * lib/memchr.c (LONG_MAX): Remove.
24870         * lib/memrchr.c (LONG_MAX): Likewise.
24871         * lib/memchr.c (__memchr): Define via a prototype.
24872         * lib/memrchr.c (__memrchr): Likewise.
24873         * lib/memcmp.c (__P): Remove, and remove all uses.
24874         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
24875         Remove forward decls; no longer needed.
24876         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
24877         Use types required by C89 in prototype.
24878
24879         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
24880         * lib/savedir.c: Likewise.
24881         * lib/mkdir.c (free): Remove decl.
24882         * lib/rmdir.c (rmdir): Define with a prototype.
24883         * lib/savedir.c: Include savedir.h first, to test interface.
24884
24885         * lib/mktime.c (STDC_HEADERS): Remove.
24886         Include <stdlib.h>, <string.h> unconditionally.
24887
24888         * lib/modechange.c: Include <stdlib.h> unconditionally.
24889         (malloc): Remove decl.
24890
24891         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
24892         (free): Remove decl.
24893
24894         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
24895         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
24896         (This type really should be intptr_t, but that's a C99ism.)
24897         (_obstack_memcpy): Remove: all uses changed to memcpy.
24898         Include <string.h> unconditionally.
24899         (struct obstack): Assume __STDC__ for types of members
24900         chunkfun, freefun, extra_arg.
24901         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
24902         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
24903         obstack_begin, obstack_specify_allocation,
24904         obstack_specify_allocation_with_arg, obstack_chunkfun,
24905         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
24906         Remove unprototyped decls and the macros that use them.
24907         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
24908         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
24909         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
24910         (defined __STDC__ && __STDC__)]:
24911         Remove nonprototyped code.
24912         Include <stdlib.h> unconditionally.
24913         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
24914         _obstack_allocated_p, _obstack_free, obstack_free,
24915         _obstack_memory_used, print_and_abort):
24916         Define using prototypes.
24917         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
24918         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
24919         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
24920         obstack_next_free, obstack_object_size, obstack_room) [0]:
24921         Remove unused, unprototyped code.
24922
24923         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
24924
24925         * lib/physmem.c (physmem_total, physmem_available, main): Define
24926         with prototypes.
24927
24928         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
24929         (main): Define with a prototype.
24930
24931         * lib/posixver.c (getenv): Remove decl.
24932
24933         * lib/putenv.c (malloc): Returns void *, not char *.
24934         Include <string.h> unconditionally.
24935         (strchr, memcpy, NULL): Do not define.
24936
24937         * lib/readtokens.c: Include readtokens.h first, to test interface.
24938         Include <stdlib.h>, <string.h> unconditionally.
24939         (init_tokenbuffer): Define with a prototype.
24940
24941         * lib/regex.c (PARAMS): Remove.  All uses removed.
24942         All uses of _RE_ARGS removed, too.
24943         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
24944         unconditionally.
24945         (bzero): Assume memset exists.
24946         (memcmp, memcpy, NULL): Remove.
24947         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
24948         char, or assignments to local vars of type signed char.
24949         (init_syntax_once, PREFIX(extract_number_and_incr),
24950         PREFIX(print_partial_compiled_pattern),
24951         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
24952         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
24953         PREFIX(regex_grow_registers), PREFIX(regex_compile),
24954         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
24955         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
24956         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
24957         wcs_compile_range, byte_compile_range, truncate_wchar,
24958         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
24959         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
24960         count_mbs_length, wcs_re_match_2_internal,
24961         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
24962         PREFIX(alt_match_null_string_p),
24963         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
24964         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
24965         regfree, PREFIX(extract_number)): Define with prototype.  Remove
24966         now-unnecessary declaration, if any.
24967         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
24968         regcomp, regexec):
24969         Remove now-unnecessary casts among pointer types.
24970         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
24971
24972         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
24973         (free): Remove decl.
24974
24975         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
24976
24977         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
24978         (free): Remove decl.
24979
24980         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
24981         * lib/xgetcwd.c: Likewise.
24982
24983         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
24984         (free): Remove decl.
24985
24986         * lib/strchrnul.c (strchrnul): Define with a prototype.
24987         Fix bug: c_in was not converted to char before searching.
24988
24989         The following changes are not K&R related:
24990
24991         * lib/group-member.h: Include <sys/types.h>, so that this file is
24992         self-contained.
24993         * lib/makepath.h: Likewise.
24994
24995         * lib/getusershell.c (readname, default_index, line_size, readname):
24996         Use size_t, not int, for sizes.
24997         (readname): If the size overflows, report an error instead of
24998         looping forever.
24999
25000 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25001
25002         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
25003         libc.
25004
25005 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25006
25007         * README: New section: portability guidelines.
25008
25009 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25010
25011         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
25012         C89 spec.
25013
25014 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25015
25016         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
25017
25018 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25019
25020         Assume C89 or better; remove K&R cruft.
25021         A few of these changes were first proposed by Derek Robert Price
25022         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
25023
25024         * lib/addext.c: Include <string.h> unconditionally.
25025         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
25026         Don't declare getenv or malloc.
25027
25028         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
25029         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
25030         (NULL): Remove.
25031         (find_stack_direction, alloca): Use prototypes.
25032
25033         * lib/atexit.c (atexit): Define using a prototype.
25034
25035         * lib/basename.c, dirname.c, stripslash.c:
25036         Include <string.h> unconditionally.
25037
25038         * lib/bcopy.c: Include <stddef.h>.
25039         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
25040
25041         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
25042
25043         * lib/error.h (error, error_at_line, error_print_progname)
25044         [! (defined (__STDC__) && __STDC__)]: Remove decls.
25045         * lib/error.c: Include error.h first, to check interface.
25046         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25047         (VA_START): Remove; all uses changeed to va_start.
25048         (exit, strerror): Remove decls.
25049         (error_print_progname): Prototype uncondionally.
25050         Don't include <errno.h>; no longer needed.
25051         (private_strerror): Remove.
25052         (error_tail): Always define.
25053         (error, error_at_line): Assume C89 or better; always use prototypes.
25054         * lib/fatal.c: Include "fatal.h" first, to test interface.
25055         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25056         (VA_START): Remove; all uses changed to va_start.
25057         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
25058         this case.
25059         (exit): Remove decl.
25060         (fatal): Prototype unconditionally.  Assume va_start works.
25061         Abort at end, to pacify gcc.
25062
25063         * lib/euidaccess.c (main): Define with a prototype.
25064
25065         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
25066
25067         * lib/exitfail.c: Include <stdlib.h> unconditionally.
25068
25069         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
25070         prototypes.
25071         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
25072         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
25073         (getenv): Remove decl.
25074         (fnmatch): Define using a prototype.
25075         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
25076         (FCT): Define using a prototype.
25077
25078         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
25079
25080         * lib/gethostname.c: Include <stddef.h>.
25081         (gethostname): Define with prototype.  Length is size_t, not int.
25082
25083 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25084
25085         Assume C89 or better; remove K&R cruft.
25086         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
25087         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
25088         string.h, getenv, malloc.
25089         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
25090         headers.
25091         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
25092         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
25093         do not check for strerror.
25094         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
25095         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
25096         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
25097         do not check for doprnt or vprintf.
25098         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
25099         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
25100
25101 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25102
25103         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
25104         getversion.c should have been removed then, but was accidentally
25105         preserved.
25106
25107         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
25108         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
25109
25110 2003-09-08  Karl Berry  <karl@gnu.org>
25111
25112         * config/config.sub, config.guess, srclistvars.sh: update from savannah
25113                 config, forget about prep.
25114
25115         * config/depcomp, missing: update from automake.
25116
25117 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25118
25119         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
25120         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25121
25122 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25123
25124         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
25125         copy_tm_result.  Bug reported by Simon Josefsson in
25126         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25127
25128 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25129
25130         * m4/time_r.m4: New file.
25131         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
25132         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
25133         is. Check for timegm declaration.
25134         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
25135         Do not check for gmtime_r.
25136         Replace mktime if __mktime_internal does not exist and if mktime
25137         hasn't been replaced already.
25138
25139 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25140
25141         * lib/time_r.c, lib/time_r.h: New files.
25142
25143         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
25144         __localtime_r.
25145         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
25146         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
25147
25148         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
25149         __gmtime_r.
25150         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
25151         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
25152         Include <time_r.h>.
25153
25154         * lib/timegm.c: Switch to glibc implementation, with the following
25155         changes:
25156         [defined HAVE_CONFIG_H]: Include <config.h>.
25157         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
25158         (__mktime_internal) [!defined _LIBC]: New decl.
25159         (__gmtime_r) [!defined _LIBC]: New macro and function.
25160         (timegm): Use a prototype, since gnulib assumes C89.
25161         Do not bother declaring tmp to be const, as it's not really usefu.
25162         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
25163         (timegm): Declare only if HAVE_DECL_TIMEGM.
25164
25165 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25166
25167         * MODULES.html.sh (func_all_modules): Add time_r.
25168         * modules/time_r: New file.
25169         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
25170         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
25171
25172 2003-09-03  Paul Eggert  <eggert@twinsun.com>
25173
25174         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
25175         Bug reported by Lute Kamstra in
25176         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
25177
25178         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
25179         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
25180         course with correspondingly smaller numbers for tomorrow and
25181         yesterday.  From Tadayoshi Funaba.  Originally installed into
25182         sh-utils on 1999-08-07, but the patch got lost (I guess during the
25183         coreutils merge?).
25184
25185 2003-08-31  Simon Josefsson  <jas@extundo.com>
25186
25187         * modules/timegm: New file.
25188         * MODULES.html.sh (func_all_modules): Add timegm.
25189
25190 2003-08-31  Simon Josefsson  <jas@extundo.com>
25191
25192         * m4/timegm.m4: New file.
25193
25194 2003-08-31  Simon Josefsson  <jas@extundo.com>
25195
25196         * lib/timegm.h: New file.
25197         * lib/timegm.c: New file.  Based on
25198         wget-1.8.2/src/http.c:mktime_from_utc.
25199
25200 2003-08-31  Karl Berry  <karl@gnu.org>
25201
25202         * lib/argp.h: update from libc.
25203
25204 2003-08-28  Bruno Haible  <bruno@clisp.org>
25205
25206         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
25207         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
25208         followed by '#define fnmatch fnmatch_posix' gives an error.
25209
25210 2003-08-28  Bruno Haible  <bruno@clisp.org>
25211
25212         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
25213         warning on QNX, which defines O_BINARY to 000000.
25214
25215 2003-08-27  Jim Meyering  <jim@meyering.net>
25216
25217         * m4/mkstemp.m4: Require that the system mkstemp be able to create
25218         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
25219         would fail after 32.  Reported by Danny Levinson.  Details here:
25220         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
25221
25222 2003-08-24  Bruno Haible  <bruno@clisp.org>
25223
25224         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
25225         MSVC7 <stdio.h> is included later.
25226
25227 2003-08-22  Simon Josefsson  <jas@extundo.com>
25228
25229         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
25230
25231 2003-08-20  Karl Berry  <karl@gnu.org>
25232
25233         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
25234
25235 2003-08-20  Bruno Haible  <bruno@clisp.org>
25236
25237         * modules/progname: New file.
25238         * MODULES.html.sh (func_all_modules): Add progname.
25239
25240 2003-08-20  Bruno Haible  <bruno@clisp.org>
25241
25242         * lib/progname.h: New file, from GNU gettext.
25243         * lib/progname.c: New file, from GNU gettext.
25244         * lib/progreloc.c: New file, from GNU gettext.
25245
25246 2003-08-19  Jim Meyering  <jim@meyering.net>
25247
25248         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
25249         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
25250
25251 2003-08-19  Bruno Haible  <bruno@clisp.org>
25252
25253         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
25254         more.
25255
25256 2003-08-19  Bruno Haible  <bruno@clisp.org>
25257
25258         * lib/xstrdup.c: Assume <string.h> exists.
25259
25260 2003-08-18  Paul Eggert  <eggert@twinsun.com>
25261
25262         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
25263         in makefile rules.
25264
25265 2003-08-18  Jim Meyering  <jim@meyering.net>
25266
25267         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
25268         * m4/lib-ld.m4: Likewise.
25269
25270 2003-08-18  Jim Meyering  <jim@meyering.net>
25271
25272         * lib/setenv.h: Indent nested cpp directive.
25273         * lib/vasnprintf.c: Remove trailing blanks.
25274
25275 2003-08-17  Simon Josefsson  <jas@extundo.com>
25276
25277         * modules/xstrndup: New file.
25278         * MODULES.html.sh (func_all_modules): Add xstrndup.
25279
25280 2003-08-17  Simon Josefsson  <jas@extundo.com>
25281
25282         * modules/argp: Fix autoconf macro name. Add more dependencies.
25283
25284 2003-08-17  Simon Josefsson  <jas@extundo.com>
25285
25286         * m4/xstrndup.m4: New file.
25287
25288 2003-08-17  Simon Josefsson  <jas@extundo.com>
25289
25290         * m4/argp.m4: New file.
25291
25292 2003-08-17  Simon Josefsson  <jas@extundo.com>
25293             Bruno Haible  <bruno@clisp.org>
25294
25295         * lib/xstrndup.h: New file.
25296         * lib/xstrndup.c: New file.
25297
25298 2003-08-17  Bruno Haible  <bruno@clisp.org>
25299
25300         * modules/strndup (Files, Include): Add lib/strndup.h.
25301
25302 2003-08-17  Bruno Haible  <bruno@clisp.org>
25303
25304         * modules/euidaccess (Files): Add lib/euidaccess.h.
25305
25306 2003-08-17  Bruno Haible  <bruno@clisp.org>
25307
25308         * lib/strndup.h: New file.
25309
25310 2003-08-17  Bruno Haible  <bruno@clisp.org>
25311
25312         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
25313         like AC_GNU_SOURCE.
25314         * modules/extensions (configure.ac): Comment out the invocation of
25315         gl_USE_SYSTEM_EXTENSIONS.
25316
25317 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25318
25319         Merges from coreutils, etc.
25320         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
25321         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
25322         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
25323         fixing a typo.
25324         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
25325         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
25326
25327 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25328
25329         Document merge from coreutils.
25330         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
25331         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
25332         * modules/utime: Add m4/utimes-null.m4.
25333
25334 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25335
25336         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
25337         space, undoing this 2003-08-12 change:
25338         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25339
25340 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25341
25342         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
25343         strtoul.c from libc, undoing this 2003-08-12 change:
25344         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25345
25346 2003-08-16  Jim Meyering  <jim@meyering.net>
25347
25348         Merges from coreutils.
25349         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
25350         prefix.  Adjust cache variables similarly.  Create 500 rather than
25351         just 300 files, to exercise bug on Darwin6.5, too.
25352         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
25353         $missing_dir.
25354         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
25355         AM_SYS_POSIX_TERMIOS.
25356         Reported by mkc@mathdogs.com.
25357         Also change use of $am_cv_sys_posix_termios
25358         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
25359         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
25360         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
25361         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
25362         in /proc/mounts until it finds one with matching device number.  This
25363         is unnecessary when the FILE argument *is* a mount point.  No stat call
25364         is necessary in that case.  So, disable the statvfs-testing code on
25365         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
25366         as RedHat bug# 84846.
25367         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25368         to 1MB, so as not to render systems with no stack size limit (e.g.,
25369         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25370         Include <unistd.h>.  On some systems,
25371         it is required for the definition of _SC_PAGESIZE.
25372
25373 2003-08-16  Jim Meyering  <jim@meyering.net>
25374
25375         Merge from coreutils.
25376         * lib/xstrtoimax.c: #else #if -> #elif.
25377         * lib/xstrtoumax.c: Likewise.
25378
25379 2003-08-16  Jim Meyering  <jim@meyering.net>
25380
25381         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
25382         * m4/utimes.m4: Removed.
25383         * m4/utimes-null.m4: Renamed from utimes.m4.
25384
25385         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25386         to 1MB, so as not to render systems with no stack size limit (e.g.,
25387         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25388         Include <unistd.h>.  On some systems,
25389         it is required for the definition of _SC_PAGESIZE.
25390
25391 2003-08-16  Jim Meyering  <jim@meyering.net>
25392         and Paul Eggert  <eggert@cs.ucla.edu>
25393
25394         Merges from coreutils, etc.
25395
25396         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
25397         using the latest version from cvs.  This avoids problems with #line
25398         directives using a vendor (Sun) compiler.
25399         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
25400         Don't set GETGROUPS_LIB here; now it's
25401         done via getgroups.m4's wrapper function.
25402         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
25403         rather than just in sh-util/configure.in, so that the
25404         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
25405         same.
25406         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
25407         AC_FUNC_GETLOADAVG where to find getloadavg.c.
25408         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
25409         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
25410         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
25411         Remove code that is now done by the newly-required macros.
25412         Append $(EXEEXT) to DF_PROG.
25413         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
25414         Do not invoke or require the following here,
25415         since prereq.m4 or some gnulib .m4 now does this for us:
25416         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
25417         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
25418         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
25419         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
25420         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
25421         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
25422         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
25423         AC_FUNC_OBSTACK.
25424         Do not replace the following functions, as this is now the job
25425         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
25426         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
25427         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
25428         atexit getpass, strdup, getpagesize.
25429         Replace 'raise'.
25430         Do not check for the following functions, as this is now the job
25431         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
25432         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
25433         setregid.
25434         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
25435         Check for sys/sysctl.h.
25436         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
25437         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
25438         of checking for ssize_t ourselves.
25439
25440         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
25441         Require every macro that gnulib/modules/* suggests for us.
25442         (jm_PREREQ_ADDEXT): New macro.
25443         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
25444         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
25445
25446         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
25447         (gl_PHYSMEM): Use it.
25448         Also check for `table' function.
25449         Check for new headers and functions.
25450         Add check for sys/sysmp.h.
25451         With suggestions from Kaveh Ghazi.
25452         Ignore headers that are present but cannot be compiled.  This
25453         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
25454         C 5.4.
25455
25456 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25457
25458         Document merge from coreutils.
25459         * modules/userspec: Depend on posixver.
25460         * modules/strftime: Depend on tzset.
25461
25462 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25463
25464         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
25465         rather than tab, after '#' in shell-script copyright notices.
25466         Suggested by Bruno Haible.
25467
25468 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25469
25470         * config/srclist-update: Use three spaces, rather than tab, after '#'
25471         in shell-script copyright notices.  Suggested by Bruno Haible.
25472         Remove unnecessary parenthesization in regular expression.
25473
25474 2003-08-15  Jim Meyering  <jim@meyering.net>
25475
25476         Merge from coreutils.
25477         * lib/xgethostname.c: Include <stdlib.h>.
25478         (xghostname): Don't exit for anything other than memory-related
25479         failure; just return NULL.
25480         * lib/userspec.c: Include "posixver.h".
25481         (parse_user_spec): Accept `.' as a separator only
25482         in pre-POSIX-200112 mode.
25483         * lib/strtoimax.c: Use #elif rather than #else #if.
25484         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
25485         Remove function, now that we can rely on a working tzset function.
25486         [!_LIBC]: Ensure that the required autoconf test has been run.
25487         [!defined _NL_CURRENT && HAVE_STRFTIME]:
25488         Use underlying_strftime for %r.
25489         * lib/sha.c: Merge in some clean-up and optimization changes from
25490         glibc.
25491         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
25492         Ensure that it is a multiple of 64.
25493         Rearrange loop exit tests so as to avoid performing an
25494         additional fread after encountering an error or EOF.
25495         * lib/realloc.c: Update copyright date.
25496
25497 2003-08-15  Jim Meyering  <jim@meyering.net>
25498         and Paul Eggert  <eggert@twinsun.com>
25499
25500         Merge from coreutils.
25501         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
25502         member but strut utmpx does not.  Needed for AIX 4.3.3.
25503         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
25504
25505 2003-08-15  Jim Meyering  <jim@meyering.net>
25506         and Paul Eggert  <eggert@cs.ucla.edu>
25507
25508         Merges from coreutils, etc.
25509         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
25510         Require gl_FUNC_TZSET_CLOBBER.
25511         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
25512         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
25513         members.
25514
25515 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25516
25517         Help the merge from coreutils.
25518         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
25519         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
25520         * m4/tzset.m4: Use it too.
25521
25522 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25523
25524         * modules/tzset: New file.
25525
25526 2003-08-14  Jim Meyering  <jim@meyering.net>
25527
25528         Merges from coreutils.
25529         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
25530         variable names, rather than @FNMATCH_H@.
25531         * modules/alloca: Likewise for $(ALLOCA_H).
25532
25533         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
25534         the three copies of the literal target, `fnmatch.h'.
25535         * modules/alloca (alloca.h): Likewise.
25536
25537 2003-08-14  Jim Meyering  <jim@meyering.net>
25538
25539         Merge from coreutils.
25540         * m4/tzset.m4: New file.
25541         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
25542         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
25543         otherwise, AIX 5.1 systems would end up using the latter.
25544         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
25545         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
25546         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
25547         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
25548
25549 2003-08-14  Jim Meyering  <jim@meyering.net>
25550
25551         Merge from coreutils.
25552         * lib/obstack.h: Whitespace changes.
25553         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
25554         and xcalloc return values.
25555         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
25556         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
25557         hang on OSF/1 5.1 for DIR on both local and remote file systems.
25558         Reported by (and fix confirmed by) Nelson H. F. Beebe.
25559         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
25560         error from mntctl.
25561         Use mntctl's return value to drive the entry-processing loop, since
25562         we can't rely on the value of the vmt_length member in the last
25563         entry.  On some systems doing so could result in exhausting
25564         virtual memory.  Based in part on a patch from Mike Jetzer.
25565
25566 2003-08-14  Jim Meyering  <jim@meyering.net>
25567         and Paul Eggert  <eggert@twinsun.com>
25568
25569         Merges from coreutils, plus other fixes.
25570         * lib/physmem.c: Merge in portability changes from gcc/libiberty
25571         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
25572         for credits and details.  Thanks to Kaveh Ghazi for helping
25573         to keep these files in sync.
25574         (ARRAY_SIZE): Define it.
25575         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
25576         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
25577         (memcasecmp): Don't assume size_t fits in unsigned int.
25578         Remove casts and duplicate code.
25579         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
25580         (memcpy): Remove definition.
25581         Merge in some clean-up and optimization changes from glibc.
25582         [BLOCKSIZE]: Move definition to top of file.
25583         Ensure that it is a multiple of 64.
25584         Rearrange loop exit tests so as to avoid performing an
25585         additional fread after encountering an error or EOF.
25586         * lib/md5.h (md5_uintptr): Define.
25587         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
25588         return to the initial working directory.  Preserve errno
25589         for caller.
25590         * lib/idcache.c: Include "xalloc.h".
25591         (xmalloc, xrealloc): Remove decls.
25592         (getuser): Remove casts no longer required in C89.
25593         * lib/human.c: Include stdio.h, for sprintf.
25594         * lib/group-member.c: Include "xalloc.h".
25595         (xmalloc, xrealloc): Remove decls.
25596         (get_group_info): Remove casts no longer required in C89.
25597         * lib/getusershell.c (readname): Remove casts no longer required in
25598         C89.
25599         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
25600         * lib/getline.c: Whitespace fix, from coreutils.
25601
25602 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25603
25604         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
25605         Check for isascii.
25606
25607         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
25608         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
25609         Undo previous (whitespace-only) change.
25610
25611 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25612
25613         * lib/exclude.c: Include <ctype.h>
25614         (IN_CTYPE_DOMAIN): New macro.
25615         (is_space): New fn.
25616         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
25617         and empty lines.
25618
25619         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
25620         Undo previous (whitespace-only) change.
25621
25622 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25623
25624         * config/srclist-update: Change update back to the old behavior,
25625         leaving whitespace alone.  Use one 'sed' command rather than a
25626         pipeline.
25627         (fixlicense): Now a variable, not a function.
25628         (remove_trailing_blanks): Remove.
25629         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
25630         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
25631         Undo previous (whitespace-only) change.
25632
25633 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25634
25635         Merge from coreutils.
25636         * modules/euidaccess: Add lib_SOURCES, include for new
25637         file euidaccess.h
25638
25639 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25640
25641         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
25642         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
25643         Normalize leading white space and remove trailing white space.
25644
25645         Merge from coreutils
25646         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
25647
25648         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
25649         0.12.1.  These files are now being upgraded automatically by
25650         ../config/srclist-update.
25651
25652 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25653
25654         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
25655         Normalize leading white space and remove trailing white space.
25656         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
25657         notice, as per ../config/srclist-update.
25658
25659         Merge from coreutils.
25660         * lib/euidaccess.h: New file.
25661         * lib/euidaccess.c: Include it.
25662         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
25663         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
25664         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
25665
25666 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25667
25668         * config/srclist-update: Add copyright notice.
25669         (remove_id_lines, remove_trailing_blanks): New constants.
25670         (fixfile): Use them to normalize spacing a bit in copied files.
25671         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
25672         Normalize leading white space and remove trailing white space.
25673
25674         * config/texinfo.tex: Sync with texinfo.
25675
25676         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
25677         strtoul.c from libc, to merge coreutils whitespace changes.
25678
25679         * config/srclist.txt: Get the following m4 files from gettext:
25680         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
25681         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
25682         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
25683         wint_t.m4.
25684
25685 2003-08-12  Karl Berry  <karl@gnu.org>
25686
25687         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
25688         been made.
25689
25690 2003-08-11  Paul Eggert  <eggert@twinsun.com>
25691
25692         * modules/gnu-source, m4/gnu-source.m4:
25693         Remove; we're assuming Autoconf 2.54 or later now.
25694         Suggested by Bruno Haible.
25695         * MODULES.html.sh (func_all_modules): Remove gnu-source.
25696
25697 2003-08-11  Bruno Haible  <bruno@clisp.org>
25698
25699         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
25700
25701 2003-08-11  Bruno Haible  <bruno@clisp.org>
25702
25703         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
25704         (vasnprintf): Use it instead of wcslen.
25705
25706 2003-08-11  Bruno Haible  <bruno@clisp.org>
25707
25708         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
25709         value to ensure that _Bool promotes to int. Use #define for _Bool when
25710         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
25711
25712 2003-08-10  Karl Berry  <karl@gnu.org>
25713
25714         * lib/regex.h: update from libc (whitespace fix).
25715
25716 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25717
25718         Merge some files from coreutils.  These changes were
25719         originally made by Jim Meyering.
25720         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
25721         many older Unixes require this.
25722         * lib/alloca.c (alloca): Remove cast to argument of free;
25723         no longer needed in C89.
25724         * lib/alloca_.h, regex.h: Fix white space to match
25725         what GNU indent does.
25726
25727 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25728
25729         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
25730         apparently Emacs's Unicode mode got confused before my 2003-08-05
25731         checkin.
25732
25733 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25734
25735         * m4/extensions.m4: New file.
25736         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
25737         Require gl_USE_SYSTEM_EXTENSIONS.
25738         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
25739         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
25740
25741 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25742
25743         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
25744         * modules/extensions, modules/gnu-source: New files.
25745         * modules/timespec, modules/unlocked-io: Depend on extensions.
25746
25747 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25748
25749         * modules/restrict: New file.
25750         * MODULES.html.sh (func_all_modules): Add restrict.
25751         * modules/regex: Depend on restrict.
25752
25753 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25754
25755         * m4/restrict.m4: New file.
25756         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
25757
25758 2003-08-07  Bruno Haible  <bruno@clisp.org>
25759
25760         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
25761         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
25762
25763 2003-08-07  Bruno Haible  <bruno@clisp.org>
25764
25765         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
25766         makes the module 'getndelim2' compatible with the module 'getline'.
25767
25768 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25769
25770         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
25771         byte with "\201" to avoid glitches when editing that source file
25772         with multi-gnome-terminal.
25773
25774 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25775
25776         * lib/bumpalloc.h: Remove.
25777
25778 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25779
25780         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
25781         * modules/bumpalloc: Remove.
25782
25783 2003-08-04  Paul Eggert  <eggert@twinsun.com>
25784
25785         * lib/getloadavg.c: Change copyright notice and spacing to conform to
25786         GNU coding style.
25787
25788         Merge from coreutils.
25789         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
25790         1. From glibc.
25791         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
25792         from Karl Berry, implemented by Jim Meyering.
25793         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
25794         from Dmitry V. Levin.
25795         Remove anachronistic cast of xrealloc.
25796         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
25797         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
25798         type. Otherwise, it wouldn't compile with at least /bin/cc on
25799         ymp-cray-unicos9.0.2.X.
25800         Combine two mostly-identical uses of alloca into one.
25801         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
25802
25803 2003-08-04  Dave Love  <d.love@dl.ac.uk>
25804
25805         [From Emacs.]
25806
25807         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
25808         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
25809         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
25810         obsolete NLIST_NAME_UNION.
25811         [__GNU__]: Undef BSD and FSCALE.
25812         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
25813
25814 2003-08-03  Paul Eggert  <eggert@twinsun.com>
25815
25816         * lib/stdbool_.h (_Bool): Make it signed char, instead of
25817         an enum type, so that it's guaranteed to promote to int.  See:
25818         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
25819
25820 2003-08-03  Karl Berry  <karl@gnu.org>
25821
25822         * config/depcomp: update from automake.
25823
25824 2003-07-31  Paul Eggert  <eggert@twinsun.com>
25825
25826         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
25827         (strerror): Don't assume that a printable int fits in 14 bytes.
25828
25829 2003-07-31  Bruno Haible  <bruno@clisp.org>
25830
25831         * modules/getpass-gnu: New file.
25832         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
25833
25834 2003-07-31  Bruno Haible  <bruno@clisp.org>
25835
25836         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
25837
25838 2003-07-24  Karl Berry  <karl@gnu.org>
25839
25840         * config/missing: update from automake.
25841
25842 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
25843             Bruno Haible  <bruno@clisp.org>
25844
25845         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
25846         * lib/getline.c (getline, getdelim): Likewise.
25847         Remove _GNU_SOURCE define; now it's defined in config.h through
25848         m4/getline.m4.
25849
25850 2003-07-23  Karl Berry  <karl@gnu.org>
25851
25852         * config/config.sub: update from prep.
25853
25854 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25855
25856         * modules/xalloc (Depends-on): Add exitfail.
25857         * modules/xmemcoll: Likewise.
25858
25859 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25860
25861         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
25862         over-parenthesization in macros.
25863
25864         Sync with coreutils.
25865
25866         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
25867         required by C99.
25868
25869         Use `exit_failure' for xalloc and xmemcoll instead of their own
25870         private exit-failure variables.
25871         * lib/xalloc.h (xalloc_exit_failure): Remove.
25872         * lib/xmalloc.c: Likewise.  Include exitfail.h.
25873         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
25874         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
25875         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
25876         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
25877
25878 2003-07-20  Jim Meyering  <jim@meyering.net>
25879
25880         * modules/closeout (Depends-on): Add exitfail.
25881         Suggestion from Bruno Haible.
25882
25883 2003-07-19  Karl Berry  <karl@gnu.org>
25884
25885         * config/config.sub: update from prep.
25886
25887 2003-07-18  Paul Eggert  <eggert@twinsun.com>
25888
25889         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
25890         Remove.
25891         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
25892         to test that it can stand by itself.  Include "exitfail.h".
25893         Clients should set exit_failure instead.
25894         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
25895
25896 2003-07-18  Bruno Haible  <bruno@clisp.org>
25897
25898         * modules/getndelim2: New file.
25899         * modules/getline: Share files with module getndelim2.
25900         * modules/getnline: Depend on getndelim2 instead of sharing files with
25901         it. Add getnline.c to lib_SOURCES.
25902         * MODULES.html.sh (func_all_modules): Add getndelim2.
25903
25904 2003-07-18  Bruno Haible  <bruno@clisp.org>
25905
25906         * m4/getndelim2.m4: New file.
25907         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
25908         invoke gl_PREREQ_GETNDELIM2.
25909         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
25910         gl_PREREQ_GETNDELIM2.
25911         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
25912         gl_GETNDELIM2.
25913
25914 2003-07-18  Bruno Haible  <bruno@clisp.org>
25915
25916         * lib/getndelim2.h: New file.
25917         * lib/getndelim2.c: Make into a module of its own. Include config.h,
25918         getndelim2.h.
25919         (getndelim2): Make non-static. Change return type to ssize_t.
25920         * lib/getline.h: Change argument names.
25921         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
25922         * lib/getnline.c: Include getndelim2.h.
25923
25924 2003-07-18  Andreas Schwab  <schwab@suse.de>
25925
25926         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
25927
25928 2003-07-17  Karl Berry  <karl@gnu.org>
25929
25930         * config/config.sub: update from prep.
25931
25932 2003-07-17  Bruno Haible  <bruno@clisp.org>
25933
25934         * modules/getnline: New file.
25935         * modules/getline: Add lib/getndelim2.c to source file list.
25936         * MODULES.html.sh (func_all_modules): Add getnline.
25937
25938 2003-07-17  Bruno Haible  <bruno@clisp.org>
25939
25940         * m4/getnline.m4: New file.
25941
25942 2003-07-17  Bruno Haible  <bruno@clisp.org>
25943
25944         * m4/Makefile.am.in: Remove file.
25945         * m4/Makefile.am: Remove file.
25946         * m4/Makefile.in: Remove file.
25947
25948 2003-07-17  Bruno Haible  <bruno@clisp.org>
25949
25950         * lib/getnline.h: New file.
25951         * lib/getnline.c: New file.
25952         * lib/getndelim2.c: New file, extracted from getline.c.
25953         (getndelim2): Renamed from getdelim2, with added nmax argument.
25954         * lib/getline.c: Include getndelim2.c.
25955         (getdelim2): Moved out to getndelim2.c.
25956         (getline, getdelim): Update.
25957
25958 2003-07-17  Bruno Haible  <bruno@clisp.org>
25959
25960         * lib/Makefile.am: Remove file.
25961         * lib/Makefile.in: Remove file.
25962
25963 2003-07-17  Bruno Haible  <bruno@clisp.org>
25964
25965         * configure.in: Remove file.
25966         * Makefile.in: Remove file.
25967
25968 2003-07-17  Bruno Haible  <bruno@clisp.org>
25969
25970         * MODULES.html.sh: Put the </BODY> right before </HTML>.
25971
25972 2003-07-16  Karl Berry  <karl@gnu.org>
25973
25974         * config/srclist-update: was running fixlicense twice, which caused
25975                 texinfo.tex to be nullified for some reason.  Simplify,
25976                 $gplsrc is no longer needed as far as I can see?
25977
25978 2003-07-16  Jim Meyering  <jim@meyering.net>
25979
25980         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
25981
25982 2003-07-15  Paul Eggert  <eggert@twinsun.com>
25983
25984         * config/srclist.txt: Get the following files from gettext-runtime/intl
25985         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
25986         ref-del.sin.  From Bruno Haible.
25987         * config/srclist-update (fixfile): Change grep pattern again, since the
25988         previous fix didn't work (there was another trailing $).  Use
25989         '[$]' to escape the $s.
25990
25991 2003-07-15  Karl Berry  <karl@gnu.org>
25992
25993         * lib/vasnprintf.c: update from gettext.
25994
25995 2003-07-15  Karl Berry  <karl@gnu.org>
25996
25997         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
25998         gets expanded when surrounded by '$'.
25999
26000 2003-07-15  Jim Meyering  <jim@meyering.net>
26001
26002         * modules/save-cwd: Don't depend on error.  From Derek Price.
26003
26004 2003-07-15  Jim Meyering  <jim@meyering.net>
26005
26006         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
26007
26008 2003-07-14  Simon Josefsson  <jas@extundo.com>
26009
26010         * modules/mempcpy: New file.
26011         * MODULES.html.sh (func_all_modules): Add mempcpy.
26012
26013 2003-07-14  Simon Josefsson  <jas@extundo.com>
26014
26015         * m4/mempcpy.m4: New file.
26016
26017 2003-07-14  Simon Josefsson  <jas@extundo.com>
26018
26019         * lib/mempcpy.h: New file.
26020         * lib/mempcpy.c: New file.
26021
26022 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26023
26024         * modules/getdate, modules/posixtm: Depend on mktime.
26025
26026 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26027
26028         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
26029         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
26030         unicodeio.c, unicodeio.h, unlocked-io.h:
26031         Switch from LGPL to GPL.
26032
26033 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26034
26035         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
26036         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
26037         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
26038         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
26039         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
26040         updated automatically by ../config/srclist-update.  This changes
26041         their license from LPGL to GPL.
26042
26043 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26044
26045         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
26046         assumed to refer to the root of the most recent stable gettext version.
26047         * config/srclistvars.sh: Add defaults for eggert.
26048         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
26049         Match "This program" as well as "The program".  This is needed
26050         for gettext.
26051
26052 2003-07-14  Jim Meyering  <jim@meyering.net>
26053
26054         Don't emit diagnostics.  Let callers do that.
26055         * lib/save-cwd.c: Don't include "error.h".
26056         (save_cwd): Don't call error.  Ensure that errno is valid
26057         when returning nonzero.
26058
26059         * lib/save-cwd.h (restore_cwd): Update prototype.
26060         * lib/save-cwd.c (restore_cwd): Remove two parameters.
26061         Simplify.  Don't call error upon failure.  Let callers do that.
26062         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
26063         when auditing is enabled.  But don't bother updating the #if.
26064
26065 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
26066
26067         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
26068         it breaks C++ compilation.
26069         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
26070
26071 2003-07-10  Simon Josefsson  <jas@extundo.com>
26072
26073         * modules/strchrnul (Makefile.am): Add strchrnul.h.
26074
26075 2003-07-10  Jim Meyering  <jim@meyering.net>
26076
26077         * m4/clock_time.m4: Remove trailing blank.
26078         * m4/intmax_t.m4: Likewise.
26079
26080 2003-07-10  Jim Meyering  <jim@meyering.net>
26081
26082         * lib/vasnprintf.c: Remove trailing blanks.
26083         Make cpp indentation consistent.
26084
26085 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26086
26087         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
26088         posixver.c, strftime.c, strnlen.c, strverscmp.c:
26089         Switch from LGPL to GPL.
26090
26091 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26092
26093         * config/srclist.txt: Sort sublists.  Add
26094         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
26095         that differ from gnulib for one reason or another; we'd like this list
26096         to be smaller but for now let's document what we have.
26097
26098 2003-07-08  Paul Eggert  <eggert@twinsun.com>
26099
26100         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
26101         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
26102         and sweeter "eval x=$x".
26103         * config/srclist.txt: Get lib/argp* from glibc.
26104
26105 2003-07-07  Paul Eggert  <eggert@twinsun.com>
26106
26107         * lib/mktime.c: Fix some boundary cases and remove need for floating
26108         point.
26109
26110         Issue a compile-time diagnostic if time_t is floating point, or if
26111         two's complement arithmetic is not in effect, or if arithmetic
26112         right shift does not propagate the sign.  These assumptions were
26113         all in the original code but they weren't checked.
26114
26115         (TIME_T_MIDPOINT, verify): New macros.
26116         (__isleap): Remove; it has integer overflow problems.
26117         (leapyear): New function, without those problems.
26118         (ydhms_tm_diff): Remove; splitting into two parts.
26119         (ydhms_diff): New function, containing the arithmetic part of
26120         the old ydhms_tm_diff function.  Issue a compile-time
26121         diagnostic if we are not using C99 integer division.
26122         Avoid casts when possible.
26123         (guess_time_tm): New function, containing the checking part of
26124         the old ydhms_tm_diff function.  Return the new value, rather than
26125         the difference between it and the old.  Accept a new argument T
26126         so that *T specifies the old value.  Check for overflow in the result.
26127
26128         (__mktime_internal): Use a time_t offset, not a long int offset.
26129         This undoes the 2003-06-04 change, which is no longer needed now
26130         that we have better overflow checking.
26131         (localtime_offset): Likewise.
26132
26133         (__mktime_internal): Avoid harmful overflow on hosts where time_t
26134         and long are 64-bit but int is only 32-bit.
26135         (ydhms_diff): Use long int to store year1 and yday1.
26136         Issue a compile-time diagnostic if long int is not wide enough.
26137
26138         (__mktime_internal): Use long int to store adjusted year and yday.
26139         Use plain C rather than preprocessor commands, if that doesn't
26140         affect efficiency.
26141         Check for overflow (and try to repair) after each probe
26142         rather than checking only at the very end.  This avoids some bugs
26143         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
26144         does not equal GMT offset at maximum time).
26145         Use integer to check for overflow rather than floating point; this
26146         is more portable to non-IEEE hosts, and is a tad faster.
26147         When we detect that we are oscillating between two values,
26148         don't check whether tm_isdst has the requested value, since
26149         we already know the answer.  When tm_isdst has the wrong value,
26150         use a different heuristic to find the right one, based on the
26151         extreme values actually observed in practice in tz2003a,
26152         rather than the (overly optimistic) "previous 3 calendar quarters".
26153
26154         (not_equal_tm, print_tm, check_result): Use "const T" rather than
26155         "T const" to accommodate glibc style.
26156         (check_result): Use less-confusing report format.  "long" -> "long int.
26157         (main): Likewise.
26158         Don't loop if the iteration overflows time_t.
26159         Allow a negative step in the iteration.
26160
26161 2003-07-06  Karl Berry  <karl@gnu.org>
26162
26163         * config/depcomp: update from automake.
26164         * config/config.sub: update from prep.
26165
26166 2003-07-03  Karl Berry  <karl@gnu.org>
26167
26168         * config/config.guess: update from prep.
26169
26170 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26171
26172         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
26173         xreadlink.c now includes it unconditionally.
26174
26175 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26176
26177         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
26178         having it depend on HAVE_SYS_TYPES_H.
26179
26180 2003-07-01  Bruno Haible  <bruno@clisp.org>
26181
26182         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
26183         <sys/types.h> should be sufficient.
26184         Reported by Paul Eggert.
26185
26186 2003-06-26  Karl Berry  <karl@gnu.org>
26187
26188         * config/depcomp: update from automake.
26189
26190 2003-06-26  Bruno Haible  <bruno@clisp.org>
26191
26192         * modules/human: Depend on module stdbool.
26193
26194 2003-06-25  Bruno Haible  <bruno@clisp.org>
26195
26196         * modules/readlink: New file.
26197         * modules/xreadlink: Depend on it.
26198         * MODULES.html.sh (func_all_modules): Add readlink.
26199
26200 2003-06-25  Bruno Haible  <bruno@clisp.org>
26201
26202         * m4/readlink.m4: New file.
26203
26204 2003-06-25  Bruno Haible  <bruno@clisp.org>
26205
26206         * lib/readlink.c: New file.
26207
26208 2003-06-22  Karl Berry  <karl@gnu.org>
26209
26210         * config/srclist.txt: update mkinstalldirs from automake.
26211         * config/mkinstalldirs: update.
26212
26213 2003-06-22  Bruno Haible  <bruno@clisp.org>
26214
26215         Portability to mingw32.
26216         * m4/ssize_t.m4: New file, from GNU gettext.
26217         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
26218         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
26219
26220 2003-06-22  Bruno Haible  <bruno@clisp.org>
26221
26222         * modules/safe-read: Add m4/ssize_t.m4.
26223         * modules/xreadlink: Add m4/ssize_t.m4.
26224
26225 2003-06-20  Bruno Haible  <bruno@clisp.org>
26226
26227         Assume C89, so PARAMS isn't needed.
26228         * lib/unicodeio.h (PARAMS): Remove.
26229         * lib/unicodeio.c: Don't use PARAMS.
26230
26231 2003-06-18  Karl Berry  <karl@gnu.org>
26232
26233         * config/config.{guess,sub}: update from prep.
26234
26235 2003-06-18  Jim Meyering  <jim@meyering.net>
26236
26237         Merge changes from coreutils.
26238         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
26239         Remove explicit declarations of xmalloc and realloc.
26240         Include xalloc.h.
26241         (read_utmp): Remove anachronistic cast of xmalloc.
26242
26243 2003-06-17  Paul Eggert  <eggert@twinsun.com>
26244
26245         Assume C89, so PARAMS isn't needed.
26246         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
26247         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
26248         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
26249         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
26250         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
26251         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
26252         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
26253         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
26254         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
26255         lib/xstrtod.h, lib/xstrtol.h: Likewise.
26256         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
26257         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
26258         no longer needed. Anyway, config.h should always be included before any
26259         other file.
26260
26261 2003-06-11  Simon Josefsson  <jas@extundo.com>
26262
26263         * modules/sysexits: New file.
26264         * MODULES.html.sh (func_all_modules): Add sysexits.
26265
26266 2003-06-11  Simon Josefsson  <jas@extundo.com>
26267
26268         * lib/sysexit_.h: New file.
26269
26270 2003-06-11  Derek Price  <derek@ximbiot.com>
26271
26272         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
26273         necessary.
26274
26275 2003-06-11  Bruno Haible  <bruno@clisp.org>
26276
26277         * m4/sysexits.m4: New file.
26278
26279 2003-06-10  Simon Josefsson  <jas@extundo.com>
26280
26281         * lib/argp.h: New file, from glibc.
26282         * lib/argp-ba.c: New file, from glibc.
26283         * lib/argp-eexst.c: New file, from glibc.
26284         * lib/argp-fmtstream.c: New file, from glibc.
26285         * lib/argp-fmtstream.h: New file, from glibc.
26286         * lib/argp-fs-xinl.c: New file, from glibc.
26287         * lib/argp-help.c: New file, from glibc.
26288         * lib/argp-namefrob.h: New file, from glibc.
26289         * lib/argp-parse.c: New file, from glibc.
26290         * lib/argp-pv.c: New file, from glibc.
26291         * lib/argp-pvh.c: New file, from glibc.
26292         * lib/argp-xinl.c: New file, from glibc.
26293
26294 2003-06-10  Simon Josefsson  <jas@extundo.com>
26295
26296         * modules/strchrnul: New file.
26297
26298 2003-06-10  Simon Josefsson  <jas@extundo.com>
26299
26300         * modules/argp: New file.
26301
26302 2003-06-10  Simon Josefsson  <jas@extundo.com>
26303
26304         * m4/strchrnul.m4: New file.
26305
26306 2003-06-10  Simon Josefsson  <jas@extundo.com>
26307
26308         * lib/strchrnul.h: New file.
26309         * lib/strchrnul.c: New file.
26310
26311 2003-06-10  Bruno Haible  <bruno@clisp.org>
26312
26313         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
26314
26315 2003-06-07  Karl Berry  <karl@gnu.org>
26316
26317         * config/config.{guess,sub}: update from prep.
26318
26319 2003-06-07  Jim Meyering  <jim@meyering.net>
26320
26321         * modules/strtod: Use $(...) notation, not @...@ for
26322         AC_REPLACE'd variables.
26323         * modules/localcharset: Likewise.
26324
26325 2003-06-07  Jim Meyering  <jim@meyering.net>
26326
26327         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
26328         in place of my name in the copyright comment.
26329         Remove definition and uses of __P.
26330
26331         From coreutils.
26332         * lib/stat.c: Don't declare xmalloc explicitly.
26333         Instead, include "xalloc.h".
26334         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
26335         xrealloc, and xcalloc return values.
26336         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
26337         Improve comment.
26338         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
26339
26340 2003-06-07  Bruno Haible  <bruno@clisp.org>
26341
26342         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
26343         avoid AC_CONFIG_LINKS.
26344         * modules/fnmatch (Makefile.am): Use explicit creation rule for
26345         fnmatch.h, to avoid AC_CONFIG_LINKS.
26346         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
26347
26348 2003-06-07  Bruno Haible  <bruno@clisp.org>
26349
26350         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
26351         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
26352         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26353         directory.
26354         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
26355         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26356         directory.
26357
26358 2003-06-06  Jim Meyering  <jim@meyering.net>
26359
26360         Merge from coreutils.
26361         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
26362         Consolidate declarations and initializations of *_base* locals.
26363
26364         Merge from coreutils.
26365         This avoids a core dump on systems without GNU putenv,
26366         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
26367         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
26368         (unsetenv): New static function, from GNU libc.
26369         (rpl_putenv): Use it.
26370
26371         * lib/modechange.c: Remove trailing blanks.
26372
26373         Merge from coreutils.
26374         * lib/fsusage.c: Remove declaration of statfs.
26375         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
26376
26377         * lib/posixtm.c: Include <stdbool.h> unconditionally.
26378
26379 2003-06-06  Jim Meyering  <jim@meyering.net>
26380
26381         * lib/stdbool_.h: Renamed from stdbool.h.in.
26382
26383 2003-06-06  Jim Meyering  <jim@meyering.net>
26384             Bruno Haible  <bruno@clisp.org>
26385
26386         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
26387         Adjust Makefile.am snippet not to redirect directly to target.
26388         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
26389
26390 2003-06-05  Paul Eggert  <eggert@twinsun.com>
26391
26392         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
26393         mismatch, look in future quarters as well as past.  This fixes a
26394         bug when processing fall-backwards gaps immediately after a long
26395         period of daylight-saving time.
26396
26397         * lib/mktime.c: Assume freestanding C89 or better.
26398         (HAVE_LIMITS_H): Remove.  Assume it's 1.
26399         (__P): Remove; not used.
26400         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
26401         (mktime, not_equal_tm, print_tm, check_result,
26402         main): Use prototypes.  Use const * where appropriate.
26403         (main): Fix typo in testing code that uncovered by above changes.
26404         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
26405
26406 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26407
26408         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
26409         locale.h, localeconv.  This merges changes from coreutils.
26410
26411         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
26412         It can be removed after the next Autoconf is released.
26413         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
26414         needed.
26415
26416 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26417
26418         * lib/mktime.c: Fix Debian bug 177940
26419         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
26420         (localtime_offset): Now long int, not time_t, because we want it
26421         to be guaranteed to be signed.  All uses changed.
26422         (__mktime_internal): If overflow would occur when adding offset,
26423         don't add it.
26424
26425         Merge 'human' changes from coreutils.  Rewrite to support
26426         locale-specific notations like thousands separators.
26427         * lib/human.c: Simplify authorship notice.
26428         Include human.h immediately after config.h.
26429         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
26430         <limits.h>: Do not include, since human.h does.
26431         (SIZE_MAX, UINTMAX_MAX): New macros.
26432         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
26433         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
26434         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
26435         (power_letter): Renamed from suffixes.
26436         (generate_suffix_backwards): Remove.
26437         (adjust_value): Now takes int style (because of human.h changes)
26438         and long double value (for greater precision on some platforms).
26439         (group_number): New function.
26440         (human_readable): Use it.  Use integer options, not enum.
26441         Put the options before the sizes in the arg list.
26442         Support all the new options.
26443         The old human_readable function has been removed;
26444         use inttostr.h instead.
26445         (human_readable, default_block_size, humblock):
26446         Use uintmax_t, not int, for block sizes.
26447         (human_readable_inexact, block_size_types): Remove.
26448         (block_size_opts): New constant.
26449         (human_options): Renamed from human_block_size, with new signature
26450         that allows block sizes up to UINTMAX_MAX.  All callers changed.
26451         * lib/human.h: Add copyright and authorship notice.
26452         Include <limits.h> and <stdbool.h> unconditionally.
26453         (PARAMS): Remove.  All uses removed.
26454         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
26455         (enum human_inexact_style): Remove tag; now a nameless enum.
26456         (human_floor, human_ceiling, human_round_to_even): Now have
26457         values 2, 0, 1 rather than -1, 1, 0.
26458         (human_group_digits, human_suppress_point_zero, human_autoscale,
26459         human_base_1024, human_SI, human_B): New constants.
26460         (human_readable_inexact, human_block_size): Remove.
26461         (human_readable): Size args are now uintmax_t, not int.
26462         (human_options): New decl.
26463
26464         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
26465         unnecessary now that we assume C89 or better.  This change
26466         imported from coreutils.
26467
26468         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26469         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
26470         in the 2003-05-30 sync from glibc.
26471
26472         .h files should stand alone, but we shouldn't include <sys/types.h>
26473         if we can get away with just <stddef.h>.
26474
26475         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
26476         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
26477         rather than <sys/types.h>, as we merely need size_t.
26478         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
26479         to get size_t.
26480         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
26481         Include <stdio.h>, to get FILE.
26482         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
26483         memcasecmp.h has included <stddef.h> and all we need is size_t.
26484         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
26485         our interface, instead of including <sys/types.h>
26486
26487 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26488
26489         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
26490         now, as glibc mktime is buggy on non-glibc systems.
26491
26492 2003-06-03  Karl Berry  <karl@gnu.org>
26493
26494         * config/config.sub: update from prep.
26495
26496 2003-06-02  Paul Eggert  <eggert@twinsun.com>
26497
26498         [from coreutils]
26499         Fix some minor time-related bugs with POSIX time arguments.
26500         Some valid time stamps were being rejected (notably -1, and
26501         time stamps before 1900 on 64-bit hosts).  And some invalid
26502         time stamps were being accepted, e.g. September 31.
26503
26504         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
26505         that we can return (time_t) -1 successfully.
26506         * lib/posixtm.c: Likewise.
26507         [HAVE_STDBOOL_H]: Include <stdbool.h>.
26508         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
26509         (t): Remove static var.
26510         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
26511         of static var.  All uses changed.
26512         (year): Do not reject years before 1900; they can occur with
26513         64-bit time_t.
26514         (posix_time_parse): Do not check for out-of-range components;
26515         that is now the caller's responsibility, since our checks were
26516         only approximations.
26517         (posixtime): Use mktime to check for out-of-range components,
26518         since it knows them exactly.
26519         If mktime returns (time_t) -1, check whether an error actually occurred
26520         by invoking localtime on -1.
26521         (main) [TEST_POSIXTIME]: Check for input data errors, and report
26522         posixtime failures better.
26523         Improve the test data (in comments only).
26524
26525 2003-06-02  Karl Berry  <karl@gnu.org>
26526
26527         * config/mkinstalldirs (version): new variable.
26528         (--version): new option.
26529         (usage): improve message.
26530
26531 2003-05-30  Karl Berry  <karl@gnu.org>
26532
26533         * lib/mktime.c: update from libc.
26534
26535 2003-05-30  Bruno Haible  <bruno@clisp.org>
26536
26537         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
26538         * config/config.rpath: Upgrade to gettext-0.12.1.
26539
26540 2003-05-30  Bruno Haible  <bruno@clisp.org>
26541
26542         * m4/gettext.m4: Upgrade to gettext-0.12.1.
26543         * m4/nls.m4: New file, from gettext-0.12.1.
26544         * m4/po.m4: New file, from gettext-0.12.1.
26545         * m4/progtest.m4: Upgrade to gettext-0.12.1.
26546
26547 2003-05-30  Bruno Haible  <bruno@clisp.org>
26548
26549         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
26550         * lib/localcharset.h: Likewise.
26551         * lib/localcharset.c: Likewise.
26552
26553 2003-05-29  Karl Berry  <karl@gnu.org>
26554
26555         * config/config.rpath: update from gettext.
26556
26557 2003-05-28  Paul Eggert  <eggert@twinsun.com>
26558
26559         Assume the headers required for C89 freestanding compilers.
26560         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
26561         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
26562         * m4/human.m4 (gl_HUMAN): Likewise.
26563         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
26564         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
26565         * m4/userspec.m4 (gl_USERSPEC): Likewise.
26566         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
26567         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
26568         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
26569
26570 2003-05-28  Paul Eggert  <eggert@twinsun.com>
26571
26572         Assume the headers required for C89 freestanding compilers.
26573         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
26574         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
26575         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
26576         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
26577         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
26578         define, since <limits.h> is guaranteed to do that.
26579         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
26580         * lib/exclude.c: Include <stdbool.h> unconditionally.
26581         * lib/tempname.c: Include <stddef.h> unconditionally.
26582         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
26583         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
26584         <stddef.h> does that.
26585         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
26586         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
26587         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
26588         needed.
26589         * lib/xstrtol.c: Likewise.
26590         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
26591         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
26592
26593         * lib/addext.c (addext): Use assignment rather than cast, to avoid
26594         warnings on some platforms.
26595
26596         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26597         arbitrarily.
26598
26599 2003-05-26  Jim Meyering  <jim@meyering.net>
26600
26601         Merge in a change from coreutils:
26602         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
26603         that is guaranteed to be `no'.  Use `no_such_member' to indicate
26604         that condition, rather than `-1' which is slightly misleading.
26605         Change the name of the cache variable to have the gl_ prefix.
26606         Prompted by a patch from Richard Dawe for DJGPP.
26607
26608 2003-05-24  Karl Berry  <karl@gnu.org>
26609
26610         * config/config.guess: update from prep.
26611
26612 2003-05-22  Karl Berry  <karl@gnu.org>
26613
26614         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
26615
26616 2003-05-20  Karl Berry  <karl@gnu.org>
26617
26618         * config/config.guess: update from prep.
26619
26620 2003-05-18  Karl Berry  <karl@gnu.org>
26621
26622         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
26623         might actually be set by the user.
26624
26625         * config/depcomp, install-sh, mdate-sh: update from automake.
26626
26627 2003-05-17  Bruno Haible  <bruno@clisp.org>
26628
26629         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
26630         invalid expansion for AC_EGREP_CPP.
26631         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
26632         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
26633         Suggested by Akim Demaille <akim@epita.fr> in
26634         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
26635
26636 2003-05-12  Jim Meyering  <jim@meyering.net>
26637
26638         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
26639         the space-padded-by-default conversion specifiers, %e, %k, %l.
26640
26641 2003-05-12  Bruno Haible  <bruno@clisp.org>
26642
26643         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
26644         the string is longer than 4 KB.
26645
26646 2003-05-11  Karl Berry  <karl@gnu.org>
26647
26648         * config/config.{guess,sub}: update from prep.
26649
26650 2003-05-09  Bruno Haible  <bruno@clisp.org>
26651
26652         * modules/error: Add m4/strerror_r.m4 to file list.
26653
26654 2003-05-03  Bruno Haible  <bruno@clisp.org>
26655
26656         Upgrade to Unicode-4.0.
26657         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
26658         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
26659         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
26660         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
26661         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
26662         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
26663         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
26664         Change width of U+E0100..U+E01EF from 1 to 0.
26665
26666 2003-04-25  Jim Meyering  <jim@meyering.net>
26667
26668         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
26669         of type size_t, not int.
26670
26671 2003-04-25  Bruno Haible  <bruno@clisp.org>
26672
26673         * lib/copy-file.c: Include <stddef.h>, for size_t.
26674
26675 2003-04-21  Paul Eggert  <eggert@twinsun.com>
26676
26677         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
26678         code which expansion is under static control.  Patch imported from
26679         Akim Demaille's patch to Bison; see
26680         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
26681
26682 2003-04-14  Bruno Haible  <bruno@clisp.org>
26683
26684         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
26685
26686 2003-04-11  Jim Meyering  <jim@meyering.net>
26687
26688         Merge changes from Coreutils.
26689
26690         2003-03-22  Jim Meyering  <jim@meyering.net>
26691
26692         * lib/strftime.c (widen): Cast alloca return value to proper type.
26693
26694         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
26695
26696         From GNU libc.
26697         * lib/strftime.c (my_strftime): Handle very large width
26698         specifications for numeric values correctly.  Improve checks for
26699         overflow.
26700
26701         2003-01-19  Jim Meyering  <jim@meyering.net>
26702
26703         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
26704         definitions.
26705         (nl_get_alt_digit) [! defined my_strftime]: Define.
26706         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
26707         _nl_get_alt_digit and _nl_get_walt_digit.
26708
26709         * lib/strftime.c (my_strftime): Merge in locale-related changes from
26710         libc. These changes have no effect outside of _LIBC.
26711
26712 2003-04-10  Bruno Haible  <bruno@clisp.org>
26713
26714         * modules/findprog: New file.
26715         * MODULES.html.sh (func_all_modules): Add it.
26716
26717 2003-04-10  Bruno Haible  <bruno@clisp.org>
26718
26719         * m4/findprog.m4: New file.
26720         * m4/eaccess.m4: New file.
26721
26722 2003-04-10  Bruno Haible  <bruno@clisp.org>
26723
26724         * lib/findprog.h: New file, from GNU gettext.
26725         * lib/findprog.c: New file, from GNU gettext.
26726
26727 2003-04-05  Jim Meyering  <jim@meyering.net>
26728
26729         Merge changes from Coreutils.
26730
26731         * lib/exclude.h (PARAMS): Remove definition and uses.
26732         * lib/exclude.c: Remove uses of `PARAMS'.
26733
26734         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
26735         Add test-cases for DOS filenames. Declare program_name.
26736         (main): Set up program_name.  Patch by Rich Dawe.
26737
26738         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26739         error from mntctl.
26740         Use mntctl's return value to drive the entry-processing loop, since
26741         we can't rely on the value of the vmt_length member in the last
26742         entry.  On some systems doing so could result in exhausting
26743         virtual memory.  Based in part on a patch from Mike Jetzer.
26744
26745 2003-04-04  Bruno Haible  <bruno@clisp.org>
26746
26747         * modules/linebreak: New file.
26748         * MODULES.html.sh (func_all_modules): Add it.
26749
26750 2003-04-04  Bruno Haible  <bruno@clisp.org>
26751
26752         * m4/linebreak.m4: New file.
26753
26754 2003-04-04  Bruno Haible  <bruno@clisp.org>
26755
26756         * lib/linebreak.h: New file, from GNU gettext.
26757         * lib/linebreak.c: New file, from GNU gettext with slight
26758         modifications.
26759         * lib/lbrkprop.h: New file, from GNU gettext.
26760
26761 2003-04-03  Bruno Haible  <bruno@clisp.org>
26762
26763         * modules/utf8-ucs4: New file.
26764         * modules/utf16-ucs4: New file.
26765         * modules/ucs4-utf8: New file.
26766         * modules/ucs4-utf16: New file.
26767         * MODULES.html.sh (func_all_modules): Add them.
26768
26769 2003-04-03  Bruno Haible  <bruno@clisp.org>
26770
26771         * m4/utf-ucs4.m4: New file.
26772         * m4/ucs4-utf.m4: New file.
26773
26774 2003-04-03  Bruno Haible  <bruno@clisp.org>
26775
26776         * lib/utf8-ucs4.h: New file, from GNU gettext.
26777         * lib/utf16-ucs4.h: New file, from GNU gettext.
26778         * lib/ucs4-utf8.h: New file, from GNU gettext.
26779         * lib/ucs4-utf16.h: New file, from GNU gettext.
26780
26781 2003-04-02  Bruno Haible  <bruno@clisp.org>
26782
26783         * modules/binary-io: New file.
26784         * MODULES.html.sh (func_all_modules): Add it.
26785
26786 2003-04-02  Bruno Haible  <bruno@clisp.org>
26787
26788         * lib/binary-io.h: New file, from GNU gettext.
26789
26790 2003-04-01  Bruno Haible  <bruno@clisp.org>
26791
26792         * modules/pathname: New file.
26793         * MODULES.html.sh (func_all_modules): Add it.
26794
26795 2003-04-01  Bruno Haible  <bruno@clisp.org>
26796
26797         * lib/pathname.h: New file, from GNU gettext.
26798         * lib/concatpath.c: New file, from GNU gettext.
26799
26800 2003-03-30  Bruno Haible  <bruno@clisp.org>
26801
26802         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
26803
26804 2003-03-30  Bruno Haible  <bruno@clisp.org>
26805
26806         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
26807         function chown() doesn't exist.
26808
26809 2003-03-28  Bruno Haible  <bruno@clisp.org>
26810
26811         * modules/copy-file: New file.
26812         * MODULES.html.sh (func_all_modules): Add it.
26813
26814 2003-03-28  Bruno Haible  <bruno@clisp.org>
26815
26816         * m4/copy-file.m4: New file.
26817
26818 2003-03-28  Bruno Haible  <bruno@clisp.org>
26819
26820         * lib/copy-file.h: New file, from GNU gettext.
26821         * lib/copy-file.c: New file, from GNU gettext.
26822
26823 2003-03-18  Jim Meyering  <jim@meyering.net>
26824
26825         * lib/quote.c (quote_n): Fix typo in comment.
26826
26827 2003-03-18  Bruno Haible  <bruno@clisp.org>
26828
26829         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
26830         checking.
26831         * m4/onceonly_2_57.m4: Likewise.
26832
26833 2003-03-17  Bruno Haible  <bruno@clisp.org>
26834
26835         * m4/onceonly.m4: Require autoconf 2.54 or newer.
26836         (m4_quote): Remove macro.
26837         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
26838
26839 2003-03-14  Jim Meyering  <jim@meyering.net>
26840
26841         Merge changes from Coreutils.
26842         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
26843         to be const, in order to avoid warnings.
26844         (obstack_room): Likewise.
26845         (obstack_empty_p): Likewise.
26846
26847 2003-03-14  Bruno Haible  <bruno@clisp.org>
26848
26849         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
26850         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
26851
26852 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26853
26854         Merge changes from Bison.
26855         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
26856         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
26857         when compiling Bison 1.875's `bitset bset = obstack_alloc
26858         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
26859         * lib/hash.c: Include <stdbool.h> unconditionally.
26860
26861 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26862
26863         * m4/onceonly.m4 (m4_quote): New macro.
26864         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
26865         Quote AC_FOREACH variable-expansions properly.
26866
26867 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26868
26869         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
26870
26871 2003-03-09  Paul Eggert  <eggert@twinsun.com>
26872
26873         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
26874         Reported by Bruce Becker; see:
26875         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
26876
26877 2003-03-03  Paul Eggert  <eggert@twinsun.com>
26878             Bruno Haible  <bruno@clisp.org>
26879
26880         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
26881         Reported by John Hughes, see
26882         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
26883
26884 2003-02-20  Bruno Haible  <bruno@clisp.org>
26885
26886         * MODULES.html.sh (func_all_modules): Add poll.
26887
26888 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26889
26890         * modules/poll: New file.
26891
26892 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26893
26894         * lib/poll_.h: New file.
26895         * lib/poll.c: New file.
26896
26897 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26898
26899         * m4/poll.m4: New file.
26900
26901 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26902
26903         * modules/mathl: New file.
26904
26905 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26906
26907         * lib/mathl.h: New file.
26908         * lib/acosl.c: New file.
26909         * lib/asinl.c: New file.
26910         * lib/atanl.c: New file.
26911         * lib/ceill.c: New file.
26912         * lib/cosl.c: New file.
26913         * lib/expl.c: New file.
26914         * lib/floorl.c: New file.
26915         * lib/frexpl.c: New file.
26916         * lib/ldexpl.c: New file.
26917         * lib/logl.c: New file.
26918         * lib/sincosl.c: New file.
26919         * lib/sinl.c: New file.
26920         * lib/sqrtl.c: New file.
26921         * lib/tanl.c: New file.
26922         * lib/trigl.c: New file.
26923         * lib/trigl.h: New file.
26924
26925 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26926
26927         * m4/mathl.m4: New file.
26928
26929 2003-02-18  Bruno Haible  <bruno@clisp.org>
26930
26931         * MODULES.html.sh (func_all_modules): Add mathl.
26932
26933 2003-02-17  Bruno Haible  <bruno@clisp.org>
26934
26935         * modules/mkdtemp: New module.
26936         * MODULES.html.sh (func_all_modules): Add it.
26937
26938 2003-02-17  Bruno Haible  <bruno@clisp.org>
26939
26940         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
26941
26942 2003-02-17  Bruno Haible  <bruno@clisp.org>
26943
26944         * lib/mkdtemp.h: New file, from GNU gettext.
26945         * lib/mkdtemp.c: New file, from GNU gettext.
26946
26947 2003-02-02  Jim Meyering  <jim@meyering.net>
26948
26949         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
26950         e.g. glibc-2.2.93.
26951
26952 2003-01-31  Bruno Haible  <bruno@clisp.org>
26953
26954         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
26955         'rpl_rename'.
26956         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
26957         'rpl_strnlen'.
26958         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
26959         'rpl_strtod'.
26960         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
26961         'rpl_utime'.
26962
26963 2003-01-31  Bruno Haible  <bruno@clisp.org>
26964
26965         * lib/rename.c: #undef rename before defining rpl_rename.
26966         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
26967
26968 2003-01-30  Bruno Haible  <bruno@clisp.org>
26969
26970         * modules/vasnprintf, modules/vasprintf: New modules.
26971         * MODULES.html.sh (func_all_modules): Add them.
26972
26973 2003-01-30  Bruno Haible  <bruno@clisp.org>
26974
26975         * m4/signed.m4: New file, from GNU gettext.
26976         * m4/longdouble.m4: New file, from GNU gettext.
26977         * m4/wchar_t.m4: New file, from GNU gettext.
26978         * m4/wint_t.m4: New file, from GNU gettext.
26979         * m4/vasnprintf.m4: New file.
26980         * m4/vasprintf.m4: New file.
26981
26982 2003-01-30  Bruno Haible  <bruno@clisp.org>
26983
26984         * lib/printf-args.h: New file, from GNU gettext.
26985         * lib/printf-args.c: New file, from GNU gettext.
26986         * lib/printf-parse.h: New file, from GNU gettext.
26987         * lib/printf-parse.c: New file, from GNU gettext.
26988         * lib/vasnprintf.h: New file, from GNU gettext.
26989         * lib/vasnprintf.c: New file, from GNU gettext.
26990         * lib/asnprintf.c: New file, from GNU gettext.
26991         * lib/vasprintf.h: New file, from GNU gettext with modifications.
26992         * lib/vasprintf.c: New file, from GNU gettext.
26993         * lib/asprintf.c: New file, from GNU gettext.
26994
26995 2003-01-29  Bruno Haible  <bruno@clisp.org>
26996
26997         * modules/stpncpy: New module.
26998         * MODULES.html.sh (func_all_modules): Add it.
26999
27000 2003-01-29  Bruno Haible  <bruno@clisp.org>
27001
27002         * m4/stpncpy.m4: New file.
27003
27004 2003-01-29  Bruno Haible  <bruno@clisp.org>
27005
27006         * lib/stpncpy.h: New file, from GNU gettext with modifications.
27007         * lib/stpncpy.c: New file, from GNU gettext with modifications.
27008
27009 2003-01-28  Bruno Haible  <bruno@clisp.org>
27010
27011         * modules/c-ctype: New module.
27012         * MODULES.html.sh (func_all_modules): Add it.
27013
27014 2003-01-28  Bruno Haible  <bruno@clisp.org>
27015
27016         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
27017         Paul Eggert.
27018         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
27019         Paul Eggert.
27020
27021 2003-01-27  Bruno Haible  <bruno@clisp.org>
27022
27023         * modules/xsetenv: New module.
27024         * MODULES.html.sh (func_all_modules): Add it.
27025
27026 2003-01-27  Bruno Haible  <bruno@clisp.org>
27027
27028         * lib/xsetenv.h: New file, from GNU gettext.
27029         * lib/xsetenv.c: New file, from GNU gettext.
27030
27031 2003-01-23  Jim Meyering  <jim@meyering.net>
27032
27033         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
27034         from working on systems without dirfd (at least Irix and OSF1/Tru64).
27035
27036 2003-01-23  Bruno Haible  <bruno@clisp.org>
27037
27038         * modules/minmax: New module.
27039         * MODULES.html.sh (func_all_modules): Add it.
27040
27041 2003-01-23  Bruno Haible  <bruno@clisp.org>
27042
27043         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
27044         Eggert.
27045
27046 2003-01-22  Bruno Haible  <bruno@clisp.org>
27047
27048         * modules/exit: New module.
27049         * MODULES.html.sh (func_all_modules): Add it.
27050
27051 2003-01-22  Bruno Haible  <bruno@clisp.org>
27052
27053         * lib/exit.h: New file, from GNU gettext.
27054
27055 2003-01-19  Bruno Haible  <bruno@clisp.org>
27056
27057         * gnulib-tool: Recognize option --extract-maintainer.
27058         (func_get_maintainer): New function.
27059         * modules/*: Add Maintainer entry.
27060
27061 2003-01-16  Jim Meyering  <jim@meyering.net>
27062
27063         * m4/regex.m4: The `regex' struct is both input and output.
27064         Initialize it before each use.  Patch by Tim Waugh.
27065
27066 2003-01-16  Bruno Haible  <bruno@clisp.org>
27067
27068         * MODULES.html.sh: Add a table of contents. Add the module name as
27069         leftmost column. Add hyperlinks.
27070
27071 2003-01-15  Bruno Haible  <bruno@clisp.org>
27072
27073         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
27074
27075 2003-01-15  Bruno Haible  <bruno@clisp.org>
27076
27077         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
27078         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
27079         suffix.
27080
27081 2003-01-15  Bruno Haible  <bruno@clisp.org>
27082
27083         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
27084
27085 2003-01-15  Bruno Haible  <bruno@clisp.org>
27086
27087         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
27088         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
27089
27090 2003-01-14  Jim Meyering  <jim@meyering.net>
27091
27092         * lib/same.c (same_name): Tweak a comment.
27093
27094 2003-01-14  Bruno Haible  <bruno@clisp.org>
27095
27096         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
27097         when a string comparison is sufficient.
27098
27099 2003-01-14  Bruno Haible  <bruno@clisp.org>
27100
27101         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
27102         'unsigned int'.
27103
27104 2003-01-14  Bruno Haible  <bruno@clisp.org>
27105
27106         * lib/hash-pjw.c: Add comment about low quality of this function.
27107
27108 2003-01-13  Bruno Haible  <bruno@clisp.org>
27109
27110         * modules/stpcpy: Distribute lib/stpcpy.h.
27111         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
27112
27113 2003-01-13  Bruno Haible  <bruno@clisp.org>
27114
27115         * modules/*: Add a description.
27116         * modules/strpbrk: Fix Makefile.am snippet.
27117         * modules/strtoimax: Fix dependencies.
27118         * modules/strtoumax: Likewise.
27119
27120 2003-01-13  Bruno Haible  <bruno@clisp.org>
27121
27122         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
27123         * modules/alloca (Makefile.am): All object files depend on alloca.h.
27124         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
27125
27126 2003-01-13  Bruno Haible  <bruno@clisp.org>
27127
27128         * gnulib-tool (func_create_testdir): Store config/* files in the main
27129         directory.
27130         * config.rpath: Move to ...
27131         * config/config.rpath: ... here.
27132         * modules/gettext: Contains config/config.rpath, not config.rpath.
27133         * modules/iconv: Likewise.
27134
27135 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27136
27137         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27138         to avoid collisions with libcurses and libreadline.
27139
27140         * m4/getstr.m4: Remove.
27141         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
27142
27143 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27144
27145         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27146         to avoid collisions with libcurses and libreadline.
27147
27148         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
27149         * lib/getstr.h, getstr.c: Remove.
27150         * lib/getline.c: Include "getline.h", to check interface.
27151         Move body of old getstr.c here: this defines MIN_CHUNK and
27152         declares getdelim2, which is renamed from getstr.
27153         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
27154
27155         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
27156         All uses changed.
27157         * lib/linebuffer.h: Likewise.
27158         (readline): Remove backward-compatibility macro.
27159
27160 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27161
27162         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27163         to avoid collisions with libcurses and libreadline.
27164         * getstr: Remove.
27165         * MODULES.html.sh: Remove getstr.
27166         * modules/getline: Depend on unlocked-io, not getstr.
27167
27168 2003-01-12  Jim Meyering  <jim@meyering.net>
27169
27170         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
27171
27172 2003-01-10  Bruno Haible  <bruno@clisp.org>
27173
27174         * modules/alloca: Change Makefile.am requirements. Simplify Include
27175         requirements. Add lib/alloca_.h to file list.
27176
27177 2003-01-10  Bruno Haible  <bruno@clisp.org>
27178
27179         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
27180
27181 2003-01-10  Bruno Haible  <bruno@clisp.org>
27182
27183         * lib/alloca_.h: New file.
27184         * lib/getdate.y: Unconditionally include alloca.h.
27185         * lib/makepath.c: Likewise.
27186         * lib/setenv.c: Likewise.
27187         * lib/userspec.c: Likewise.
27188
27189 2003-01-09  Karl Berry  <karl@gnu.org>
27190
27191         * MODULES.html.sh: include `dirname $0` in PATH, to find
27192         gnulib-tool.
27193
27194 2003-01-09  Bruno Haible  <bruno@clisp.org>
27195
27196         * modules/stdbool: Change configure.ac, Makefile.am requirements.
27197         Simplify Include requirements. Add lib/stdbool.h.in to file list.
27198
27199 2003-01-09  Bruno Haible  <bruno@clisp.org>
27200
27201         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
27202
27203 2003-01-09  Bruno Haible  <bruno@clisp.org>
27204
27205         * lib/stdbool.h.in: New file.
27206
27207 2003-01-09  Bruno Haible  <bruno@clisp.org>
27208
27209         * gnulib-tool (func_all_modules): Ignore files ending in ~.
27210         * MODULES.html.sh: Likewise.
27211
27212 2003-01-08  Jim Meyering  <jim@meyering.net>
27213
27214         * lib/full-write.c: Undefine and define-away `const' after inclusion
27215         of errno.h, not before.  Suggestion from Bruno Haible.
27216
27217 2003-01-08  Bruno Haible  <bruno@clisp.org>
27218
27219         * modules/full-read: Depend on full-write.
27220
27221 2003-01-08  Bruno Haible  <bruno@clisp.org>
27222
27223         * lib/safe-read.c: Include specification header first, to ensure its
27224         selfcontainedness.
27225         * lib/full-write.c: Likewise.
27226
27227 2003-01-07  Jim Meyering  <jim@meyering.net>
27228
27229         * lib/full-write.c: Rework so that it may serve to define full_read,
27230         too.
27231         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
27232
27233 2003-01-07  Bruno Haible  <bruno@clisp.org>
27234
27235         * lib/strtoimax.c: Include <stdint.h> as an alternative to
27236         <inttypes.h>.
27237         * lib/xstrtol.h: Likewise.
27238         * lib/xstrtoimax.c: Likewise.
27239         * lib/xstrtoumax.c: Likewise.
27240         * lib/human.h: Likewise.
27241
27242         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
27243         on systems that have <inttypes.h> but not <stdint.h>.
27244
27245 2003-01-07  Bruno Haible  <bruno@clisp.org>
27246
27247         * MODULES.html.sh: Add copyright notice.
27248         (missed_files): Omit CVS directory entries.
27249         (func_module): Make it work with sed-3.02.
27250         * MODULES.txt: Remove file.
27251
27252 2003-01-06  Jim Meyering  <jim@meyering.net>
27253
27254         * lib/version-etc.c: Update year in translatable copyright string.
27255
27256 2003-01-03  Karl Berry  <karl@gnu.org>
27257
27258         * config/config.{guess,sub}: update from prep.
27259
27260 2003-01-02  Karl Berry  <karl@gnu.org>
27261
27262         * doc/COPYING.DOC: belatedly updated to 1.2.
27263
27264 2003-01-01  Karl Berry  <karl@gnu.org>
27265
27266         * gnulib-tool (func_verify_module): report module name $module in
27267         error message, not $1.
27268         * gnulib-tool (create-testdir): don't complain if destdir couldn't
27269         be created, only if it doesn't exist.
27270         * gnulib-tool (last_checkin_date): don't expand the $Date here.
27271
27272 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27273
27274         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
27275
27276 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27277
27278         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
27279         memcmp if strcoll doesn't work.
27280
27281 2002-12-31  Bruno Haible  <bruno@clisp.org>
27282
27283         * lib/utime.c (utime_null): No need to call ftruncate if the file was
27284         nonempty.
27285
27286 2002-12-31  Bruno Haible  <bruno@clisp.org>
27287
27288         * lib/memcoll.c (STRCOLL): New macro.
27289         (memcoll): Use it.
27290
27291 2002-12-31  Bruno Haible  <bruno@clisp.org>
27292
27293         * lib/localcharset.h: New file.
27294         * lib/localcharset.c: Include it.
27295         * lib/unicodeio.c: Likewise.
27296
27297 2002-12-31  Bruno Haible  <bruno@clisp.org>
27298
27299         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
27300         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
27301
27302 2002-12-31  Bruno Haible  <bruno@clisp.org>
27303
27304         * lib/getline.h: Include <stddef.h>, for size_t.
27305
27306         * lib/unicodeio.h: Include <stddef.h>, for size_t.
27307         * lib/unicodeio.c: Don't include <stddef.h>.
27308
27309 2002-12-31  Bruno Haible  <bruno@clisp.org>
27310
27311         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
27312         HAVE_TM_ZONE.
27313
27314 2002-12-24  Karl Berry  <karl@gnu.org>
27315
27316         * config/config.guess: update from prep.
27317
27318 2002-12-24  Bruno Haible  <bruno@clisp.org>
27319
27320         General infrasructure.
27321         * m4/README: Rewritten.
27322         * m4/onceonly.m4: New file.
27323         * m4/onceonly_2_57.m4: New file.
27324
27325         Module atexit.
27326         * m4/atexit.m4: New file.
27327
27328         Module strtod.
27329         * m4/strtod.m4: New file.
27330
27331         Module strtol.
27332         * m4/strtol.m4: New file.
27333
27334         Module strtoul.
27335         * m4/strtoul.m4: New file.
27336
27337         Module memchr.
27338         * m4/memchr.m4: New file.
27339
27340         Module memcmp.
27341         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
27342         (jm_FUNC_MEMCMP): Invoke it.
27343
27344         Module memcpy.
27345         * m4/memcpy.m4: New file.
27346
27347         Module memmove.
27348         * m4/memmove.m4: New file.
27349
27350         Module memset.
27351         * m4/memset.m4: New file.
27352
27353         Module strcspn.
27354         * m4/strcspn.m4: New file.
27355
27356         Module strpbrk.
27357         * m4/strpbrk.m4: New file.
27358
27359         Module strstr.
27360         * m4/strstr.m4: New file.
27361
27362         Module strerror.
27363         * m4/strerror.m4: New file.
27364
27365         Module mktime.
27366         * m4/mktime.m4: Renamed from jm-mktime.m4.
27367         (gl_PREREQ_MKTIME): New macro.
27368         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
27369
27370         Module malloc.
27371         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
27372         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
27373         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
27374
27375         Module realloc.
27376         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
27377         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
27378         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
27379
27380         Module strftime.
27381         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
27382         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
27383         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
27384         gl_TM_GMTOFF.
27385         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
27386
27387         Module xalloc.
27388         * m4/xalloc.m4: New file.
27389
27390         Module alloca.
27391         * m4/alloca.m4: New file.
27392
27393         Module putenv.
27394         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
27395         (jm_FUNC_PUTENV): Invoke it.
27396
27397         Module setenv.
27398         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
27399         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
27400         when invoked twice.
27401         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
27402         gt_FUNC_SETENV.
27403
27404         Module memrchr.
27405         * m4/memrchr.m4: New file.
27406
27407         Module stpcpy.
27408         * m4/stpcpy.m4: New file.
27409
27410         Module strcase.
27411         * m4/strcase.m4: New file.
27412
27413         Module strdup.
27414         * m4/strdup.m4: New file.
27415
27416         Module strnlen.
27417         * m4/strnlen.m4: New file.
27418
27419         Module strndup.
27420         * m4/strndup.m4: New file.
27421
27422         Module xstrtod.
27423         * m4/xstrtod.m4: New file.
27424
27425         Module xstrtol.
27426         * m4/xstrtol.m4: New file.
27427
27428         Module getdate.
27429         * m4/getdate.m4: New file.
27430
27431         Module unlocked-io.
27432         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
27433         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
27434         * m4/jm-glibc-io.m4n: Remove file.
27435
27436         Module long-options.
27437         * m4/long-options.m4: New file.
27438
27439         Module md5.
27440         * m4/md5.m4: New file.
27441
27442         Module sha.
27443         * m4/sha.m4: New file.
27444
27445         Module getstr.
27446         * m4/getstr.m4: New file.
27447
27448         Module getline.
27449         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
27450         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
27451         <sys/types.h>, for size_t. Use the function name gnu_getline, not
27452         simply getline. Infoke gl_PREREQ_GETLINE.
27453
27454         Module obstack.
27455         * m4/obstack.m4: New file.
27456
27457         Module hash.
27458         * m4/hash.m4: New file.
27459
27460         Module readtokens.
27461         * m4/readtokens.m4: New file.
27462
27463         Module strverscmp.
27464         * m4/strverscmp.m4: New file.
27465
27466         Module stdbool.
27467         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
27468         OSF/1.
27469
27470         Module strtoll.
27471         * m4/strtoll.m4: New file.
27472
27473         Module strtoull.
27474         * m4/strtoull.m4: New file.
27475
27476         Module strtoimax.
27477         * m4/strtoimax.m4: New file.
27478
27479         Module strtoumax.
27480         * m4/strtoumax.m4: New file.
27481
27482         Module xstrtoimax.
27483         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
27484         jm_AC_PREREQ_XSTRTOIMAX.
27485         Moved the strtol prerequisites to strtol.m4.
27486         Moved the strtoll prerequisites to strtoll.m4.
27487         Moved the strtoimax prerequisites to strtoimax.m4.
27488
27489         Module xstrtoumax.
27490         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
27491         jm_AC_PREREQ_XSTRTOUMAX.
27492         Moved the strtoul prerequisites to strtoul.m4.
27493         Moved the strtoull prerequisites to strtoull.m4.
27494         Moved the strtoumax prerequisites to strtoumax.m4.
27495
27496         Module chown.
27497         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
27498         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
27499
27500         Module dup2.
27501         * m4/dup2.m4: New file.
27502
27503         Module ftruncate.
27504         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
27505         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
27506
27507         Module getgroups.
27508         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
27509         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
27510
27511         Module gettimeofday.
27512         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
27513         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
27514         gl_PREREQ_GETTIMEOFDAY.
27515
27516         Module mkdir.
27517         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
27518         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
27519
27520         Module mkstemp.
27521         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
27522         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
27523         jm_AC_TYPE_UINTMAX_T.
27524         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
27525
27526         Module stat.
27527         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
27528         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
27529
27530         Module lstat.
27531         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
27532         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
27533
27534         Module timespec.
27535         * m4/timespec.m4 (gl_TIMESPEC): New macro.
27536         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
27537         * m4/st_mtim.m4: Indentation.
27538
27539         Module nanosleep.
27540         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
27541         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
27542         gl_PREREQ_NANOSLEEP.
27543
27544         Module regex.
27545         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
27546         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
27547         (gl_REGEX): New macro.
27548
27549         Module rename.
27550         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
27551         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
27552
27553         Module rmdir.
27554         * m4/rmdir.m4: New file.
27555
27556         Module utime.
27557         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
27558         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
27559         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
27560
27561         Module dirname.
27562         * m4/dirname.m4: New file.
27563
27564         Module getopt.
27565         * m4/getopt.m4: New file.
27566
27567         Module unistd-safer.
27568         * m4/unistd-safer.m4: New file.
27569
27570         Module fnmatch.
27571         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
27572         declaration.
27573         (gl_PREREQ_FNMATCH_EXTRA): New macro.
27574         (gl_FUNC_FNMATCH_POSIX): New macro.
27575         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
27576         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
27577         simply fnmatch.
27578
27579         Module exclude.
27580         * m4/exclude.m4: New file.
27581
27582         Module human.
27583         * m4/human.m4: New file.
27584
27585         Module acl.
27586         * m4/acl.m4: Nop.
27587
27588         Module backupfile.
27589         * m4/backupfile.m4: New file.
27590         * m4/d-ino.m4: Indentation.
27591
27592         Module fsusage.
27593         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
27594         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
27595         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
27596
27597         Module dirfd.
27598         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
27599         requirements.
27600
27601         Module euidaccess.
27602         * m4/euidaccess.m4: New file.
27603
27604         Module file-type.
27605         * m4/file-type.m4: New file.
27606
27607         Module fileblocks.
27608         * m4/fileblocks.m4: New file.
27609
27610         Module filemode.
27611         * m4/filemode.m4: New file.
27612
27613         Module isdir.
27614         * m4/isdir.m4: New file.
27615
27616         Module lchown.
27617         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
27618         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
27619
27620         Module makepath.
27621         * m4/makepath.m4: New file.
27622
27623         Module modechange.
27624         * m4/modechange.m4: New file.
27625
27626         Module mountlist.
27627         * m4/mountlist.m4: New file.
27628         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
27629         Indentation.
27630
27631         Module path-concat.
27632         * m4/path-concat.m4: New file.
27633
27634         Module pathmax.
27635         * m4/pathmax.m4: New file.
27636
27637         Module same.
27638         * m4/same.m4: New file.
27639
27640         Module save-cwd.
27641         * m4/save-cwd.m4: New file.
27642
27643         Module savedir.
27644         * m4/savedir.m4: New file.
27645
27646         Module xgetcwd.
27647         * m4/xgetcwd.m4: New file.
27648         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
27649
27650         Module xreadlink.
27651         * m4/xreadlink.m4: New file.
27652
27653         Module safe-read.
27654         * m4/safe-read.m4: New file.
27655
27656         Module safe-write.
27657         * m4/safe-write.m4: New file.
27658
27659         Module closeout.
27660         * m4/closeout.m4: New file.
27661
27662         Module stdio-safer.
27663         * m4/stdio-safer.m4: New file.
27664
27665         Module getpass.
27666         * m4/getpass.m4: New file.
27667
27668         Module getugroups.
27669         * m4/getugroups.m4: New file.
27670
27671         Module group-member.
27672         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
27673         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
27674
27675         Module idcache.
27676         * m4/idcache.m4: New file.
27677
27678         Module userspec.
27679         * m4/userspec.m4: New file.
27680
27681         Module gettime.
27682         * m4/clock_time.m4: New file.
27683         * m4/gettime.m4: New file.
27684
27685         Module settime.
27686         * m4/settime.m4: New file.
27687
27688         Module posixtm.
27689         * m4/posixtm.m4: New file.
27690
27691         Module gethostname.
27692         * m4/gethostname.m4: New file.
27693
27694         Module canon-host.
27695         * m4/canon-host.m4: New file.
27696
27697         Module gettext.
27698         * m4/codeset.m4: New file, from gettext-0.11.5.
27699         * m4/gettext.m4: New file, from gettext-0.11.5.
27700         * m4/glibc21.m4: New file, from gettext-0.11.5.
27701         * m4/iconv.m4: New file, from gettext-0.11.5.
27702         * m4/intdiv0.m4: New file, from gettext-0.11.5.
27703         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
27704         * m4/inttypes.m4: New file, from gettext-0.11.5.
27705         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
27706         * m4/isc-posix.m4: New file, from gettext-0.11.5.
27707         * m4/lcmessage.m4: New file, from gettext-0.11.5.
27708         * m4/lib-ld.m4: New file, from gettext-0.11.5.
27709         * m4/lib-link.m4: New file, from gettext-0.11.5.
27710         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
27711         * m4/progtest.m4: New file, from gettext-0.11.5.
27712         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
27713         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
27714         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
27715
27716         Module localcharset.
27717         * m4/localcharset.m4: New file.
27718
27719         Module hard-locale.
27720         * m4/hard-locale.m4: New file.
27721
27722         Module mbswidth.
27723         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
27724         onceonly macros.
27725         * m4/mbrtowc.m4: Add comment.
27726
27727         Module memcasecmp.
27728         * m4/memcasecmp.m4: New file.
27729
27730         Module memcoll.
27731         * m4/memcoll.m4: New file.
27732
27733         Module unicodeio.
27734         * m4/unicodeio.m4: New file.
27735
27736         Module rpmatch.
27737         * m4/rpmatch.m4: New file.
27738
27739         Module yesno.
27740         * m4/yesno.m4: New file.
27741
27742         Module exitfail.
27743         * m4/exitfail.m4: New file.
27744
27745         Module c-stack.
27746         * m4/c-stack.m4 (gl_C_STACK): New macro.
27747         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
27748
27749         Module error.
27750         * m4/error.m4 (gl_ERROR): New macro.
27751         (jm_PREREQ_ERROR): Use onceonly macros.
27752
27753         Module fatal.
27754         * m4/fatal.m4: New file.
27755
27756         Module getloadavg.
27757         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
27758         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
27759
27760         Module getpagesize.
27761         * m4/getpagesize.m4: New file.
27762
27763         Module getusershell.
27764         * m4/getusershell.m4: New file.
27765
27766         Module physmem.
27767         * m4/physmem.m4: New file.
27768
27769         Module posixver.
27770         * m4/posixver.m4: New file.
27771
27772         Module quotearg.
27773         * m4/quotearg.m4: New file.
27774
27775         Module quote.
27776         * m4/quote.m4: New file.
27777
27778         Module readutmp.
27779         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
27780
27781         Module sig2str.
27782         * m4/sig2str.m4: New file.
27783
27784         Other.
27785         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
27786         ulonglong.m4.
27787         * m4/intmax_t.m4: New file.
27788         * m4/d-type.m4: Indentation.
27789         * m4/jm-macros.m4: Update.
27790         * m4/prereq.m4 (jm_PREREQ): Update.
27791         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
27792         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
27793         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
27794         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
27795         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
27796         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
27797         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
27798         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
27799         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
27800         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
27801         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
27802         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
27803         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
27804         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
27805         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
27806         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
27807         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
27808         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
27809         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
27810
27811 2002-12-24  Bruno Haible  <bruno@clisp.org>
27812
27813         * MODULES.txt: Update according to m4/ changes.
27814
27815         Module gettext.
27816         * config.rpath: New file, from gettext-0.11.5.
27817
27818         * modules/*: New module descriptions.
27819         * gnulib-tool: New file.
27820         * MODULES.html.sh: New file.
27821
27822 2002-12-21  Karl Berry  <karl@gnu.org>
27823
27824         * doc/fdl.texi: update to version 1.2.
27825
27826 2002-12-19  Karl Berry  <karl@gnu.org>
27827
27828         * config/config.guess: update from prep.
27829
27830 2002-12-18  Bruno Haible  <bruno@clisp.org>
27831
27832         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
27833         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
27834
27835 2002-12-17  Bruno Haible  <bruno@clisp.org>
27836
27837         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
27838         stdlib.h, string.h.
27839
27840 2002-12-17  Bruno Haible  <bruno@clisp.org>
27841
27842         * lib/canon-host.c (strdup): Remove unused declaration.
27843
27844         * lib/fsusage.c: Include full_read.h.
27845         (get_fs_usage): Use full_read instead of safe_read.
27846
27847         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
27848
27849 2002-12-12  Karl Berry  <karl@gnu.org>
27850
27851         * config/config.guess: update from prep.
27852
27853 2002-12-11  Bruno Haible  <bruno@clisp.org>
27854
27855         * m4/setenv.m4: New file, from gettext-0.11.5.
27856
27857 2002-12-11  Bruno Haible  <bruno@clisp.org>
27858
27859         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
27860         not unsetenv().
27861         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
27862         modifications:
27863
27864         2002-12-11  Bruno Haible  <bruno@clisp.org>
27865
27866                 * setenv.c (alloca): Fall back to malloc.
27867                 (freea): New macro.
27868                 (setenv): Use freea() to free memory allocated with alloca().
27869
27870         2002-11-13  Bruno Haible  <bruno@clisp.org>
27871
27872                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
27873                 function declarations.
27874                 * unsetenv.c (unsetenv): Likewise.
27875
27876         2002-03-04  Bruno Haible  <bruno@clisp.org>
27877
27878                 Portability to AIX 4.3.3.
27879                 * unsetenv.c: New file, extracted from setenv.c.
27880                 * setenv.c: Move the unsetenv() function to unsetenv.c.
27881
27882         2001-12-20  Bruno Haible  <bruno@clisp.org>
27883
27884                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
27885                 use malloc instead. For SunOS 4.
27886
27887         2001-12-11  Bruno Haible  <bruno@clisp.org>
27888
27889                 * setenv.c: Declare alloca.
27890                 (compar_fn_t): New typedef.
27891                 (KNOWN_VALUE, STORE_VALUE): Use it.
27892
27893         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
27894         setenv.h.
27895
27896 2002-12-10  Paul Eggert  <eggert@twinsun.com>
27897
27898         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
27899         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
27900         Choose values that are less likely to collide with system fnmatch
27901         options.
27902         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
27903         defined (e.g., a pure POSIX system).
27904         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
27905         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
27906
27907 2002-12-06  Paul Eggert  <eggert@twinsun.com>
27908
27909         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
27910         a pain in practice to deal with generated m4 files.  This change
27911         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
27912
27913         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
27914         and jm-glibc-io.m4, as they are no longer a special case.
27915         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
27916         kludge and the auto-generation stuff.  Check only whether the
27917         functions are declared, not whether they exist, since older hosts
27918         that don't declare the functions can't use the optimization anyway.
27919
27920 2002-12-06  Jim Meyering  <jim@meyering.net>
27921
27922         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
27923
27924         Merge in changes from libc's misc/error.c, in preparation
27925         for the merge of gnulib's changes back into libc.
27926
27927         * lib/error.c (_): Define only if not already defined.
27928         Move definition to follow all #include directives.
27929         Include unlocked-io.h only if !_LIBC.
27930         [_LIBC]: Include <libio/libioP.h>.
27931         [USE_IN_LIBIO]: Include <libio/iolibio.h>
27932         (fflush): Tweak definition to use INTUSE.
27933         (putc): Define.
27934
27935 2002-12-05  Paul Eggert  <eggert@twinsun.com>
27936
27937         * lib/alloca.c [defined emacs]: Include "lisp.h".
27938         (xalloc_die) [defined emacs]: New macro.
27939         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
27940         [! defined emacs]: Include <xalloc.h>.
27941         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
27942         (pointer): Typedef to POINTER_TYPE *.
27943         (malloc): Remove decl; we now always use xmalloc.
27944         (alloca): Use old-style definition, since Emacs needs this.
27945         Check for arithmetic overflow when computing combined size.
27946
27947 2002-12-04  Paul Eggert  <eggert@twinsun.com>
27948
27949         Do not generate unlocked-io.h automatically, since it's easier to
27950         maintain it by hand.
27951
27952         * lib/unlocked-io.h: New file, from GNU diffutils,
27953         but with proper copyright notice and attribution.
27954         * lib/gen-uio: Remove.
27955         * lib/Makefile.am: Add copyright notice.
27956         (libfetish_a_SOURCES): Add unlocked-io.h.
27957         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
27958         (DISTCLEANFILES, io_functions): Remove macros.
27959         (EXTRA_DIST): Remove gen_uio.
27960         (unlocked-io.h): Remove rule.
27961
27962 2002-12-04  Jim Meyering  <jim@meyering.net>
27963
27964         Reflect the fact that stat.c and lstat.c are no longer generated.
27965         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
27966         (DISTCLEANFILES): Likewise.
27967         (EXTRA_DIST): Likewise.
27968         (all_local): Don't depend on stat.c or lstat.c.
27969         (stat.c, lstat.c): Remove rules.
27970         (EXTRA_DIST): Remove xstat.in.
27971
27972         * lib/xstat.in: Remove file.  Contents moved into stat.c.
27973         * lib/stat.c: New file.  Contents mostly from xstat.in.
27974         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
27975         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
27976
27977         * lib/safe-read.c: Rework so that it may serve to define safe_write,
27978         too.
27979         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
27980
27981 2002-12-03  Jim Meyering  <jim@meyering.net>
27982
27983         * lib/safe-read.c, safe-write.c: Change variable names and comments,
27984         but not semantics, to minimize the differences between these two files.
27985         (safe_read): Change comment to mention SAFE_READ_ERROR.
27986
27987         * lib/safe-read.c (IS_EINTR): Define.
27988         (safe_read): Use IS_EINTR in place of in-function cpp directives.
27989
27990 2002-12-02  Jim Meyering  <jim@meyering.net>
27991
27992         * lib/safe-read.c (EINTR): Define.
27993         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
27994         (INT_MAX): Provide fallback.
27995         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
27996
27997         * lib/safe-read.h (SAFE_READ_ERROR): Define.
27998
27999 2002-12-02  Bruno Haible  <bruno@clisp.org>
28000
28001         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
28002         Define, taken from safe-read.c.
28003         (INT_MAX): Provide fallback.
28004         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
28005         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
28006
28007         * lib/safe-read.c (EINTR): Remove definition.
28008         (safe_read): Don't use EINTR if it is absent.
28009
28010 2002-12-01  Jim Meyering  <jim@meyering.net>
28011
28012         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
28013         zero.
28014         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
28015
28016 2002-11-27  Paul Eggert  <eggert@twinsun.com>
28017
28018         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
28019         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
28020         with `if (! (value < limit)) abort ();', for readability.
28021
28022 2002-11-26  Karl Berry  <karl@gnu.org>
28023
28024         * lib/strdup.c: copy from libc again, with jim's ok.
28025         * lib/.cppi-disable: re-add strdup.c
28026
28027 2002-11-25  Karl Berry  <karl@gnu.org>
28028
28029         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
28030         instead of "strtol.c".
28031
28032 2002-11-25  Karl Berry  <karl@gnu.org>
28033
28034         * config/install-sh: update from automake for variable quoting, $0 in
28035         error msgs, etc.
28036
28037         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
28038         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
28039         entry.
28040
28041 2002-11-25  Jim Meyering  <jim@meyering.net>
28042
28043         * lib/mktime.c: Sync from libc, now that it has the latest fix.
28044
28045 2002-11-24  Karl Berry  <karl@gnu.org>
28046
28047         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
28048         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
28049
28050 2002-11-24  Jim Meyering  <jim@meyering.net>
28051
28052         Update from coreutils:
28053
28054         * lib/mktime.c: Merge in changes from libc.
28055
28056         Avoid a link-time failure on some Linux systems.
28057         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
28058         (otherwise).
28059         (__mon_yday): Declare with the STATIC attribute.
28060         (__mktime_internal): Likewise.
28061         Based on a report from Greg Schafer.
28062
28063 2002-11-23  Jim Meyering  <jim@meyering.net>
28064
28065         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
28066         Use `unsigned', not `int', as type of index.
28067
28068         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
28069
28070         * lib/fsusage.c: Remove unneeded parentheses around operands of
28071         `defined'.
28072
28073 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28074
28075         * lib/quotearg.h: Allow multiple inclusion by surrounding with
28076         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
28077         so that we can be included first.
28078         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
28079         * lib/quotearg.c: Include quotearg.h immediately after config.h.
28080         No need to include stddef.h or sys/types.h any more.
28081         Surround local include files with "", not "<>".
28082         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
28083         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
28084         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
28085         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
28086         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
28087         (ISPRINT): Remove; no longer needed now that we assume C89.
28088
28089         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
28090         Preserve errno.
28091
28092         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
28093         quotearg_char): Use SIZE_MAX rather than
28094         (size_t) -1 when we are talking about "infinity".
28095
28096         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
28097
28098 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28099
28100         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
28101         hint that one should use `if (! x) abort ();' rather than `assert
28102         (x);', and anyway it's one less thing to worry about configuring.
28103         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
28104         hash_rehash, hash_insert): Use abort rather than assert.
28105
28106 2002-11-22  Bruno Haible  <bruno@clisp.org>
28107
28108         * lib/safe-read.h: Assume C89. Add comments.
28109         (safe_read): Change return type to size_t.
28110         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
28111         byte counts > SSIZE_MAX correctly.
28112         * lib/safe-write.h: New file.
28113         * lib/safe-write.c: New file.
28114         * lib/full-read.h: New file.
28115         * lib/full-read.c: New file.
28116         * lib/full-write.h: Assume C89. Add comments.
28117         * lib/full-write.c: Include safe-write.h.
28118         (full_write): Rewritten to use safe_write.
28119         Suggested by Jim Meyering and Paul Eggert.
28120
28121 2002-11-21  Jim Meyering  <jim@meyering.net>
28122
28123         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
28124
28125         Merge in changes from the coreutils.
28126
28127         2002-09-25  Paul Eggert  <eggert@twinsun.com>
28128         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
28129         <stdint.h>.
28130         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
28131         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
28132         int.  Work more efficiently if X is the same width as uintmax_t.
28133         Do not compare X to -1, to avoid bogus compiler warning.
28134         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
28135         Don't assume that f_frsize and f_bsize are the same type.
28136
28137         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
28138         warning on FreeBSD.
28139
28140         * lib/makepath.c (make_path): Restore umask *before* creating the final
28141         component.
28142         (make_path): Minor reformatting.
28143
28144         * lib/xmalloc.c: Adjust to work with new autoconf macros,
28145         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
28146         HAVE_MALLOC/HAVE_REALLOC.
28147
28148         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
28149         dummy ones.  At least on GNU/Linux systems, `auto' means something
28150         else.
28151         From Michael Stone.
28152
28153 2002-11-21  Bruno Haible  <bruno@clisp.org>
28154
28155         Remove case insensitive option matching.
28156         * lib/argmatch.h (argcasematch): Remove declaration.
28157         (ARGCASEMATCH): Remove macro.
28158         (__xargmatch_internal): Remove case_sensitive argument.
28159         (XARGMATCH): Update.
28160         (XARGCASEMATCH): Remove macro.
28161         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
28162         case_sensitive argument.
28163         (argcasematch): Remove function.
28164         (__xargmatch_internal): Remove case_sensitive argument.
28165         (main): Use XARGMATCH instead of XARGCASEMATCH.
28166
28167         * lib/xmalloc.c: Change compile-time error message. Add comment about
28168         required autoconf version.
28169
28170 2002-11-20  Paul Eggert  <eggert@twinsun.com>
28171
28172         Merge argmatch cleanups from Bison.  Assume C89.
28173
28174         * lib/argmatch.c: Include config.h here, not in argmatch.h.
28175         Include stdlib.h, for EXIT_FAILURE.
28176         Always include <string.h>, since we assume C89.
28177         (EXIT_FAILURE): Remove pre-C89 bug workaround.
28178         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
28179         Include <stddef.h> instead, since it's all we need for size_t.
28180         (PARAMS): Remove.  All uses removed.
28181         (ARRAY_CARDINALITY): Do not bother to #undef.
28182         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
28183         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28184         Remove unnecessary parentheses.
28185         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28186         Insert necessary parentheses.
28187         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
28188         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
28189
28190 2002-11-19  Bruno Haible  <bruno@clisp.org>
28191
28192         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
28193         * lib/mbswidth.h: Include <stddef.h>, for size_t.
28194
28195         * lib/mbswidth.h (PARAMS): Remove macro.
28196         (mbswidth, mbsnwidth): Use ANSI C function declarations.
28197         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
28198
28199         * lib/gcd.h (PARAMS): Remove macro.
28200         (gcd): Use ANSI C function declarations.
28201         * lib/gcd.c (gcd): Likewise.
28202
28203 2002-11-15  Bruno Haible  <bruno@clisp.org>
28204
28205         * lib/strcspn.c: Include <stddef.h>.
28206         (strcspn): Use ANSI C function declaration. Change return type to
28207         size_t. Use NULL.
28208         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
28209         (strpbrk): Use NULL.
28210         * lib/strpbrk.h (PARAMS): Remove macro.
28211         (strpbrk): Use ANSI C function declaration.
28212         * lib/strstr.c: Don't include <sys/types.h>.
28213         * lib/strstr.h (PARAMS): Remove macro.
28214         (strstr): Use ANSI C function declarations.
28215
28216 2002-11-14  Karl Berry  <karl@gnu.org>
28217
28218         * config/mkinstalldirs: `do' on separate line, instead of
28219         `for var; do'.
28220
28221 2002-11-06  Bruno Haible  <bruno@clisp.org>
28222
28223         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
28224         * lib/gcd.c (gcd): Likewise.
28225
28226 2002-11-05  Bruno Haible  <bruno@clisp.org>
28227
28228         * lib/gcd.h: New file, from gettext-0.11.5.
28229         * lib/gcd.c: New file, from gettext-0.11.5.
28230
28231 2002-11-05  Bruno Haible  <bruno@clisp.org>
28232
28233         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28234         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28235         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28236         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28237
28238         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
28239         <libintl.h>.
28240         * lib/makepath.c: Include gettext.h instead of <locale.h> and
28241         <libintl.h>.
28242
28243         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
28244         * lib/human.c: Include gettext.h instead of <libintl.h>.
28245         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
28246         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
28247         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
28248         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
28249         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
28250         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
28251         (textdomain): Remove definition.
28252         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
28253
28254         * lib/long-options.c: Remove include of <libintl.h> and definition of
28255         _.
28256         * lib/same.c: Remove include of <libintl.h> and definition of _.
28257
28258 2002-11-04  Owen Taylor  <otaylor@redhat.com>
28259
28260         * lib/config.charset: A few additions for Solaris.
28261
28262 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28263
28264         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
28265         * lib/localcharset.c (locale_charset): Declare as extern "C".
28266
28267 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28268
28269         * lib/config.charset: msdos in uk_UA uses CP1125.
28270
28271 2002-11-04  Bruno Haible  <bruno@clisp.org>
28272
28273         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
28274         * lib/strcase.h: New file, from GNU gettext-0.11.5.
28275         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
28276         * lib/strstr.h: New file, from GNU gettext-0.11.5.
28277         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
28278
28279 2002-11-04  Bruno Haible  <bruno@clisp.org>
28280
28281         * lib/localcharset.c (locale_charset): Don't return an empty string.
28282
28283 2002-11-04  Bruno Haible  <bruno@clisp.org>
28284
28285         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
28286         aliases.
28287
28288 2002-11-04  Bruno Haible  <bruno@clisp.org>
28289
28290         * lib/config.charset: Update for newest glibc. Add canonical names
28291         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
28292
28293 2002-11-04  Bruno Haible  <bruno@clisp.org>
28294
28295         * lib/config.charset: Add support for NetBSD.
28296
28297 2002-11-04  Bruno Haible  <bruno@clisp.org>
28298
28299         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
28300
28301 2002-11-01  Bruno Haible  <bruno@clisp.org>
28302
28303         * configure.in: Add AC_CONFIG_AUX_DIR call.
28304         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
28305         test/Makefile.
28306         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
28307
28308 2002-09-28  Karl Berry  <karl@gnu.org>
28309
28310         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
28311         installed automake until the next release, since changes have been
28312         made.
28313
28314 2002-09-25  Karl Berry  <karl@gnu.org>
28315
28316         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
28317         * lib/getopt*: copy from libc/posix.
28318         * lib/gettext.h: copy from gettext.
28319         * lib/.cppi-disable: add strdup.c, gettext.h.
28320
28321 2002-09-25  Karl Berry  <karl@gnu.org>
28322
28323         * config/srclist.txt: enable gettext.h check.
28324         * config/config.{guess,sub}: update from prep.
28325         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
28326                 from automake 1.6.3.
28327         See srclist*.
28328
28329 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
28330
28331         * regex.c (PATFETCH): Remove the translating fetch.
28332         (PATFETCH_RAW): Rename to PATFETCH.
28333         (set_image_of_range): New fun.
28334         (SET_RANGE_TABLE_WORK_AREA): Use it.
28335         (regex_compile): Don't translate the pattern chars so eagerly.
28336         Only do it when inserting an `exactn' bytecode or when handling
28337         a char-range.
28338         (mutually_exclusive_p): Avoid empty statement.
28339
28340 2002-07-06  Jim Meyering  <meyering@lucent.com>
28341
28342         * m4/README: Don't mention Makefile.am.in.
28343         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
28344
28345 2002-07-01  Jim Meyering  <meyering@lucent.com>
28346
28347         * lib/c-stack.c: Include sys/time.h.
28348         From Volker Borchert.
28349
28350 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28351
28352         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
28353
28354 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28355
28356         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
28357         New macro.  Use it uniformly instead of
28358         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
28359         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
28360         reported by Vin Shelton.
28361
28362 2002-06-22  Paul Eggert  <eggert@twinsun.com>
28363
28364         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
28365         Do not assume SA_SIGINFO behavior.
28366         Bug reported by Jim Meyering on NetBSD 1.5.2.
28367
28368 2002-06-22  Jim Meyering  <meyering@lucent.com>
28369
28370         * m4/c-stack.m4: New file, from diffutils-2.8.2.
28371         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
28372
28373         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
28374         now that configure.ac uses AC_GNU_SOURCE.
28375         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
28376         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
28377
28378         Update to latest tools.  Suggestions from Paul Eggert.
28379         * m4/stdbool.m4: New file, from diffutils-2.8.2.
28380         * m4/gnu-source.m4: Update from diffutils-2.8.2.
28381         * m4/fnmatch.m4: Likewise.
28382         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
28383         to AC_HEADER_STDBOOL
28384
28385 2002-06-22  Jim Meyering  <meyering@lucent.com>
28386
28387         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
28388         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
28389
28390 2002-06-22  Jim Meyering  <meyering@lucent.com>
28391
28392         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
28393
28394         * lib/exitfail.c, exitfail.h: Likewise.
28395         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
28396
28397         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
28398         of fnmatch.h.
28399         (EXTRA_DIST): Add fnmatch_loop.c.
28400         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
28401
28402         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
28403         * lib/fnmatch.c: Update from diffutils-2.8.2.
28404         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
28405         * lib/fnmatch.h: Remove file.
28406
28407 2002-06-21  Jim Meyering  <meyering@lucent.com>
28408
28409         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
28410         * m4/mbrtowc.m4: Likewise.
28411
28412         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
28413         * m4/mbswidth.m4: Reflect name change:
28414         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
28415         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
28416
28417         * m4/lib-link.m4: Update from gettext-0.11.2.
28418         * m4/gettext.m4: Likewise.
28419
28420         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
28421         From Alfred M. Szmidt.
28422
28423 2002-06-18  Paul Eggert  <eggert@twinsun.com>
28424
28425         * lib/file-type.h: Report an error if neither S_ISREG nor
28426         S_IFREG is defined, instead of using a test specific to glibc
28427         2.2.  This should be safe, since POSIX requires S_ISREG and
28428         Unix Version 7 had S_IFREG.  We don't need to check for
28429         <sys/types.h> since we don't use any symbols that it defines.
28430
28431 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
28432
28433         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
28434         $@-t, so that each temporary file name is unique and valid in the first
28435         8 characters, for operation under DOS.
28436
28437 2002-06-15  Paul Eggert  <eggert@twinsun.com>
28438
28439         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
28440
28441 2002-06-15  Jim Meyering  <meyering@lucent.com>
28442
28443         Work even with DJGPP 2.03, which lacks support for symlinks.
28444         From Richard Dawe.
28445         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
28446         is defined.
28447         * lib/lchown.c (S_ISLNK): Likewise.
28448
28449 2002-06-15  Jim Meyering  <meyering@lucent.com>
28450
28451         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
28452         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
28453         have been included before this file.
28454
28455 2002-06-14  Jim Meyering  <meyering@lucent.com>
28456
28457         * lib/file-type.h: Use the version from diffutils-2.8.2.
28458         * lib/file-type.c: Likewise.
28459
28460 2002-06-07  Jim Meyering  <meyering@lucent.com>
28461
28462         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
28463         They're needed at least for NetBSD 1.5.2.
28464         ($statxfs_includes): Include those same headers.
28465         ($statxfs_includes): Include sys/vfs.h if available.
28466         ($statxfs_includes): Likewise for sys/statvfs.h.
28467         Check for the following members in both structs statfs and statvfs:
28468         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
28469
28470 2002-06-01  Jim Meyering  <meyering@lucent.com>
28471
28472         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
28473         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
28474
28475 2002-05-28  Jim Meyering  <meyering@lucent.com>
28476
28477         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
28478         Reported by Volker Borchert.
28479
28480 2002-05-27  Jim Meyering  <meyering@lucent.com>
28481
28482         Fix a problem seen only on nonconforming systems whereby ls.c's
28483         use of localtime, and then of gettimeofday would cause trouble:
28484         the localtime call used to initialize rpl_gettimeofday's save
28485         mechanism would clobber ls's current local time information so
28486         that in any long listing the first file would always be listed
28487         with date 1970-01-01.  Analysis by Volker Borchert.
28488
28489         * lib/gettimeofday.c (localtime): Undefine.
28490         (rpl_localtime): New function.
28491
28492 2002-05-27  Jim Meyering  <meyering@lucent.com>
28493
28494         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
28495         localtime.
28496
28497         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
28498         use the replacement function; it wouldn't resolve at link time.
28499         Reported by Volker Borchert.
28500
28501 2002-05-22  Jim Meyering  <meyering@lucent.com>
28502
28503         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
28504         file-type.h.
28505         * lib/file-type.h: New file.
28506         * lib/file-type.c (file_type): New file/function.  Extracted from
28507         diffutils.
28508
28509 2002-04-30  Jim Meyering  <meyering@lucent.com>
28510
28511         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
28512
28513 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28514
28515         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
28516
28517 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28518
28519         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
28520         Do not check for alloca.h (no longer used) or stdbool.h (was never
28521         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
28522
28523 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28524
28525         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
28526
28527 2002-04-29  Jim Meyering  <meyering@lucent.com>
28528
28529         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
28530         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
28531         Use AC_FUNC_STRNLEN here instead.
28532
28533         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
28534         With autoconf-2.53a, it's part of AC_PROG_CC.
28535
28536 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28537
28538         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
28539         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
28540
28541 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28542
28543         * lib/sig2str.h, lib/sig2str.c: New files.
28544         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
28545
28546 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28547
28548         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
28549         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
28550         of 127, since 64 is the largest conceivable number for ancient
28551         nonstandard hosts.
28552         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
28553
28554 2002-04-28  Jim Meyering  <meyering@lucent.com>
28555
28556         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
28557
28558 2002-04-24  Jim Meyering  <meyering@lucent.com>
28559
28560         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
28561         (jm_PREREQ): Use it.
28562
28563         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
28564         mach/mach.h fcntl.h.
28565         Check for this function: setlocale.
28566
28567 2002-04-24  Jim Meyering  <meyering@lucent.com>
28568
28569         * lib/gettext.h: New file, from Gettext.
28570         * lib/Makefile.am (INCLUDES): Remove -I../intl.
28571         (libfetish_a_SOURCES): Add gettext.h.
28572
28573 2002-04-16  Jim Meyering  <meyering@lucent.com>
28574
28575         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
28576         ut_pid, ut_id, ut_exit.
28577
28578 2002-04-16  Jim Meyering  <meyering@lucent.com>
28579
28580         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
28581         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
28582         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
28583
28584 2002-04-12  Jim Meyering  <meyering@lucent.com>
28585
28586         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
28587         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
28588         existence of the getmntinfo function.  Needed for Darwin 5.3.
28589
28590         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
28591         This is necessary at least on Darwin 5.3.
28592
28593         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
28594         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
28595         strnlen.o in the library, and that makes some versions of ranlib
28596         object.
28597
28598 2002-04-12  Jim Meyering  <meyering@lucent.com>
28599
28600         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
28601
28602 2002-04-09  Jim Meyering  <meyering@lucent.com>
28603
28604         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
28605         to be more precise.  Rather than saying we're checking whether the
28606         function `works', say what we're testing.
28607         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
28608         Reported by Bruno Haible.
28609
28610 2002-03-10  Jim Meyering  <meyering@lucent.com>
28611
28612         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
28613         Suggestion from Santiago Vila.
28614
28615 2002-03-08  Jim Meyering  <meyering@lucent.com>
28616
28617         * lib/rename.c: Mention that this wrapper is needed also on
28618         mips-dec-ultrix4.4 systems.
28619
28620 2002-03-02  Jim Meyering  <meyering@lucent.com>
28621
28622         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
28623         not HAVE_CLOCK_SETTIME.
28624
28625 2002-02-27  Paul Eggert  <eggert@twinsun.com>
28626
28627         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
28628         Check for clock_settime.
28629
28630 2002-02-27  Paul Eggert  <eggert@twinsun.com>
28631
28632         * lib/nanosleep.h: Rename to....
28633         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
28634
28635         * lib/gettime.c: New file.
28636         * lib/settime.c: New file.
28637         * lib/stime.c: Remove.
28638
28639         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
28640         timespec.h.  Remove nanosleep.h.
28641
28642 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28643
28644         * m4/acl.m4: New file.
28645         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
28646         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
28647
28648 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28649
28650         * lib/acl.c, lib/acl.h: New files.
28651         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
28652
28653 2002-02-24  Jim Meyering  <meyering@lucent.com>
28654
28655         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
28656         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
28657         cause trouble.  Reported by Nelson Beebe.
28658
28659 2002-02-23  Paul Eggert  <eggert@twinsun.com>
28660
28661         * lib/path-concat.c (xpath_concat): Reorder code to pacify
28662         compilers that don't know that xalloc_die never returns.
28663
28664 2002-02-20  Jim Meyering  <meyering@lucent.com>
28665
28666         * lib/getdate.c: Regenerate using bison-1.33.
28667
28668 2002-02-17  Jim Meyering  <meyering@lucent.com>
28669
28670         * config/config.guess (main): Don't use `head -1'; it's no longer
28671         portable. Use `sed 1q' instead.
28672
28673 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
28674
28675         * m4/codeset.m4: Upgrade to gettext-0.11.
28676         * m4/gettext.m4: Upgrade to gettext-0.11.
28677         * m4/glibc21.m4: Upgrade to gettext-0.11.
28678         * m4/iconv.m4: Upgrade to gettext-0.11.
28679         * m4/isc-posix.m4: Upgrade to gettext-0.11.
28680         * m4/lcmessage.m4: Upgrade to gettext-0.11.
28681         * m4/lib-ld.m4: New file, from gettext-0.11.
28682         * m4/lib-link.m4: New file, from gettext-0.11.
28683         * m4/lib-prefix.m4: New file, from gettext-0.11.
28684         * m4/progtest.m4: Upgrade to gettext-0.11.
28685
28686 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28687
28688         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
28689         (jm_PREREQ): Use it.
28690
28691 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28692
28693         * lib/posixver.c, lib/posixver.h: New files.
28694         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28695
28696 2002-02-02  Paul Eggert  <eggert@twinsun.com>
28697             Bruno Haible  <bruno@clisp.org>
28698
28699         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
28700         (fwrite_success_callback): New declaration.
28701         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
28702         print_unicode_char. Call failure callback instead of error.
28703         (fwrite_success_callback): New function.
28704         (exit_failure_callback): New function.
28705         (fallback_failure_callback): New function.
28706         (print_unicode_char): Call unicode_to_mb.
28707
28708 2002-01-26  Jim Meyering  <meyering@lucent.com>
28709
28710         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
28711         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
28712
28713 2002-01-26  Jim Meyering  <meyering@lucent.com>
28714
28715         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
28716
28717 2002-01-22  Paul Eggert  <eggert@twinsun.com>
28718
28719         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
28720
28721 2002-01-22  Jim Meyering  <meyering@lucent.com>
28722
28723         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
28724         Otherwise, some versions of automake would omit the rule that makes
28725         Makefile from Makefile.in.
28726
28727 2002-01-21  Paul Eggert  <eggert@twinsun.com>
28728
28729         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
28730         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28731         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
28732         (memcoll): Set errno to zero if there is no error.
28733
28734         * lib/quotearg.c (quotearg_buffer_restyled):
28735         Fix bug with quoting buffers containing NUL when backslashing escapes.
28736         This bug was exposed by the other changes in this patch.
28737         (quotearg_n_options): New arg ARGSIZE.
28738         All callers changed.
28739         (quoting_options_from_style): New function.
28740         (quotearg_n_style): Use it.
28741         (quotearg_n_style_mem): New function.
28742
28743         * lib/quotearg.h (quotearg_n_style_mem): New function.
28744
28745 2002-01-19  Jim Meyering  <meyering@lucent.com>
28746
28747         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
28748         Remove useless quotes: DF_PROG="df".
28749         * m4/strnlen.m4: New file.
28750
28751 2002-01-16  Paul Eggert  <eggert@twinsun.com>
28752
28753         * lib/backupfile.c (ISDIGIT): Comment fix.
28754         * lib/getdate.y (ISDIGIT): Likewise.
28755         * lib/posixtm.c (ISDIGIT, year): Likewise.
28756         * lib/strverscmp.c (ISDIGIT): Likewise.
28757         * lib/userspec.c (ISDIGIT): Likewise.
28758
28759 2002-01-16  Jim Meyering  <meyering@lucent.com>
28760
28761         * lib/getdate.y: Add three semicolons, each just before a closing
28762         brace. Bison (as of version 1.31) no longer papers over that mistake.
28763
28764 2002-01-05  Jim Meyering  <meyering@lucent.com>
28765
28766         * lib/version-etc.c (version_etc_copyright): Update copyright year.
28767
28768 2001-12-19  Paul Eggert  <eggert@twinsun.com>
28769
28770         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
28771         not silently exit merely because the output buffer happens to
28772         have nothing pending.
28773
28774 2001-12-18  Paul Eggert  <eggert@twinsun.com>
28775
28776         See the big note in ../ChangeLog.
28777         * lib/human.c (suffixes): Prefer K to k for 1024.
28778         (generate_suffix_backwards): New function.
28779         (human_readable_inexact): Use it.
28780         * lib/xstrtol.c (__xstrtol): If there is no number but there
28781         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
28782         Accept 'K' as well as 'k'.
28783
28784 2001-12-15  Jim Meyering  <meyering@lucent.com>
28785
28786         * lib/regex.h (__restrict_arr): Update from libc.
28787
28788         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
28789         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
28790         (STREQ): Define.
28791
28792 2001-12-14  Jim Meyering  <meyering@lucent.com>
28793
28794         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
28795         Suggestion from Bruno Haible.
28796
28797 2001-12-10  Jim Meyering  <meyering@lucent.com>
28798
28799         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
28800         xrealloc, Instead, include "xalloc.h".
28801         (initbuffer): Don't cast xmalloc return value to char*.
28802         (readline): Reword comment.
28803         Don't cast xrealloc return value to char*
28804         Return NULL, not 0.
28805
28806 2001-12-09  Jim Meyering  <meyering@lucent.com>
28807
28808         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
28809         about `signed and unsigned type in conditional expression'.
28810         * lib/posixtm.c (posix_time_parse): Likewise.
28811
28812         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
28813
28814         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
28815         to avoid a pedantic warning.
28816
28817         * lib/getstr.c: Don't include assert.h.
28818         (getstr): Remove warning-evoking assertions.
28819         Return -1 if offset parameter is out of bounds.
28820         Change the type of a local from int to size_t.
28821
28822         * lib/strftime.c (my_strftime_localtime_r): Include this function
28823         definition in the `#if ! HAVE_TM_GMTOFF' block.
28824
28825         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
28826         Include xalloc.h instead.
28827
28828 2001-12-02  Jim Meyering  <meyering@lucent.com>
28829
28830         * lib/tempname.c: Don't declare getenv, thus reverting the change of
28831         2001-11-18.  It's no longer necessary, now that stdlib.h is always
28832         included.
28833
28834         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
28835         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
28836
28837 2001-11-30  Akim Demaille  <akim@epita.fr>
28838
28839         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
28840         before being defined.
28841
28842 2001-11-27  Paul Eggert  <eggert@twinsun.com>
28843
28844         * lib/quotearg.h (quotearg_n, quotearg_n_style):
28845         First arg is int, not unsigned.
28846         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
28847         (SIZE_MAX, UINT_MAX): New macros.
28848         (quotearg_n_options): Abort if N is negative.
28849         Avoid overflow check on hosts where size_t is 64 bits and int
28850         is 32 bits, as overflow is impossible there.
28851         Fix off-by-one typo that caused unnecessary reallocation.
28852
28853 2001-11-27  Jim Meyering  <meyering@lucent.com>
28854
28855         * lib/tempname.c: Merge with version from libc.
28856         * lib/regex.c: Likewise.
28857
28858         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
28859         systems for which STDC_HEADERS is 0, it was not included, resulting in
28860         a warning about an integer-to-pointer conversion problem with getenv.
28861         Reported by Volker Borchert.
28862
28863 2001-11-26  Jim Meyering  <meyering@lucent.com>
28864
28865         * lib/gtod.h: Remove file.
28866         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
28867         * lib/gettimeofday.c: Don't include gtod.h.
28868         (GTOD_init): Remove function.
28869         (rpl_gettimeofday): Do its job here instead, rather than aborting.
28870         Suggestion from Volker Borchert.
28871
28872 2001-11-23  Jim Meyering  <meyering@lucent.com>
28873
28874         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
28875         it.
28876         * lib/hash.c (struct hash_table): Define it here instead.
28877
28878 2001-11-22  Jim Meyering  <meyering@lucent.com>
28879
28880         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
28881
28882 2001-11-20  Jim Meyering  <meyering@lucent.com>
28883
28884         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
28885         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
28886
28887 2001-11-19  Jim Meyering  <meyering@lucent.com>
28888
28889         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
28890         directory.  Use "conftestXXXXXX" as the template.
28891         Suggestion from Paul Eggert.
28892
28893         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
28894         immediately, so the test doesn't mistakenly hit the max-open-files
28895         limit.
28896
28897 2001-11-18  Paul Eggert  <eggert@twinsun.com>
28898
28899         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
28900         (TEMPORARIES): New macro.
28901         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
28902         removes an artificial limitation (e.g. HP-UX 10.20, where
28903         TMP_MAX is 17576).
28904
28905 2001-11-18  Jim Meyering  <meyering@lucent.com>
28906
28907         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
28908
28909 2001-11-18  Jim Meyering  <meyering@lucent.com>
28910
28911         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
28912         on SunOS 4.
28913
28914         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
28915         files will be created before anything else.
28916
28917 2001-11-17  Paul Eggert  <eggert@twinsun.com>
28918
28919         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
28920         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
28921
28922 2001-11-17  Jim Meyering  <meyering@lucent.com>
28923
28924         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
28925         Prompted by a report from Bob Proulx.
28926
28927         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
28928         Instead, require UTILS_FUNC_MKSTEMP.
28929
28930 2001-11-17  Jim Meyering  <meyering@lucent.com>
28931
28932         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
28933         Now, that's done as part of AC_FUNC_STRTOD.
28934
28935 2001-11-17  Jim Meyering  <meyering@lucent.com>
28936
28937         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
28938         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
28939         rather than group writable.  Patch by Juan F. Codagnone.
28940
28941         * lib/readtokens.c: Remove explicit declarations of xmalloc and
28942         xrealloc, Instead, include "xalloc.h".
28943
28944         * lib/mountlist.c: Include unlocked-io.h after all system headers.
28945         Remove explicit declarations of xmalloc, xrealloc,
28946         and xstrdup.  Instead, include "xalloc.h".
28947
28948         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
28949         unlocked-io.h.
28950         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
28951         Likewise.
28952         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
28953
28954         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
28955         Reported by Padraig Brady.
28956
28957         * lib/mkstemp.c: #undef mkstemp.
28958         Include config.h.
28959         (rpl_mkstemp): Rename from mkstemp.
28960         Protoize.
28961
28962 2001-11-16  Jim Meyering  <meyering@lucent.com>
28963
28964         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
28965         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
28966         determine the amount of total physical memory, use pstat_getstatic.
28967         HPUX-11 doesn't define _SC_PHYS_PAGES.
28968         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
28969         If sysconf couldn't be used to determine the amount of available
28970         physical memory, use both pstat_getstatic and pstat_getdynamic.
28971         Based on a patch from Bob Proulx.
28972
28973 2001-11-10  Jim Meyering  <meyering@lucent.com>
28974
28975         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
28976         (jm_PREREQ): Use it.
28977
28978 2001-11-09  Jim Meyering  <meyering@lucent.com>
28979
28980         * m4/jm-macros.m4: Require autoconf-2.52f.
28981         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
28982         Use these AC_-prefixed names, not the AM_-prefixed ones.
28983
28984         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
28985
28986 2001-11-05  Jim Meyering  <meyering@lucent.com>
28987
28988         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
28989
28990 2001-11-04  Jim Meyering  <meyering@lucent.com>
28991
28992         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
28993         $DEFS.
28994
28995 2001-11-03  Jim Meyering  <meyering@lucent.com>
28996
28997         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
28998         of AC_DEFUN.
28999
29000         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
29001         know the name of the variable in the macro definition.
29002
29003 2001-11-03  Jim Meyering  <meyering@lucent.com>
29004
29005         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
29006         in argmatch_to_argument call.
29007
29008         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
29009         argument.
29010
29011         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
29012         e.g., a fault due to an attempt to free a NULL pointer.
29013
29014 2001-11-01  Jim Meyering  <meyering@lucent.com>
29015
29016         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
29017         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
29018
29019 2001-11-01  Jim Meyering  <meyering@lucent.com>
29020
29021         * lib/dirfd.c, lib/dirfd.h: New files.
29022         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
29023
29024         * lib/hash.c (hash_print) [TESTING]: Clean up.
29025
29026 2001-10-22  Paul Eggert  <eggert@twinsun.com>
29027
29028         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
29029         to avoid a warning if -Wall.
29030
29031 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
29032
29033         * README: New file
29034         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
29035         (per RMS's instructions, this is now the canonical source)
29036         * lgpl/, gpl/: New directories.
29037
29038 2001-10-21  Paul Eggert  <eggert@twinsun.com>
29039
29040         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
29041
29042 2001-10-21  Jim Meyering  <meyering@lucent.com>
29043
29044         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
29045         this code would end up calling gettext even in packages built
29046         with --disable-nls.
29047         * lib/getopt.c (_): Likewise.
29048         * lib/regex.c (_): Likewise.
29049
29050 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29051
29052         * m4/error.m4 (jm_PREREQ_ERROR):
29053         Do not invoke AC_CHECK_FUNCS with strerror_r, as
29054         AC_FUNC_STRERROR_R does that.
29055         Check for strerror declaration.
29056
29057         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
29058         are supposed to have them these days.
29059         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
29060         Merge changes from latest Autoconf CVS.
29061         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
29062         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
29063         POSIX decided to standardize on the int flavor of strerror_r.
29064
29065 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29066
29067         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
29068         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
29069         Use strerror_r that is only a macro, even if it is not a function.
29070         (strerror): Check for HAVE_DECL_STRERROR before declaring.
29071         (private_strerror): Use prototypes, not old-style function definition.
29072         (print_errno_message): New function.
29073         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
29074         char*-flavored one.
29075         (error_tail, error, error_at_line): Use it.
29076
29077 2001-10-11  Jim Meyering  <meyering@lucent.com>
29078
29079         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
29080         and quote_n (1, ... to avoid clobbering a buffer.
29081
29082 2001-10-05  Jim Meyering  <meyering@lucent.com>
29083
29084         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
29085         hash-pjw.h.
29086         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
29087         * lib/hash-pjw.h: New file.
29088
29089 2001-09-30  Jim Meyering  <meyering@lucent.com>
29090
29091         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
29092         `struct fsstat' has the `f_fstypename' member.
29093         Use that to define FS_TYPE, which is now used to make
29094         the getfsstat link test tighter.
29095
29096 2001-09-30  Jim Meyering  <meyering@lucent.com>
29097
29098         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
29099         Include <sys/ucred.h>, for Apple Darwin.
29100         Include sys/mount.h and sys/fs_types.h only if available.
29101         (FS_TYPE): Define.
29102         (read_filesystem_list): Use FS_TYPE.
29103
29104 2001-09-29  Paul Eggert  <eggert@twinsun.com>
29105
29106         * lib/exclude.c (excluded_filename): 0 -> false, since it's
29107         a boolean context.
29108
29109 2001-09-29  Jim Meyering  <meyering@lucent.com>
29110
29111         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29112         [one-argument getmntent function]): Include stdio.h before mntent.h.
29113         SunOS 4.1.x needs it for the declaration of `FILE'.
29114         Patch by Volker Borchert.
29115
29116         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29117         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
29118         sys/fs_types.h, and make the link-test for getfsstat guard #include
29119         directives with appropriate #if HAVE_*_H tests so that we can
29120         detect getfsstat on Apple Darwin1.3.7 systems.
29121         Reported by Nelson Beebe.
29122         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
29123
29124 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29125
29126         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29127         #defines strtoimax.  Also treat the other strto* functions
29128         like strtoimax.
29129
29130         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29131         Check for strtoul and strtoumax,
29132         as those declarations are made even in the signed case.
29133         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
29134         Likewise, for strtol and strtoimax.
29135
29136 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29137
29138         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29139         #defines strtoimax.  Also treat the other strto* functions
29140         like strtoimax.
29141
29142         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
29143         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
29144         (strtoimax, strtoumax): Do not declare if already defined as a macro.
29145
29146 2001-09-26  Jim Meyering  <meyering@lucent.com>
29147
29148         Most macros in unlocked-io.h had the wrong number of arguments.
29149         * lib/gen-uio: New script.
29150         (USE_UNLOCKED_IO): Define to 1 if not already defined.
29151         * lib/unlocked-io.hin: Remove file.
29152         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
29153         rather than trying to embed it here.
29154         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
29155         Reported by Padraig Brady.
29156
29157 2001-09-25  Volker Borchert  <bt@teknon.de>
29158
29159         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
29160         `result'.
29161
29162 2001-09-24  Jim Meyering  <meyering@lucent.com>
29163
29164         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
29165
29166 2001-09-23  Jim Meyering  <meyering@lucent.com>
29167
29168         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
29169         instead of the mere test for existence of mntent.h.  The latter
29170         would get a false-positive on AIX 3.4 systems.
29171         In the outer getmntent if-block, don't die if neither of the getmntent
29172         tests succeeds.  Instead, just fall through and continue with the
29173         remaining tests.
29174
29175 2001-09-23  Jim Meyering  <meyering@lucent.com>
29176
29177         * lib/mountlist.c: Remove useless parentheses in #if directives.
29178         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
29179         the deprecated MOUNTED symbol is no longer defined in mntent.h.
29180
29181 2001-09-22  Jim Meyering  <meyering@lucent.com>
29182
29183         * m4/gettext.m4: New file.  From gettext.
29184         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
29185         * m4/progtest.m4: Likewise
29186         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
29187         * m4/glibc21.m4: Likewise.
29188
29189         * m4/libintl.m4: Remove.  No longer used.
29190
29191 2001-09-22  Jim Meyering  <meyering@lucent.com>
29192
29193         * lib/localcharset.c: Update from latest gettext.
29194         * lib/config.charset: Likewise.
29195
29196 2001-09-20  Jim Meyering  <meyering@lucent.com>
29197
29198         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
29199         strtoimax.
29200         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
29201         strtoumax.
29202
29203 2001-09-20  Jim Meyering  <meyering@lucent.com>
29204
29205         * lib/xstrtol.c (strtoimax): Guard declaration with
29206         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
29207         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
29208         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
29209         (strtoumax): Likewise, for completeness (it wasn't necessary).
29210
29211 2001-09-17  Paul Eggert  <eggert@twinsun.com>
29212
29213         * lib/strtoimax.c (HAVE_LONG_LONG):
29214         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
29215         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
29216         to work around bug in IBM C compiler.
29217
29218 2001-09-17  Jim Meyering  <meyering@lucent.com>
29219
29220         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
29221         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
29222         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
29223         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
29224         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
29225         whenever the right hand side need not be expanded by the shell.
29226
29227 2001-09-16  Paul Eggert  <eggert@twinsun.com>
29228
29229         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
29230         library.  It's not correct, as some older glibcs are buggy.
29231         fnmatch wasn't fixed until glibc 2.2.
29232
29233         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
29234         special shell magic here.
29235
29236 2001-09-16  Jim Meyering  <meyering@lucent.com>
29237
29238         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
29239         * m4/jm-macros.m4: Require it.
29240
29241 2001-09-16  Jim Meyering  <meyering@lucent.com>
29242
29243         * lib/mkdir.c: New file.
29244
29245 2001-09-15  Jim Meyering  <meyering@lucent.com>
29246
29247         * m4/jm-macros.m4: Check for help2man.
29248
29249 2001-09-11  Jim Meyering  <meyering@lucent.com>
29250
29251         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
29252         The body, by Paul Eggert, was moved here from configure.in.
29253         * m4/jm-macros.m4: Require UTILS_HOST_OS.
29254
29255 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29256
29257         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
29258         (jm_PREREQ): Use it.
29259
29260 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29261
29262         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
29263         Use ssize_t, not int, to store result of readlink.
29264         Check for ssize_t overflow as well as size_t overflow,
29265         as POSIX says the result of readlink is implementation-defined
29266         when ssize_t overflows.
29267         Remove unnecessary cast to char*.
29268         Use free+malloc instead of realloc, as the storage doesn't need
29269         to be preserved and it's clearer and can be more efficient that way.
29270         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
29271         * lib/xreadlink.h (xreadlink): Update prototype.
29272
29273 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29274
29275         * lib/xgetcwd.c: Revert some of the previous change; intead,
29276         fix the HAVE_GETCWD_NULL code to behave more like the
29277         !HAVE_GETCWD_NULL code used to.
29278
29279         Include "xalloc.h".
29280         (xgetcwd): Do not return NULL when memory is exhausted; instead,
29281         invoke xalloc_die.
29282
29283 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29284
29285         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
29286         sys/param.h, as pathmax.h includes them.
29287
29288 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29289
29290         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
29291         (jm_PREREQ_XGETCWD): New macro.
29292
29293         * m4/getcwd.m4: New file.
29294
29295 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29296
29297         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
29298         like the HAVE_GETCWD_NULL code.
29299         Include pathmax.h if not HAVE_GETCWD.
29300         Do not include xalloc.h.
29301         (INITIAL_BUFFER_SIZE): New symbol.
29302         Do not use xmalloc / xrealloc, since the caller is responsible for
29303         handling errors.  Preserve errno around `free' during failure.
29304         Do not overrun buffer when using getwd.
29305
29306 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29307
29308         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
29309         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
29310         getcwd (NULL, 0).
29311
29312 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29313
29314         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
29315         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
29316         spotted by Jim Meyering.
29317
29318 2001-09-03  Jim Meyering  <meyering@lucent.com>
29319
29320         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
29321         failure.
29322
29323 2001-09-02  Jim Meyering  <meyering@lucent.com>
29324
29325         * lib/error.c: Update from GNU libc.
29326
29327 2001-09-01  Jim Meyering  <meyering@lucent.com>
29328
29329         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
29330         Used by df.
29331
29332 2001-09-01  Jim Meyering  <meyering@lucent.com>
29333
29334         * lib/xreadlink.c: New file.
29335         * lib/xreadlink.h: New file.
29336         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
29337         xreadlink.h.
29338
29339         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
29340         doesn't conflict with sparc Solaris 7's definition in
29341         /usr/include/sys/int_types.h.
29342
29343         * lib/exclude.c: Use `""', not `<>' to #include non-system header
29344         files.
29345         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
29346         and strncasecmp as r-values.  Unixware didn't have declarations.
29347
29348 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29349
29350         * lib/xstrtol.h: Add copyright notice.
29351         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
29352         LONGINT_INVALID_SUFFIX_CHAR.
29353
29354 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29355
29356         * lib/xstrtol.c (strtoimax): New decl.
29357
29358 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29359
29360         * lib/xgetcwd.c: Don't include pathmax.h.
29361         Include stdlib.h and unistd.h if available.
29362         Include xalloc.h.
29363         (xmalloc, xstrdup, free): Remove decls.
29364         (xgetcwd): Don't assume sizes fit in unsigned.
29365         Check for overflow when computing sizes.
29366         Simplify reallocation code.
29367
29368 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29369
29370         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
29371         a directory's st_size can have an arbitrary value, so the old
29372         usage could waste an arbitrary amount of memory.  All uses
29373         changed.
29374         * lib/savedir.h: Update prototype.
29375
29376 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29377
29378         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
29379
29380         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
29381         old strtoimax.c.
29382
29383         Also, make the following further changes to make this file's
29384         configuration more similar to that of strtol.c:
29385         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
29386         (strtoumax, uintmax_t, strtoull, strtol): Remove.
29387         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
29388         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
29389         changed to signed values.
29390
29391         And make the following changes as well:
29392         Fix copyright notice, as 1999 was missing.
29393         (verify): New macro.
29394         (strtoimax): Check sizes at compile-time, not run-time.
29395         Prefer strtol to strtoll if both work.
29396         (main): Remove; it was not that useful and was a pain to maintain.
29397
29398         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
29399
29400 2001-08-31  Jim Meyering  <meyering@lucent.com>
29401
29402         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
29403         Use an initial, malloc'd, buffer of length 128 rather than
29404         a statically allocated one of length 1024.
29405
29406 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29407
29408         Simplify code, partly by assuming autoconf 2.52 semantics.
29409
29410         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
29411
29412         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
29413         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
29414         All uses removed.
29415         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
29416         Move AC_REQUIRE to next-to-top level, to avoid confusion.
29417         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
29418         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
29419         jm_AC_HEADER_INTTYPES_H.
29420         * m4/jm-macros.m4 (jm_MACROS): Likewise.
29421
29422         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
29423
29424         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29425         Quote first arg of AC_DEFUN.
29426         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
29427         since they are needed to parse the include file even if we need
29428         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
29429         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
29430         but with opposite signedness.
29431
29432 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29433
29434         Merge 'exclude' changes from tar 1.13.22.
29435         This fixes one or two unlikely storage allocation overflow bugs,
29436         but doesn't change user-visible behavior otherwise.
29437
29438 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29439
29440         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
29441         (jm_PREREQ_EXCLUDE): New macro.
29442
29443 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29444
29445         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
29446         tm to be declared.
29447
29448 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29449
29450         * lib/hash.c: Remove '2001' from copyright notice.
29451
29452 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29453
29454         * lib/full-write.h: New file.
29455         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
29456         * lib/full-write.c: Correct credits, as cccp.c no longer
29457         exists and anyway it was so heavily changed from the old cccp
29458         code as to be unrecognizable.  Include full-write.h.
29459         (full_write) Return size_t, with short writes meaning failure.
29460         All callers changed.  This fixes a bug with large buffers
29461         on 64-bit hosts.
29462         * lib/utime.c: Include full-write.h.
29463
29464 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29465
29466         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
29467         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
29468         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
29469         Include if available.
29470         (<xalloc.h>): Include
29471         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
29472         (verify): New macro.  Use it to verify that EXCLUDE macros do not
29473         collide with FNM macros.
29474         (struct patopts): New struct.
29475         (struct exclude): Use it, as exclude patterns now come with options.
29476         (new_exclude): Support above changes.
29477         (new_exclude, add_exclude_file):
29478         Initial size must now be a power of two to simplify overflow checking.
29479         (free_exclude, fnmatch_no_wildcards): New function.
29480         (excluded_filename): No longer requires options arg, as the options
29481         are determined by add_exclude.  Now returns bool, not int.
29482         (excluded_filename, add_exclude):
29483         Add support for the fancy new exclusion options.
29484         (add_exclude, add_exclude_file): Now takes int options arg.
29485         Check for arithmetic overflow when computing sizes.
29486         (add_exclude_file): xrealloc might modify errno, so don't
29487         realloc until after errno might be used.
29488
29489         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
29490         New macros.
29491         (free_exclude): New decl.
29492         (add_exclude, add_exclude_file): Now takes int options arg.
29493         (excluded_filename): No longer requires options arg, as the options
29494         are determined by add_exclude.  Now returns bool, not int.
29495
29496 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29497
29498         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
29499
29500 2001-08-27  Jim Meyering  <meyering@lucent.com>
29501
29502         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
29503
29504         * lib/version-etc.c (N_): Remove definition.
29505         Revert most of last change.
29506         Instead, simply don't mark the `Copyright...' string for translation.
29507         Based on advice from Paul Eggert.
29508
29509         * lib/strtoxmax.c: Tweak comment.
29510
29511 2001-08-26  Jim Meyering  <meyering@lucent.com>
29512
29513         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
29514
29515         * m4/xstrtoimax.m4: New file.
29516         * m4/xstrtoumax.m4: Add comments explaining why we
29517         AC_REPLACE_FUNCS(strtol).
29518
29519 2001-08-26  Jim Meyering  <meyering@lucent.com>
29520
29521         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
29522         of copyright with `%s' so translators don't get an untranslated
29523         message in 2002.
29524         (COPYRIGHT_YEAR): Define.
29525         (version_etc): Use fprintf rather than fputs.
29526         Suggestion from Ulrich Drepper.
29527
29528         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
29529
29530         * lib/strtoll.c: New file, from GNU libc.
29531         * lib/xstrtoimax.c: New file.
29532
29533         * lib/xstrtol.h: Add xstrtoimax.
29534         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
29535         * lib/strtoimax.c: New file.  Likewise, but first define
29536         STRTOUXMAX_SIGNED.
29537
29538         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
29539         ...
29540         * lib/strtoxmax.c: ... then renamed to this.
29541
29542 2001-08-18  Paul Eggert  <eggert@twinsun.com>
29543
29544         * m4/inttypes.m4: Add AC_PREREQ(2.13).
29545         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
29546         (jm_AC_TYPE_INTMAX_T): New macro.
29547         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
29548
29549         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
29550
29551         * m4/longlong.m4: Renamed from ulonglong.m4.
29552         * m4/inttypes.m4: Renamed from inttypes_h.m4.
29553         * m4/uintmax_t.m4: Removed.
29554
29555 2001-08-13  Paul Eggert  <eggert@twinsun.com>
29556
29557         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
29558         Port to Solaris 8, where 'sed' requires a space after the 'r'
29559         command, and where sh dislikes "$/".  Clean up the spacing a bit.
29560         Redirect output to $tmp just once.
29561
29562 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
29563
29564         * lib/addext.c (<errno.h>): Include.
29565         (errno): Declare if not defined.
29566         (addext): Work correctly when pathconf returns -1 and leaves
29567         errno alone because there is no limit.  Also, work even if
29568         pathconf returns a value greater than SIZE_MAX.
29569
29570 2001-08-12  Jim Meyering  <meyering@lucent.com>
29571
29572         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
29573         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
29574         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
29575         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
29576         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
29577         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
29578         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
29579         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
29580         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
29581         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
29582         utime.m4, utimes.m4, xstrtoumax.m4:
29583         Quote the first argument in each use of AC_DEFUN.
29584
29585 2001-08-12  Jim Meyering  <meyering@lucent.com>
29586
29587         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
29588         Simply `return getcwd (NULL, 0);'.
29589         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
29590         Use 1300 as initial value for length, not PATH_MAX.
29591
29592         * lib/pathmax.h: Clean up cpp syntax.
29593
29594 2001-08-12  Jim Meyering  <meyering@lucent.com>
29595
29596         * lib/gettimeofday.c: New file.
29597         * lib/gtod.h: New file.
29598         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
29599
29600 2001-08-05  Jim Meyering  <meyering@lucent.com>
29601
29602         * m4/jm-macros.m4: Require autoconf-2.52.
29603
29604 2001-08-04  Jim Meyering  <meyering@lucent.com>
29605
29606         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
29607         stmt, to get in sync with glibc.
29608
29609 2001-08-03  Paul Eggert  <eggert@twinsun.com>
29610
29611         The following changes are from gettext 0.10.39 as maintained by
29612         Bruno Haible.
29613
29614         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
29615         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
29616         with inverted sense.  All uses changed.
29617
29618         * lib/mbswidth.c: Don't include <limits.h>.
29619         Include <stdlib.h> and <string.h> unconditionally.
29620         (iswcntrl, mbsinit, ISCNTRL): New macros.
29621         (mbsnwidth): Use K&R style function declarations.
29622         Don't bother checking for MB_LEN_MAX == 1, since the compiler
29623         can optimize it when MB_CUR_MAX == 1.
29624         The width of control characters is zero, not 1.
29625
29626 2001-08-03  Paul Eggert  <eggert@twinsun.com>
29627
29628         The following changes are from gettext 0.10.39 as maintained by
29629         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
29630
29631         * m4/codeset.m4: Upgrade to serial AM1.
29632         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
29633         all uses changed.  Quote first arg of AC_DEFUN.
29634         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
29635
29636         * m4/iconv.m4: Upgrade to serial AM2.
29637         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
29638         Add --with-libconv-prefix.
29639         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
29640         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
29641         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
29642         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
29643         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
29644
29645         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
29646         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
29647         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
29648         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
29649         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
29650         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
29651         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
29652         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
29653         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
29654
29655         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
29656         string.h any more.
29657
29658         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
29659         not the default value.
29660
29661         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
29662         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
29663         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
29664         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
29665         Also check for iswcntrl, used for wcwidth fallback.
29666         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
29667         to Autoconf 2.13.
29668
29669 2001-08-03  Jim Meyering  <meyering@lucent.com>
29670
29671         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
29672         as it was in the original.  Reported by Paul Eggert.
29673
29674 2001-07-16  Jim Meyering  <meyering@lucent.com>
29675
29676         * m4/gettimeofday.m4: New file.
29677         Prompted by a report from Bernhard Baehr.
29678
29679 2001-07-15  Jim Meyering  <meyering@lucent.com>
29680
29681         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
29682         stuff. Now it's in ../Makefile.cfg.
29683
29684 2001-07-15  Jim Meyering  <meyering@lucent.com>
29685
29686         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
29687         (BUILT_SOURCES): Add unlocked-io.h.
29688         (io_functions): Define.
29689         (unlocked-io.h): New rule.
29690         (DISTCLEANFILES): Add unlocked-io.h.
29691         (all-local): Depend on unlocked-io.h, to ensure it is created.
29692
29693         * lib/unlocked-io.hin: New file
29694
29695         * lib/regex.c: Update from glibc.
29696
29697 2001-07-05  Jim Meyering  <meyering@lucent.com>
29698
29699         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
29700         recommendation.
29701         (libfetish_a_SOURCES): Put all .h files here instead.
29702         Remove a thus-exposed (better checks in automake) duplicate and
29703         two unnecessary .h files.
29704
29705 2001-07-04  Jim Meyering  <meyering@lucent.com>
29706
29707         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
29708         that generates jm-glibc-io.m4 so that it doesn't trigger any make
29709         distcheck failure.
29710
29711 2001-07-02  Jim Meyering  <meyering@lucent.com>
29712
29713         The following changes were prompted by suggestions from Bruno Haible.
29714
29715         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
29716         is now generated.
29717         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
29718         definition of EXTRA_DIST.
29719         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
29720         ensure that the generated file is created/updated whenever the list
29721         of $(unlocked_functions) is changed.
29722         (jm-glibc-io.m4): New rule.
29723         (unlocked-io.h): New rule -- currently unused.
29724
29725 2001-06-24  Jim Meyering  <meyering@lucent.com>
29726
29727         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
29728         unmatched right bracket, rather than kludging it with an extra,
29729         falsely-matching quote in a comment.  Patch by Akim Demaille.
29730
29731 2001-06-11  Jim Meyering  <meyering@lucent.com>
29732
29733         * lib/regex.c: Update from GNU libc.
29734
29735 2001-05-27  Jim Meyering  <meyering@lucent.com>
29736
29737         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
29738         Check for ut_type in struct utmp.
29739
29740 2001-05-27  Jim Meyering  <meyering@lucent.com>
29741
29742         * lib/readutmp.h (UT_TYPE): Define.
29743
29744 2001-05-24  Jim Meyering  <meyering@lucent.com>
29745
29746         * lib/argmatch.c: Include "quote.h".
29747         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
29748         quote function.  Reported by Göran Uddeborg.
29749
29750 2001-05-22  Jim Meyering  <meyering@lucent.com>
29751
29752         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
29753         now that we use the package-supplied version unconditionally.
29754         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
29755
29756 2001-05-21  Jim Meyering  <meyering@lucent.com>
29757
29758         * m4/regex.m4: Change a couple backticks to single quotes to avoid
29759         shell syntax errors.
29760
29761 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29762
29763         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
29764
29765 2001-05-20  Paul Eggert  <eggert@twinsun.com>
29766
29767         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
29768         Don't bother to check library strftime, since
29769         we'll be using our own my_strftime function anyway.
29770         Define my_strftime instead of strftime.
29771
29772 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
29773
29774         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
29775         which is not yet declared.
29776
29777 2001-05-15  Jim Meyering  <meyering@lucent.com>
29778
29779         * m4/regex.m4: Use proper quoting so brackets appear in the test
29780         program.
29781         Reported by, and with help from, Bruno Haible.
29782
29783 2001-05-13  Jim Meyering  <meyering@lucent.com>
29784
29785         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
29786         undefined.
29787
29788 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29789
29790         dirname code cleanup.  base_name now behaves more compatibly
29791         with POSIX basename when given file names that have trailing
29792         slashes, and similarly for dir_name.  Add new primitives
29793         base_len and dir_len.  Put the directory-name-related decls
29794         into dirname.h.
29795
29796         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
29797         * lib/backupfile.c (base_name): Likewise.
29798         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
29799         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
29800         * lib/makepath.c (strip_trailing_slashes): Likewise.
29801         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
29802         ISSLASH): Likewise.
29803         * lib/rename.c (strip_trailing_slashes): Likewise.
29804         * lib/same.c (base_name): Likewise.
29805         * lib/stripslash.c (ISSLASH): Likewise.
29806
29807         * lib/addext.c: Include <dirname.h> after size_t is defined.
29808         * lib/backupfile.c: Likewise.
29809
29810         * lib/addext.c (addext): Use base_len to trim redundant
29811         trailing slashes instead of doing it ourselves.
29812         But do not trim the last slash if it is not redundant.
29813
29814         * lib/backupfile.c (find_backup_file_name,
29815         max_backup_version): Use base_len instead of rolling it ourselves.
29816         Handle the case of "" and (on DOS) "C:" correctly.
29817
29818         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
29819         needed. Include <string.h>, <dirname.h>.
29820         (base_name): Allow file names ending in slashes, other than names
29821         that are all slashes.  In this case, return the basename followed
29822         by the slashes.  This is more general, and can be used in places
29823         where the original base_name purposely had an assertion failure.
29824         (base_len): New function.
29825
29826         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
29827         Do not include <assert.h>; no longer needed.
29828         Include xalloc.h.
29829         (memrchr): Remove decl.
29830         (dir_name_r): Remove.
29831         (dir_len): Renamed from dirlen.  All callers changed.
29832         Rewrite in terms of base_name, for simplicity and consistency.
29833         (dir_name): Never return NULL.  All callers changed.
29834         Do not include <stdlib.h> in test program; no longer needed.
29835         return 0; is fine for test program.
29836
29837         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
29838         New macros.
29839         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
29840
29841         * lib/path-concat.c (path_concat): Use base_len to compute
29842         base length, not strlen; this means we cannot rely on memcpy
29843         to null-terminate.
29844
29845         * lib/same.c (STREQ): Remove.
29846         (same_name): Handle the case where the basename ends in trailing '/'.
29847
29848         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
29849         a slash was stripped.  Do not strip the last slash after a
29850         file system prefix.
29851
29852 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29853
29854         * lib/Makefile.am (libfetish_a_SOURCES):
29855         Add strftime.c, since we now compile it on all hosts.
29856
29857         * lib/strftime.c (my_strftime):
29858         Define to nstrftime if emacs, but only if my_strftime is not defined.
29859         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
29860         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
29861         Add one more extra argument: a nanoseconds value.
29862         All uses changed.
29863         (ns): New macro.
29864         (my_strftime function): Add %N format.
29865         (emacs_strftimeu): Renamed from emacs_strftime,
29866         with extra ut argument.
29867
29868 2001-05-09  Paul Eggert  <eggert@twinsun.com>
29869
29870         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
29871
29872 2001-04-21  Jim Meyering  <meyering@lucent.com>
29873
29874         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
29875         doesn't interfere.
29876
29877 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29878
29879         * m4/ftruncate.m4: Check for chsize.
29880         Link with ftruncate.o unconditionally if ftruncate is missing.
29881         This was required when cross-compiling to i586-mingw32msvc.
29882
29883 2001-04-08  Jim Meyering  <meyering@lucent.com>
29884
29885         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
29886         recomputed; that's necessary when the offset spans a DST transition.
29887         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
29888
29889 2001-04-02  Jim Meyering  <meyering@lucent.com>
29890
29891         * lib/regex.h, regex.c: Update from GNU libc.
29892
29893 2001-03-24  Jim Meyering  <meyering@lucent.com>
29894
29895         * m4/jm-macros.m4: Require autoconf-2.49d.
29896
29897 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
29898
29899         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
29900
29901 2001-03-19  Paul Eggert  <eggert@twinsun.com>
29902
29903         * lib/version-etc.c (version_etc_copyright): Update to 2001.
29904
29905 2001-03-17  Jim Meyering  <meyering@lucent.com>
29906
29907         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
29908         now that the version in autoconf is equivalent.
29909         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
29910
29911         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
29912         Suggestion from Akim Demaille.
29913
29914         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
29915         (jm_PREREQ_TEMPNAME): New function.
29916
29917 2001-03-16  Paul Eggert  <eggert@twinsun.com>
29918
29919         * lib/tempname.c (uint64_t): Define to uintmax_t if
29920         not defined, and if UINT64_MAX is not defined.
29921         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
29922         Reported by John David Anglin.
29923
29924 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
29925
29926         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
29927         resolve alias if codeset is empty.
29928         * lib/config.charset (BeOS): Use wildcard syntax.
29929
29930 2001-03-13  Jim Meyering  <meyering@lucent.com>
29931
29932         * lib/path-concat.c (path_concat)
29933         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
29934         concatenating e.g., `C:' and `foo'.
29935         From Bruno Haible.
29936
29937 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29938
29939         * lib/localcharset.c (locale_charset): Don't use
29940         setlocale(LC_CTYPE,NULL). Don't return NULL.
29941         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
29942
29943 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29944
29945         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
29946         support for DOS/DJGPP.
29947
29948 2001-03-01  Paul Eggert  <eggert@twinsun.com>
29949
29950         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
29951         lacks mkstemp.  Compile our own tempname.c if we compile our own
29952         mkstemp.c, as mkstemp relies on tempname.
29953
29954 2001-03-01  Jim Meyering  <meyering@lucent.com>
29955
29956         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
29957         AH_VERBATIM really does output its argument verbatim.
29958
29959 2001-02-28  Paul Eggert  <eggert@twinsun.com>
29960
29961         * lib/Makefile.am (libfetish_a_SOURCES):
29962         Add dup-safer.c, fopen-safer.c.
29963         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
29964
29965         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
29966         * lib/unistd-safer.h: New files.
29967
29968 2001-02-25  Paul Eggert  <eggert@twinsun.com>
29969
29970         The mkstemp replacement is taken from glibc 2.2.2, with some
29971         portability fixes for use outside glibc, as follows:
29972
29973         * lib/tempname.c (struct_stat64): New macro.
29974         (direxists, __gen_tempname): Use it.
29975         This avoids a portability problem with Solaris 8.
29976
29977         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
29978         (<stddef.h>, <stdint.h>, <string.h>):
29979         Include only if STDC_HEADERS || _LIBC.
29980         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
29981         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
29982         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
29983         (__set_errno): Define this macro if <errno.h> doesn't.
29984         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
29985         Define these macros if <stdio.h> doesn't.
29986         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
29987         Define these macros if <sys/stat.h>
29988         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
29989         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
29990         __xstat64): Define if not _LIBC.
29991         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
29992         (__gen_tempname): Invoke gettimeofday only if
29993         HAVE_GETTIMEOFDAY || _LIBC;
29994         otherwise, fall back on plain "time".
29995         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
29996
29997         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
29998
29999         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
30000
30001 2001-02-18  Paul Eggert  <eggert@twinsun.com>
30002
30003         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
30004
30005 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30006
30007         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
30008         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
30009         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
30010         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
30011
30012 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30013
30014         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
30015         Remove workaround macros for hosts that have mbrtowc but not
30016         mbstate_t, as we now insist on proper declarations for both
30017         before using mbrtowc.
30018
30019 2001-02-17  Jim Meyering  <meyering@lucent.com>
30020
30021         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
30022         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
30023         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
30024         UnixWare 7.1.1.
30025
30026         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
30027         rather than AC_CACHE_VAL.
30028
30029 2001-02-17  Jim Meyering  <meyering@lucent.com>
30030
30031         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
30032         around included file name.
30033
30034         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
30035
30036         * lib/strftime.c: Update from GNU libc (the only changes were to
30037         comments).
30038
30039 2001-02-17  Jim Meyering  <meyering@lucent.com>
30040
30041         * lib/regex.c: Update from libc.
30042
30043 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
30044
30045         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
30046         clash.
30047
30048 2001-02-16  Paul Eggert  <eggert@twinsun.com>
30049
30050         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
30051         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
30052         Reported by Mark Hounschell via Paul Eggert.
30053
30054 2001-02-07  Jim Meyering  <meyering@lucent.com>
30055
30056         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
30057
30058 2001-02-05  Jim Meyering  <meyering@lucent.com>
30059
30060         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
30061         it includes the patch required for `large file' support with at least
30062         HP-UX's 10.20 /bin/cc.
30063
30064 2001-02-03  Jim Meyering  <meyering@lucent.com>
30065
30066         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
30067         AS_IF, now that it works once again (mysteriously).
30068         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30069
30070 2001-01-30  Jim Meyering  <meyering@lucent.com>
30071
30072         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
30073         * m4/chown.m4: Rename conftestchown to conftest.chown.
30074         * m4/rename.m4: s/conftestdir/conftest.d1/ and
30075         s/conftestdir2/conftest.d2/.
30076         * m4/utimes.m4: s/conftestdata/conftest.data/
30077         Inspired by Pavel Roskin's change in autoconf.
30078
30079 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
30080
30081         * lib/config.charset: Update for FreeBSD 4.2.
30082
30083 2001-01-27  Jim Meyering  <meyering@lucent.com>
30084
30085         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
30086         a use of AS_IF.
30087         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30088
30089 2001-01-26  Jim Meyering  <meyering@lucent.com>
30090
30091         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
30092         quotearg.c includes it.
30093
30094 2001-01-26  Jim Meyering  <meyering@lucent.com>
30095
30096         * lib/quotearg.c: Include stddef.h.
30097         * lib/quote.c: Include stddef.h.
30098         Reported by Axel Kittenberger.
30099
30100         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
30101         line in double quotes so that it evokes a better diagnostic.
30102         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
30103         Reported by Axel Kittenberger.
30104
30105 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
30106
30107         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
30108         as if it was a `charset'.
30109
30110 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30111
30112         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
30113         has const.
30114
30115 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30116
30117         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
30118         to avoid a warning.  Add back 'const' to inptr.
30119
30120 2001-01-20  Jim Meyering  <meyering@lucent.com>
30121
30122         Be sure that headers are checked before used in code compiled
30123         for the type checks.
30124         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
30125         In place of that, invoke jm_CHECK_ALL_TYPES.
30126         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
30127         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
30128         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
30129         The check for ssize_t was mistakenly run before the test for unistd.h.
30130
30131         The configure-time check for stdbool.h was missing.
30132         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
30133         (jm_PREREQ_HASH): New function.
30134
30135 2001-01-17  Jim Meyering  <meyering@lucent.com>
30136
30137         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
30138         for autoconf-2.49c.
30139         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
30140
30141 2001-01-16  Jim Meyering  <meyering@lucent.com>
30142
30143         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
30144         From Bruno Haible.
30145
30146 2001-01-14  Jim Meyering  <meyering@lucent.com>
30147
30148         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
30149         foo and bar.  Create conftestdir/ in the script, not in the C code.
30150         Remove directories in the script, not in the C code.
30151         Remove conftestdir{,2} before trying to create the directory.
30152         Make the entire configure script fail if the mkdir fails.
30153
30154 2001-01-14  Jim Meyering  <meyering@lucent.com>
30155
30156         * lib/rename.c: New file.  From Volker Borchert.
30157         Include stdlib.h, string.h or strings.h, and xalloc.h.
30158         Use strip_trailing_slashes rather than open-coding it.
30159
30160 2001-01-03  Paul Eggert  <eggert@twinsun.com>
30161
30162         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
30163
30164 2001-01-03  Jim Meyering  <meyering@lucent.com>
30165
30166         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
30167         of local `inptr' to avoid warning with some system declarations of
30168         iconv.
30169
30170 2001-01-02  Volker Borchert  <bt@teknon.de>
30171
30172         * m4/rename.m4: New file.
30173         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
30174
30175 2001-01-01  Jim Meyering  <meyering@lucent.com>
30176
30177         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
30178         even on systems with utmpx.h.  It's necessary for the declaration of
30179         utmp's ut_user member.  Reported by Andreas Jaeger.
30180
30181         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
30182         available. They are required for the declarations of getgrgid and
30183         getpwuid resp.
30184         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
30185         Reported by Andreas Jaeger.
30186
30187 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
30188
30189         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
30190         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
30191         so `make install' also works in VPATH builds.
30192
30193 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
30194
30195         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
30196         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
30197         can be used in subdirectories.
30198
30199 2000-12-29  Paul Eggert  <eggert@twinsun.com>
30200
30201         * lib/modechange.c: Do not assume that mode_t uses the
30202         traditional octal encoding.  E.g. "chmod 1 FOO" should set
30203         the other-execute bit of FOO even if S_IXOTH != 1.
30204
30205         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
30206         WOTH, XOTH, ALLM): New macros.
30207         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
30208          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
30209         Use them.
30210         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
30211         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
30212         (mode_compile):
30213         No need to use uintmax_t; unsigned long is long enough.
30214         Don't bother to get suffix since we don't use it.
30215
30216 2000-12-26  Jim Meyering  <meyering@lucent.com>
30217
30218         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
30219         better with autoheader.
30220
30221 2000-12-24  Jim Meyering  <meyering@lucent.com>
30222
30223         * lib/hash.c (is_prime): Return explicit boolean values.
30224         (hash_get_first): Return NULL to appease Irix5.6's 89.
30225         Reported by Nelson Beebe.
30226
30227 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
30228
30229         * lib/localcharset.c (locale_charset): Add support for Win32.
30230
30231 2000-12-18  Paul Eggert  <eggert@twinsun.com>
30232
30233         * lib/physmem.h, lib/physmem.c: New files.
30234
30235         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
30236         (noinst_HEADERS): Add physmem.h.
30237
30238         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
30239         't' for compatibility with Solaris 8 sort.
30240
30241 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
30242
30243         * lib/config.charset: Add support for BeOS.
30244
30245 2000-12-17  Jim Meyering  <meyering@lucent.com>
30246
30247         * m4/dos.m4 (jm_AC_DOS): New file and macro.
30248         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
30249
30250 2000-12-16  Jim Meyering  <meyering@lucent.com>
30251
30252         This bug had a serious impact on chown: `chown N:M FILE' (for integer
30253         N and M) would have treated it like `chown N:N FILE'.
30254
30255         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
30256
30257 2000-12-16  Jim Meyering  <meyering@lucent.com>
30258
30259         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
30260         SHELLS_FILE to a file name that's useful on djgpp systems.
30261         Include stdlib.h.
30262         (ADDITIONAL_DEFAULT_SHELLS): Define.
30263         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
30264         Based mostly on a patch from Prashant TR.
30265
30266 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
30267
30268         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
30269         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
30270         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
30271
30272 2000-12-08  Andreas Schwab  <schwab@suse.de>
30273
30274         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
30275         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
30276
30277 2000-12-07  Jim Meyering  <meyering@lucent.com>
30278
30279         * lib/stripslash.c (ISSLASH): Define.
30280         (strip_trailing_slashes): Use ISSLASH rather than comparing against
30281         `/'.
30282         From Prashant TR.
30283
30284         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
30285         (dir_name_r): Declare this function as static.
30286         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
30287         manifest itself on a name containing a mix of slashes and
30288         backslashes.
30289         Make this function work with names starting with a DOS-style
30290         drive letter and colon prefix.
30291         (dir_name): Append `.' if necessary.
30292         Based mostly on patches from Prashant TR and Eli Zaretskii.
30293
30294         * lib/dirname.h (dir_name_r): Remove prototype.
30295
30296 2000-12-06  Paul Eggert  <eggert@twinsun.com>
30297
30298         * m4/off_t-format.m4: Remove this file.
30299         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
30300
30301 2000-12-06  Jim Meyering  <meyering@lucent.com>
30302
30303         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
30304         replacement strtoull, we may well need the replacement strtoul, too.
30305         Check for declarations of strtoul and strtoull.
30306         Check for strtol.  Mainly as a cue to cause automake to include
30307         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
30308         Check for limits.h -- strtol.c needs it.
30309
30310 2000-12-05  Jim Meyering  <meyering@lucent.com>
30311
30312         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
30313
30314 2000-12-04  Jim Meyering  <meyering@lucent.com>
30315
30316         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
30317         Also include memory.h, stdlib.h, unistd.h if appropriate.
30318         Reported by Andreas Jaeger (conflicting declaration of malloc).
30319
30320 2000-12-02  Jim Meyering  <meyering@lucent.com>
30321
30322         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
30323         * m4/jm-macros.m4 (jm_MACROS): require it.
30324
30325 2000-12-02  Jim Meyering  <meyering@lucent.com>
30326
30327         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
30328
30329 2000-12-01  Paul Eggert  <eggert@twinsun.com>
30330
30331         * lib/memrchr.c: Include <config.h> before any system include file.
30332
30333 2000-11-30  Jim Meyering  <meyering@lucent.com>
30334
30335         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
30336
30337 2000-11-30  Jim Meyering  <meyering@lucent.com>
30338
30339         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
30340
30341 2000-11-29  Paul Eggert  <eggert@twinsun.com>
30342
30343         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
30344
30345 2000-11-26  Jim Meyering  <meyering@lucent.com>
30346
30347         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
30348
30349 2000-11-22  Paul Eggert  <eggert@twinsun.com>
30350
30351         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
30352         size of (size_t) -1; it's not portable.
30353
30354 2000-11-17  Jim Meyering  <meyering@lucent.com>
30355
30356         * lib/strstr.c: Update from GNU libc.
30357
30358 2000-11-17  Akim Demaille  <akim@epita.fr>
30359
30360         * lib/obstack.h: Formatting changes.
30361         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
30362         prevent type checking.
30363         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
30364         cast the value to (void *): assigning a `foo *' to a `void *'
30365         variable is valid.
30366         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
30367
30368 2000-11-16  Jim Meyering  <meyering@lucent.com>
30369
30370         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
30371
30372 2000-11-11  Jim Meyering  <meyering@lucent.com>
30373
30374         * lib/error.c: Add a couple #includes, merging from GNU libc version.
30375
30376 2000-11-10  Jim Meyering  <meyering@lucent.com>
30377
30378         * lib/obstack.h: Update from GNU libc.
30379         * lib/obstack.c: Likewise.
30380
30381 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
30382
30383         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
30384
30385 2000-11-06  Paul Eggert  <eggert@twinsun.com>
30386
30387         * lib/getusershell.c (setusershell): Use rewind rather than
30388         fseek/fseeko, to avoid configuration hassles with fseeko.
30389         Don't bother opening SHELLS_FILE if shellstream is NULL;
30390         it's not necessary.
30391
30392 2000-11-05  Jim Meyering  <meyering@lucent.com>
30393
30394         * lib/makepath.h (make_dir): Declare.
30395         * lib/makepath.c (make_dir): Remove `static' attribute.
30396         Tweak a comment.
30397
30398 2000-11-04  Jim Meyering  <meyering@lucent.com>
30399
30400         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
30401
30402 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
30403
30404         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
30405         last one in a bucket, advance to the next bucket.
30406
30407 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
30408
30409         * lib/fnmatch.c: Do not comment out all the code if we are using
30410         the GNU C library, because in some cases we are replacing buggy
30411         code in the GNU C library itself.
30412
30413 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
30414
30415         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
30416         (regex_compile): Catch bogus \(\1\).
30417
30418 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30419
30420         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
30421         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
30422         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
30423
30424 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30425
30426         * lib/error.h, getline.h, modechange.h:
30427         Remove "2000" from Copyright line, as the file hasn't been
30428         changed this year other than in the copyright notice.
30429
30430         * lib/xalloc.h: Add "2000" to Copyright line, as this file
30431         was changed this year.
30432
30433 2000-10-29  Jim Meyering  <meyering@lucent.com>
30434
30435         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
30436         renaming.
30437         * m4/ls-mntd-fs.m4: Likewise
30438
30439 2000-10-29  Jim Meyering  <meyering@lucent.com>
30440
30441         * lib/xstat.in: Fix grammar in comment.
30442
30443 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
30444
30445         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
30446         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
30447         doesn't define __restrict_arr.
30448
30449 2000-10-28  Jim Meyering  <meyering@lucent.com>
30450
30451         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
30452         (jm_PREREQ_MEMCHR): New function.
30453
30454 2000-10-28  Jim Meyering  <meyering@lucent.com>
30455
30456         * lib/memchr.c: Update from libc.
30457         Adjust for portability:
30458         [HAVE_STDLIB_H]: Include stdlib.h.
30459         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
30460         Undef __memchr, too.
30461         [!weak_alias]: Define __memchr to memchr.
30462
30463         * lib/regex.c: Update from libc.
30464         * lib/regex.h: Likewise.
30465         * lib/getopt1.c: Likewise.
30466         * lib/memcmp.c: Likewise.
30467
30468         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
30469         Avoid using fseek, when possible -- it's broken by design.
30470         Patch by Ulrich Drepper.
30471
30472 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
30473
30474         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
30475         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
30476         Giving in to popular pressure to shut up the compiler with casts.
30477
30478 2000-10-26  Jim Meyering  <meyering@lucent.com>
30479
30480         * lib/strftime.c: Update from libc.
30481
30482 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
30483
30484         * regex.c: More `unsigned char' -> `re_char' changes.
30485         Also change several `int' into `re_wchar_t'.
30486         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
30487         (PUSH_FAILURE_POINTER): Don't cast any more.
30488         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
30489         We want GCC to complain, since this piece of code makes
30490         re_match non-reentrant, which *should* be fixed.
30491         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
30492         (EXTEND_BUFFER): Use RETALLOC.
30493         (SET_LIST_BIT): Don't cast.
30494         (re_wchar_t): New type.
30495         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
30496         that those two functions will always properly return.
30497         (IMMEDIATE_QUIT_CHECK): Cast to void.
30498         (analyse_first): Use recursion rather than an explicit stack.
30499         (re_compile_fastmap): Can't fail anymore.
30500         (re_search_2): Don't check re_compile_fastmap for failure.
30501         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
30502         Now also sets the new value (passed in a new argument).
30503         (re_match_2_internal): Use it.
30504         Also, use a new var `reg' of type size_t when looping through regs
30505         rather than reuse the inappropriate `mcnt'.
30506
30507 2000-10-25  Jim Meyering  <meyering@lucent.com>
30508
30509         * lib/obstack.c: Update from libc.
30510
30511 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
30512
30513         * regex.c (regex_compile): Change the way of handling a range from
30514         a char less than 256 to a char not less than 256.
30515
30516 2000-10-24  Andrew Innes  <andrewi@gnu.org>
30517
30518         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
30519         NT-Emacs only.
30520         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
30521         so that re_search functions only quit when callers expect them to.
30522
30523 2000-10-23  Jim Meyering  <meyering@lucent.com>
30524
30525         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
30526         wrong.  That set_locale call must not have any side effects.
30527         From Paul Eggert.
30528
30529 2000-10-22  Jim Meyering  <meyering@lucent.com>
30530
30531         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
30532         [CYCLIC]: Remove now-unused definition.
30533
30534         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
30535         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
30536         Suggestion from Ulrich Drepper.
30537
30538 2000-10-21  Jim Meyering  <meyering@lucent.com>
30539
30540         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
30541         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
30542         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
30543
30544 2000-10-21  Jim Meyering  <meyering@lucent.com>
30545
30546         * lib/dirname.c (memrchr): Declare if necessary.
30547         (dir_name): Remove the restriction that there be no
30548         trailing slashes.  Now, this code skips past them, effectively
30549         ignoring them.
30550         [TEST_DIRNAME] (main): New unit tests.
30551
30552         * lib/memrchr.c: New file from GNU libc.
30553         Undef __memrchr, too.
30554         [!weak_alias]: Define __memrchr to memrchr.
30555         Guard weak_alias use with `#ifdef weak_alias'.
30556
30557 2000-10-21  Jim Meyering  <meyering@lucent.com>
30558
30559         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
30560         (dir_name): Use dir_name_r.
30561         * lib/dirname.h (dir_name_r): Declare it.
30562
30563 2000-10-17  Jim Meyering  <meyering@lucent.com>
30564
30565         * lib/quote.h (PARAMS): Define and use.
30566         Reported by Akim Demaille.
30567
30568         * lib/getopt.c: Update from libc.
30569
30570 2000-10-16  Jim Meyering  <meyering@lucent.com>
30571
30572         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
30573         setlocale.
30574         From Jan Fedak.
30575
30576 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
30577
30578         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
30579
30580 2000-09-25  Jim Meyering  <meyering@lucent.com>
30581
30582         * lib/md5.h (rol): Define (from GnuPG).
30583
30584         * lib/sha.c: Give credit (GnuPG) where due.
30585         (M): Use rol rather than open-coding it.
30586         Add a FIXME comment.
30587
30588 2000-09-21  Jim Meyering  <meyering@lucent.com>
30589
30590         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
30591         Reported by Michael Stone.
30592
30593 2000-09-20  Jim Meyering  <meyering@lucent.com>
30594
30595         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
30596         (noinst_HEADERS): Add sha.h.
30597         Based on code from Scott G. Miller and from GnuPG.
30598
30599 2000-09-18  Jim Meyering  <meyering@lucent.com>
30600
30601         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
30602         LIBS. Otherwise, everyone ends up linking with -lelf for some
30603         configurations.
30604         Reported by Mike Stone.
30605
30606 2000-09-15  Jim Meyering  <meyering@lucent.com>
30607
30608         * lib/regex.c: Update from libc.
30609
30610 2000-09-10  Jim Meyering  <meyering@lucent.com>
30611
30612         * lib/getopt.c (_getopt_internal): Update from glibc.
30613
30614 2000-09-09  Jim Meyering  <meyering@lucent.com>
30615
30616         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
30617         think it should be used as a general replacement for isascii.
30618         * lib/fnmatch.c: Likewise.
30619         * lib/mbswidth.c: Likewise
30620         * lib/regex.c: Likewise.
30621
30622         Don't use atoi.
30623         * lib/userspec.c: Include sys/param.h and limits.h.
30624         Include xstrtol.h.
30625         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
30626         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
30627         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
30628         UID, GID.  Check range.
30629
30630 2000-09-06  Jim Meyering  <meyering@lucent.com>
30631
30632         * lib/getopt.c (_getopt_internal): Update from glibc.
30633
30634 2000-08-30  Jim Meyering  <meyering@lucent.com>
30635
30636         * lib/strftime.c: Merge in changes from GNU libc.
30637
30638 2000-08-26  Jim Meyering  <meyering@lucent.com>
30639
30640         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
30641         * m4/fpending.m4: New file.
30642
30643 2000-08-26  Jim Meyering  <meyering@lucent.com>
30644
30645         * lib/closeout.c: Include "__fpending.h".
30646         (close_stdout_status): Return right away if there's nothing to flush.
30647
30648         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
30649         * lib/__fpending.c: New file.
30650         * lib/__fpending.h: New file.
30651
30652 2000-08-20  Jim Meyering  <meyering@lucent.com>
30653
30654         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
30655         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
30656         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
30657
30658 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
30659
30660         Improve fileutils installation on systems where running
30661         programs (like install) can't be unlinked.
30662         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
30663         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
30664
30665 2000-08-07  Paul Eggert  <eggert@twinsun.com>
30666
30667         Standardize on "memory exhausted" instead of "Memory exhausted"
30668         or "virtual memory exhausted".
30669         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
30670         "virtual memory exhausted".
30671         * lib/same.c (same_name): Invoke xalloc_die instead of printing
30672         our own message.
30673         * lib/userspec.c (parse_user_spec): Likewise.
30674         * lib/bumpalloc.h: comment fix
30675         * lib/same.c, userspec.c: Include xalloc.h.
30676
30677         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
30678         not char *const and pointing to a constant array.
30679         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
30680         (xrealloc): Comment fix.
30681
30682         * lib/userspec.c (parse_user_spec):
30683         Don't translate a message until just before returning,
30684         to avoid unnecessary translation.
30685
30686 2000-08-07  Jim Meyering  <meyering@lucent.com>
30687
30688         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
30689         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
30690         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
30691         getgroups.c, gethostname.c, getopt.h, group-member.c,
30692         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
30693         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
30694         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
30695         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
30696         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
30697         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
30698         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
30699         yesno.c: Back out Copyright date changes for each file with no change
30700         this year.  This eases coordination with other programs using the same
30701         source code modules.  From Paul Eggert.
30702
30703 2000-08-06  Paul Eggert  <eggert@twinsun.com>
30704
30705         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
30706         not char, for compatibility with glibc 2.1.3 strftime.c.
30707
30708 2000-08-03  Greg McGary  <greg@mcgary.org>
30709
30710         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
30711         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
30712         (EXTEND_BUFFER): Use them.
30713
30714 2000-08-01  Jim Meyering  <meyering@lucent.com>
30715
30716         * lib/dirname.c (ISSLASH): Define.
30717         (BACKSLASH_IS_PATH_SEPARATOR): Define.
30718         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
30719         both `\' and `/' may be use as path separators.
30720         Based on a patch from Prashant TR.
30721
30722 2000-07-31  Paul Eggert  <eggert@twinsun.com>
30723
30724         * lib/quotearg.c (quotearg_n_options): Don't make the initial
30725         slot vector a constant, since it might get modified.
30726
30727 2000-07-31  Jim Meyering  <meyering@lucent.com>
30728
30729         * lib/xmalloc.c: Use `virtual memory exhausted', not
30730         `Memory exhausted'.
30731         * lib/obstack.c (print_and_abort): Likewise.
30732
30733 2000-07-30  Paul Eggert  <eggert@twinsun.com>
30734
30735         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
30736         buffer, so that the caller can always quote one small
30737         component of a "memory exhausted" message in slot 0.
30738         From a suggestion by Jim Meyering.
30739
30740 2000-07-30  Jim Meyering  <meyering@lucent.com>
30741
30742         * lib/makepath.c (make_path): Quote the other instance, too.
30743
30744         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
30745         (STATIC_BUF_SIZE): Define.
30746         (quotearg_n_options): Use only statically allocated storage when
30747         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
30748         than STATIC_BUF_SIZE.
30749
30750 2000-07-29  Jim Meyering  <meyering@lucent.com>
30751
30752         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
30753         * lib/dirname.c (dir_name): Likewise.
30754
30755         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
30756         `/'.
30757
30758         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
30759         (dir_name): Assert that there are no trailing slashes.
30760
30761 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
30762
30763         * lib/mbswidth.h (mbswidth): Add a flags argument.
30764         (mbswidth): New declaration.
30765         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
30766         * lib/mbswidth.c (mbswidth): Add a flags argument.
30767         (mbsnwidth): New function.
30768
30769 2000-07-24  Jim Meyering  <meyering@lucent.com>
30770
30771         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
30772
30773 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30774
30775         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
30776
30777 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30778
30779         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
30780         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
30781         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
30782         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
30783         invoke multibyte primitives.
30784
30785 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30786
30787         * lib/quotearg.c:
30788         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
30789         so that mbstate_t is always defined.
30790
30791         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
30792         be 1 in at least one GCC installation, and this configuration
30793         error is likely to be common.  Ignoring MB_LEN_MAX hurts
30794         performance on hosts that have mbrtowc but have only unibyte
30795         locales, but I assume these hosts are rare.
30796
30797 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30798
30799         * lib/mbswidth.c (_XOPEN_SOURCE):
30800         Don't define; this causes problems on Solaris 7.
30801         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
30802
30803 2000-07-23  Jim Meyering  <meyering@lucent.com>
30804
30805         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
30806         too: getgrgid, getpwuid, getuid.
30807
30808 2000-07-23  Jim Meyering  <meyering@lucent.com>
30809
30810         * lib/basename.c (base_name): Add an assertion.
30811
30812 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
30813
30814         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
30815         shadow its mbsinit function.
30816
30817 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30818
30819         * lib/mbswidth.h: New file.
30820         * lib/mbswidth.c: New file.
30821         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
30822         (noinst_HEADERS): Add mbswidth.h.
30823
30824 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30825
30826         * lib/config.charset: Add support for FreeBSD. Improve support for
30827         HP-UX and IRIX 6.
30828
30829 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
30830
30831         * m4/mbswidth.m4: New file.
30832         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
30833
30834 2000-07-15  Jim Meyering  <meyering@lucent.com>
30835
30836         * lib/makepath.c: Include quote.h.
30837         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
30838         corresponding argument in a `quote (...)' call.
30839         Give better diagnostics.
30840
30841         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
30842         (noinst_HEADERS): Add quote.h.
30843
30844         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
30845         from tar's src/misc.c.
30846         * lib/quote.h: New file.  Prototypes for same.
30847
30848 2000-07-14  Paul Eggert  <eggert@twinsun.com>
30849
30850         From a suggestion by Bruno Haible.
30851         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
30852         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
30853         to decide whether to define the BeOS workaround macro;
30854         this adjusts to the change to AC_MBSTATE_T.
30855
30856 2000-07-14  Jim Meyering  <meyering@lucent.com>
30857
30858         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
30859         jm_AC_TYPE_UINTMAX_T.
30860
30861 2000-07-13  Paul Eggert  <eggert@twinsun.com>
30862
30863         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
30864
30865         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
30866         quotearg_buffer_restyled): Add support for
30867         clocale_quoting_style.  Undo previous change to
30868         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
30869         and "{RIGHT QUOTATION MARK}" msgids.
30870
30871 2000-07-10  Paul Eggert  <eggert@twinsun.com>
30872
30873         From a suggestion by Bruno Haible.
30874         * m4/mbstate_t.m4 (AC_MBSTATE_T):
30875         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
30876         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
30877         and mbstate_t, to a single-part test that simply defines mbstate_t.
30878         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
30879         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
30880
30881 2000-07-10  Jim Meyering  <meyering@lucent.com>
30882
30883         * m4/strerror_r.m4: Mirror the correction made in autoconf.
30884
30885         * m4/gnu-source.m4: Output to confdefs.h directly.
30886         Suggestion from Akim Demaille.
30887
30888 2000-07-09  Paul Eggert  <eggert@twinsun.com>
30889
30890         The old behavior of quoting `like this' doesn't look good with
30891         newer, ISO-style fonts.  See:
30892         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
30893
30894         Instead, quote "like this" by default.  Let the translator
30895         tailor the locale-specific quoting behavior by providing
30896         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
30897
30898         * lib/quotearg.c (N_): New macro.
30899         (gettext_default): New function.
30900         (quotearg_buffer_restyled): Use
30901         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
30902         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
30903
30904 2000-07-09  Jim Meyering  <meyering@lucent.com>
30905
30906         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
30907         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
30908
30909         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
30910         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
30911
30912 2000-07-09  Jim Meyering  <meyering@lucent.com>
30913
30914         * lib/Most files: Update copyright dates to include 2000.
30915
30916 2000-07-08  Jim Meyering  <meyering@lucent.com>
30917
30918         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
30919         if not defined.
30920         (xgethostname): Remove now-unnecessary #ifdef.
30921         Move declaration of `err' into loop where it's used.
30922
30923 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30924         and Bruno Haible  <haible@clisp.cons.org>
30925
30926         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
30927         only if the test for an object-type mbstate_t fails.  This
30928         prevents us from mistakenly reporting that mbstate_t is a
30929         system object type after we "#define mbstate_t int" to work
30930         around its lack.
30931
30932 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30933         and Bruno Haible  <haible@clisp.cons.org>
30934
30935         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
30936
30937 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30938
30939         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
30940         to strerror_r.
30941         Include <ctype.h> for use of isalpha.
30942
30943 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30944
30945         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
30946         by allocating a larger buffer. Test the gethostname return value for
30947         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
30948         returns an error and ENAMETOOLONG isn't defined.
30949
30950 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30951
30952         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
30953         dimension.
30954
30955 2000-07-04  Jim Meyering  <meyering@lucent.com>
30956
30957         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
30958         of the deprecated AC_CHECKING.
30959
30960 2000-07-04  Jim Meyering  <meyering@lucent.com>
30961
30962         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
30963         Reported by Bruno Haible.
30964
30965 2000-07-04  Jim Meyering  <meyering@lucent.com>
30966
30967         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
30968         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
30969         lacks mbrtowc.
30970
30971 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30972
30973         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
30974         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
30975
30976 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30977         and Bruno Haible  <haible@clisp.cons.org>
30978
30979         * lib/quotearg.c (mbrtowc):
30980         Assign to *pwc, and return 1 only if result is nonzero.
30981         (iswprint): Use ISPRINT when substituting our own mbrtowc.
30982
30983 2000-07-03  Jim Meyering  <meyering@lucent.com>
30984
30985         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
30986
30987 2000-07-03  Jim Meyering  <meyering@lucent.com>
30988
30989         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
30990         This is necessary to get a definition of e.g., UTMP_FILE on
30991         HP-UX 10.20.
30992         From Bob Proulx.
30993
30994 2000-07-02  Jim Meyering  <meyering@lucent.com>
30995
30996         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
30997
30998         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
30999         AC_LIBOBJ(function_name).
31000         * m4/chown.m4: Likewise.
31001         * m4/fnmatch.m4: Likewise.
31002         * m4/ftruncate.m4: Likewise.
31003         * m4/getgroups.m4: Likewise.
31004         * m4/getline.m4: Likewise.
31005         * m4/group-member.m4: Likewise.
31006         * m4/jm-macros.m4: Likewise.
31007         * m4/lstat.m4: Likewise.
31008         * m4/malloc.m4: Likewise.
31009         * m4/memcmp.m4: Likewise.
31010         * m4/nanosleep.m4: Likewise.
31011         * m4/putenv.m4: Likewise.
31012         * m4/realloc.m4: Likewise.
31013         * m4/regex.m4: Likewise.
31014         * m4/stat.m4: Likewise.
31015         * m4/strftime.m4: Likewise.
31016
31017 2000-07-02  Jim Meyering  <meyering@lucent.com>
31018
31019         * lib/quotearg.c (mbstate_t): Don't define here.
31020
31021 2000-07-02  Jim Meyering  <meyering@lucent.com>
31022
31023         * lib/nanosleep.c (SIGCONT): Define if not already defined.
31024
31025 2000-07-01  Jim Meyering  <meyering@lucent.com>
31026
31027         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
31028
31029 2000-07-01  Jim Meyering  <meyering@lucent.com>
31030
31031         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
31032         problem.
31033
31034 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31035
31036         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
31037         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
31038
31039 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31040
31041         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
31042         per change in ../m4/ls-mntd-fs.m4.
31043         (read_filesystem_list): Ignore symbolic links.
31044
31045 2000-06-29  Jim Meyering  <meyering@lucent.com>
31046
31047         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
31048         for declaration of strcmp.
31049
31050         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
31051
31052         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
31053         Avoid warning by casting result to `char *' to remove `const'.
31054
31055 2000-06-28  Jim Meyering  <meyering@lucent.com>
31056
31057         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
31058         included by quotearg.c, for which we perform this test.  From
31059         Bruno Haible.
31060
31061 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31062
31063         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
31064         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
31065         <utmpx.h> exists, put readutmp.o into LIBOBJS.
31066
31067 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31068
31069         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
31070
31071 2000-06-26  Paul Eggert  <eggert@twinsun.com>
31072
31073         savedir now sets errno on failure and invokes xmalloc to get memory.
31074         Fix a couple of other minor bugs while we're at it.
31075
31076         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
31077         (NAMLEN): Remove macro.
31078         (malloc, realloc): Remove decls.
31079         (stpcpy): Likewise.
31080         ("xalloc.h"): Include.
31081         (NAME_SIZE_DEFAULT): New macro.
31082         (savedir): Use xmalloc / xrealloc to allocate memory.
31083         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
31084         Skip "" directory entries.
31085         Use strlen to calculate directory entry length, since the old method
31086         is rarely used these days and isn't worth supporting.
31087         Don't use a pointer after freeing it.
31088         Check for integer overflow when calculating allocation size.
31089         Use memcpy to copy entries, instead of stpcpy.
31090         Set errno properly when returning NULL.
31091         Check for readdir error.
31092
31093 2000-06-26  Jim Meyering  <meyering@lucent.com>
31094
31095         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
31096
31097 2000-06-25  Jim Meyering  <meyering@lucent.com>
31098
31099         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
31100         Linux header bug when _XOPEN_SOURCE is defined to 500.
31101
31102 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31103
31104         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
31105         deficiency.
31106
31107 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31108
31109         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
31110         Include xalloc.h.
31111         Don't include <stdlib.h>.  Don't declare malloc, realloc.
31112
31113 2000-06-24  Jim Meyering  <meyering@lucent.com>
31114
31115         * m4/strerror_r.m4: Revive this file -- to try out an experimental
31116         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
31117         for which strerror does return char*, but which lacks a conveniently
31118         accessible declaration of the function.  If the compile-test says
31119         strerror_r doesn't work, then resort to a `run'-test that works on
31120         BeOS and segfaults on DEC Unix.
31121
31122 2000-06-24  Jim Meyering  <meyering@lucent.com>
31123
31124         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
31125
31126 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31127
31128         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
31129         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
31130
31131 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31132
31133         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
31134         (mbrtowc, mbstate_t): Define substitutes if
31135         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
31136         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
31137         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
31138
31139 2000-06-23  Jim Meyering  <meyering@lucent.com>
31140
31141         * m4/afs.m4: Add missing AC_MSG_RESULT.
31142         Reported by Bruno Haible.
31143
31144         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
31145         Suggestion from Bruno Haible.
31146
31147 2000-06-23  Jim Meyering  <meyering@lucent.com>
31148
31149         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
31150
31151 2000-06-21  Jim Meyering  <meyering@lucent.com>
31152
31153         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
31154
31155 2000-06-21  Jim Meyering  <meyering@lucent.com>
31156
31157         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
31158         (noinst_HEADERS): Add getstr.h.
31159
31160         * lib/getline.c (getstr): Move into a separate file.
31161         * lib/getstr.c (getstr): New file, extracted from getline.c, with
31162         the following changes: new parameter, delim2; both delim[12]
31163         parameters have type `int', not `char'.  The latter would lose
31164         with 8-bit delimiters.
31165         * lib/getstr.h: New file.
31166
31167 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31168
31169         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
31170         than 1024, return a memory chunk of least possible size, instead
31171         of size PATH_MAX + 2. In the loop, increment the size proportionally.
31172         Use free/xmalloc instead of xrealloc to avoid copying for very long
31173         paths.
31174
31175 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31176
31177         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
31178         the empty string.
31179
31180 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31181
31182         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
31183         address, not strdup.  Include <stdlib.h> and don't declare free().
31184
31185 2000-06-19  Jim Meyering  <meyering@lucent.com>
31186
31187         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
31188
31189 2000-06-18  Jim Meyering  <meyering@lucent.com>
31190
31191         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
31192
31193         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
31194         `checking whether...' message to be consistent with that of the
31195         lstat test.
31196
31197 2000-06-18  Jim Meyering  <meyering@lucent.com>
31198
31199         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
31200         Besides, these days every porting target provides a mkdir function.
31201
31202         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
31203         needed. (this snippet comes from src/system.h).
31204
31205 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
31206
31207         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
31208
31209 2000-06-15  Paul Eggert  <eggert@twinsun.com>
31210
31211         * lib/human.c (adjust_value): New function.
31212         (human_readable_inexact): Apply rounding style even when
31213         printing approximate values.
31214
31215 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31216
31217         * lib/human.c (human_readable_inexact): Allow an input block
31218         size that is not a multiple of the output block size, and vice versa.
31219         Reported by Piergiorgio Sartor.
31220
31221 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31222
31223         * lib/getdate.y (get_date): Apply relative times after time
31224         zone indicator, not before.  Reported by Todd A. Jacobs.
31225
31226 2000-06-13  Jim Meyering  <meyering@lucent.com>
31227
31228         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
31229
31230         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
31231
31232 2000-06-12  Paul Eggert  <eggert@twinsun.com>
31233
31234         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
31235
31236 2000-06-12  Jim Meyering  <meyering@lucent.com>
31237
31238         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
31239         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
31240         optional argument.
31241         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
31242         the optional argument, `lib'.
31243
31244 2000-06-08  Jim Meyering  <meyering@lucent.com>
31245
31246         * m4/largefile.m4: Remove file (now that it's part of autoconf).
31247
31248 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31249
31250         Rewrite largefile configuration so that we don't need to run
31251         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
31252         AC_CANONICAL_HOST in configure.in -- jmm]
31253
31254         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
31255         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
31256         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
31257         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
31258         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
31259         All uses changed.
31260         Instead of inspecting the output of getconf, try to compile the
31261         test program without and with the macro definition.
31262         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
31263         for getconf.  Instead, check for the needed flags by compiling
31264         test programs.
31265
31266 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31267
31268         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
31269
31270 2000-06-04  Jim Meyering  <meyering@lucent.com>
31271
31272         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
31273         SunOS 4.1.4 for which gid_t is an unsigned type.
31274
31275 2000-06-03  Jim Meyering  <meyering@lucent.com>
31276
31277         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
31278         now that autoconf requires that.
31279
31280         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
31281         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
31282         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
31283
31284 2000-06-03  Jim Meyering  <meyering@lucent.com>
31285
31286         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
31287
31288 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31289
31290         * m4/glibc21.m4: New file.
31291         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
31292
31293 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31294
31295         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
31296         newer, don't install charset.alias.
31297         * lib/config.charset: Change the Linux/glibc rules so they become empty
31298         on glibc-2.1 or newer.
31299
31300 2000-06-02  Jim Meyering  <meyering@lucent.com>
31301
31302         * lib/mountlist.c: Back out last change.  Instead, do this...
31303         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
31304         me_dummy member using the same `ignore'-testing code.
31305         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
31306         fs_type strings.
31307         From Mark D. Roth.
31308
31309 2000-05-29  Jim Meyering  <meyering@lucent.com>
31310
31311         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
31312         mounts with the `ignore' attribute.  Based on a patch from
31313         Mark D. Roth.
31314
31315 2000-05-28  Jim Meyering  <meyering@lucent.com>
31316
31317         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
31318         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31319         * m4/stat.m4: Likewise.
31320         * m4/lstat.m4: Likewise.
31321         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
31322
31323         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
31324         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
31325
31326 2000-05-26  Jim Meyering  <meyering@lucent.com>
31327
31328         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
31329
31330 2000-05-24  Jim Meyering  <meyering@lucent.com>
31331
31332         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
31333         autoconf requires that.
31334         * m4/lib-check.m4: Likewise.
31335         * m4/jm-macros.m4: Likewise.
31336         * m4/strftime.m4: Likewise.
31337
31338         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
31339         AC_CHECK_DECLS, now that autoconf requires that.
31340
31341 2000-05-22  Jim Meyering  <meyering@lucent.com>
31342
31343         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31344         * m4/lstat.m4: Likewise.
31345
31346 2000-05-22  Jim Meyering  <meyering@lucent.com>
31347
31348         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
31349
31350 2000-05-20  Jim Meyering  <meyering@lucent.com>
31351
31352         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
31353         (jm_PREREQ): Use it.
31354
31355 2000-05-18  Jim Meyering  <meyering@lucent.com>
31356
31357         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
31358         back, too, since it may have been modified by allocate_entry.
31359         (hash_delete): Rewrite to use neither the assignment operator
31360         nor the comma operator in an if-expression.
31361
31362 2000-05-15  Paul Eggert  <eggert@twinsun.com>
31363
31364         * lib/closeout.c:
31365         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
31366         Remove; no longer needed.
31367         "quotearg.h": Add include.
31368         (file_name): Do not bother to explicitly initialize to NULL; it's less
31369         efficient on some hosts.
31370         (close_stdout_status): Remove test as to whether stdout was already
31371         closed; it breaks for the case "echo x | sort >&-".
31372         Quote file name colons.
31373         Do not assume that _("write error") lacks format strings.
31374
31375 2000-05-15  Jim Meyering  <meyering@lucent.com>
31376
31377         * lib/version-etc.c (version_etc_copyright): Update the copyright
31378         string used in all --version output.
31379
31380 2000-05-14  Jim Meyering  <meyering@lucent.com>
31381
31382         * lib/closeout.c (close_stdout_set_file_name): New function.
31383         (close_stdout_status): Use new file-scoped global.
31384         Return right away if fstat says the stdout file descriptor is invalid.
31385         * lib/closeout.h (close_stdout_set_file_name): Declare.
31386
31387 2000-05-10  Jim Meyering  <meyering@lucent.com>
31388
31389         * lib/closeout.c [default_exit_status]: New file-scoped variable.
31390         (close_stdout_set_status): New function.
31391         * lib/closeout.h (close_stdout_set_status): Declare.
31392
31393 2000-05-09  Jim Meyering  <meyering@lucent.com>
31394
31395         * m4/gettext.m4: Rename this...
31396         * m4/libintl.m4: ...to this.
31397
31398 2000-05-08  Jim Meyering  <meyering@lucent.com>
31399
31400         * lib/long-options.c: Don't include closeout.h.
31401         (parse_long_options): Don't call close_stdout for --version.
31402
31403 2000-05-06  Paul Eggert  <eggert@twinsun.com>
31404
31405         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
31406         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
31407         2.1.3 bug.  This avoids a clash when files like regex.c define
31408         _GNU_SOURCE.
31409
31410 2000-05-06  Jim Meyering  <meyering@lucent.com>
31411
31412         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
31413         (AC_REPLACE_FUNCS): Add strnlen.
31414
31415         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
31416         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
31417
31418         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
31419         AC_SEARCH_LIBS call for nanosleep.
31420         (LIB_NANOSLEEP): Set and AC_SUBST.
31421
31422 2000-05-06  Jim Meyering  <meyering@lucent.com>
31423
31424         * lib/strnlen.c: Undefine __strnlen and strnlen.
31425         [!weak_alias]: Define __strnlen to strnlen.
31426
31427         * lib/atexit.c: New file, from libiberty.
31428
31429 2000-05-06  Jim Meyering  <meyering@lucent.com>
31430
31431         * lib/closeout.c (close_stdout_status): Also check for errors on the
31432         stderr stream.
31433
31434 2000-05-05  Jim Meyering  <meyering@lucent.com>
31435
31436         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
31437         AC_SEARCH_LIBS call for clock_gettime.
31438         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
31439
31440         * m4/search-libs.m4: Update from autoconf.
31441
31442         su doesn't work on Solaris 2.6.
31443         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
31444         <shadow.h>.  Reported by Dragos Harabor.
31445
31446 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
31447
31448         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
31449         memcpy instead of xmalloc, xrealloc, path_concat.
31450         (locale_charset): Treat empty environment variables as absent.
31451         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
31452
31453 2000-05-04  Jim Meyering  <meyering@lucent.com>
31454
31455         * lib/getopt.c: Update from glibc.
31456         * lib/obstack.c: Likewise.
31457         * lib/obstack.h: Likewise.
31458         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
31459         file
31460
31461         * lib/regex.h: Likewise.
31462         * lib/strndup.c: Likewise.
31463         * lib/strnlen.c: New file, from glibc.
31464
31465 2000-05-03  Jim Meyering  <meyering@lucent.com>
31466
31467         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
31468
31469 2000-05-02  Paul Eggert  <eggert@twinsun.com>
31470
31471         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
31472         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
31473         compile-time test, rather than inspecting host and OS, to
31474         decide whether to define _LARGEFILE_SOURCE.
31475
31476 2000-05-01  Jim Meyering  <meyering@lucent.com>
31477
31478         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
31479
31480         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
31481         Based on a patch from Bruno Haible.
31482
31483 2000-05-01  Jim Meyering  <meyering@lucent.com>
31484
31485         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
31486
31487 2000-04-29  Jim Meyering  <meyering@lucent.com>
31488
31489         * lib/path-concat.c: Declare strdup only if it's not defined.
31490         * lib/canon-host.c: Likewise.
31491
31492 2000-04-28  Jim Meyering  <meyering@lucent.com>
31493
31494         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
31495         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
31496         is included first, then limits.h is included by locale.h by libintl.h.
31497         From John David Anglin.
31498
31499 2000-04-25  Jim Meyering  <meyering@lucent.com>
31500
31501         * lib/makepath.c (S_IRWXUGO): Define.
31502         (make_path): Always perform explicit chmod if MODE specifies any
31503         of the `special' permission bits.  Prompted by a bug report against
31504         install from Mate Wierdl and Joost van Baal.
31505
31506 2000-04-18  Jim Meyering  <meyering@lucent.com>
31507
31508         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
31509         (jm_PREREQ): Use it.
31510
31511 2000-04-18  Jim Meyering  <meyering@lucent.com>
31512
31513         * lib/README: New file.
31514
31515         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
31516         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
31517
31518 2000-04-17  Jim Meyering  <meyering@lucent.com>
31519
31520         Get it right :-)
31521         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
31522         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
31523         Suggestion from Akim Demaille.
31524
31525 2000-04-17  Jim Meyering  <meyering@lucent.com>
31526
31527         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
31528         the definition of it to rpl_strftime also defined-away the system's
31529         declaration.
31530
31531 2000-04-15  Jim Meyering  <meyering@lucent.com>
31532
31533         Use `C' to denote so-called `contiguous' files, the same way
31534         that tar does.
31535         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
31536         (ftypelet): Use S_ISCTG.
31537         From Michael Deutschmann.
31538
31539 2000-04-14  Jim Meyering  <meyering@lucent.com>
31540
31541         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
31542         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
31543         clobbered.
31544
31545 2000-04-14  Jim Meyering  <meyering@lucent.com>
31546
31547         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
31548
31549 2000-04-13  Jim Meyering  <meyering@lucent.com>
31550
31551         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
31552         AH_VERBATIM to insert required #ifndef into config.h.in.
31553         Suggestion from Akim Demaille.
31554
31555 2000-04-12  Jim Meyering  <meyering@lucent.com>
31556
31557         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
31558         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
31559         Christian Krackowizer.
31560
31561         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
31562         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
31563         (AC_SYS_LARGEFILE): Require.
31564         (AM_C_PROTOTYPES): Require.
31565
31566 2000-04-08  Jim Meyering  <meyering@lucent.com>
31567
31568         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
31569         names don't conflict.  Reported by Eli Zaretskii.
31570
31571 2000-04-07  Jim Meyering  <meyering@lucent.com>
31572
31573         * lib/putenv.c: Move inclusion of errno.h so it follows that of
31574         sys/types.h, to work around system header problems on AIX 3.2.5.
31575         From Bruno Haible.
31576
31577 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
31578
31579         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
31580         bug.  Deal with the different error behavior of Irix iconv.
31581
31582 2000-04-05  Paul Eggert  <eggert@twinsun.com>
31583
31584         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
31585         IRIX if the installer said otherwise.
31586
31587 2000-04-05  Jim Meyering  <meyering@lucent.com>
31588
31589         Portability tweaks required for ultrix4.3.
31590         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
31591         (jm_CHECK_DECLS): Add getutent to the list of functions.
31592         (_jm_DECL_HEADERS): Add utmpx.h.
31593         From John David Anglin.
31594
31595         * m4/strftime.m4: Back out the 2000-04-02 change.
31596         Instead of that change, simply undefine putenv in the test program.
31597
31598 2000-04-05  Jim Meyering  <meyering@lucent.com>
31599
31600         Portability tweaks required for ultrix4.3.
31601         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
31602         getutent.
31603         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
31604         * lib/canon-host.c: Declare strdup.
31605         * lib/path-concat.c: Likewise.
31606         From John David Anglin.
31607
31608 2000-04-04  Jim Meyering  <meyering@lucent.com>
31609
31610         Be more DOS 8.3-friendly.
31611         * lib/ref-add.sin: Renamed from ref-add.sed.in.
31612         * lib/ref-del.sin: Renamed from ref-del.sed.in.
31613         * lib/Makefile.am: Reflect renaming.
31614         Reported by Eli Zaretskii.
31615
31616         Use a temporary file name that won't clash with `charset.alias'
31617         in the DOS 8.3 name space.
31618         * lib/Makefile.am (charset_tmp): Define.
31619         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
31620         (uninstall-local): Likewise.
31621         Reported by Eli Zaretskii.
31622
31623 2000-04-03  Jim Meyering  <meyering@lucent.com>
31624
31625         * m4/gettext.m4: Fix typo in comment.
31626
31627         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
31628         textutils/configure.in).  Suggestion from Paul Eggert.
31629         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
31630
31631 2000-04-02  Paul Eggert  <eggert@twinsun.com>
31632
31633         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
31634         variable in the shell rather than using putenv, which isn't
31635         portable.  This avoids the configure-time inter-test dependency
31636         on the potentially-renamed putenv function.
31637
31638 2000-03-30  Paul Eggert  <eggert@twinsun.com>
31639
31640         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
31641         before checking struct stat.st_blksize, so that
31642         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
31643
31644 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31645
31646         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
31647         since strftime.c uses HAVE_STRFTIME to decide whether to use
31648         the underlying strftime.
31649
31650 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31651
31652         * lib/time/strftime.c (my_strftime): Make sure we call the system
31653         strftime, not ourselves, when invoking the underlying strftime.
31654
31655 2000-03-24  Jim Meyering  <meyering@lucent.com>
31656
31657         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
31658         (charset_alias): Define.
31659         (install-exec-local): Factor out common code.
31660         (uninstall-local): Split lines longer than 80.
31661         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
31662         (SUFFIXES): Define.
31663         (.sed.in.sed): New rule.  Don't redirect directly to $@.
31664         (CLEANFILES): Add ref-add.sed and ref-del.sed.
31665
31666 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
31667
31668         * lib/config.charset: Output a line containing "Packages using this
31669         file".
31670         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
31671         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
31672         ref-del.sed): New rules.
31673
31674 2000-03-17  Jim Meyering  <meyering@lucent.com>
31675
31676         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
31677         Otherwise, include <strings.h>
31678
31679 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
31680
31681         * lib/unicodeio.c (utf8_wctomb): New function.
31682         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
31683         format instead of in UCS-4 with platform dependent endianness.
31684
31685 2000-03-10  Jim Meyering  <meyering@lucent.com>
31686
31687         * m4/lib-check.m4: Look for getspnam in -lgen, too.
31688         From Marco Franzen.
31689
31690 2000-03-07  Paul Eggert  <eggert@twinsun.com>
31691
31692         * lib/savedir.c (savedir): Work even if directory size is
31693         negative; this can happen with some screwy NFS configurations.
31694
31695 2000-03-06  Jim Meyering  <meyering@lucent.com>
31696
31697         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
31698         if it's NULL (because we ran out of memory).  From Bruno Haible.
31699
31700 2000-03-05  Jim Meyering  <meyering@lucent.com>
31701
31702         * lib/localcharset.c ("path-concat.h"): Include.
31703         (get_charset_aliases): Use path_concat instead of ANSI string
31704         concatenation.
31705
31706         * lib/unicodeio.h (PARAMS): Define.
31707         Use it to guard prototype.
31708
31709 2000-03-04  Jim Meyering  <meyering@lucent.com>
31710
31711         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
31712         for lib/localcharset.c.
31713
31714 2000-03-04  Jim Meyering  <meyering@lucent.com>
31715
31716         * lib/Makefile.am (install-exec-local): Create $(libdir) before
31717         installing into it.
31718         (uninstall-local): Uncomment this rule so `make distcheck' works
31719         once again.
31720
31721         * lib/unicodeio.c (<errno.h>): Include it.
31722         (errno): Declare if not defined.
31723
31724         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
31725
31726         * lib/config.charset: New version, incorporating remarks from a linux
31727         i18n mailing list.  From Bruno Haible.
31728
31729 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
31730
31731         * m4/codeset.m4: New file.
31732         * m4/iconv.m4: New file.
31733         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
31734
31735 2000-03-03  Jim Meyering  <meyering@lucent.com>
31736
31737         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
31738
31739 2000-03-02  Jim Meyering  <meyering@lucent.com>
31740
31741         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
31742         the messages come out on separate lines.
31743
31744         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
31745         rather than jm_CHECK_DECLARATIONS.
31746         * m4/decl.m4: Remove now-unused file.
31747
31748         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
31749         geteuid.
31750
31751 2000-03-02  Jim Meyering  <meyering@lucent.com>
31752
31753         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
31754
31755 2000-03-01  Jim Meyering  <meyering@lucent.com>
31756
31757         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
31758         * lib/unicodeio.c: Likewise.
31759
31760 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
31761
31762         * lib/config.charset: New file.
31763         * lib/localcharset.c: New file.
31764         * lib/unicodeio.h, lib/unicodeio.c: New files.
31765         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
31766         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
31767         (noinst_HEADERS): Add unicodeio.h.
31768         (all-local, install-exec-local, charset.alias): New targets.
31769
31770 2000-02-28  Paul Eggert  <eggert@twinsun.com>
31771
31772         * lib/quotearg.c (ALERT_CHAR): New macro.
31773         (quotearg_buffer_restyled): Use it.
31774
31775 2000-02-27  Jim Meyering  <meyering@lucent.com>
31776
31777         * m4/check-decl.m4: Add getenv to the list.
31778
31779 2000-02-27  Jim Meyering  <meyering@lucent.com>
31780
31781         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
31782         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
31783
31784         * lib/backupfile.c: Guard inclusion of stdlib.h with
31785         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
31786         Declare malloc if needed.
31787
31788         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
31789         `#ifndef HAVE_DECL..'
31790         now that autoconf always defines the HAVE_DECL_ symbols.
31791         * lib/human.c: Likewise.
31792         * lib/same.c: Likewise.
31793         * lib/strtoumax.c: Likewise.
31794
31795         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
31796         declaration check was not run.
31797         * lib/hash.c: Likewise.
31798         * lib/human.c: Likewise.
31799         * lib/same.c: Likewise.
31800         * lib/strtoumax.c: Likewise.
31801
31802         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
31803         `.', then first look up the entire `.'-containing string as a login
31804         name.
31805
31806 2000-02-23  Jim Meyering  <meyering@lucent.com>
31807
31808         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
31809         in place of my hack.
31810
31811 2000-02-18  Paul Eggert  <eggert@twinsun.com>
31812
31813         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
31814         (textint): New typedef.
31815         (parser_control): Member year changed from int to textint.
31816         All uses changed.
31817         (YYSTYPE): Removed; replaced by %union with int and textint members.
31818         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
31819         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
31820         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
31821         (tSNUMBER, tUNUMBER): Now of type <textintval>.
31822         (date, number, to_year): Use width of number in digits, not its value,
31823         to determine whether it's a 2-digit year, or a 2-digit time.
31824         (yylex): Store number of digits of numeric tokens.
31825         Reported by John Kendall.
31826
31827         (parser_control): Changed from struct parser_control to typedef (for
31828         consistency).  All uses changed.
31829
31830         (tID): Removed; not used.
31831         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
31832
31833 2000-02-14  Paul Eggert  <eggert@twinsun.com>
31834
31835         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
31836         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
31837
31838 2000-02-12  Jim Meyering  <meyering@lucent.com>
31839
31840         * lib/userspec.c (ISDIGIT): Define it.
31841         (isdigit): Remove definition.
31842         (is_number): Use ISDIGIT, not isdigit.
31843         <libintl.h>: Include.
31844         (_ and N_): Define.
31845         (parse_user_spec): Mark translatable strings.
31846
31847 2000-02-10  Jim Meyering  <meyering@lucent.com>
31848
31849         With these changes, nanosleep.[ch] are finally enough like the other
31850         lib/* replacement files to compile on a few more losing systems.
31851
31852         * lib/nanosleep.h: Don't include config.h.
31853         Remove prototype from declaration of nanosleep.
31854         (PARAMS): Remove now-unneeded definition.
31855         * lib/nanosleep.c: #undef nanosleep.
31856         (rpl_nanosleep): Rename from nanosleep.
31857
31858 2000-02-10  Jim Meyering  <meyering@lucent.com>
31859
31860         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
31861         gnu_nanosleep to rpl_nanosleep.
31862
31863 2000-02-09  Jim Meyering  <meyering@lucent.com>
31864
31865         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
31866         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
31867
31868 2000-02-08  Akim Demaille  <akim@epita.fr>
31869
31870         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
31871         `[' and `]' and remove uses of `changequote'.
31872         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
31873         (AC_SYS_LARGEFILE): Likewise.
31874         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
31875         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
31876         of changequote.
31877         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
31878         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
31879         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
31880         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
31881
31882 2000-02-05  Jim Meyering  <meyering@lucent.com>
31883
31884         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
31885         Remove explicit use of AC_HEADER_TIME.  It is required by
31886         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
31887         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
31888         in autoconf whereby the expansion of the latter ended up preceding
31889         the expansion of its prerequisite, AC_HEADER_TIME.
31890         Reported by Volker Borchert.
31891
31892 2000-02-03  Jim Meyering  <meyering@lucent.com>
31893
31894         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
31895
31896 2000-02-03  Jim Meyering  <meyering@lucent.com>
31897
31898         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
31899         rather than with `#if HAVE_UTMPNAME'.
31900
31901 2000-02-02  Jim Meyering  <meyering@lucent.com>
31902
31903         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
31904         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
31905         Reported by Eli Zaretskii.
31906
31907 2000-02-01  Jim Meyering  <meyering@lucent.com>
31908
31909         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
31910
31911 2000-01-31  Jim Meyering  <meyering@lucent.com>
31912
31913         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
31914         functions.  Add the time.h and sys/time.h headers along with the
31915         AC_REQUIRE'ment of AC_HEADER_TIME.
31916
31917 2000-01-31  Jim Meyering  <meyering@lucent.com>
31918
31919         * lib/nanosleep.h (nanosleep): Guard declaration with
31920         `#if ! HAVE_DECL_NANOSLEEP'.
31921         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
31922         the declaration in that vendor's sys/timers.h.
31923         Reported by Christian Krackowizer.
31924
31925         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
31926         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
31927         (ISPRINT): Likewise.
31928         Reported by Tom Tromey.
31929
31930 2000-01-30  Jim Meyering  <meyering@lucent.com>
31931
31932         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
31933
31934         * m4/prereq.m4 (utmp_includes): Define.
31935         Check for ut_user and ut_name members in both struct utmpx
31936         and struct utmp.
31937
31938 2000-01-30  Jim Meyering  <meyering@lucent.com>
31939
31940         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
31941         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
31942         header files where only utmpx.ut_user is declared.
31943
31944         * lib/readutmp.h (UT_USER): Define.
31945
31946 2000-01-29  Jim Meyering  <meyering@lucent.com>
31947
31948         * m4/lib-check.m4: New file containing library-related checks from
31949         fileutils and sh-utils (textutils had none).
31950
31951 2000-01-28  Jim Meyering  <meyering@lucent.com>
31952
31953         * m4/perl.m4: Change format of warning message to look more like that
31954         from the missing script.  Suggestion from François Pinard.
31955
31956 2000-01-25  Jim Meyering  <meyering@lucent.com>
31957
31958         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
31959         well as time.h in the compile check.
31960         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
31961         Fix typo in cross-compiling case: s/yes/no/.
31962
31963 2000-01-23  Jim Meyering  <meyering@lucent.com>
31964
31965         * m4/jm-macros.m4: Move df-related tests here from
31966         fileutils/configure.in
31967
31968         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
31969         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
31970
31971         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
31972         s/space/ac_fsusage_space/.
31973         (jm_FILE_SYSTEM_USAGE): Take two parameters.
31974
31975         * m4/ftruncate.m4: New file (derived from part of
31976         fileutils/configure.in).
31977         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
31978         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
31979
31980         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
31981         AC_SUBST these here, rather than just in sh-util/configure.in, so
31982         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
31983         all the same.
31984         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
31985         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
31986         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
31987         (AC_SUBST(POW_LIBM)): Likewise.
31988         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
31989
31990 2000-01-23  Jim Meyering  <meyering@lucent.com>
31991
31992         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
31993         obstack.c.
31994
31995 2000-01-22  Jim Meyering  <meyering@lucent.com>
31996
31997         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
31998
31999         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
32000
32001         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
32002         configure.in
32003         (AC_CHECK_HEADERS): Likewise for sh-utils.
32004         (AC_CHECK_HEADERS): Likewise for textutils.
32005         Merge the three lists of headers.
32006
32007         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
32008         from fileutils' configure.in.
32009
32010         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
32011         code. Moved tests into their own function (_jm_DECL_HEADERS) in
32012         check-decl.m4.
32013
32014         * m4/check-decl.m4: Use #if rather than #ifdef.
32015         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
32016         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
32017         (_jm_DECL_HEADERS): Define new function.
32018         (jm_CHECK_DECLARATIONS): Require it.
32019
32020 2000-01-22  Jim Meyering  <meyering@lucent.com>
32021
32022         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
32023         [! HAVE_DECL_STRTOULL]: Declare strtoull.
32024         Required for some AIX systems.  Reported by Christian Krackowizer.
32025         [TESTING] (main): New function.
32026
32027         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
32028         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
32029         letters.
32030
32031         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
32032         iswprint.
32033
32034         * lib/strverscmp.c (ISDIGIT): Define.
32035         (strverscmp): Use ISDIGIT, not isdigit.
32036
32037 2000-01-19  Jim Meyering  <meyering@lucent.com>
32038
32039         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
32040         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
32041         defines `struct timespec' in <sys/time.h>
32042
32043         * m4/c-bs-a.m4: Remove uses of changequote altogether.
32044         Thanks to Akim for explaining.
32045
32046 2000-01-17  Paul Eggert  <eggert@twinsun.com>
32047
32048         * lib/nanosleep.c (nanosleep):
32049         Don't use SA_INTERRUPT to decide whether to call sigaction, as
32050         POSIX.1 doesn't require SA_INTERRUPT and some systems
32051         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
32052         it's been part of POSIX.1 since day 1 (in 1988).
32053
32054 2000-01-17  Jim Meyering  <meyering@lucent.com>
32055
32056         * lib/interlock: Remove unused file.  Reported by François Pinard.
32057
32058 2000-01-16  Paul Eggert  <eggert@twinsun.com>
32059
32060         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
32061         alert, backslash, formfeed, and vertical tab unnecessarily in
32062         shell quoting style.
32063
32064 2000-01-16  Jim Meyering  <meyering@lucent.com>
32065
32066         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
32067         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
32068         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
32069         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
32070
32071 2000-01-16  Jim Meyering  <meyering@lucent.com>
32072
32073         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
32074         because the latter didn't work.
32075
32076 2000-01-15  Jim Meyering  <meyering@lucent.com>
32077
32078         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
32079         (AC_REPLACE_FUNCS): Add memcpy and memset.
32080         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
32081         Add strpbrk.
32082         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
32083
32084 2000-01-12  Jim Meyering  <meyering@lucent.com>
32085
32086         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
32087         (jm_PREREQ): Use it.
32088         (jm_PREREQ_READUTMP): New macro.
32089         (jm_PREREQ): Use it.
32090
32091 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32092
32093         Quote multibyte characters correctly.
32094         * m4/c-bs-a.m4: New file.
32095         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
32096         (jm_PREREQ): Use it.
32097
32098 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32099
32100         * m4/uintmax_t.m4: Port to autoconf 2.13.
32101
32102 2000-01-08  Jim Meyering  <meyering@ascend.com>
32103
32104         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
32105         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
32106
32107 2000-01-04  Jim Meyering  <meyering@ascend.com>
32108
32109         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
32110         jm_STRUCT_DIRENT_D_TYPE.
32111         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
32112         jm_STRUCT_DIRENT_D_INO.
32113         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
32114         jm_STRUCT_UTIMBUF.
32115         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
32116         renamings.
32117         * m4/utime.m4: Likewise.
32118
32119         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
32120         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
32121
32122 2000-01-03  Paul Eggert  <eggert@twinsun.com>
32123
32124         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
32125         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
32126
32127 2000-01-02  Jim Meyering  <meyering@ascend.com>
32128
32129         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
32130         remember if this is necessary.
32131
32132 1999-12-26  Jim Meyering  <meyering@ascend.com>
32133
32134         * m4/jm-macros.m4: Use it here.
32135         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
32136
32137 1999-12-23  Jim Meyering  <meyering@ascend.com>
32138
32139         * m4/jm-macros.m4: Check for clock_gettime (moved from
32140         fileutils/configure.in)
32141         Check for gettimeofday.
32142
32143 1999-12-20  Jim Meyering  <meyering@ascend.com>
32144
32145         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
32146         autoconf-2.14a-1999-12-20.
32147
32148 1999-12-19  Jim Meyering  <meyering@ascend.com>
32149
32150         * m4/lstat-slash.m4: New file.
32151         * m4/jm-macros.m4: Use the new macro:
32152         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
32153
32154 1999-12-07  Jim Meyering  <meyering@ascend.com>
32155
32156         * m4/perl.m4: Require that File::Compare be available, too.
32157         Too many systems seem to lack it.
32158
32159         * m4/strftime.m4: Add checks for most of the cpp macros tested in
32160         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
32161
32162 1999-11-18  Paul Eggert  <eggert@twinsun.com>
32163
32164         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
32165         problem with the QNX 4.25 shell, which doesn't propagate exit
32166         status of failed commands inside shell assignments.
32167
32168 1999-11-17  Jim Meyering  <meyering@ascend.com>
32169
32170         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
32171
32172 1999-11-07  Jim Meyering  <meyering@ascend.com>
32173
32174         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
32175
32176 1999-11-06  Jim Meyering  <meyering@ascend.com>
32177
32178         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
32179         * m4/jm-macros.m4 (jm_MACROS): Use it here.
32180
32181 1999-11-05  Jim Meyering  <meyering@ascend.com>
32182
32183         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
32184         configure.in of textutils, fileutils, and sh-utils into this one
32185         (shared between those packages) file.
32186         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
32187         AC_STRUCT_ST_BLKSIZE.
32188
32189 1999-11-03  Jim Meyering  <meyering@ascend.com>
32190
32191         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
32192         of AC_CHECK_TYPE checks includes unistd.h.
32193         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
32194         Suggestion from Akim Demaille.
32195
32196 1999-10-30  Jim Meyering  <meyering@ascend.com>
32197
32198         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
32199         m4-quoted string.
32200         * m4/ls-mntd-fs.m4: Likewise.
32201         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
32202         * m4/jm-winsz1.m4: Likewise.
32203
32204         * m4/const.m4: Remove file, since the fix made it into the experimental
32205         version of autoconf.
32206         * m4/mktime.m4: Likewise.
32207
32208         * m4/check-type.m4: Remove file, now that the latest version of
32209         AC_CHECK_TYPE takes a third arg to specify additional #includes.
32210
32211         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
32212         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
32213         AC_CHECK_TYPE.
32214
32215 1999-10-04  Jim Meyering  <meyering@ascend.com>
32216
32217         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
32218
32219 1999-09-22  Paul Eggert  <eggert@twinsun.com>
32220
32221         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
32222         2.95.1 bug with HP-UX 10.20.
32223
32224 1999-09-17  Jim Meyering  <meyering@ascend.com>
32225
32226         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
32227         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
32228         due to missing strdup (against sh-utils-2.0).
32229
32230 1999-08-29  Jim Meyering  <meyering@ascend.com>
32231
32232         * m4/jm-macros.m4: Require jm_BISON.
32233         * m4/bison.m4: New file.
32234
32235 1999-08-17  Paul Eggert  <eggert@twinsun.com>
32236
32237         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
32238         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
32239
32240 1999-08-05  Jim Meyering  <meyering@ascend.com>
32241
32242         * m4/getline.m4: Rename test file from conftestdata to conftest.data
32243         to avoid conflicts with `conftest' on 8+3 filesystems.
32244         Suggestion from Eli Zaretskii.
32245
32246 1999-08-04  Jim Meyering  <meyering@ascend.com>
32247
32248         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
32249         fileutils and sh-utils (textutils's getline test was inadequate).
32250         (AM_FUNC_GETLINE): Run this test.
32251         (AC_CHECK_FUNCS): Check for getdelim.
32252         Reported by Bob Proulx.
32253
32254 1999-08-02  Jim Meyering  <meyering@ascend.com>
32255
32256         * m4/jm-macros.m4: Add a comment.
32257
32258 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32259
32260         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
32261         <inttypes.h> defines strtoumax as a macro (and not as a
32262         function).
32263
32264 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32265
32266         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
32267         that we can shift, multiply and divide unsigned long long
32268         values; Ultrix cc can't do it.
32269
32270 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32271
32272         * m4/mktime.m4: New file, which is a preview of what should appear
32273         in the next public autoconf release.
32274
32275 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32276
32277         * m4/lfs.m4: Remove this file.
32278         * m4/largefile.m4: New file.  It contains the old contents of
32279         lfs.m4, except that all names with prefix AC_LFS have been
32280         changed to use the prefix AC_SYS_LARGEFILE instead, to be
32281         compatible with future autoconf versions.  Also, some minor m4
32282         quoting problems have been fixed.
32283
32284 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32285
32286         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
32287         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
32288         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
32289         and simplify the shell code.
32290
32291 1999-08-01  Jim Meyering  <meyering@ascend.com>
32292
32293         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
32294         m4.
32295
32296 1999-07-20  Jim Meyering  <meyering@ascend.com>
32297
32298         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
32299
32300 1999-07-15  Jim Meyering  <meyering@ascend.com>
32301
32302         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
32303
32304 1999-05-22  Jim Meyering  <meyering@ascend.com>
32305
32306         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
32307
32308 1999-05-20  Jim Meyering  <meyering@ascend.com>
32309
32310         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
32311         Add a colon after each `then' in case $4 is empty.
32312
32313 1999-05-16  Jim Meyering  <meyering@ascend.com>
32314
32315         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
32316
32317 1999-05-10  Jim Meyering  <meyering@ascend.com>
32318
32319         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
32320
32321         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
32322         AC_FUNC_MKTIME.
32323
32324 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
32325
32326         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
32327
32328 1999-05-04  Paul Eggert  <eggert@twinsun.com>
32329
32330         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
32331         not CPPFLAGS, so that linking works correctly in IRIX.
32332
32333 1999-04-30  Paul Eggert  <eggert@twinsun.com>
32334
32335         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
32336
32337 1999-04-20  Paul Eggert  <eggert@twinsun.com>
32338
32339         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
32340         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
32341         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
32342         jm_AC_TYPE_UNSIGNED_LONG_LONG.
32343         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
32344
32345         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
32346
32347 1999-04-20  Jim Meyering  <meyering@ascend.com>
32348
32349         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
32350         AC_REPLACE xstroull if necessary.  From Paul Eggert.
32351         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
32352
32353 1999-04-18  Jim Meyering  <meyering@ascend.com>
32354
32355         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
32356         * m4/jm-macros.m4: Use it.
32357
32358 1999-04-06  Jim Meyering  <meyering@ascend.com>
32359
32360         * m4/strftime.m4: Remove test for %f.
32361
32362 1999-03-29  Jim Meyering  <meyering@ascend.com>
32363
32364         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
32365         superset of the AC_TYPE_* checks in the textutils, fileutils,
32366         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
32367         AC_TYPE_PID_T.
32368
32369 1999-03-28  Jim Meyering  <meyering@ascend.com>
32370
32371         * m4/jm-macros.m4: Define GNU_PACKAGE here.
32372         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
32373         replaced e.g., in the *.sh files of the sh-utils.
32374
32375 1999-03-20  Jim Meyering  <meyering@ascend.com>
32376
32377         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
32378         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
32379         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
32380
32381 1999-03-19  Jim Meyering  <meyering@ascend.com>
32382
32383         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
32384
32385 1999-03-12  Jim Meyering  <meyering@ascend.com>
32386
32387         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
32388
32389 1999-03-07  Jim Meyering  <meyering@ascend.com>
32390
32391         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
32392         declared.
32393
32394 1999-02-17  Jim Meyering  <meyering@ascend.com>
32395
32396         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
32397         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
32398
32399 1999-02-07  Jim Meyering  <meyering@ascend.com>
32400
32401         * m4/group-member.m4: New file -- extracted from sh-utils'
32402         configure.in.
32403
32404         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
32405         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
32406
32407 1999-02-06  Jim Meyering  <meyering@ascend.com>
32408
32409         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
32410         * m4/fnmatch.m4: Likewise.
32411         * m4/getgroups.m4: Likewise.
32412         * m4/lstat.m4: Likewise.
32413         * m4/malloc.m4: Likewise.
32414         * m4/putenv.m4: Likewise.
32415         * m4/realloc.m4: Likewise.
32416         * m4/regex.m4: Likewise.
32417         * m4/stat.m4: Likewise.
32418         * m4/strftime.m4: Likewise.
32419         Suggestion from Alain Magloire.
32420
32421         * m4/chown.m4: Use `.$ac_objext', not `.o'.
32422         * m4/fnmatch.m4: Likewise.
32423         * m4/getgroups.m4: Likewise.
32424         * m4/getline.m4: Likewise.
32425         * m4/lstat.m4: Likewise.
32426         * m4/malloc.m4: Likewise.
32427         * m4/memcmp.m4: Likewise.
32428         * m4/putenv.m4: Likewise.
32429         * m4/realloc.m4: Likewise.
32430         * m4/regex.m4: Likewise.
32431         * m4/stat.m4: Likewise.
32432         * m4/strftime.m4: Likewise.
32433         Suggestion from Alain Magloire.
32434
32435         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
32436         an argument.
32437
32438         * m4/regex.m4: Add a run-time Test for proper operation of
32439         re_compile_pattern.
32440
32441 1999-01-31  Jim Meyering  <meyering@ascend.com>
32442
32443         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
32444
32445 1999-01-30  Jim Meyering  <meyering@ascend.com>
32446
32447         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
32448
32449         * m4/jm-mktime.m4: Make this a wrapper around the official
32450         AM_FUNC_MKTIME rather than my private copy, now that the official one
32451         is up to date.
32452         * m4/mktime.m4: Remove file.
32453
32454         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
32455         * m4/uptime.m4: Likewise.
32456         * m4/uintmax_t.m4: Likewise.
32457
32458 1999-01-28  Jim Meyering  <meyering@ascend.com>
32459
32460         * m4/jm-macros.m4: Use jm_AFS.
32461         * m4/afs.m4: New file (from fileutils' configure.in).
32462
32463         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
32464         * m4/chown.m4: Likewise.
32465         * m4/d-ino.m4: Likewise.
32466         * m4/d-type.m4: Likewise.
32467         * m4/fnmatch.m4: Likewise.
32468         * m4/getgroups.m4: Likewise.
32469         * m4/gettext.m4: Likewise.
32470         * m4/jm-mktime.m4: Likewise.
32471         * m4/jm-winsz2.m4: Likewise.
32472         * m4/lcmessage.m4: Likewise.
32473         * m4/ls-mntd-fs.m4: Likewise.
32474         * m4/malloc.m4: Likewise.
32475         * m4/memcmp.m4: Likewise.
32476         * m4/putenv.m4: Likewise.
32477         * m4/realloc.m4: Likewise.
32478         * m4/st_mtim.m4: Likewise.
32479         * m4/strftime.m4: Likewise.
32480
32481 1999-01-16  Jim Meyering  <meyering@ascend.com>
32482
32483         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
32484         (ARGMATCH_DIE_DECL): Define.
32485
32486 1999-01-12  Jim Meyering  <meyering@ascend.com>
32487
32488         * m4/Makefile.am.in: Rewrite to avoid using fmt.
32489         Reported by Lars Hecking.
32490
32491 1999-01-10  Jim Meyering  <meyering@ascend.com>
32492
32493         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
32494         gross kludge.
32495         * m4/inttypes_h.m4: Likewise.
32496         * m4/lstat.m4: Likewise.
32497         * m4/malloc.m4: Likewise.
32498         * m4/readdir.m4: Likewise.
32499         * m4/realloc.m4: Likewise.
32500         * m4/st_dm_mode.m4: Likewise.
32501         * m4/stat.m4: Likewise.
32502         * m4/utimbuf.m4: Likewise.
32503         * m4/utimes.m4: Likewise.
32504
32505         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
32506         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
32507         comments in config.h.in are meaningful.
32508
32509         * m4/jm-macros.m4: Require autoconf-2.13 here.
32510
32511         * m4/regex.m4: By default, don't use the included regex.c on systems
32512         with glibc 2.  Suggestion from Uli Drepper.
32513
32514 1999-01-02  Jim Meyering  <meyering@ascend.com>
32515
32516         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
32517
32518 1998-12-18  Jim Meyering  <meyering@ascend.com>
32519
32520         * m4/Makefile.am.in (Makefile.am): Simplify rule.
32521         Based on a suggestion from Lars Hecking.
32522
32523 1998-11-16  Paul Eggert  <eggert@twinsun.com>
32524
32525         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
32526
32527 1998-11-16  Jim Meyering  <meyering@ascend.com>
32528
32529         * m4/lfs.m4: Double-quote the `uname...` expression.
32530
32531 1998-11-14  Jim Meyering  <meyering@ascend.com>
32532
32533         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
32534         * m4/stat.m4: Likewise.
32535
32536 1998-11-03  Jim Meyering  <meyering@ascend.com>
32537
32538         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
32539         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
32540
32541 1998-10-18  Jim Meyering  <meyering@ascend.com>
32542
32543         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
32544
32545 1998-10-17  Jim Meyering  <meyering@ascend.com>
32546
32547         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
32548         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
32549         calls for those previously hard-coded headers.  Instead, take a new
32550         parameter.
32551         (jm_CHECK_DECLARATIONS): Reflect interface change.
32552         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
32553         (jm_CHECK_DECL_LOCALTIME_R): New macro.
32554
32555         * m4/mktime.m4: Test for spring-forward gap before long-running test.
32556
32557 1998-10-14  Jim Meyering  <meyering@ascend.com>
32558
32559         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
32560         instead of "TZ=America/Vancouver".  From Paul Eggert.
32561
32562 1998-10-11  Jim Meyering  <meyering@ascend.com>
32563
32564         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
32565         This adds a test for a recently added compatibility fix for mktime.c.
32566         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
32567
32568 1998-09-27  Jim Meyering  <meyering@ascend.com>
32569
32570         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
32571
32572         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
32573         ../configure.in, including a change from Gordon Matzigkeit to allow
32574         cross-compiling for the Hurd.
32575
32576         * m4/glibc.m4: New file/macro to test for the GNU C Library
32577         versions 1 and 2.  From Gordon Matzigkeit.
32578         Indent.
32579
32580 1998-09-21  Jim Meyering  <meyering@ascend.com>
32581
32582         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
32583
32584 1998-08-18  Paul Eggert  <eggert@twinsun.com>
32585
32586         Port nanosecond-resolution times to UnixWare 2.1.2 and
32587         pedantic Solaris 2.6.
32588
32589         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
32590         AC_STRUCT_ST_MTIM.
32591         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
32592         Generate name of ns member, instead of just 1 or undef.
32593         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
32594
32595 1998-08-15  Jim Meyering  <meyering@ascend.com>
32596
32597         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
32598         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
32599         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
32600         instead of jm_TYPE_SSIZE_T.
32601
32602 1998-08-12  Jim Meyering  <meyering@ascend.com>
32603
32604         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
32605
32606 1998-08-02  Jim Meyering  <meyering@ascend.com>
32607
32608         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
32609         in acconfig.h manually.
32610
32611 1998-07-31  Paul Eggert  <eggert@twinsun.com>
32612
32613         * m4/st_mtim.m4: New file.
32614
32615 1998-07-28  Jim Meyering  <meyering@ascend.com>
32616
32617         * m4/utimes.m4: Undef stat.
32618
32619 1998-07-25  Jim Meyering  <meyering@ascend.com>
32620
32621         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
32622         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
32623
32624 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
32625
32626         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
32627         uid and gid actually remain unchanged.
32628
32629 1998-07-07  Jim Meyering  <meyering@ascend.com>
32630
32631         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
32632
32633 1998-07-04  Jim Meyering  <meyering@ascend.com>
32634
32635         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
32636         to prove that this macro can be used in packages without regex.c.
32637
32638 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
32639
32640         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
32641         is to be used.
32642
32643 1998-07-03  Jim Meyering  <meyering@ascend.com>
32644
32645         * m4/gettext.m4: Add -lintl if it's found to be necessary.
32646
32647         * m4/gettext.m4: New file -- from gettext-0.10.35.
32648         * m4/lcmessage.m4: Likewise.
32649         * m4/progtest.m4: Likewise.
32650
32651         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
32652         * m4/jm-macros.m4: Require the new macro.
32653
32654 1998-06-29  Jim Meyering  <meyering@ascend.com>
32655
32656         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
32657         for the definition of NGROUPS (used in a system header included
32658         by sys/mount.h).
32659
32660 1998-06-28  Jim Meyering  <meyering@ascend.com>
32661
32662         * m4/ls-mntd-fs.m4: New file.
32663         * m4/fstypename.m4: New file.
32664
32665         * m4/jm-macros.m4: Require the new macro.
32666         * m4/jm-glibc-io.m4: New file.
32667
32668 1998-05-19  Jim Meyering  <meyering@ascend.com>
32669
32670         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
32671         * m4/lchown.m4: New file.
32672
32673         * m4/Makefile.am.in: New file.
32674         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
32675
32676 1998-05-14  Jim Meyering  <meyering@ascend.com>
32677
32678         * m4/Makefile.am (EXTRA_DIST): Add them.
32679         * m4/jm-macros.m4: New file.
32680         * m4/utimbuf.m4: New file.
32681
32682 1998-05-12  Jim Meyering  <meyering@ascend.com>
32683
32684         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
32685
32686 1998-05-11  Jim Meyering  <meyering@ascend.com>
32687
32688         * m4/isc-posix.m4: New file.
32689
32690 1998-05-10  Jim Meyering  <meyering@ascend.com>