cba7b6cdba754c570a458854550db792dc9dcb4d
[gnulib.git] / ChangeLog
1 2007-08-26  Bruno Haible  <bruno@clisp.org>
2
3         * gnulib-tool (func_ln_if_changed): Use "test -h", not "test -L".
4
5 2007-08-23  Simon Josefsson  <simon@josefsson.org>
6
7         * lib/readline.c: Don't include getline.h, the prototype is now
8         found in stdio.h.
9
10 2007-08-23  Jim Meyering  <jim@meyering.net>
11
12         Getdelim touchup.
13         * lib/getdelim.c (getdelim): Don't bother to save/restore errno
14         around the funlockfile call, since funlockfile never sets errno.
15         Don't set errno upon failed realloc.
16
17 2007-08-22  Eric Blake  <ebb9@byu.net>
18
19         Getline touchups.
20         * lib/getdelim.c (getdelim): Revert regression that required *n to
21         be 0 when *lineptr is NULL.  Preserve errno across funlockfile.
22         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of
23         getdelim, rather than whether implementation is missing.
24         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline.
25         * lib/stdio_.h (getline): Also declare if replacement is
26         required.
27         * doc/functions/getdelim.texi: New file.
28         * doc/functions/getline.texi: Likewise.
29         * doc/gnulib.texi (Function Substitutes): Add new files.
30         Reported by Bruno Haible.
31
32 2007-08-22  Ludovic Courtès  <ludo@gnu.org>
33
34         * users.txt: Add Guile.
35
36 2007-08-22  Eric Blake  <ebb9@byu.net>
37
38         * tests/test-getdelim.c (main): Use remove, not unlink.
39         * tests/test-getline.c (main): Likewise.
40
41         Move getline and getdelim into stdio.h, per POSIX 200x.
42         * modules/getline (Files): Remove getline.h.
43         (Depends-on): Add stdio.
44         (configure.ac): Add module indicator.
45         * modules/getdelim (Files): Remove getdelim.h.
46         (Depends-on): Add stdio.
47         (configure.ac): Add module indicator.
48         * modules/stdio (Makefile.am): Work with new indicators.
49         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
50         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs.
51         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
52         * lib/getdelim.h: Delete.
53         * lib/getline.h: Delete.
54         * lib/stdio_.h (getdelim, getline): Declare.
55         * modules/getdelim-tests: New module.
56         * modules/getline-tests: Likewise.
57         * tests/test-getdelim.c: New file.
58         * tests/test-getline.c: Likewise.
59         * NEWS: Document the change.
60         * lib/getline.c: Update choice of header.
61         * lib/csharpcomp.c: Likewise.
62         * lib/getpass.c: Likewise.
63         * lib/javacomp.c: Likewise.
64         * lib/javaversion.c: Likewise.
65         * lib/yesno.c: Likewise.
66         * lib/getdelim.c: Likewise.
67         (getdelim): Set errno on failure, and avoid memory leak.
68
69 2007-08-19  Bruno Haible  <bruno@clisp.org>
70
71         * modules/closein (Depends-on): Add freadahead.
72         * lib/closein.c: Include freadahead.h.
73         (close_stdin): Skip the fseeko and fflush calls if freadahead(stdin)
74         is zero.
75
76 2007-08-19  Bruno Haible  <bruno@clisp.org>
77
78         * modules/freadahead-tests: New file.
79         * tests/test-freadahead.sh: New file.
80         * tests/test-freadahead.c: New file.
81
82         * modules/freadahead: New file.
83         * lib/freadahead.h: New file.
84         * lib/freadahead.c: New file.
85         * MODULES.html.sh (File stream based Input/Output): Add freadahead,
86         fbufmode, fpurge, freadable, fwritable.
87
88 2007-08-19  Eric Blake  <ebb9@byu.net>
89
90         Test yesno in combination with closein.
91         * lib/yesno.c (yesno): Document use of stdin.
92         * modules/yesno-tests (Files): New module.
93         * tests/test-yesno.c (main): New file.
94         * tests/test-yesno.sh: Likewise.
95
96 2007-08-19  Bruno Haible  <bruno@clisp.org>
97
98         * lib/fbufmode.c (fbufmode): Add tentative support for Solaris/AMD64.
99         * lib/fseeko.c (rpl_fseeko): Likewise.
100         * lib/fseterr.c (fseterr): Likewise.
101
102 2007-08-19  Bruno Haible  <bruno@clisp.org>
103
104         * tests/test-lseek.c (main): Disable a test for BeOS.
105         * doc/functions/lseek.texi: Document the BeOS bug.
106
107 2007-08-19  Bruno Haible  <bruno@clisp.org>
108             Eric Blake  <ebb9@byu.net>
109
110         * lib/lseek.c: Include <sys/stat.h>.
111         (rpl_lseek): Add workaround code also for Unix platforms.
112         Needed for BeOS.
113         * m4/lseek.m4 (gl_FUNC_LSEEK): When cross-compiling, fail on BeOS.
114         * doc/functions/lseek.texi: Document BeOS definiency.
115
116 2007-08-18  Bruno Haible  <bruno@clisp.org>
117
118         * modules/fstrcmp-tests: New file.
119         * tests/test-fstrcmp.c: New file.
120
121 2007-08-18  Bruno Haible  <bruno@clisp.org>
122
123         * modules/fstrcmp: New file, from GNU gettext with modifications.
124         * lib/fstrcmp.h: New file, from GNU gettext.
125         * lib/fstrcmp.c: New file, from GNU gettext.
126         * MODULES.html.sh (String handling): Add fstrcmp.
127
128 2007-08-18  Bruno Haible  <bruno@clisp.org>
129
130         * lib/diffseq.h (struct context): Change type of 'heuristic' field to
131         'bool'.
132         (diag, compareseq): Remove const from the ctxt argument.
133         (USE_HEURISTIC): Undefine at the end.
134
135 2007-08-18  Jim Meyering  <jim@meyering.net>
136
137         New file: lib/idcache.h
138         * NEWS: Mention the addition.
139         * modules/idcache (Files): Add lib/idcache.h
140         * lib/idcache.c: Include "idcache.h".
141         Don't include <sys/types.h>.
142         Add a FIXME comment.
143         Move file-scoped "static" declarations to the top.
144         * lib/idcache.h: New file.  Include <sys/types.h> here, instead.
145
146 2007-08-17  Bruno Haible  <bruno@clisp.org>
147         and Paul Eggert  <eggert@cs.ucla.edu>
148
149         * MODULES.html.sh: Add diffseq.
150         * modules/diffseq: New file.
151         * lib/diffseq.h: New file, from GNU gettext with a few minor changes,
152         extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
153
154 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
155
156         Import changes from coreutils for bootstrap script.
157
158         2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
159
160         * build-aux/bootstrap (slurp): Work even in environments where
161         "ls" defaults to "ls -A".  Put in a FIXME, though, since the
162         current code does not slurp files whose names start with ".", and
163         this looks like it might be a troublesome area.
164
165         2007-07-11  Jim Meyering  <jim@meyering.net>
166
167         If there's a GPL vN copyright comment, require that N == 3.
168
169         2007-07-08  Jim Meyering  <jim@meyering.net>
170
171         Run the coreutils-specific code only if tests/Makefile.am.in exists.
172         * build-aux/bootstrap (mam_template): Move definition out of loop.
173
174         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
175
176         * build-aux/bootstrap (symlink_to_dir): Rename function from
177         symlink_to_gnulib.  Add a directory parameter.  Update all
178         callers.
179         (cp_mark_as_generated): Also check for -- and link to -- files in
180         gl/.
181
182         2007-07-08  Jim Meyering  <jim@meyering.net>
183
184         Adapt to deeper hierarchy in gnulib.
185         * build-aux/bootstrap (symlink_to_dir): If the destination
186         directory doesn't exist, create it. This is required at least for
187         "lib/uniwidth/cjk.h".
188
189         2007-05-15  Jim Meyering  <jim@meyering.net>
190
191         * build-aux/bootstrap: Now that generated Makefile.am files
192         are no longer under version control, they must be created at
193         bootstrap time.
194
195 2007-08-14  Ben Pfaff  <blp@gnu.org>
196
197         * lib/count-one-bits.h: Add comments.  From Bruno Haible.
198
199 2007-08-14  Paul Eggert  <eggert@cs.ucla.edu>
200
201         * lib/count-one-bits.h: Don't include <limits.h>; no longer needed
202         given the changes below.
203         (COUNT_ONE_BITS): Use 'verify' rather than 'verify_true'.  Work
204         even on hosts that have padding bits beyond the supported 64.
205
206 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
207
208         * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.
209         * lib/xstrtol.h: Don't include exitfail.h; that's now internal to
210         xstrtol.c.  Include getopt.h, since xstrtol_fatal's signature
211         depends on it.
212         (xstrtol_error): Remove.
213         (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error
214         but with a different signature.
215         (ATTRIBUTE_NORETURN, __attribute__): New macros.
216         * lib/xstrtol-error.c: Include exitfail.h.
217         (xstrtol_fatal): New function, with a different signature from the
218         old xstrtol_error, so that the caller need not worry about passing
219         in an exit status, or about storage management of the option argument.
220         (xstrtol_error): Now a static function.  Redo signature to
221         implement xstrtol_fatal.  Output the correct number of hyphens in
222         front of the option so that the caller need not worry about
223         storage management.
224         (N_): New macro.
225         (_): Remove; not used now.
226         * modules/xstrtol: Depend on getopt.
227         * tests/test-xstrtol.c (main): Use new xstrtol_error function instead
228         of old STRTOL_FATAL_ERROR macro.
229         * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior
230         of test program.
231         * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise.
232         * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.
233
234 2007-08-08  Eric Blake  <ebb9@byu.net>
235
236         * lib/xstrtol-error.c: Add missing include.
237
238         Move xstrtol messages into gnulib domain, when --pobase is used.
239         * lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro...
240         * lib/xstrtol-error.c (xstrtol_error): ...into new file.
241         * modules/xstrtol (Files): Distribute new file.
242         * m4/xstrtol.m4 (gl_XSTRTOL): Build new file.
243         * lib/xstrtol.c (TESTING_XSTRTO): Move tests...
244         * tests/test-xstrtol.c: ...into new file.
245         * tests/test-xstrtoul.c: Also test xstrtoul.
246         * tests/test-xstrtoimax.c: Also test xstrtoimax.
247         * tests/test-xstrtoumax.c: Also test xstrtoumax.
248         * tests/test-xstrtol.sh: Drive the tests.
249         * tests/test-xstrtoimax.sh: Likewise.
250         * tests/test-xstrtoumax.sh: Likewise.
251         * modules/xstrtol-tests: New module.
252         * modules/xstrtoimax-tests: Likewise.
253         * modules/xstrtoumax-tests: Likewise.
254
255 2007-08-08  Jim Meyering  <jim@meyering.net>
256
257         New function: mfile_name_concat.
258         * lib/filenamecat.c (mfile_name_concat): New function, just like
259         file_name_concat, but return NULL upon failure rather than exiting
260         with a diagnostic.
261         * lib/filenamecat.h: Declare it.
262
263 2007-08-07  Bruno Haible  <bruno@clisp.org>
264
265         * m4/inttypes.m4 (gl_INTTYPES_H): Use GL_TRIGGER_STDC_LIMIT_MACROS
266         instead of __STDC_LIMIT_MACROS_TRIGGER. This avoids a redefinition
267         warning from gcc.
268         Reported by Eric Blake.
269
270 2007-08-07  Simon Josefsson  <simon@josefsson.org>
271
272         * modules/crypto/arctwo (License): Use the synonymous term "LGPLv2+".
273         * modules/crypto/arcfour (License): Likewise.
274         * modules/crypto/des-tests (License): Likewise.
275         * modules/crypto/gc-arctwo-tests (License): Likewise.
276         * modules/crypto/gc-des-tests (License): Likewise.
277         * modules/crypto/gc-hmac-md5-tests (License): Likewise.
278         * modules/crypto/gc-hmac-sha1-tests (License): Likewise.
279         * modules/crypto/gc-md2-tests (License): Likewise.
280         * modules/crypto/gc-md4-tests (License): Likewise.
281         * modules/crypto/gc-md5-tests (License): Likewise.
282         * modules/crypto/gc-pbkdf2-sha1-tests (License): Likewise.
283         * modules/crypto/gc-rijndael-tests (License): Likewise.
284         * modules/crypto/gc-sha1-tests (License): Likewise.
285         * modules/crypto/gc-tests (License): Likewise.
286         * modules/crypto/hmac-md5 (License): Likewise.
287         * modules/crypto/hmac-sha1 (License): Likewise.
288         * modules/crypto/md2-tests (License): Likewise.
289         * modules/crypto/md4-tests (License): Likewise.
290         * modules/crypto/md5 (License): Likewise.
291         * modules/crypto/rijndael (License): Likewise.
292         * modules/crypto/sha1 (License): Likewise.
293         * modules/memxor (License): Likewise.
294
295 2007-08-06  Paul Eggert  <eggert@cs.ucla.edu>
296         and Bruno Haible  <bruno@clisp.org>
297
298         * NEWS: Describe interface changes to human, xstrtol.
299         * lib/human.h: Include <xstrtol.h>.
300         (human_options): Return enum strtol_error, not int.  Remove
301         bool arg; take int * instead.
302         * lib/human.c: Don't include "gettext.h".
303         (_): Remove; no longer used.
304         Don't include <xstrtol.h>, since human.h does it.
305         (human_options): Adjust to abovementioned interface changes.
306         Do not report error to stderr; that's now the caller's
307         responsibility.
308         * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
309         interface change.
310         * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
311         Str, Argument_type_string.  All uses changed.  Put " argument"
312         in diagnostics to make them clearer.  Change wording of suffix
313         message for clarity.
314         (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
315         Argument_type_string.
316         (STRTOL_FATAL_WARN): Remove; no longer used.
317         * modules/human (Depends-on): Remove gettext-h.
318
319 2007-08-06  Simon Josefsson  <simon@josefsson.org>
320
321         * build-aux/maint.mk, build-aux/GNUmakefile: Relicense to GPLv3+.
322
323 2007-07-31  Bruno Haible  <bruno@clisp.org>
324
325         * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX
326         are defined by <stdint.h> (as opposed to <wchar.h>, as on Dragonfly).
327         Reported by Joerg Sonnenberger <joerg@britannica.bec.de>.
328
329 2007-07-31  Bruno Haible  <bruno@clisp.org>
330
331         * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag.
332         Suggested by Joerg Sonnenberger <joerg@britannica.bec.de>.
333
334 2007-07-30  Bruno Haible  <bruno@clisp.org>
335
336         * modules/base64 (License): Use the synonymous term "LGPLv2+".
337         * modules/c-ctype (License): Likewise.
338         * modules/c-strcase (License): Likewise.
339         * modules/check-version (License): Likewise.
340         * modules/iconv (License): Likewise.
341         * modules/iconv_open (License): Likewise.
342         * modules/read-file (License): Likewise.
343         * modules/striconv (License): Likewise.
344         * modules/strverscmp (License): Likewise.
345         * modules/vasprintf (License): Likewise.
346         * modules/crypto/des (License): Likewise.
347         * modules/crypto/gc (License): Likewise.
348         * modules/crypto/gc-arcfour (License): Likewise.
349         * modules/crypto/gc-arctwo (License): Likewise.
350         * modules/crypto/gc-des (License): Likewise.
351         * modules/crypto/gc-hmac-md5 (License): Likewise.
352         * modules/crypto/gc-hmac-sha1 (License): Likewise.
353         * modules/crypto/gc-md2 (License): Likewise.
354         * modules/crypto/gc-md4 (License): Likewise.
355         * modules/crypto/gc-md5 (License): Likewise.
356         * modules/crypto/gc-pbkdf2-sha1 (License): Likewise.
357         * modules/crypto/gc-random (License): Likewise.
358         * modules/crypto/gc-rijndael (License): Likewise.
359         * modules/crypto/gc-sha1 (License): Likewise.
360         * modules/crypto/md2 (License): Likewise.
361         * modules/crypto/md4 (License): Likewise.
362
363 2007-07-30  Jim Meyering  <jim@meyering.net>
364
365         * lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
366         set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
367         it has valid stat data.  This bug would cause du not to count the
368         sizes of inaccessible directories.
369         Patch by Bryan Mason <bmason@redhat.com>, via Jose Maria Plans
370         in <http://bugzilla.redhat.com/250077>.
371
372 2007-07-25  Peter O'Gorman  <peter@pogma.com>
373             Bruno Haible  <bruno@clisp.org>
374
375         * m4/include_next.m4 (gl_INCLUDE_NEXT): Test whether #include_next
376         really works. Needed because AIX 4.3 "xlc -E" doesn't understand
377         #include_next, gives a diagnostic about it, but reports no error in
378         the exit code.
379         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
380
381 2007-07-24  Ben Pfaff  <blp@gnu.org>
382
383         Improve name: "count-one-bits" is better than "popcount".
384         * MODULES.html.sh: Update name.
385         * lib/popcount.h: Renamed lib/count-one-bits.h.
386         (popcount): Renamed count_one_bits.
387         (popcountl): Renamed count_one_bits_l.
388         (popcountll): Renamed count_one_bits_ll.
389         * m4/popcount.m4: Renamed m4/count-one-bits.m4.
390         * modules/popcount: Renamed module/count-one-bits.
391         * modules/popcount-tests: Renamed module/count-one-bits-tests.
392         * tests/test-popcount.c: Renamed tests/test-count-one-bits.c.
393
394 2007-07-23  Ben Pfaff  <blp@gnu.org>
395
396         * lib/popcount.h (popcount32): Reduce size of constants, to allow
397         better code generation, and add U to large constants to avoid
398         warnings, in non-GCC case.
399         Suggested by Bruno Haible.
400
401 2007-07-23  Ben Pfaff  <blp@gnu.org>
402
403         * lib/popcount.h: Use verify_true instead of if...abort.
404         * modules/popcount: Depend on verify module.
405         Suggested by Jim Meyering.
406
407 2007-07-23  Bruno Haible  <bruno@clisp.org>
408
409         * gnulib-tool (func_import): Create a .cvsignore file also when the
410         directory is not yet in CVS but the toplevel directory is. When
411         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
412         Reported by Karl Berry.
413
414 2007-07-22  Ben Pfaff  <blp@gnu.org>
415
416         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
417         case.
418         Suggested by Eric Blake.
419
420 2007-07-22  Ben Pfaff  <blp@gnu.org>
421
422         New module: popcount.
423         * MODULES.html.sh: Add popcount.
424         * modules/popcount: New file.
425         * modules/popcount-tests: New file.
426         * tests/test-popcount.c: New file.
427         * lib/popcount.h: New file.
428         * m4/popcount.m4: New file.
429
430 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
431
432         * build-aux/announce-gen: Update to GPLv3.
433
434         * build-aux/config.guess: Update from config.
435
436 2007-07-21  Bruno Haible  <bruno@clisp.org>
437
438         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
439         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
440
441 2007-07-20  Jim Meyering  <jim@meyering.net>
442
443         * check-module: Diagnose a self-dependency.
444
445 2007-07-19  Bruno Haible  <bruno@clisp.org>
446
447         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
448         empty.
449         Reported by Eric Blake.
450
451 2007-07-18  Bruno Haible  <bruno@clisp.org>
452
453         * gnulib-tool: New options --po-base, --po-domain.
454         (func_usage): Document them.
455         (pobase, po_domain): New variables.
456         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
457         DEFAULT_TEXT_DOMAIN.
458         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
459         (func_import): Consider pobase and po_domain. Create a po/ directory.
460         (func_create_testdir): Set pobase and po_domain to empty.
461         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
462         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
463
464 2007-07-18  Bruno Haible  <bruno@clisp.org>
465
466         * gnulib-tool (func_get_automake_snippet): Synthesize also an
467         EXTRA_DIST augmentation for files in build-aux/.
468
469 2007-07-16  Bruno Haible  <bruno@clisp.org>
470
471         * modules/lseek (License): Use the synonymous term "LGPLv2+".
472         * modules/getdelim (License): Likewise.
473
474 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
475
476         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
477         * modules/d-type (License): Likewise.
478         * modules/extensions (License): Likewise.
479         * modules/fnmatch (License): Likewise.
480         * modules/fseeko (License): Likewise.
481         * modules/getaddrinfo (License): Likewise.
482         * modules/getline (License): Likewise.
483         * modules/getlogin_r (License): Likewise.
484         * modules/getpass (License): Likewise.
485         * modules/gettimeofday (License): Likewise.
486         * modules/glob (License): Likewise.
487         * modules/inet_ntop (License): Likewise.
488         * modules/malloc (License): Likewise.
489         * modules/malloca (License): Likewise.
490         * modules/memmem (License): Likewise.
491         * modules/mempcpy (License): Likewise.
492         * modules/memset (License): Likewise.
493         * modules/minmax (License): Likewise.
494         * modules/mktime (License): Likewise.
495         * modules/netinet_in (License): Likewise.
496         * modules/pathmax (License): Likewise.
497         * modules/poll (License): Likewise.
498         * modules/regex (License): Likewise.
499         * modules/snprintf (License): Likewise.
500         * modules/stdbool (License): Likewise.
501         * modules/stdint (License): Likewise.
502         * modules/stdio (License): Likewise.
503         * modules/strcase (License): Likewise.
504         * modules/strcasestr (License): Likewise.
505         * modules/strdup (License): Likewise.
506         * modules/string (License): Likewise.
507         * modules/strndup (License): Likewise.
508         * modules/strnlen (License): Likewise.
509         * modules/strpbrk (License): Likewise.
510         * modules/strptime (License): Likewise.
511         * modules/strsep (License): Likewise.
512         * modules/sys_select (License): Likewise.
513         * modules/sys_socket (License): Likewise.
514         * modules/sys_stat (License): Likewise.
515         * modules/sys_time (License): Likewise.
516         * modules/time (License): Likewise.
517         * modules/time_r (License): Likewise.
518         * modules/timegm (License): Likewise.
519         * modules/unistd (License): Likewise.
520         * modules/vsnprintf (License): Likewise.
521         * modules/wctype (License): Likewise.
522
523 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
524
525         * modules/argz (License): LGPLv2+.
526
527 2007-07-15  Karl Berry  <karl@gnu.org>
528
529         * doc/gnulib.texi: revise node structure per new fdl.texi.
530
531 2007-07-14  Bruno Haible  <bruno@clisp.org>
532
533         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
534         the output file.
535         * lib/uniname/uninames.h: Regenerated.
536
537 2007-07-14  Karl Berry  <karl@gnu.org>
538
539         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
540         omitting sectioning and index commands.
541
542 2007-07-13  Bruno Haible  <bruno@clisp.org>
543
544         New gnulib-tool option --more-symlinks.
545         * gnulib-tool (func_usage): Document --more-symlinks.
546         (do_copyrights): New variable.
547         Recognize option --more-symlinks.
548         (func_import): Don't add a copyright notice transform to
549         sed_transform_lib_file if do_copyrights is empty.
550
551 2007-07-13  Bruno Haible  <bruno@clisp.org>
552
553         * lib/vasnprintf.c (decimal_point_char): Define also if
554         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
555         && !NEED_PRINTF_DIRECTIVE_A.
556         Reported by Clemens Koller <clemens.koller@anagramm.de> via
557         Gary V. Vaughan <gary@gnu.org>.
558
559 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
560
561         * lib/inttypes_.h: Undo previous change, since it was fixed
562         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
563
564 2007-07-13  Bruno Haible  <bruno@clisp.org>
565
566         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
567         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
568
569 2007-07-13  Jim Meyering  <jim@meyering.net>
570
571         df: Don't fail for Tru64's "file-on-file mount".
572         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
573         so we fall through and use statfs instead.  Details here:
574         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
575         Reported by Albert Chin.
576
577 2007-07-13  Bruno Haible  <bruno@clisp.org>
578
579         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
580         * modules/configmake (License): Likewise.
581         * modules/gettext (License): Likewise.
582         * modules/gettext-h (License): Likewise.
583         * modules/include_next (License): Likewise.
584         * modules/link-warning (License): Likewise.
585         * modules/localcharset (License): Likewise.
586         * modules/localename (License): Likewise.
587         * modules/lock (License): Likewise.
588         * modules/relocatable-lib-lgpl (License): Likewise.
589         * modules/size_max (License): Likewise.
590         * modules/vasnprintf (License): Likewise.
591         * modules/wchar (License): Likewise.
592         * modules/xsize (License): Likewise.
593
594 2007-07-13  Bruno Haible  <bruno@clisp.org>
595
596         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
597         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
598
599 2007-07-12  Bruno Haible  <bruno@clisp.org>
600
601         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
602         in the modules files.
603
604 2007-07-11  Karl Berry  <karl@gnu.org>
605
606         * MODULES.html.sh (func_module): use
607          sed -e '\|^'"${includefile}"'$|d'
608          instead of /.../d, to avoid errors on $includefile's containing /.
609
610 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
611
612         * gnulib-tool (func_import): Avoid duplication of --avoid
613         statements
614         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
615         names to `_' in variable names.
616
617 2007-07-10  Eric Blake  <ebb9@byu.net>
618
619         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
620         * NEWS: Document this change.
621
622 2007-07-08  Bruno Haible  <bruno@clisp.org>
623
624         Update to Unicode 5.0.
625         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
626         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
627         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
628         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
629         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
630         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
631         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
632         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
633         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
634         U+10A3F, U+1D242..U+1D244.
635         (nonspacing_table_ind): Update.
636         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
637         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
638
639 2007-07-08  Bruno Haible  <bruno@clisp.org>
640
641         Update to Unicode 5.0.
642         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
643         code transform. Extend the name index field of unicode_name_to_code and
644         unicode_code_to_name from 16 to 24 bits.
645         * lib/uniname/uniname.c (unicode_character_name,
646         unicode_name_character): Add the range 0x12xxx to the code transform.
647         * lib/uniname/uninames.h: Regenerated.
648         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
649
650 2007-07-07  Bruno Haible  <bruno@clisp.org>
651
652         * modules/wcwidth-tests: New file.
653         * tests/test-wcwidth.c: New file.
654
655         Work around MacOS X wcwidth() bug.
656         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
657         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
658         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
659         original wcwidth in non-UTF-8 locales.
660         * modules/wcwidth (Depends-on): Add localcharset, streq,
661         uniwidth/width.
662         * doc/functions/wcwidth.texi: Update.
663
664 2007-07-07  Bruno Haible  <bruno@clisp.org>
665
666         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
667         (wcwidth): New declaration.
668         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
669         macros.
670         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
671         here. Prepare for creating <wchar.h> unconditionally.
672         * modules/wchar (Depends-on): Add link-warning.
673         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
674         REPLACE_WCWIDTH, and GL_LINK_WARNING.
675         * lib/wcwidth.h: Remove file.
676         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
677         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
678         * modules/wcwidth (Files): Remove lib/wcwidth.h.
679         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
680         (Include): Replace wcwidth.h with <wchar.h>.
681         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
682         * lib/mbchar.h: Don't include wcwidth.h.
683         * lib/mbswidth.c: Likewise.
684         * NEWS: Mention the change.
685
686 2007-07-07  Bruno Haible  <bruno@clisp.org>
687
688         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
689         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
690         definition with an external declaration.
691         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
692         defined as a function. Remove AC_C_INLINE requirement.
693         * modules/wcwidth (Files): Add lib/wcwidth.c.
694         (Makefile.am): Remove redundant statement.
695
696 2007-07-07  Bruno Haible  <bruno@clisp.org>
697
698         * MODULES.html.sh (Unicode string functions): Add the new modules.
699
700         * tests/uniwidth/test-u32-strwidth.c: New file.
701         * modules/uniwidth/u32-strwidth-tests: New file.
702
703         * lib/uniwidth/u32-strwidth.c: New file.
704         * modules/uniwidth/u32-strwidth: New file.
705
706         * tests/uniwidth/test-u16-strwidth.c: New file.
707         * modules/uniwidth/u16-strwidth-tests: New file.
708
709         * lib/uniwidth/u16-strwidth.c: New file.
710         * modules/uniwidth/u16-strwidth: New file.
711
712         * tests/uniwidth/test-u8-strwidth.c: New file.
713         * modules/uniwidth/u8-strwidth-tests: New file.
714
715         * lib/uniwidth/u8-strwidth.c: New file.
716         * modules/uniwidth/u8-strwidth: New file.
717
718         * tests/uniwidth/test-u32-width.c: New file.
719         * modules/uniwidth/u32-width-tests: New file.
720
721         * lib/uniwidth/u32-width.c: New file.
722         * modules/uniwidth/u32-width: New file.
723
724         * tests/uniwidth/test-u16-width.c: New file.
725         * modules/uniwidth/u16-width-tests: New file.
726
727         * lib/uniwidth/u16-width.c: New file.
728         * modules/uniwidth/u16-width: New file.
729
730         * tests/uniwidth/test-u8-width.c: New file.
731         * modules/uniwidth/u8-width-tests: New file.
732
733         * lib/uniwidth/u8-width.c: New file.
734         * modules/uniwidth/u8-width: New file.
735
736         * tests/uniwidth/test-uc_width.c: New file.
737         * modules/uniwidth/width-tests: New file.
738
739         * lib/uniwidth/width.c: New file, from GNU libiconv.
740         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
741         * modules/uniwidth/width: New file.
742
743         * lib/uniwidth.h: New file, from GNU libiconv.
744         * modules/uniwidth/base: New file.
745
746 2007-07-07  Bruno Haible  <bruno@clisp.org>
747
748         * lib/uniname.h: New file, from GNU gettext.
749         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
750         * lib/uniname/uninames.h: New file, from GNU gettext.
751         * lib/uniname/uniname.c: New file, from GNU gettext.
752         * tests/uniname/test-uninames.sh: New file.
753         * tests/uniname/test-uninames.c: New file, from GNU gettext.
754         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
755         * modules/uniname/base: New file.
756         * modules/uniname/uniname: New file.
757         * modules/uniname/uniname-tests: New file.
758         * MODULES.html.sh (Unicode string functions): Add the new modules.
759
760 2007-07-06  Bruno Haible  <bruno@clisp.org>
761
762         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
763
764 2007-07-06  Bruno Haible  <bruno@clisp.org>
765
766         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
767         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
768         includes <cygwin/sys_time.h> which includes <sys/select.h> which
769         include <sys/time.h>.
770         Reported by Eric Blake.
771
772 2007-07-06  Eric Blake  <ebb9@byu.net>
773
774         Fix testing canonicalize on cygwin.
775         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
776         Revert patch from 2007-06-19.
777         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
778         canonicalize module is also in use.
779         * tests/test-canonicalize.c: New file.
780         * tests/test-canonicalize.sh: Likewise.
781         * modules/canonicalize-tests: Likewise.
782
783 2007-07-06  Jim Meyering  <jim@meyering.net>
784
785         * lib/getugroups.c (getugroups): Detect getgrent failure.
786         Adjust comment to reflect reality: this function may return -1.
787
788 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
789
790         * build-aux/bootstrap (TP_URL,get_translations): Update to use
791         the new TP address.
792         (usage): Fix typo
793         (gnulib_mk): New variable.
794
795 2007-07-05  Jim Meyering  <jim@meyering.net>
796
797         Don't let endgrent clobber errno, no matter how improbable.
798         * lib/getugroups.c (getugroups): Save and restore errno around
799         endgrent call.
800
801         Close the group DB even when failing with 2^31 or more members.
802         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
803
804 2007-07-04  Jim Meyering  <jim@meyering.net>
805
806         * lib/getugroups.h: New file.
807         * lib/getugroups.c: Include "getugroups.h".
808         Remove uses of "register" keyword.
809         Move local variable, "cp", down into scope where used.
810         Give "username" parameter the "const" attribute.
811         * modules/getugroups (Files): Add lib/getugroups.h
812
813 2007-07-04  Karl Berry  <karl@gnu.org>
814
815         * MODULES.html.sh (func_all_modules): Complete rename of
816         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
817
818 2007-07-02  Bruno Haible  <bruno@clisp.org>
819
820         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
821         mode, when inttypes.h comes from gnulib.
822         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
823
824 2007-07-02  Simon Josefsson  <simon@josefsson.org>
825
826         * NEWS: Mention lgpl module name change.
827
828         * modules/lgpl-2.1: Renamed from lgpl.
829
830         * NEWS: Mention gpl module name change.
831
832         * modules/gpl-3.0: New file, based on gpl-2.0.
833
834         * modules/gpl-2.0: Renamed from gpl.
835
836         * modules/gpl: Fix filename, doc/gpl.texi is now found at
837         doc/gpl-2.0.texi.
838
839 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
840
841         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
842         #define __STDC_LIMIT_MACROS temporarily while including
843         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
844         Problem reported by Joel E. Denny in
845         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
846
847 2007-07-01  Bruno Haible  <bruno@clisp.org>
848
849         * lib/unistdio.h: New file.
850         * lib/unistdio/u-asnprintf.h: New file.
851         * lib/unistdio/u-asprintf.h: New file.
852         * lib/unistdio/u-printf-args.c: New file.
853         * lib/unistdio/u-printf-args.h: New file.
854         * lib/unistdio/u-printf-parse.h: New file.
855         * lib/unistdio/u-snprintf.h: New file.
856         * lib/unistdio/u-sprintf.h: New file.
857         * lib/unistdio/u-vasprintf.h: New file.
858         * lib/unistdio/u-vsnprintf.h: New file.
859         * lib/unistdio/u-vsprintf.h: New file.
860         * lib/unistdio/ulc-asnprintf.c: New file.
861         * lib/unistdio/ulc-asprintf.c: New file.
862         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
863         * lib/unistdio/ulc-printf-parse.c: New file.
864         * lib/unistdio/ulc-snprintf.c: New file.
865         * lib/unistdio/ulc-sprintf.c: New file.
866         * lib/unistdio/ulc-vasnprintf.c: New file.
867         * lib/unistdio/ulc-vasprintf.c: New file.
868         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
869         * lib/unistdio/ulc-vsnprintf.c: New file.
870         * lib/unistdio/ulc-vsprintf.c: New file.
871         * lib/unistdio/u8-asnprintf.c: New file.
872         * lib/unistdio/u8-asprintf.c: New file.
873         * lib/unistdio/u8-printf-parse.c: New file.
874         * lib/unistdio/u8-snprintf.c: New file.
875         * lib/unistdio/u8-sprintf.c: New file.
876         * lib/unistdio/u8-vasnprintf.c: New file.
877         * lib/unistdio/u8-vasprintf.c: New file.
878         * lib/unistdio/u8-vsnprintf.c: New file.
879         * lib/unistdio/u8-vsprintf.c: New file.
880         * lib/unistdio/u8-u8-asnprintf.c: New file.
881         * lib/unistdio/u8-u8-asprintf.c: New file.
882         * lib/unistdio/u8-u8-snprintf.c: New file.
883         * lib/unistdio/u8-u8-sprintf.c: New file.
884         * lib/unistdio/u8-u8-vasnprintf.c: New file.
885         * lib/unistdio/u8-u8-vasprintf.c: New file.
886         * lib/unistdio/u8-u8-vsnprintf.c: New file.
887         * lib/unistdio/u8-u8-vsprintf.c: New file.
888         * lib/unistdio/u16-asnprintf.c: New file.
889         * lib/unistdio/u16-asprintf.c: New file.
890         * lib/unistdio/u16-printf-parse.c: New file.
891         * lib/unistdio/u16-snprintf.c: New file.
892         * lib/unistdio/u16-sprintf.c: New file.
893         * lib/unistdio/u16-vasnprintf.c: New file.
894         * lib/unistdio/u16-vasprintf.c: New file.
895         * lib/unistdio/u16-vsnprintf.c: New file.
896         * lib/unistdio/u16-vsprintf.c: New file.
897         * lib/unistdio/u16-u16-asnprintf.c: New file.
898         * lib/unistdio/u16-u16-asprintf.c: New file.
899         * lib/unistdio/u16-u16-snprintf.c: New file.
900         * lib/unistdio/u16-u16-sprintf.c: New file.
901         * lib/unistdio/u16-u16-vasnprintf.c: New file.
902         * lib/unistdio/u16-u16-vasprintf.c: New file.
903         * lib/unistdio/u16-u16-vsnprintf.c: New file.
904         * lib/unistdio/u16-u16-vsprintf.c: New file.
905         * lib/unistdio/u32-asnprintf.c: New file.
906         * lib/unistdio/u32-asprintf.c: New file.
907         * lib/unistdio/u32-printf-parse.c: New file.
908         * lib/unistdio/u32-snprintf.c: New file.
909         * lib/unistdio/u32-sprintf.c: New file.
910         * lib/unistdio/u32-vasnprintf.c: New file.
911         * lib/unistdio/u32-vasprintf.c: New file.
912         * lib/unistdio/u32-vsnprintf.c: New file.
913         * lib/unistdio/u32-vsprintf.c: New file.
914         * lib/unistdio/u32-u32-asnprintf.c: New file.
915         * lib/unistdio/u32-u32-asprintf.c: New file.
916         * lib/unistdio/u32-u32-snprintf.c: New file.
917         * lib/unistdio/u32-u32-sprintf.c: New file.
918         * lib/unistdio/u32-u32-vasnprintf.c: New file.
919         * lib/unistdio/u32-u32-vasprintf.c: New file.
920         * lib/unistdio/u32-u32-vsnprintf.c: New file.
921         * lib/unistdio/u32-u32-vsprintf.c: New file.
922         * tests/unistdio/test-ulc-asnprintf1.c: New file.
923         * tests/unistdio/test-ulc-asnprintf1.h: New file.
924         * tests/unistdio/test-ulc-printf1.h: New file.
925         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
926         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
927         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
928         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
929         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
930         * tests/unistdio/test-ulc-vasprintf1.c: New file.
931         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
932         * tests/unistdio/test-ulc-vsprintf1.c: New file.
933         * tests/unistdio/test-u8-asnprintf1.c: New file.
934         * tests/unistdio/test-u8-asnprintf1.h: New file.
935         * tests/unistdio/test-u8-printf1.h: New file.
936         * tests/unistdio/test-u8-vasnprintf1.c: New file.
937         * tests/unistdio/test-u8-vasnprintf2.c: New file.
938         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
939         * tests/unistdio/test-u8-vasnprintf3.c: New file.
940         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
941         * tests/unistdio/test-u8-vasprintf1.c: New file.
942         * tests/unistdio/test-u8-vsnprintf1.c: New file.
943         * tests/unistdio/test-u8-vsprintf1.c: New file.
944         * tests/unistdio/test-u16-asnprintf1.c: New file.
945         * tests/unistdio/test-u16-asnprintf1.h: New file.
946         * tests/unistdio/test-u16-printf1.h: New file.
947         * tests/unistdio/test-u16-vasnprintf1.c: New file.
948         * tests/unistdio/test-u16-vasnprintf2.c: New file.
949         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
950         * tests/unistdio/test-u16-vasnprintf3.c: New file.
951         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
952         * tests/unistdio/test-u16-vasprintf1.c: New file.
953         * tests/unistdio/test-u16-vsnprintf1.c: New file.
954         * tests/unistdio/test-u16-vsprintf1.c: New file.
955         * tests/unistdio/test-u32-asnprintf1.c: New file.
956         * tests/unistdio/test-u32-asnprintf1.h: New file.
957         * tests/unistdio/test-u32-printf1.h: New file.
958         * tests/unistdio/test-u32-vasnprintf1.c: New file.
959         * tests/unistdio/test-u32-vasnprintf2.c: New file.
960         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
961         * tests/unistdio/test-u32-vasnprintf3.c: New file.
962         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
963         * tests/unistdio/test-u32-vasprintf1.c: New file.
964         * tests/unistdio/test-u32-vsnprintf1.c: New file.
965         * tests/unistdio/test-u32-vsprintf1.c: New file.
966         * modules/unistdio/base: New file.
967         * modules/unistdio/u-printf-args: New file.
968         * modules/unistdio/ulc-asnprintf: New file.
969         * modules/unistdio/ulc-asprintf: New file.
970         * modules/unistdio/ulc-fprintf: New file.
971         * modules/unistdio/ulc-printf-parse: New file.
972         * modules/unistdio/ulc-snprintf: New file.
973         * modules/unistdio/ulc-sprintf: New file.
974         * modules/unistdio/ulc-vasnprintf: New file.
975         * modules/unistdio/ulc-vasprintf: New file.
976         * modules/unistdio/ulc-vfprintf: New file.
977         * modules/unistdio/ulc-vsnprintf: New file.
978         * modules/unistdio/ulc-vsprintf: New file.
979         * modules/unistdio/u8-asnprintf: New file.
980         * modules/unistdio/u8-asprintf: New file.
981         * modules/unistdio/u8-printf-parse: New file.
982         * modules/unistdio/u8-snprintf: New file.
983         * modules/unistdio/u8-sprintf: New file.
984         * modules/unistdio/u8-vasnprintf: New file.
985         * modules/unistdio/u8-vasprintf: New file.
986         * modules/unistdio/u8-vsnprintf: New file.
987         * modules/unistdio/u8-vsprintf: New file.
988         * modules/unistdio/u8-u8-asnprintf: New file.
989         * modules/unistdio/u8-u8-asprintf: New file.
990         * modules/unistdio/u8-u8-snprintf: New file.
991         * modules/unistdio/u8-u8-sprintf: New file.
992         * modules/unistdio/u8-u8-vasnprintf: New file.
993         * modules/unistdio/u8-u8-vasprintf: New file.
994         * modules/unistdio/u8-u8-vsnprintf: New file.
995         * modules/unistdio/u8-u8-vsprintf: New file.
996         * modules/unistdio/u16-asnprintf: New file.
997         * modules/unistdio/u16-asprintf: New file.
998         * modules/unistdio/u16-printf-parse: New file.
999         * modules/unistdio/u16-snprintf: New file.
1000         * modules/unistdio/u16-sprintf: New file.
1001         * modules/unistdio/u16-vasnprintf: New file.
1002         * modules/unistdio/u16-vasprintf: New file.
1003         * modules/unistdio/u16-vsnprintf: New file.
1004         * modules/unistdio/u16-vsprintf: New file.
1005         * modules/unistdio/u16-u16-asnprintf: New file.
1006         * modules/unistdio/u16-u16-asprintf: New file.
1007         * modules/unistdio/u16-u16-snprintf: New file.
1008         * modules/unistdio/u16-u16-sprintf: New file.
1009         * modules/unistdio/u16-u16-vasnprintf: New file.
1010         * modules/unistdio/u16-u16-vasprintf: New file.
1011         * modules/unistdio/u16-u16-vsnprintf: New file.
1012         * modules/unistdio/u16-u16-vsprintf: New file.
1013         * modules/unistdio/u32-asnprintf: New file.
1014         * modules/unistdio/u32-asprintf: New file.
1015         * modules/unistdio/u32-printf-parse: New file.
1016         * modules/unistdio/u32-snprintf: New file.
1017         * modules/unistdio/u32-sprintf: New file.
1018         * modules/unistdio/u32-vasnprintf: New file.
1019         * modules/unistdio/u32-vasprintf: New file.
1020         * modules/unistdio/u32-vsnprintf: New file.
1021         * modules/unistdio/u32-vsprintf: New file.
1022         * modules/unistdio/u32-u32-asnprintf: New file.
1023         * modules/unistdio/u32-u32-asprintf: New file.
1024         * modules/unistdio/u32-u32-snprintf: New file.
1025         * modules/unistdio/u32-u32-sprintf: New file.
1026         * modules/unistdio/u32-u32-vasnprintf: New file.
1027         * modules/unistdio/u32-u32-vasprintf: New file.
1028         * modules/unistdio/u32-u32-vsnprintf: New file.
1029         * modules/unistdio/u32-u32-vsprintf: New file.
1030         * modules/unistdio/ulc-asnprintf-tests: New file.
1031         * modules/unistdio/ulc-vasnprintf-tests: New file.
1032         * modules/unistdio/ulc-vasprintf-tests: New file.
1033         * modules/unistdio/ulc-vsnprintf-tests: New file.
1034         * modules/unistdio/ulc-vsprintf-tests: New file.
1035         * modules/unistdio/u8-asnprintf-tests: New file.
1036         * modules/unistdio/u8-vasnprintf-tests: New file.
1037         * modules/unistdio/u8-vasprintf-tests: New file.
1038         * modules/unistdio/u8-vsnprintf-tests: New file.
1039         * modules/unistdio/u8-vsprintf-tests: New file.
1040         * modules/unistdio/u16-asnprintf-tests: New file.
1041         * modules/unistdio/u16-vasnprintf-tests: New file.
1042         * modules/unistdio/u16-vasprintf-tests: New file.
1043         * modules/unistdio/u16-vsnprintf-tests: New file.
1044         * modules/unistdio/u16-vsprintf-tests: New file.
1045         * modules/unistdio/u32-asnprintf-tests: New file.
1046         * modules/unistdio/u32-vasnprintf-tests: New file.
1047         * modules/unistdio/u32-vasprintf-tests: New file.
1048         * modules/unistdio/u32-vsnprintf-tests: New file.
1049         * modules/unistdio/u32-vsprintf-tests: New file.
1050         * MODULES.html.sh (Unicode string functions): Add the new modules.
1051
1052 2007-07-01  Bruno Haible  <bruno@clisp.org>
1053
1054         * lib/sprintf.c (sprintf): Limit the available length estimation,
1055         to avoid address wraparound.
1056         * lib/vsprintf.c (vsprintf): Likewise.
1057         * modules/sprintf-posix (Dependencies): Add stdint.
1058         * modules/vsprintf-posix (Dependencies): Likewise.
1059
1060 2007-07-01  Bruno Haible  <bruno@clisp.org>
1061
1062         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
1063         Windows PATH as well. Conservative double-quoting. Comments.
1064
1065 2007-07-01  Bruno Haible  <bruno@clisp.org>
1066             Eric Blake  <ebb9@byu.net>
1067             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1068
1069         * gnulib-tool (self_abspathname): Fix algorithm to cope with
1070         empty components in $PATH, denoting '.'.
1071
1072 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1073
1074         * gnulib-tool: Fix indentation.
1075         (func_create_megatestdir): Likewise.
1076         Report by Bruno Haible.
1077
1078 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1079
1080         Sync from Automake.
1081         * build-aux/gnupload: Fix shell portability issues with for loops.
1082         Report by Karl Berry.
1083
1084 2007-06-29  Simon Josefsson  <simon@josefsson.org>
1085
1086         * build-aux/maint.mk (POURL): Use translationproject.org.
1087
1088 2007-06-27  Simon Josefsson  <simon@josefsson.org>
1089             Bruno Haible  <bruno@clisp.org>
1090
1091         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
1092         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
1093         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
1094         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
1095         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
1096
1097 2007-06-27  Bruno Haible  <bruno@clisp.org>
1098
1099         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
1100         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
1101
1102 2007-06-26  Karl Berry  <karl@gnu.org>
1103
1104         * MODULES.html.sh: remove xreadlink-with-size.
1105
1106 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1107
1108         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
1109         method that I hope also handles the double-include problem noted
1110         by Bruno Haible in
1111         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
1112
1113 2007-06-23  Bruno Haible  <bruno@clisp.org>
1114
1115         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1116         Don't let the 'mostlyclean' target fail if the last subdirectory could
1117         not be removed.
1118         Reported by Karl Berry.
1119
1120 2007-06-23  Bruno Haible  <bruno@clisp.org>
1121
1122         * gnulib-tool (echo): Add a speedier workaround for ksh.
1123         * tests/test-echo.sh: Likewise.
1124
1125 2007-06-23  Bruno Haible  <bruno@clisp.org>
1126
1127         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
1128         * tests/test-echo.sh: Likewise.
1129
1130 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1131
1132         * gnulib-tool (IFS): Initialize early, so we don't set it to
1133         empty later.
1134         (self_abspathname): Rewrite algorithm to set it, reindent.
1135         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
1136         (func_create_megatestdir): Merge some sed scripts.
1137
1138 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1139
1140         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
1141         exposed by Sun Studio 11 cc on Solaris 8.
1142
1143 2007-06-22  Bruno Haible  <bruno@clisp.org>
1144
1145         * gnulib-tool (echo): Ensure the echo primitive does not interpret
1146         backslashes.
1147         * tests/test-echo.sh: New file.
1148
1149 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1150
1151         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
1152         simplify `sed_replace_build_aux' scripts, they are portable but
1153         echoing them with `echo' is not.
1154         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
1155
1156 2007-06-21  Karl Berry  <karl@gnu.org>
1157
1158         * config/srclist.txt: guess we can't handle the licenses via
1159         srclist at the moment.
1160
1161 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
1162
1163         * MODULES.html.sh: Add include_next.
1164         * modules/include_next: New file.
1165
1166 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
1167
1168         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
1169         INCLUDE_NEXT.
1170         (gl_CHECK_NEXT_HEADERS): New macro.
1171         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
1172         the obsolescent gl_ABSOLUTE_HEADER.
1173         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
1174         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
1175         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
1176         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
1177         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
1178         * m4/math_h.m4 (gl_MATH_H): Likewise.
1179         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
1180         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
1181         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
1182         * m4/stdint.m4 (gl_STDINT_H): Likewise.
1183         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
1184         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
1185         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
1186         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
1187         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
1188         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
1189         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
1190         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
1191         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
1192         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
1193         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
1194         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1195         * m4/inttypes.m4 (gl_INTTYPES_H): Define
1196         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
1197         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
1198         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
1199         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
1200         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
1201         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
1202         * lib/float_.h: Likewise.
1203         * lib/inttypes_.h: Likewise.
1204         * lib/math_.h: Likewise.
1205         * lib/search_.h: Likewise.
1206         * lib/signal_.h: Likewise.
1207         * lib/stdint_.h: Likewise.
1208         * lib/stdio_.h: Likewise.
1209         * lib/stdlib_.h: Likewise.
1210         * lib/string_.h: Likewise.
1211         * lib/sys_stat_.h: Likewise.
1212         * lib/sys_time_.h: Likewise.
1213         * lib/time_.h: Likewise.
1214         * lib/unistd_.h: Likewise.
1215         * lib/wchar_.h: Likewise.
1216         * lib/wctype_.h: Likewise.
1217         * lib/dirent_.h: Likewise.
1218         * lib/iconv_.h: Likewise.
1219         * lib/locale_.h: Likewise.
1220         * lib/netinet_in_.h: Likewise.
1221         * lib/sys_select_.h: Likewise.
1222         * lib/sys_socket_.h: Likewise.
1223         * lib/sysexits_.h: Likewise.
1224         * modules/fcntl (Depends-on): Depend on include_next, not
1225         absolute_header.
1226         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
1227         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
1228         * modules/fchdir: Likewise.
1229         * modules/float: Likewise.
1230         * modules/iconv_open: Likewise.
1231         * modules/inttypes: Likewise.
1232         * modules/locale: Likewise.
1233         * modules/math: Likewise.
1234         * modules/netinet_in: Likewise.
1235         * modules/search: Likewise.
1236         * modules/signal: Likewise.
1237         * modules/stdint: Likewise.
1238         * modules/stdio: Likewise.
1239         * modules/stdlib: Likewise.
1240         * modules/string: Likewise.
1241         * modules/sys_select: Likewise.
1242         * modules/sys_socket: Likewise.
1243         * modules/sys_stat: Likewise.
1244         * modules/sys_time: Likewise.
1245         * modules/sysexits: Likewise.
1246         * modules/time: Likewise.
1247         * modules/unistd: Likewise.
1248         * modules/wchar: Likewise.
1249         * modules/wctype: Likewise.
1250         * modules/sys_stat: Change maintainer to "all".
1251         * modules/unistd: Likewise.
1252
1253 2007-06-20  Karl Berry  <karl@gnu.org>
1254
1255         * config/srclist.txt: track www changes in license files.
1256
1257 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
1258
1259         * build-aux/bootstrap: Remove stray dot.
1260         Make sure build_aux settings are honored when linking
1261         gnulib_extra_files.
1262
1263 2007-06-19  Eric Blake  <ebb9@byu.net>
1264
1265         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1266         Allow compilation on cygwin.
1267
1268 2007-06-19  Jim Meyering  <jim@meyering.net>
1269
1270         xreadlink-with-size: Remove module.  No longer used.
1271         Ex-callers now use xreadlink or mreadlink-with-size.
1272         * modules/xreadlink-with-size: Remove module.
1273         * lib/xreadlink-with-size.c: Remove file.
1274         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
1275         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
1276         just before the function definition *is* accurate.
1277
1278         Eliminate one way canonicalize_filename_mode could exit.
1279         * lib/canonicalize.c (canonicalize_filename_mode):
1280         Use mreadlink_with_size, not xreadlink_with_size.
1281
1282 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
1283
1284         Detect porting problems to FreeBSD/arm, which has time_t wider than
1285         long int.  Original problem reported for GNU diff by Xin Li in
1286         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
1287         * modules/getdate (Depends-on): Add intprops, verify.
1288         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
1289         is an integer type no wider than long int.
1290
1291 2007-06-18  Jim Meyering  <jim@meyering.net>
1292
1293         New module: mreadlink-with-size.
1294         * MODULES.html.sh: Add mreadlink-with-size.
1295         * modules/mreadlink-with-size: New module
1296         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
1297         not xreadlink-with-size.
1298         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
1299
1300 2007-06-16  Bruno Haible  <bruno@clisp.org>
1301
1302         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
1303         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
1304         Reported by Gary V. Vaughan <gary@gnu.org>.
1305
1306 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
1307
1308         Revamp lchown so that it lives in unistd.h where it belongs.
1309         * lib/lchown.h: Remove.
1310         * lib/dirchownmod.c: Don't include lib/lchown.h.
1311         * lib/fchownat.c: Likewise.
1312         * lib/openat.c: Likewise.
1313         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
1314         does not follow symlinks.
1315         (EOPNOTSUPP): Define if not defined.
1316         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
1317         is defined to 0.
1318         (lchown): New decl.
1319         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
1320         Do not check for lchown decl.
1321         Set REPLACE_LCHOWN.
1322         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
1323         REPLACE_LCHOWN.
1324         * modules/chown: Make it clear it follows symlinks.
1325         * modules/lchown: Make it clear it doesn't follow symlinks.
1326         (Files): Remove lib/lchown.h
1327         (Depends-on): Add unistd.
1328         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
1329         (Include): Include <unistd.h>, not "lchown.h".
1330         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
1331         REPLACE_LCHOWN.
1332
1333 2007-06-15  Jim Meyering  <jim@meyering.net>
1334
1335         Change license (GPL to LGPL) of fsusage and dependents.
1336         * modules/fsusage (License): Change to LGPL.
1337         * modules/full-read (License): Likewise.
1338         * modules/full-write (License): Likewise.
1339         * modules/safe-read (License): Likewise.
1340         * modules/safe-write (License): Likewise.
1341
1342 2007-06-14  Ben Pfaff  <blp@gnu.org>
1343
1344         Missing part of allocsa -> malloca transition.
1345         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
1346         gl_MALLOCA.
1347
1348 2007-06-12  Bruno Haible  <bruno@clisp.org>
1349
1350         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
1351         to ia64, x86_64, i386.
1352         Reported by Eric Blake.
1353
1354 2007-06-12  Bruno Haible  <bruno@clisp.org>
1355
1356         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
1357         cross-compiling to x86_64.
1358
1359 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
1360
1361         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
1362         glitch reported by Ralf Wildenhues in
1363         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
1364
1365         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
1366         Vin Shelton.
1367
1368 2007-06-11  Bruno Haible  <bruno@clisp.org>
1369
1370         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
1371         replacement string.
1372         Reported by Eric Blake.
1373
1374 2007-06-10  Bruno Haible  <bruno@clisp.org>
1375
1376         Prepare vasnprintf code for use with Unicode strings.
1377         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
1378         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
1379         TYPE_U32_STRING.
1380         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
1381         a_u32_string variants.
1382         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1383         * lib/printf-args.c: Don't include config.h and the specification
1384         header if PRINTF_FETCHARGS is already defined.
1385         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1386         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
1387         TYPE_U16_STRING, TYPE_U32_STRING.
1388         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
1389         u16_directive, u16_directives, u32_directive, u32_directives): New
1390         types.
1391         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
1392         New declarations.
1393         * lib/printf-parse.c: Don't include config.h and the specification
1394         header if PRINTF_PARSE is already defined. Eliminate the set of
1395         parameters for WIDE_CHAR_VERSION; the user of this file must provide
1396         them now. Include c-ctype.h.
1397         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
1398         directive and CHAR_T_ONLY_ASCII.
1399         * lib/vasnprintf.c: Don't include config.h and the specification header
1400         if VASNPRINTF is already defined.
1401         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
1402         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
1403         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
1404         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
1405         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
1406         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
1407         code accordingly.
1408         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
1409         pad_ourselves also in this case, with the 'c' and 's' directives, and
1410         with a different notion of "width".
1411         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
1412
1413 2007-06-10  Bruno Haible  <bruno@clisp.org>
1414
1415         * modules/unistr/u32-mbsnlen: New file.
1416         * lib/unistr/u32-mbsnlen.c: New file.
1417
1418         * modules/unistr/u16-mbsnlen: New file.
1419         * lib/unistr/u16-mbsnlen.c: New file.
1420
1421         * modules/unistr/u8-mbsnlen: New file.
1422         * lib/unistr/u8-mbsnlen.c: New file.
1423
1424         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
1425         declarations.
1426
1427 2007-06-10  Bruno Haible  <bruno@clisp.org>
1428
1429         * lib/string_.h (mbsnlen): New declaration.
1430         * lib/mbsnlen.c: New file.
1431         * m4/mbsnlen.m4: New file.
1432         * modules/mbsnlen: New file.
1433         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
1434         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
1435         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
1436
1437 2007-06-10  Bruno Haible  <bruno@clisp.org>
1438
1439         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
1440
1441 2007-06-10  Bruno Haible  <bruno@clisp.org>
1442
1443         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
1444         * lib/mbuiter.h: Likewise.
1445
1446 2007-06-10  Bruno Haible  <bruno@clisp.org>
1447
1448         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
1449         declaration.
1450
1451 2007-06-10  Karl Berry  <karl@gnu.org>
1452
1453         * config/srclist.txt: remove gettext entries, Bruno prefers
1454         to update individually.
1455
1456 2007-06-10  Bruno Haible  <bruno@clisp.org>
1457
1458         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
1459         'maxlen'. Ensure only length + width bytes are allocated, not
1460         length + 1 + width.
1461
1462 2007-06-09  Bruno Haible  <bruno@clisp.org>
1463
1464         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
1465         (CHAR_T): Remove macro.
1466         (VASNPRINTF): Update.
1467
1468 2007-06-09  Bruno Haible  <bruno@clisp.org>
1469
1470         * MODULES.html.sh (Unicode string functions): Add the new modules.
1471
1472         * modules/uniconv/u32-conv-to-enc: New file.
1473         * lib/uniconv/u32-conv-to-enc.c: New file.
1474         * modules/uniconv/u32-conv-to-enc-tests: New file.
1475         * tests/uniconv/test-u32-conv-to-enc.c: New file.
1476
1477         * modules/uniconv/u16-conv-to-enc: New file.
1478         * lib/uniconv/u16-conv-to-enc.c: New file.
1479         * lib/uniconv/u-conv-to-enc.h: New file.
1480         * modules/uniconv/u16-conv-to-enc-tests: New file.
1481         * tests/uniconv/test-u16-conv-to-enc.c: New file.
1482
1483         * modules/uniconv/u8-conv-to-enc: New file.
1484         * lib/uniconv/u8-conv-to-enc.c: New file.
1485         * modules/uniconv/u8-conv-to-enc-tests: New file.
1486         * tests/uniconv/test-u8-conv-to-enc.c: New file.
1487
1488         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
1489         u32_conv_to_encoding): New declarations.
1490
1491 2007-06-09  Bruno Haible  <bruno@clisp.org>
1492
1493         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
1494
1495 2007-06-09  Bruno Haible  <bruno@clisp.org>
1496
1497         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
1498         * modules/malloca: Renamed from modules/allocsa, updated.
1499         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
1500         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
1501         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
1502         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
1503         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
1504         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
1505         * modules/xmalloca: Renamed from modules/xallocsa, updated.
1506         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
1507         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
1508         * modules/c-strcasestr (Depends-on): Update.
1509         * lib/c-strcasestr.c: Update.
1510         * modules/c-strstr (Depends-on): Update.
1511         * lib/c-strstr.c: Update.
1512         * modules/canonicalize-lgpl (Depends-on): Update.
1513         * lib/canonicalize-lgpl.c: Update.
1514         * modules/clean-temp (Depends-on): Update.
1515         * lib/clean-temp.c: Update.
1516         * modules/csharpcomp (Depends-on): Update.
1517         * lib/csharpcomp.c: Update.
1518         * modules/csharpexec (Depends-on): Update.
1519         * lib/csharpexec.c: Update.
1520         * modules/javacomp (Depends-on): Update.
1521         * lib/javacomp.c: Update.
1522         * modules/javaexec (Depends-on): Update.
1523         * lib/javaexec.c: Update.
1524         * modules/mbscasestr (Depends-on): Update.
1525         * lib/mbscasestr.c: Update.
1526         * modules/mbsstr (Depends-on): Update.
1527         * lib/mbsstr.c: Update.
1528         * modules/setenv (Depends-on): Update.
1529         * lib/setenv.c: Update.
1530         * modules/strcasestr (Depends-on): Update.
1531         * lib/strcasestr.c: Update.
1532         * modules/striconveha (Depends-on): Update.
1533         * lib/striconveha.c: Update.
1534         * modules/relocatable-prog-wrapper (Files): Update.
1535         * lib/relocwrapper.c: Update.
1536         * build-aux/install-reloc: Update.
1537         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
1538
1539 2007-06-08  Bruno Haible  <bruno@clisp.org>
1540
1541         Port to uClibc.
1542         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
1543         * lib/fpurge.c (fpurge): Likewise.
1544         * lib/freading.c (freading): Likewise.
1545         * lib/fseeko.c (rpl_fseeko): Likewise.
1546         * lib/fseterr.c (fseterr): Likewise.
1547         * lib/fwriting.c (fwriting): Likewise.
1548         * tests/test-fflush.c (main): Avoid a failure on uClibc.
1549
1550 2007-06-08  Bruno Haible  <bruno@clisp.org>
1551
1552         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
1553         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
1554         * modules/gettext (Files): Add m4/intlmacosx.m4.
1555
1556 2007-06-07  Bruno Haible  <bruno@clisp.org>
1557
1558         * modules/localename-tests: New file.
1559         * tests/test-localename.c: New file.
1560
1561         New module 'localename'.
1562         * lib/localename.h: New file.
1563         * lib/localename.c: New file, from GNU gettext.
1564         * m4/localename.m4: New file.
1565         * modules/localename: New file.
1566
1567 2007-06-07  Bruno Haible  <bruno@clisp.org>
1568
1569         Work around the lack of <wchar.h> on some builds of uClibc.
1570         * doc/headers/wchar.texi: Update.
1571         * lib/wchar_.h: Include <wchar.h> only if it exists.
1572         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
1573         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
1574         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
1575         doesn't exist.
1576         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
1577         * modules/mbfile (Depends-on): Add wchar.
1578         * modules/mbiter (Depends-on): Likewise.
1579         * modules/mbuiter (Depends-on): Likewise.
1580         Reported by Simon Josefsson.
1581
1582 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
1583
1584         Work around problem reported by Steven M. Schweda in
1585         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
1586         Tru64 5.1B with the Compaq compiler environment installed declares
1587         an 'isblank' function but does not define it in the C library.
1588         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
1589         * lib/regex_internal.h (isblank): Likewise.
1590         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
1591         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1592
1593 2007-06-05  Bruno Haible  <bruno@clisp.org>
1594
1595         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
1596         ia64.
1597         * modules/printf-safe: New file.
1598         * modules/fprintf-posix (Depends-on): Add printf-safe.
1599         * modules/printf-posix (Depends-on): Likewise.
1600         * modules/snprintf-posix (Depends-on): Likewise.
1601         * modules/sprintf-posix (Depends-on): Likewise.
1602         * modules/vasnprintf-posix (Depends-on): Likewise.
1603         * modules/vasprintf-posix (Depends-on): Likewise.
1604         * modules/vfprintf-posix (Depends-on): Likewise.
1605         * modules/vprintf-posix (Depends-on): Likewise.
1606         * modules/vsnprintf-posix (Depends-on): Likewise.
1607         * modules/vsprintf-posix (Depends-on): Likewise.
1608         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
1609         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
1610         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
1611         "no" on i386, x86_64, ia64.
1612         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
1613         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1614         on i386, x86_64, ia64.
1615         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
1616         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1617         on i386, x86_64, ia64.
1618         * tests/test-vasnprintf-posix.c: Include float.h.
1619         (LDBL80_WORDS): New macro.
1620         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1621         on i386, x86_64, ia64.
1622         * tests/test-vasprintf-posix.c: Include float.h.
1623         (LDBL80_WORDS): New macro.
1624         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1625         on i386, x86_64, ia64.
1626         * tests/test-snprintf-posix.c: Include float.h.
1627         * tests/test-sprintf-posix.c: Likewise.
1628         * tests/test-vsnprintf-posix.c: Likewise.
1629         * tests/test-vsprintf-posix.c: Likewise.
1630
1631 2007-06-05  Bruno Haible  <bruno@clisp.org>
1632
1633         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
1634         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
1635         non-IEEE numbers on i386, x86_64, ia64.
1636         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
1637         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
1638         * tests/test-isnanl.h: Include float.h.
1639         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
1640
1641 2007-06-05  Bruno Haible  <bruno@clisp.org>
1642
1643         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
1644         also the %a / %A. Handle the %a / %A code before this extra handling.
1645
1646 2007-06-05  Bruno Haible  <bruno@clisp.org>
1647
1648         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
1649         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
1650
1651 2007-06-05  Bruno Haible  <bruno@clisp.org>
1652
1653         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
1654         typo in variable name.
1655
1656 2007-06-05  Eric Blake  <ebb9@byu.net>
1657
1658         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
1659         Reported by Simon Josefsson.
1660
1661 2007-06-04  Bruno Haible  <bruno@clisp.org>
1662
1663         Avoid test failures on some PowerPC platforms.
1664         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
1665         Define differently for PowerPC.
1666         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
1667         Reported by Gary V. Vaughan <gary@gnu.org>.
1668
1669 2007-06-02  Bruno Haible  <bruno@clisp.org>
1670
1671         Fix test-stdint failure on FreeBSD/ia64.
1672         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
1673         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
1674         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
1675         * doc/headers/stdint.texi: Update.
1676
1677 2007-06-01  Bruno Haible  <bruno@clisp.org>
1678
1679         * tests/test-binary-io.c (main): Pass a third argument to open().
1680         Reported by Gary V. Vaughan <gary@gnu.org>.
1681
1682 2007-06-01  Bruno Haible  <bruno@clisp.org>
1683
1684         * doc/functions/frexpl.texi: Update for mingw.
1685
1686 2007-06-01  Bruno Haible  <bruno@clisp.org>
1687
1688         * tests/test-lseek.c (main): Disable test of errno for invalid third
1689         argument.
1690         * doc/functions/lseek.texi: Update.
1691         Reported by Gary V. Vaughan <gary@gnu.org>.
1692
1693 2007-05-28  Bruno Haible  <bruno@clisp.org>
1694
1695         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
1696
1697 2007-05-31  Eric Blake  <ebb9@byu.net>
1698
1699         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
1700         cross compiling.
1701
1702 2007-05-30  Eric Blake  <ebb9@byu.net>
1703         and Bruno Haible  <bruno@clisp.org>
1704
1705         Work around mingw test failures exposed by m4-1.4.9b.
1706         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
1707         * tests/test-unistd.c: Disable uid_t and git_t tests for the
1708         moment.
1709
1710 2007-05-30  Bruno Haible  <bruno@clisp.org>
1711
1712         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
1713         assuming that they are closed. Needed on HP-UX 11.
1714
1715 2007-05-29  Bruno Haible  <bruno@clisp.org>
1716
1717         Fix a problem with #include_next.
1718         * lib/dirent_.h: Split the double-inclusion guard.
1719         * lib/fcntl_.h: Likewise.
1720         * lib/float_.h: Likewise.
1721         * lib/iconv_.h: Likewise.
1722         * lib/inttypes_.h: Likewise.
1723         * lib/locale_.h: Likewise.
1724         * lib/math_.h: Likewise.
1725         * lib/netinet_in_.h: Likewise.
1726         * lib/search_.h: Likewise.
1727         * lib/signal_.h: Likewise.
1728         * lib/stdint_.h: Likewise.
1729         * lib/stdio_.h: Likewise.
1730         * lib/stdlib_.h: Likewise.
1731         * lib/string_.h: Likewise.
1732         * lib/sys_select_.h: Likewise.
1733         * lib/sys_socket_.h: Likewise.
1734         * lib/sys_stat_.h: Likewise.
1735         * lib/sys_time_.h: Likewise.
1736         * lib/sysexits_.h: Likewise.
1737         * lib/time_.h: Likewise.
1738         * lib/unistd_.h: Likewise.
1739         * lib/wchar_.h: Likewise.
1740         * lib/wctype_.h: Likewise.
1741
1742 2007-05-29  Bruno Haible  <bruno@clisp.org>
1743
1744         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
1745         for the moment.
1746
1747 2007-05-29  Bruno Haible  <bruno@clisp.org>
1748
1749         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
1750         invocation.
1751         Reported by Eric Blake.
1752
1753 2007-05-29  Bruno Haible  <bruno@clisp.org>
1754
1755         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
1756         compiling case.
1757
1758 2007-05-29  Eric Blake  <ebb9@byu.net>
1759             Bruno Haible  <bruno@clisp.org>
1760
1761         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
1762         cross compiles.
1763
1764 2007-05-28  Eric Blake  <ebb9@byu.net>
1765
1766         * modules/closein-tests (test_closein_LDADD): Support test on
1767         cygwin with libtool.
1768
1769 2007-05-28  Bruno Haible  <bruno@clisp.org>
1770
1771         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
1772         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
1773         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
1774         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
1775         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
1776         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
1777         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
1778         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
1779         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
1780
1781 2007-05-28  Eric Blake  <ebb9@byu.net>
1782
1783         Unconditionally include <config.h> in unit tests.
1784         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
1785         * tests/test-allocsa.c, tests/test-arcfour.c,
1786         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
1787         tests/test-array_list.c, tests/test-array_oset.c,
1788         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
1789         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
1790         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
1791         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
1792         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
1793         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
1794         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
1795         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
1796         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
1797         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
1798         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
1799         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
1800         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
1801         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
1802         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
1803         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
1804         test-md5.c, test-memmem.c, test-printf-posix.c,
1805         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
1806         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
1807         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
1808         test-strcasestr.c, test-striconv.c, test-striconveh.c,
1809         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
1810         test-vasnprintf-posix2.c, test-vasnprintf.c,
1811         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
1812         test-vfprintf-posix.c, test-vprintf-posix.c,
1813         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
1814         test-xvasprintf.c: Likewise.
1815
1816 2007-05-28  Bruno Haible  <bruno@clisp.org>
1817
1818         * gnulib-tool (func_import): Remember the --with-tests command-line
1819         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
1820         Reported by Eric Blake.
1821
1822 2007-05-28  Bruno Haible  <bruno@clisp.org>
1823
1824         * modules/ftell-tests: New file.
1825         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
1826         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
1827
1828         * lib/ftell.c: New file.
1829         * modules/ftell: New file.
1830         * m4/ftell.m4: New file.
1831         * doc/functions/ftell.texi: Update.
1832         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
1833         REPLACE_FTELL.
1834         * lib/stdio_.h (rpl_ftell): New declaration.
1835         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
1836         REPLACE_FTELL.
1837
1838 2007-05-28  Eric Blake  <ebb9@byu.net>
1839
1840         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
1841
1842 2007-05-28  Bruno Haible  <bruno@clisp.org>
1843
1844         * modules/fseek-tests: New file.
1845         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
1846         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
1847
1848         * lib/fseek.c: New file.
1849         * modules/fseek: New file.
1850         * m4/fseek.m4: New file.
1851         * doc/functions/fseek.texi: Update.
1852         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
1853         REPLACE_FSEEK.
1854         * lib/stdio_.h (rpl_fseek): New declaration.
1855         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
1856         REPLACE_FSEEK.
1857
1858 2007-05-28  Bruno Haible  <bruno@clisp.org>
1859
1860         * lib/stdio_.h (fflush): More comments.
1861
1862 2007-05-28  Bruno Haible  <bruno@clisp.org>
1863
1864         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
1865         runtime test.
1866
1867 2007-05-28  Eric Blake  <ebb9@byu.net>
1868
1869         Improve lseek module.
1870         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
1871         * lib/unistd_.h (lseek): Scale back link warning message.
1872         * tests/test-lseek.c: Beef up test.
1873         * tests/test-lseek.sh: Exercise more facets of lseek.
1874         Reported by Bruno Haible.
1875
1876 2007-05-28  Bruno Haible  <bruno@clisp.org>
1877
1878         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
1879         to define.
1880
1881 2007-05-27  Bruno Haible  <bruno@clisp.org>
1882
1883         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
1884
1885 2007-05-27  Bruno Haible  <bruno@clisp.org>
1886
1887         * modules/openmp: New file.
1888         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
1889         Noah Misch.
1890
1891 2007-05-26  Bruno Haible  <bruno@clisp.org>
1892
1893         * modules/chdir-long (Depends-on): Add fchdir.
1894         * modules/chdir-safer (Depends-on): Likewise.
1895         * modules/fts (Depends-on): Likewise.
1896         * modules/fts-lgpl (Depends-on): Likewise.
1897         * modules/openat (Depends-on): Likewise.
1898         * modules/savewd (Depends-on): Likewise.
1899
1900 2007-05-24  Eric Blake  <ebb9@byu.net>
1901
1902         Fix lseek on mingw.
1903         * modules/lseek: New module.
1904         * m4/lseek.m4: New file.
1905         * lib/lseek.c: New file.
1906         * modules/lseek-tests: New file.
1907         * tests/test-lseek.c: New file.
1908         * tests/test-lseek.sh: New file.
1909         * MODULES.html.sh: Document lseek module.
1910         * modules/fflush (Depends-on): Add lseek, fseeko.
1911         * modules/fseeko (Depends-on): Likewise.
1912         * modules/ftello (Depends-on): Likewise.
1913         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
1914         broken.
1915         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
1916         broken.
1917         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
1918         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
1919         * lib/ftello.c (rpl_ftello): Likewise.
1920         * tests/test-fseeko.c (main): Test this.
1921         * tests/test-fseeko.sh: Likewise.
1922         * tests/test-ftello.c (main): Likewise.
1923         * tests/test-ftello.sh: Likewise.
1924         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
1925         implies replacing fseek.
1926         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
1927         HAVE_FTELLO.
1928         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
1929         * modules/unistd (Makefile.am): Likewise.
1930         * lib/unistd_.h (lseek): Declare a replacement.
1931         * doc/functions/lseek.texi (lseek): Document this fix.
1932         * doc/functions/fseek.texi (fseek): Likewise.
1933         * doc/functions/ftell.texi (ftell): Likewise.
1934
1935 2007-05-24  Bruno Haible  <bruno@clisp.org>
1936
1937         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
1938         in the printed representation of a NaN.
1939         * tests/test-vasprintf-posix.c (test_function): Likewise.
1940         * tests/test-snprintf-posix.h (test_function): Likewise.
1941         * tests/test-sprintf-posix.h (test_function): Likewise.
1942         Reported by Eric Blake.
1943
1944 2007-05-23  Eric Blake  <ebb9@byu.net>
1945
1946         Fix fseeko/ftello on cygwin 1.5.24.
1947         * doc/functions/fseeko.texi (fseeko): Document the fix.
1948         * doc/functions/ftello.texi (ftello): Document the fix.
1949         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
1950         * doc/functions/stdout.text (stdout): New file.
1951         * doc/functions/stderr.text (stderr): New file.
1952         * doc/gnulib.texi (Function Substitutes): Use new files.
1953         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
1954         prior to 1.7.0.
1955         * tests/test-ftello.c (main): Likewise for ftello.
1956         * tests/test-fseeko.sh: New file.
1957         * tests/test-ftello.sh: New file.
1958         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
1959         with seekable stdin.
1960         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
1961         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
1962         (gl_REPLACE_FSEEKO): New macro.
1963         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
1964         * modules/fseeko (Files): Distribute fseeko.c.
1965         * modules/ftello (Files): Distribute ftello.c.
1966         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
1967         mode.
1968         * lib/ftello.c (rpl_ftello): New file.
1969         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
1970         fseeko, ftello.
1971         (gl_STDIN_LARGE_OFFSET): New macro.
1972         * modules/stdio (Makefile.am): Perform the replacement.
1973         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
1974
1975 2007-05-23  Bruno Haible  <bruno@clisp.org>
1976
1977         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
1978         GNULIB_POSIXCHECK is defined.
1979
1980 2007-05-21  Bruno Haible  <bruno@clisp.org>
1981
1982         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
1983         Check also the output for NaN arguments. When cross-compiling, guess
1984         no on IRIX.
1985         * lib/vasnprintf.c: Update comments.
1986         * tests/test-vasnprintf-posix.c (strisnan): New function.
1987         (test_function): Use it.
1988         * tests/test-vasprintf-posix.c (strisnan): New function.
1989         (test_function): Use it.
1990         * tests/test-snprintf-posix.h (strisnan): New function.
1991         (test_function): Use it.
1992         * tests/test-sprintf-posix.h (strisnan): New function.
1993         (test_function): Use it.
1994         Reported by Eric Blake.
1995
1996 2007-05-20  Bruno Haible  <bruno@clisp.org>
1997
1998         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
1999         numbers that fails on BeOS.
2000         * doc/functions/frexpl.texi: Update.
2001
2002 2007-05-20  Jim Meyering  <jim@meyering.net>
2003
2004         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
2005         forced upon us by glibc-2.6.
2006
2007 2007-05-20  Bruno Haible  <bruno@clisp.org>
2008
2009         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
2010         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
2011         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
2012         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
2013         NEED_PRINTF_INFINITE.
2014         (is_infinitel): New function.
2015         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
2016         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
2017         gl_PREREQ_VASNPRINTF_INFINITE.
2018         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
2019         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2020         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
2021         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
2022         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
2023         gl_PREREQ_VASNPRINTF_INFINITE.
2024         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2025         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2026         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2027         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2028         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2029         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2030         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2031         * doc/functions/fprintf.texi: Update.
2032         * doc/functions/printf.texi: Update.
2033         * doc/functions/snprintf.texi: Update.
2034         * doc/functions/sprintf.texi: Update.
2035         * doc/functions/vfprintf.texi: Update.
2036         * doc/functions/vprintf.texi: Update.
2037         * doc/functions/vsnprintf.texi: Update.
2038         * doc/functions/vsprintf.texi: Update.
2039
2040 2007-05-20  Bruno Haible  <bruno@clisp.org>
2041
2042         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
2043         was not found in libc.
2044         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
2045
2046 2007-05-20  Bruno Haible  <bruno@clisp.org>
2047
2048         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2049         printed as "-nan" instead of "nan".
2050         * tests/test-vasprintf-posix.c (test_function): Likewise.
2051         * tests/test-snprintf-posix.h (test_function): Likewise.
2052         * tests/test-sprintf-posix.h (test_function): Likewise.
2053         Needed for HP-UX 11.
2054
2055 2007-05-20  Jim Meyering  <jim@meyering.net>
2056
2057         Fix buggy test for the fchownat-deref bug.
2058         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
2059         symlink required for the run-test.  Without it, this test would
2060         always declare that fchownat doesn't work, and client code would
2061         unnecessarily use the replacement function with fixed libc.
2062         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
2063         Reported by Greg Schafer.
2064
2065 2007-05-19  Bruno Haible  <bruno@clisp.org>
2066
2067         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
2068         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
2069         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
2070         Needed for IRIX 6.5 and Solaris 2.5.1.
2071
2072 2007-05-19  Bruno Haible  <bruno@clisp.org>
2073
2074         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
2075         (test_function): Skip tests involving -0.0 on platforms where
2076         -0.0 = 0.0.
2077         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
2078         (test_function): Skip tests involving -0.0 on platforms where
2079         -0.0 = 0.0.
2080         * tests/test-snprintf-posix.h (have_minus_zero): New function.
2081         (test_function): Skip tests involving -0.0 on platforms where
2082         -0.0 = 0.0.
2083         * tests/test-sprintf-posix.h (have_minus_zero): New function.
2084         (test_function): Skip tests involving -0.0 on platforms where
2085         -0.0 = 0.0.
2086         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
2087         tests.
2088         * tests/test-printf-posix.h (test_function): Likewise.
2089         * tests/test-printf-posix.output: Remove all -0.0 related results.
2090         Needed for IRIX 6.5.
2091
2092 2007-05-19  Bruno Haible  <bruno@clisp.org>
2093
2094         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2095         printed as "nan0x7fffffff" instead of "nan".
2096         * tests/test-vasprintf-posix.c (test_function): Likewise.
2097         * tests/test-snprintf-posix.h (test_function): Likewise.
2098         * tests/test-sprintf-posix.h (test_function): Likewise.
2099         * tests/test-fprintf-posix.h (NaN): Remove macro.
2100         (test_function): Remove all NaN related tests.
2101         * tests/test-printf-posix.h (NaN): Remove macro.
2102         (test_function): Remove all NaN related tests.
2103         * tests/test-printf-posix.output: Remove all NaN related results.
2104         Needed for IRIX 6.5.
2105
2106 2007-05-19  Bruno Haible  <bruno@clisp.org>
2107
2108         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
2109         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
2110
2111 2007-05-19  Bruno Haible  <bruno@clisp.org>
2112
2113         * lib/float_.h: New file.
2114         * m4/float_h.m4: New file.
2115         * modules/float: New file.
2116         * modules/isnanl (Dependencies): Add float.
2117         * modules/isnanl-nolibm (Dependencies): Likewise.
2118         * modules/mathl (Dependencies): Likewise.
2119         * modules/printf-frexpl (Dependencies): Likewise.
2120         * modules/signbit (Dependencies): Likewise.
2121         * modules/vasnprintf (Dependencies): Likewise.
2122         * doc/headers/float.texi: Update.
2123
2124 2007-05-19  Jim Meyering  <jim@meyering.net>
2125
2126         * lib/utimens.c (gl_futimens): Rename from futimens,
2127         now that glibc-2.6 declares futimens.
2128         * lib/utimens.h: Likewise.
2129
2130 2007-05-19  Bruno Haible  <bruno@clisp.org>
2131
2132         Avoid test failures on mingw.
2133         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
2134         * tests/test-printf-posix.sh: Likewise.
2135         * tests/test-vfprintf-posix.sh: Likewise.
2136         * tests/test-vprintf-posix.sh: Likewise.
2137
2138 2007-05-19  Bruno Haible  <bruno@clisp.org>
2139
2140         Fix *printf result for NaN, Inf, -0.0 on mingw.
2141         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
2142         * lib/vasnprintf.c: Include math.h and isnan.h.
2143         (is_infinite_or_zero): New function.
2144         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
2145         values in the %f, %F, %e, %E, %g, %G directives.
2146         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
2147         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2148         gl_PRINTF_INFINITE and test its result. Invoke
2149         gl_PREREQ_VASNPRINTF_INFINITE.
2150         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2151         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2152         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2153         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2154         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2155         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2156         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2157         * doc/functions/fprintf.texi: Update.
2158         * doc/functions/printf.texi: Update.
2159         * doc/functions/snprintf.texi: Update.
2160         * doc/functions/sprintf.texi: Update.
2161         * doc/functions/vfprintf.texi: Update.
2162         * doc/functions/vprintf.texi: Update.
2163         * doc/functions/vsnprintf.texi: Update.
2164         * doc/functions/vsprintf.texi: Update.
2165
2166 2007-05-19  Bruno Haible  <bruno@clisp.org>
2167
2168         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
2169         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
2170         Instead of multiplying with 10^k, set extra_zeroes to k.
2171         (scale10_round_long_double): Remove function.
2172
2173 2007-05-18  Bruno Haible  <bruno@clisp.org>
2174
2175         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
2176         introduced on 2007-05-06.
2177
2178 2007-05-18  Bruno Haible  <bruno@clisp.org>
2179
2180         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
2181         %g directives.
2182         * tests/test-vasprintf-posix.c (test_function): Likewise.
2183         * tests/test-snprintf-posix.h (test_function): Likewise.
2184         * tests/test-sprintf-posix.h (test_function): Likewise.
2185
2186 2007-05-18  Bruno Haible  <bruno@clisp.org>
2187
2188         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
2189         (strmatch): New function.
2190         (test_function): Test the %f directive on numbers of various exponents.
2191         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
2192         (strmatch): New function.
2193         (test_function): Test the %f directive on numbers of various exponents.
2194         * tests/test-snprintf-posix.h (strmatch): New function.
2195         (test_function): Test the %f directive on numbers of various exponents.
2196         * tests/test-sprintf-posix.h (strmatch): New function.
2197         (test_function): Test the %f directive on numbers of various exponents.
2198         * tests/test-snprintf-posix.c (SIZEOF): New macro.
2199         * tests/test-sprintf-posix.c (SIZEOF): New macro.
2200         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
2201         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
2202
2203 2007-05-18  Bruno Haible  <bruno@clisp.org>
2204
2205         Add support for 'long double' number output.
2206         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
2207         * lib/vasnprintf.c: Include math.h and float+.h.
2208         (mp_limb_t): New type.
2209         (GMP_LIMB_BITS): New macro.
2210         (mp_twolimb_t): New type.
2211         (GMP_TWOLIMB_BITS): New macro.
2212         (mpn_t): New type.
2213         (multiply, divide, convert_to_decimal, decode_long_double,
2214         scale10_round_long_double, scale10_round_decimal_long_double,
2215         floorlog10l): New functions.
2216         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
2217         for the %f, %F, %e, %E, %g, %G directives.
2218         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
2219         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2220         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
2221         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
2222         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2223         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2224         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2225         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2226         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2227         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2228         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2229         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
2230         * modules/snprintf-posix (Depends-on): Likewise.
2231         * modules/sprintf-posix (Depends-on): Likewise.
2232         * modules/vasnprintf-posix (Depends-on): Likewise.
2233         * modules/vasprintf-posix (Depends-on): Likewise.
2234         * modules/vfprintf-posix (Depends-on): Likewise.
2235         * modules/vsnprintf-posix (Depends-on): Likewise.
2236         * modules/vsprintf-posix (Depends-on): Likewise.
2237         * modules/vasnprintf (Files): Add lib/float+.h.
2238         * doc/functions/fprintf.texi: Update.
2239         * doc/functions/printf.texi: Update.
2240         * doc/functions/snprintf.texi: Update.
2241         * doc/functions/sprintf.texi: Update.
2242         * doc/functions/vfprintf.texi: Update.
2243         * doc/functions/vprintf.texi: Update.
2244         * doc/functions/vsnprintf.texi: Update.
2245         * doc/functions/vsprintf.texi: Update.
2246
2247 2007-05-18  Bruno Haible  <bruno@clisp.org>
2248
2249         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
2250
2251 2007-05-18  Bruno Haible  <bruno@clisp.org>
2252
2253         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
2254         for printing 64-bit integers. Needed for mingw.
2255
2256 2007-05-18  Bruno Haible  <bruno@clisp.org>
2257
2258         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
2259         gl_FUNC_FREXPL_WORKS.
2260         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
2261
2262 2007-05-18  Bruno Haible  <bruno@clisp.org>
2263
2264         * modules/frexpl-nolibm-tests: New file.
2265
2266         * modules/frexpl-nolibm: New file.
2267         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
2268
2269 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
2270
2271         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
2272         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2273         GCC 4.2, which otherwise issues a lot of warnings.
2274         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
2275         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
2276         Likewise.
2277         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
2278         * modules/iconv_open (iconv.h): Likewise.
2279         * modules/locale (locale.h): Likewise.
2280         * modules/netinet_in (netinet/in.h): Likewise.
2281         * modules/sys_select (sys_select.h): Likewise.
2282         * modules/sys_socket (sys/socket.h): Likewise.
2283         * modules/sys_stat (sys/stat.h): Likewise.
2284         * modules/sysexits (sysexits.h): Likewise.
2285         * modules/unistd (unistd.h): Likewise.
2286
2287 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2288
2289         * modules/closein-tests (Makefile.am): Distribute
2290         `test-closein.sh'.
2291
2292 2007-05-17  Bruno Haible  <bruno@clisp.org>
2293
2294         * tests/test-printf-posix.output: Renamed from
2295         tests/test-fprintf-posix.out.
2296         * modules/fprintf-posix-tests: Update.
2297         * modules/printf-posix-tests: Update.
2298         * modules/vfprintf-posix-tests: Update.
2299         * modules/vprintf-posix-tests: Update.
2300         * tests/test-fprintf-posix.sh: Update.
2301         * tests/test-printf-posix.sh: Update.
2302         * tests/test-vfprintf-posix.sh: Update.
2303         * tests/test-vprintf-posix.sh: Update.
2304         Reported by Ralf Wildenhues.
2305
2306 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
2307
2308         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
2309         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2310         GCC 4.2, which otherwise issues a lot of warnings.
2311         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
2312         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
2313         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
2314         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
2315         it should no longer be needed.
2316         * lib/string_.h: Likewise.
2317         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
2318         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
2319         * modules/inttypes (inttypes.h): Likewise.
2320         * modules/math (math.h): Likewise.
2321         * modules/search (search.h): Likewise.
2322         * modules/signal (signal.h): Likewise.
2323         * modules/stdint (stdint.h): Likewise.
2324         * modules/stdio (stdio.h): Likewise.
2325         * modules/stdlib (stdlib.h): Likewise.
2326         * modules/string (string.h): Likewise.
2327         * modules/sys_time (sys/time.h): Likewise.
2328         * modules/time (time.h): Likewise.
2329         * modules/wchar (wchar.h): Likewise.
2330         * modules/wctype (wtype.h): Likewise.
2331
2332 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
2333
2334         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
2335
2336 2007-05-13  Bruno Haible  <bruno@clisp.org>
2337
2338         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
2339         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
2340         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
2341         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
2342         (gl_PREREQ_STRTOK_R): Don't require it here.
2343
2344 2007-05-13  Bruno Haible  <bruno@clisp.org>
2345
2346         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
2347         when used in C++ mode.
2348
2349 2007-05-12  Bruno Haible  <bruno@clisp.org>
2350
2351         * lib/linebuffer.h: Tweak doc.
2352         * lib/linebuffer.c: Likewise.
2353
2354 2007-05-12  James Youngman  <jay@gnu.org>
2355
2356         * lib/linebuffer.c (readlinebuffer_delim): New function,
2357         like readlinebuffer, but use a caller-specified delimiter.
2358         (readlinebuffer): Just call readlinebuffer_delim with '\n'
2359         as the delimiter.
2360         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
2361
2362 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2363
2364         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
2365         * modules/openat (Files): Remove openat-die.c.
2366         (Depends-on): Add openat-die.
2367         * modules/openat-die: New module.
2368
2369 2007-05-06  Bruno Haible  <bruno@clisp.org>
2370
2371         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
2372         Update with info about Cygwin.
2373         * doc/functions/fprintf.texi: Update.
2374         * doc/functions/printf.texi: Update.
2375         * doc/functions/snprintf.texi: Update.
2376         * doc/functions/sprintf.texi: Update.
2377         * doc/functions/vfprintf.texi: Update.
2378         * doc/functions/vprintf.texi: Update.
2379         * doc/functions/vsnprintf.texi: Update.
2380         * doc/functions/vsprintf.texi: Update.
2381         Reported by Eric Blake.
2382
2383 2007-05-06  Bruno Haible  <bruno@clisp.org>
2384
2385         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
2386         padding ourselves for the floating-point directives.
2387         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
2388         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
2389         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2390         gl_PRINTF_FLAG_ZERO and test its result. Invoke
2391         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
2392         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2393         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2394         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2395         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2396         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2397         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2398         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2399         * tests/test-snprintf-posix.h (test_function): Also check the width
2400         and some flags in the %f directive.
2401         * tests/test-sprintf-posix.h (test_function): Likewise.
2402         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2403         * tests/test-vasprintf-posix.c (test_function): Likewise.
2404         * doc/functions/fprintf.texi: Update.
2405         * doc/functions/printf.texi: Update.
2406         * doc/functions/snprintf.texi: Update.
2407         * doc/functions/sprintf.texi: Update.
2408         * doc/functions/vfprintf.texi: Update.
2409         * doc/functions/vprintf.texi: Update.
2410         * doc/functions/vsnprintf.texi: Update.
2411         * doc/functions/vsprintf.texi: Update.
2412
2413 2007-05-06  Bruno Haible  <bruno@clisp.org>
2414
2415         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
2416         pass the ' flag character to sprintf or snprintf.
2417         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
2418         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
2419         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2420         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
2421         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
2422         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2423         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2424         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2425         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2426         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2427         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2428         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2429         * tests/test-snprintf-posix.h (test_function): Also check the grouping
2430         flag.
2431         * tests/test-sprintf-posix.h (test_function): Likewise.
2432         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2433         * tests/test-vasprintf-posix.c (test_function): Likewise.
2434         * doc/functions/fprintf.texi: Update.
2435         * doc/functions/printf.texi: Update.
2436         * doc/functions/snprintf.texi: Update.
2437         * doc/functions/sprintf.texi: Update.
2438         * doc/functions/vfprintf.texi: Update.
2439         * doc/functions/vprintf.texi: Update.
2440         * doc/functions/vsnprintf.texi: Update.
2441         * doc/functions/vsprintf.texi: Update.
2442
2443 2007-05-01  Bruno Haible  <bruno@clisp.org>
2444
2445         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
2446
2447 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
2448
2449         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
2450         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
2451
2452 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
2453
2454         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
2455         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
2456         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
2457
2458 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2459
2460         * lib/argp-help.c (struct hol_entry): New member `ord'.
2461         (HOL_ENTRY_PTRCMP): Use ord for comparison
2462         (hol_sort): Initialize ord.
2463
2464 2007-05-01  Bruno Haible  <bruno@clisp.org>
2465
2466         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
2467         Reported by Eric Blake.
2468         * doc/gnulib.texi (Function Substitutes): Update.
2469
2470 2007-05-01  Bruno Haible  <bruno@clisp.org>
2471
2472         * doc/functions.texi: Remove file, now redundant through
2473         doc/functions/*.texi.
2474
2475 2007-05-01  Bruno Haible  <bruno@clisp.org>
2476
2477         * modules/argp (Depends-on): Add sleep.
2478
2479 2007-05-01  Bruno Haible  <bruno@clisp.org>
2480
2481         * modules/sleep-tests: New file.
2482         * tests/test-sleep.c: New file.
2483
2484         * modules/sleep: New file.
2485         * lib/sleep.c: New file.
2486         * m4/sleep.m4: New file.
2487         * lib/unistd_.h (sleep): New declaration.
2488         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
2489         HAVE_SLEEP.
2490         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
2491         * doc/functions/sleep.texi: Document the sleep module.
2492
2493 2007-05-01  Bruno Haible  <bruno@clisp.org>
2494
2495         * lib/sigprocmask.h: Remove file.
2496         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
2497         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
2498         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
2499         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
2500         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
2501         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
2502         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
2503         HAVE_SIGSET_T as a shell variable.
2504         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
2505         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
2506         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
2507         (Depends-on): Add signal. Remove verify.
2508         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
2509         (Include): Mention <signal.h> instead of sigprocmask.h.
2510         * NEWS: Mention the change.
2511         * lib/fatal-signal.c: Don't include sigprocmask.h.
2512
2513 2007-05-01  Bruno Haible  <bruno@clisp.org>
2514
2515         * modules/signal: New file.
2516         * lib/signal_.h: New file.
2517         * m4/signal_h.m4: New file.
2518
2519 2007-05-01  Bruno Haible  <bruno@clisp.org>
2520
2521         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
2522         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
2523         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
2524         HAVE_WCTYPE_CTMP_BUG into wctype.h.
2525
2526 2007-05-01  Bruno Haible  <bruno@clisp.org>
2527
2528         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
2529         configure time.
2530         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
2531         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
2532         * modules/sys_stat (Makefile.am): Substitute their values into
2533         sys/stat.h.
2534
2535 2007-05-01  Bruno Haible  <bruno@clisp.org>
2536
2537         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
2538         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
2539         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
2540
2541 2007-05-01  Bruno Haible  <bruno@clisp.org>
2542
2543         * doc/header/assert.texi: Undo last change: don't mention the gnulib
2544         'assert' module here.
2545
2546 2007-05-01  Bruno Haible  <bruno@clisp.org>
2547
2548         * doc/functions/*.texi: New files.
2549         * doc/functions/google-ranking.txt: New file.
2550         * doc/gnulib.texi (Function Substitutes): New chapter.
2551         (ctime, inet_ntoa): Remove sections.
2552         * doc/ctime.texi: Remove file.
2553         * doc/inet_ntoa.texi: Remove file.
2554         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
2555         dependencies.
2556         (%.info): New rule, specifying a --reference-limit.
2557
2558 2007-05-01  Bruno Haible  <bruno@clisp.org>
2559
2560         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
2561
2562 2007-05-01  Bruno Haible  <bruno@clisp.org>
2563
2564         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
2565         the portability of 'mkdir' to mingw systems.
2566
2567 2007-05-01  Bruno Haible  <bruno@clisp.org>
2568
2569         * doc/headers/google-ranking.txt: New file.
2570
2571 2007-04-30  Eric Blake  <ebb9@byu.net>
2572
2573         Prefer fseeko to fseek.
2574         * modules/getpass (Depends-on): Add fseeko.
2575         * lib/getpass.c (getpass): Use fseeko, not fseek.
2576
2577 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
2578
2579         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
2580         assumes the sorting is stable, while most qsort implementations
2581         are not.  Use argument addresses to ensure they never compare as
2582         equal.
2583
2584         * tests/test-argp-2.sh (usage-indent test): Fix output
2585         (func_compare): Restore diff options
2586         * tests/test-argp.c: Restore #include "progname.h"
2587
2588 2007-04-29  Bruno Haible  <bruno@clisp.org>
2589
2590         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
2591         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2592         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
2593         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2594         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
2595         (configure.ac): Define CHECK_SNPRINTF_POSIX.
2596         (TESTS, check_PROGRAMS): Add test-snprintf.
2597         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
2598         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
2599         (TESTS, check_PROGRAMS): Add test-vsnprintf.
2600         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
2601         assertions that fail on HP-UX, OSF/1, or IRIX.
2602         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
2603
2604 2007-04-29  Bruno Haible  <bruno@clisp.org>
2605
2606         * MODULES.html.sh (posix_functions): Remove 'contents'.
2607
2608 2007-04-29  Karl Berry  <karl@gnu.org>
2609
2610         * config/srclist.txt (gendocs_template_min): new entry.
2611
2612 2007-04-29  Bruno Haible  <bruno@clisp.org>
2613
2614         Work around fpurge bug on BSD systems.
2615         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
2616         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
2617         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
2618         fpurge to rpl_fpurge if the system already has this function.
2619         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
2620         the case where the system already has this function. Correct invariants
2621         on BSD systems.
2622         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
2623         BSD systems.
2624
2625 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
2626
2627         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
2628         proposed by Sven Verdoolaege.
2629
2630         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
2631         options.
2632         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
2633         (usage and help tests): Update
2634
2635 2007-04-29  Bruno Haible  <bruno@clisp.org>
2636
2637         * tests/test-fflush.c (main): Use a file of size 17, not 10.
2638         Print more information in case of failure. Disable a test on BeOS.
2639
2640 2007-04-29  Bruno Haible  <bruno@clisp.org>
2641
2642         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
2643         This helps debugging on systems on which no gdb is available.
2644
2645 2007-04-29  Bruno Haible  <bruno@clisp.org>
2646
2647         * lib/freading.h: Improve comments.
2648         * lib/fwriting.h: Likewise.
2649         * tests/test-freading.c (main): Don't check freading immediately after
2650         repositioning. Needed for glibc.
2651
2652 2007-04-29  Bruno Haible  <bruno@clisp.org>
2653
2654         * lib/freading.c (freading): Trivial simplification.
2655
2656 2007-04-28  Bruno Haible  <bruno@clisp.org>
2657
2658         * tests/test-fwriting.c (main): Also test the interaction between
2659         fflush and fwriting.
2660         * modules/fwriting-tests (Depends-on): Add fflush.
2661
2662         * tests/test-freading.c (main): Also test the interaction between
2663         fflush and freading.
2664         * modules/freading-tests (Depends-on): Add fflush.
2665
2666 2007-04-28  Bruno Haible  <bruno@clisp.org>
2667
2668         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
2669         fseeko and ftello.
2670         Suggested by Eric Blake.
2671
2672 2007-04-28  Jim Meyering  <jim@meyering.net>
2673
2674         Avoid false-negative in gl_STDINT_H's C99 conformance test.
2675         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
2676         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
2677
2678 2007-04-27  Eric Blake  <ebb9@byu.net>
2679
2680         * doc/headers/assert.texi (assert.h): Document assert module use.
2681
2682 2007-04-27  Bruno Haible  <bruno@clisp.org>
2683
2684         * doc/headers/*.texi: New files.
2685         * doc/gnulib.texi (Header File Substitutes): New chapter.
2686         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
2687         dependencies.
2688         (standards.info ,standards.html, standards.dvi): Update dependencies.
2689         (mostlyclean, clean): New targets.
2690
2691 2007-04-27  Bruno Haible  <bruno@clisp.org>
2692
2693         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
2694         * modules/sysexits (Files, Makefile.am): Update.
2695
2696         * lib/sys_socket_.h: Renamed from lib/socket_.h.
2697         * modules/sys_socket (Files, Makefile.am): Update.
2698
2699         * lib/sys_stat_.h: Renamed from lib/stat_.h.
2700         * modules/sys_stat (Files, Makefile.am): Update.
2701
2702 2007-04-27  Eric Blake  <ebb9@byu.net>
2703
2704         * lib/freading.h: Improve comments.
2705         * lib/fwriting.h: Likewise.
2706         * lib/fflush.c: Likewise.
2707
2708         Fix closein for mingw.
2709         * modules/closein-tests: Add tests for closein.
2710         * tests/test-closein.c: New file.
2711         * tests/test-closein.sh: Likewise.
2712         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
2713         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
2714
2715 2007-04-27  Bruno Haible  <bruno@clisp.org>
2716
2717         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
2718         version is < 6.
2719         * lib/math_.h [__DECC]: Likewise.
2720         * lib/stdio_.h [__DECC]: Likewise.
2721         * lib/stdlib_.h [__DECC]: Likewise.
2722         * lib/string_.h [__DECC]: Likewise.
2723         * lib/time_.h [__DECC]: Likewise.
2724         * lib/wchar_.h [__DECC]: Likewise.
2725         * lib/wctype_.h [__DECC]: Likewise.
2726
2727 2007-04-27  Bruno Haible  <bruno@clisp.org>
2728
2729         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
2730
2731 2007-04-27  Bruno Haible  <bruno@clisp.org>
2732
2733         * lib/fflush.c: Add comments.
2734         * modules/fpurge-tests (Depends-on): Add fflush.
2735         * modules/freadable-tests (Depends-on): Likewise.
2736         * modules/fwritable-tests (Depends-on): Likewise.
2737
2738 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
2739
2740         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
2741         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
2742         Report by Bruno Haible <bruno@clisp.org>.
2743
2744 2007-04-26  Eric Blake  <ebb9@byu.net>
2745
2746         Fix fflush on mingw.
2747         * modules/fflush (Depends-on): Add freading.
2748         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
2749         but unread data.
2750
2751 2007-04-26  Eric Blake  <ebb9@byu.net>
2752         and Bruno Haible  <bruno@clisp.org>
2753
2754         Implement freading and fwriting.
2755         * lib/freading.c: New file.
2756         * lib/freading.h: Likewise.
2757         * m4/freading.m4: Likewise.
2758         * modules/freading: Likewise.
2759         * modules/freading-tests: Likewise.
2760         * tests/test-freading.c: Likewise.
2761         * lib/fwriting.c: New file.
2762         * lib/fwriting.h: Likewise.
2763         * m4/fwriting.m4: Likewise.
2764         * modules/fwriting: Likewise.
2765         * modules/fwriting-tests: Likewise.
2766         * tests/test-fwriting.c: Likewise.
2767         * MODULES.html.sh (File stream based Input/Output): Mention them.
2768
2769 2007-04-26  Bruno Haible  <bruno@clisp.org>
2770
2771         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
2772         'long' when we assume it.
2773         Suggested by Eric Blake.
2774
2775 2007-04-26  Bruno Haible  <bruno@clisp.org>
2776
2777         Ensure fseeko, ftello are declared on glibc systems.
2778         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
2779         * modules/fseeko (configure.ac-early): Likewise.
2780         * modules/ftello (configure.ac-early): Likewise.
2781         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
2782         AC_FUNC_FSEEKO for this.
2783         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
2784         (gl_CHECK_FSEEKO): Remove macro.
2785
2786 2007-04-26  Bruno Haible  <bruno@clisp.org>
2787
2788         * tests/test-fflush.c (main): Also check the ftell result after
2789         fflush and fseek/fseeko.
2790         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
2791         file descriptor position cache in the stream.
2792         * lib/fseeko.c (rpl_fseeko): Likewise.
2793
2794 2007-04-26  Bruno Haible  <bruno@clisp.org>
2795
2796         * modules/fflush-tests (Depends-on): Add fseeko.
2797
2798 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
2799             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2800
2801         * lib/argz_.h: ensure error_t definition is obtained in same
2802         mechanism system argz.h would have.
2803         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
2804         argz facilities are known bad.  Err on the side of caution if
2805         cross-compiling.
2806
2807 2007-04-25  Eric Blake  <ebb9@byu.net>
2808
2809         * lib/fpurge.c (includes): Use stdlib.h for free.
2810         * tests/test-fflush.c (main): Also test fflush-fseeko.
2811
2812 2007-04-25  Bruno Haible  <bruno@clisp.org>
2813
2814         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
2815         * lib/fseeko.c: New file.
2816         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
2817         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
2818         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
2819         gl_FUNC_FSEEKO.
2820         (gl_FUNC_FSEEKO): Invoke it.
2821         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
2822         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
2823         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
2824
2825 2007-04-25  Bruno Haible  <bruno@clisp.org>
2826
2827         * modules/fflush (Depends-on): Add ftello.
2828
2829 2007-04-25  Bruno Haible  <bruno@clisp.org>
2830
2831         * modules/ftello-tests: New file.
2832         * tests/test-ftello.c: New file.
2833
2834         * modules/ftello: New file.
2835         * m4/ftello.m4: New file.
2836         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
2837         HAVE_FTELLO.
2838         * lib/stdio_.h (ftello): New declaration.
2839         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
2840         HAVE_FTELLO.
2841
2842 2007-04-25  Bruno Haible  <bruno@clisp.org>
2843
2844         * modules/fseeko-tests: New file.
2845         * tests/test-fseeko.c: New file.
2846
2847         * modules/fseeko: New file.
2848         * m4/fseeko.m4: New file.
2849         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
2850         HAVE_FSEEKO.
2851         * lib/stdio_.h (fseeko): New declaration.
2852         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
2853         HAVE_FSEEKO.
2854
2855 2007-04-25  Bruno Haible  <bruno@clisp.org>
2856
2857         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
2858
2859 2007-04-25  Bruno Haible  <bruno@clisp.org>
2860
2861         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
2862         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
2863         * tests/test-unistd.c: Likewise.
2864         * tests/test-fcntl.c: Likewise.
2865
2866 2007-04-23  Eric Blake  <ebb9@byu.net>
2867
2868         * lib/fflush.c: Fix missing include.
2869         Reported by Bruno Haible.
2870
2871 2007-04-23  Bruno Haible  <bruno@clisp.org>
2872
2873         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
2874         Reported by Eric Blake.
2875
2876 2007-04-23  Bruno Haible  <bruno@clisp.org>
2877
2878         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
2879
2880 2007-04-23  Bruno Haible  <bruno@clisp.org>
2881
2882         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
2883
2884 2007-04-23  Bruno Haible  <bruno@clisp.org>
2885
2886         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
2887         Needed on HP-UX 11.
2888
2889 2007-04-16  Eric Blake  <ebb9@byu.net>
2890
2891         Make fflush rely on fpurge.
2892         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
2893         open coding all variants.
2894         * modules/fflush (Depends-on): Add fpurge and unistd.
2895         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
2896         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
2897
2898         Fix --with-tests compilation on cygwin.
2899         * modules/argmatch-tests (Makefile.am): List gnulib library first
2900         in LDADD.
2901         * modules/argp-tests (Makefile.am): Likewise.
2902         * modules/array-list-tests (Makefile.am): Likewise.
2903         * modules/array-oset-tests (Makefile.am): Likewise.
2904         * modules/avltree-list-tests (Makefile.am): Likewise.
2905         * modules/avltree-oset-tests (Makefile.am): Likewise.
2906         * modules/avltreehash-list-tests (Makefile.am): Likewise.
2907         * modules/carray-list-tests (Makefile.am): Likewise.
2908         * modules/dirname-tests (Makefile.am): Likewise.
2909         * modules/frexp-tests (Makefile.am): Likewise.
2910         * modules/isnanl-tests (Makefile.am): Likewise.
2911         * modules/linked-list-tests (Makefile.am): Likewise.
2912         * modules/linkedhash-list-tests (Makefile.am): Likewise.
2913         * modules/lock-tests (Makefile.am): Likewise.
2914         * modules/rbtree-list-tests (Makefile.am): Likewise.
2915         * modules/rbtree-oset-tests (Makefile.am): Likewise.
2916         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
2917         * modules/tls-tests (Makefile.am): Likewise.
2918         * modules/tsearch-tests (Makefile.am): Likewise.
2919         * modules/xvasprintf-tests (Makefile.am): Likewise.
2920
2921         Fix fpurge for cygwin.
2922         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
2923         value.
2924         * modules/fpurge-tests (Depends-on): Clean up trash.
2925
2926 2007-04-16  Simon Josefsson  <simon@josefsson.org>
2927
2928         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
2929
2930         * m4/autobuild.m4: Re-indent.
2931
2932 2007-04-13  Bruno Haible  <bruno@clisp.org>
2933
2934         * modules/fpurge-tests: New file.
2935         * tests/test-fpurge.c: New file.
2936
2937         * modules/fpurge: New file.
2938         * lib/fpurge.h: New file.
2939         * lib/fpurge.c: New file.
2940         * m4/fpurge.m4: New file.
2941
2942 2007-04-13  Bruno Haible  <bruno@clisp.org>
2943
2944         * modules/fbufmode-tests: New file.
2945         * tests/test-fbufmode.c: New file.
2946
2947         * modules/fbufmode: New file.
2948         * lib/fbufmode.h: New file.
2949         * lib/fbufmode.c: New file.
2950         * m4/fbufmode.m4: New file.
2951
2952 2007-04-13  Bruno Haible  <bruno@clisp.org>
2953
2954         * modules/fwritable-tests: New file.
2955         * tests/test-fwritable.c: New file.
2956
2957         * modules/fwritable: New file.
2958         * lib/fwritable.h: New file.
2959         * lib/fwritable.c: New file.
2960         * m4/fwritable.m4: New file.
2961
2962 2007-04-13  Bruno Haible  <bruno@clisp.org>
2963
2964         * modules/freadable-tests: New file.
2965         * tests/test-freadable.c: New file.
2966
2967         * modules/freadable: New file.
2968         * lib/freadable.h: New file.
2969         * lib/freadable.c: New file.
2970         * m4/freadable.m4: New file.
2971
2972 2007-04-13  Bruno Haible  <bruno@clisp.org>
2973
2974         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
2975         MOSTLYCLEANFILES.
2976
2977 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
2978
2979         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
2980         gzip bootstrap.conf to avoid dragging in i18n machinery.
2981         (gnulib_tool_option): Use it.
2982
2983 2007-04-13  Bruno Haible  <bruno@clisp.org>
2984
2985         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
2986         %F directives.
2987         * tests/test-vasprintf-posix.c (test_function): Likewise.
2988         * tests/test-snprintf-posix.h (test_function): Likewise.
2989         * tests/test-sprintf-posix.h (test_function): Likewise.
2990         * tests/test-fprintf-posix.h (test_function): Likewise.
2991         * tests/test-printf-posix.h (test_function): Likewise.
2992         * tests/test-fprintf-posix.out: Likewise.
2993
2994 2007-04-13  Bruno Haible  <bruno@clisp.org>
2995
2996         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
2997         * modules/tls-tests (configure.ac): Likewise.
2998         Reported by Arto C. Nirkko <anirkko@insel.ch>.
2999
3000 2007-04-13  Bruno Haible  <bruno@clisp.org>
3001
3002         * lib/tls.c (glthread_tls_get): Fix return type.
3003         Patch by Arto C. Nirkko <anirkko@insel.ch>.
3004
3005 2007-04-12  Eric Blake  <ebb9@byu.net>
3006
3007         * modules/gettime (Depends-on): Remove gettime.
3008         Reported by Dmitry V. Levin.
3009
3010 2007-04-12  Bruno Haible  <bruno@clisp.org>
3011
3012         * modules/fflush (Include): Mention <stdio.h>.
3013         * modules/strtoimax (Include): Mention <inttypes.h>.
3014         * modules/strtoumax (Include): Likewise.
3015
3016 2007-04-12  Eric Blake  <ebb9@byu.net>
3017
3018         * .cvsignore: New file.
3019         * .gitignore: Likewise.
3020
3021 2007-04-12  Bruno Haible  <bruno@clisp.org>
3022
3023         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
3024         not before, since $(LDADD) often contains libgnu.a.
3025         * modules/striconv-tests (test_striconv_LDADD): Likewise.
3026         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
3027         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
3028         Needed on Cygwin.
3029
3030 2007-04-12  Eric Blake  <ebb9@byu.net>
3031
3032         Work around glibc's failure to flush stdin on fclose.
3033         * lib/closein.c (close_stdin): Flush stdin before closing.
3034
3035         Work around glibc's failure to reset seekable stdin on exit.
3036         * modules/closein: New module.
3037         * lib/closein.c: New file.
3038         * lib/closein.h: Likewise.
3039         * m4/closein.m4: Likewise.
3040         * MODULES.html.sh (File stream based Input/Output): Document it.
3041
3042 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3043
3044         * gnulib-tool: Rename generated 'autobuild' script to
3045         'do-autobuild' in --create-megatestdir output.
3046
3047         * doc/gnulib.texi (Build robot for gnulib): Fix.
3048
3049 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3050
3051         * modules/sysexits (Depends-on): Add absolute-header.
3052
3053 2007-04-12  Eric Blake  <ebb9@byu.net>
3054
3055         No need to preserve errno on success.
3056         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
3057         Reported by Bruno Haible.
3058
3059 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3060
3061         * MODULES.html.sh (Support for maintaining and releasing
3062         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
3063
3064 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3065
3066         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
3067
3068 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3069
3070         * modules/autobuild: New module.
3071
3072         * m4/autobuild.m4: New file.
3073
3074 2007-04-11  Bruno Haible  <bruno@clisp.org>
3075
3076         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
3077         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
3078         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
3079         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
3080         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_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/snprintf-posix.m4 (gl_FUNC_SNPRINTF_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/sprintf-posix.m4 (gl_FUNC_SPRINTF_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/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_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/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_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         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
3096         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3097         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3098         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
3099         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3100         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3101         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
3102         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3103         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3104         Reported by Eric Blake.
3105
3106 2007-04-11  Bruno Haible  <bruno@clisp.org>
3107
3108         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
3109
3110 2007-04-10  Bruno Haible  <bruno@clisp.org>
3111
3112         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
3113         for NaN and Infinity. Needed on FreeBSD 6.1.
3114         * tests/test-vasnprintf-posix.c (test_function): Undo last change
3115         regarding results for "%010a" of Infinity and NaN.
3116         * tests/test-vasprintf-posix.c (test_function): Likewise.
3117         * tests/test-snprintf-posix.h (test_function): Likewise.
3118         * tests/test-sprintf-posix.h (test_function): Likewise.
3119         * tests/test-fprintf-posix.h (test_function): Likewise.
3120         * tests/test-printf-posix.h (test_function): Likewise.
3121         * tests/test-fprintf-posix.out: Likewise.
3122
3123 2007-04-10  Bruno Haible  <bruno@clisp.org>
3124
3125         * modules/locale-tests: New file.
3126         * tests/test-locale.c: New file.
3127
3128         * modules/locale: New file.
3129         * lib/locale_.h: New file.
3130         * m4/locale_h.m4: New file.
3131
3132 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
3133             Bruno Haible  <bruno@clisp.org>
3134
3135         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
3136         be determined, test for availability of the copysignf, copysign,
3137         copysignl functions.
3138         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
3139         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
3140         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
3141
3142 2007-04-09  Eric Blake  <ebb9@byu.net>
3143
3144         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
3145         * modules/stdio (Makefile.am): Support fflush.
3146         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
3147         * modules/fflush: New file.
3148         * lib/fflush.c: Likewise.
3149         * m4/fflush.m4: Likewise.
3150         * modules/fflush-tests: New test.
3151         * tests/test-fflush.c: Likewise.
3152         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
3153
3154 2007-04-06  Bruno Haible  <bruno@clisp.org>
3155
3156         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
3157         (VASNPRINTF): Use signbit for faster determination whether to print a
3158         minus sign.
3159         * modules/vasnprintf (Files): Remove lib/float+.h.
3160         * modules/fprintf-posix (Depends-on): Add signbit.
3161         * modules/snprintf-posix (Depends-on): Likewise.
3162         * modules/sprintf-posix (Depends-on): Likewise.
3163         * modules/vasnprintf-posix (Depends-on): Likewise.
3164         * modules/vasprintf-posix (Depends-on): Likewise.
3165         * modules/vfprintf-posix (Depends-on): Likewise.
3166         * modules/vsnprintf-posix (Depends-on): Likewise.
3167         * modules/vsprintf-posix (Depends-on): Likewise.
3168
3169 2007-04-06  Bruno Haible  <bruno@clisp.org>
3170
3171         * tests/test-frexp.c (main): Test also the sign bit of zero results.
3172         * tests/test-frexpl.c (main): Likewise.
3173         * tests/test-ldexpl.c (main): Likewise.
3174         * modules/frexp-tests (Depends-on): Add signbit.
3175         * modules/frexpl-tests (Depdends-on): Likewise.
3176         * modules/ldexpl-tests (Depdends-on): Likewise.
3177
3178 2007-04-06  Bruno Haible  <bruno@clisp.org>
3179
3180         * modules/signbit-tests: New file.
3181         * tests/test-signbit.c: New file.
3182
3183         * modules/signbit: New file.
3184         * lib/signbitf.c: New file.
3185         * lib/signbitd.c: New file.
3186         * lib/signbitl.c: New file.
3187         * m4/signbit.m4: New file.
3188         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
3189         (signbit): New macro.
3190         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
3191         REPLACE_SIGNBIT.
3192         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
3193         REPLACE_FREXPL into math.h.
3194
3195 2007-04-06  Bruno Haible  <bruno@clisp.org>
3196
3197         * modules/isnanf-nolibm-tests: New file.
3198         * tests/test-isnanf.c: New file.
3199
3200         * modules/isnanf-nolibm: New file.
3201         * lib/isnanf.h: New file.
3202         * lib/isnanf.c: New file.
3203         * lib/isnan.c: Consider the USE_FLOAT macro.
3204         * m4/isnanf.m4: New file.
3205
3206 2007-04-06  Bruno Haible  <bruno@clisp.org>
3207
3208         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
3209         (Link): New section.
3210
3211         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
3212
3213 2007-04-06  Bruno Haible  <bruno@clisp.org>
3214
3215         Assume the 'long double' type.
3216         * m4/longdouble.m4: Remove file.
3217         * config/srclist.txt: Don't mention longdouble.m4.
3218         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
3219         * lib/float+.h: Likewise.
3220         * lib/frexp.c: Likewise.
3221         * lib/printf-args.h: Likewise.
3222         * lib/printf-args.c: Likewise.
3223         * lib/printf-frexp.c: Likewise.
3224         * lib/printf-parse.c: Likewise.
3225         * lib/vasnprintf.c: Likewise.
3226         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
3227         * m4/intl.m4: Likewise.
3228         * m4/isnanl.m4: Likewise.
3229         * m4/printf.m4: Likewise.
3230         * m4/printf-frexpl.m4: Likewise.
3231         * m4/vasnprintf.m4: Likewise.
3232         * modules/allocsa (Files): Remove m4/longdouble.m4.
3233         * modules/gettext (Files): Likewise.
3234         * modules/relocatable-prog-wrapper (Files): Likewise.
3235         * modules/vasnprintf (Files): Likewise.
3236         * modules/isnanl (Files): Likewise.
3237         (Include): Simplify.
3238         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
3239         (Include): Simplify.
3240         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
3241         (Include): Simplify.
3242         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
3243         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3244         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
3245         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3246         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3247         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3248         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
3249         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3250         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3251         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3252         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
3253         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3254         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
3255         * tests/test-isnanl.c: Likewise.
3256         * tests/test-snprintf-posix.h: Likewise.
3257         * tests/test-sprintf-posix.h: Likewise.
3258         * tests/test-vasnprintf-posix.c: Likewise.
3259         * tests/test-vasnprintf-posix2.c: Likewise.
3260         * tests/test-vasprintf-posix.c: Likewise.
3261
3262 2007-04-06  Bruno Haible  <bruno@clisp.org>
3263
3264         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
3265         * lib/math_.h [__DECC]: Include the overridden include file through
3266         #include_next, outside the double-inclusion guard.
3267         * lib/stdio_.h [__DECC]: Likewise.
3268         * lib/stdlib_.h [__DECC]: Likewise.
3269         * lib/string_.h [__DECC]: Likewise.
3270         * lib/time_.h [__DECC]: Likewise.
3271         * lib/wchar_.h [__DECC]: Likewise.
3272         * lib/wctype_.h [__DECC]: Likewise.
3273         * lib/inttypes_.h [__DECC]: Likewise.
3274         Reported by Albert Chin <china@thewrittenword.com> in
3275         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
3276
3277 2007-04-04  Eric Blake  <ebb9@byu.net>
3278
3279         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
3280         1.5.x.
3281
3282 2007-04-04  Bruno Haible  <bruno@clisp.org>
3283
3284         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
3285         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
3286
3287 2007-04-04  Bruno Haible  <bruno@clisp.org>
3288
3289         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
3290         results for "%010a" of Infinity and NaN.
3291         * tests/test-vasprintf-posix.c (test_function): Likewise.
3292         * tests/test-snprintf-posix.h (test_function): Likewise.
3293         * tests/test-sprintf-posix.h (test_function): Likewise.
3294         * tests/test-fprintf-posix.h (test_function): Remove these tests.
3295         * tests/test-printf-posix.h (test_function): Likewise.
3296         * tests/test-fprintf-posix.out: Update.
3297         Needed for FreeBSD 6.1.
3298
3299 2007-04-04  Bruno Haible  <bruno@clisp.org>
3300
3301         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
3302         directly used by the gnulib modules nor by gnulib-tool.
3303
3304 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
3305
3306         * DEPENDENCIES: Give overall description of version dependency
3307         desirability.  Use more-typical names for apps.
3308         Add shell, coreutils, diffutils, grep, tar, gzip.
3309
3310 2007-04-04  Simon Josefsson  <simon@josefsson.org>
3311
3312         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
3313
3314 2007-04-04  Karl Berry  <karl@gnu.org>
3315
3316         * MODULES.html.sh (func_module): missing '.
3317
3318 2007-04-03  Bruno Haible  <bruno@clisp.org>
3319
3320         * modules/argmatch-tests (Makefile.am): New variable
3321         test_argmatch_LDADD.
3322         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
3323         * modules/array-list-tests (Makefile.am): New variable
3324         test_array_list_LDADD.
3325         * modules/array-oset-tests (Makefile.am): New variable
3326         test_array_oset_LDADD.
3327         * modules/avltree-list-tests (Makefile.am): New variable
3328         test_avltree_list_LDADD.
3329         * modules/avltree-oset-tests (Makefile.am): New variable
3330         test_avltree_oset_LDADD.
3331         * modules/avltreehash-list-tests (Makefile.am): New variable
3332         test_avltreehash_list_LDADD.
3333         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
3334         test_canonicalize_lgpl_LDADD.
3335         * modules/carray-list-tests (Makefile.am): New variable
3336         test_carray_list_LDADD.
3337         * modules/dirname-tests (Makefile.am): New variable
3338         test_dirname_LDADD.
3339         * modules/linked-list-tests (Makefile.am): New variable
3340         test_linked_list_LDADD.
3341         * modules/linkedhash-list-tests (Makefile.am): New variable
3342         test_linkedhash_list_LDADD.
3343         * modules/rbtree-list-tests (Makefile.am): New variable
3344         test_rbtree_list_LDADD.
3345         * modules/rbtree-oset-tests (Makefile.am): New variable
3346         test_rbtree_oset_LDADD.
3347         * modules/rbtreehash-list-tests (Makefile.am): New variable
3348         test_rbtreehash_list_LDADD.
3349         * modules/xvasprintf-tests (Makefile.am): New variable
3350         test_xvasprintf_LDADD.
3351         Reported by Eric Blake.
3352
3353 2007-04-03  Eric Blake  <ebb9@byu.net>
3354
3355         * DEPENDENCIES: Weaken m4 requirements.
3356
3357 2007-04-03  Bruno Haible  <bruno@clisp.org>
3358
3359         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
3360         * modules/isnanl-tests (configure.ac): Likewise.
3361
3362 2007-04-03  Ben Pfaff  <blp@gnu.org>
3363
3364         * modules/iconv_open: Add $(srcdir)/ to source directory
3365         references in Makefile fragments that call gperf, to fix VPATH
3366         builds.
3367
3368 2007-04-03  Bruno Haible  <bruno@clisp.org>
3369
3370         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
3371         * lib/ldexpl.c: Undo last change.
3372
3373 2007-04-03  Bruno Haible  <bruno@clisp.org>
3374
3375         * modules/printf-frexpl (Depends-on): Undo last change.
3376         (Files): Add m4/ldexpl.m4.
3377
3378 2007-04-03  Bruno Haible  <bruno@clisp.org>
3379
3380         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
3381         * modules/isnanl (Link): New section.
3382
3383         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
3384         * modules/frexp (Link): New section.
3385
3386         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
3387         * modules/frexpl (Link): New section.
3388
3389         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
3390         * modules/ldexpl (Link): New section.
3391
3392 2007-04-03  Bruno Haible  <bruno@clisp.org>
3393
3394         * modules/TEMPLATE-EXTENDED: New file.
3395         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
3396
3397 2007-04-03  Bruno Haible  <bruno@clisp.org>
3398
3399         * DEPENDENCIES: New file.
3400         Suggested by Simon Josefsson.
3401
3402 2007-04-03  Bruno Haible  <bruno@clisp.org>
3403
3404         * doc/gnulib.texi: Escape @.
3405
3406 2007-04-03  James Youngman  <jay@gnu.org>
3407         and Paul Eggert  <eggert@cs.ucla.edu>
3408
3409         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
3410         birthtime on all systems that have birthtime, not just those which
3411         use st_birthtimensec rather than st_birthtim.  Putting zero in
3412         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
3413         that the birth time is not available for files on an NFS mount.
3414
3415 2007-04-03  Simon Josefsson  <simon@josefsson.org>
3416
3417         * modules/memxor: Move back from crypto/, suggested by Bruno.
3418         * modules/crypto/hmac-sha1: Fix memxor dependency.
3419
3420         * modules/crypto/gc: Moved from ../.
3421
3422 2007-04-02  Eric Blake  <ebb9@byu.net>
3423
3424         * lib/ldexpl.c (includes): Avoid libm.
3425
3426         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
3427
3428 2007-04-02  Bruno Haible  <bruno@clisp.org>
3429
3430         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
3431         on IRIX.
3432
3433 2007-04-02  Bruno Haible  <bruno@clisp.org>
3434
3435         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
3436         x86 or x86_64 platforms running MacOS X.
3437         Reported by Ryan Schmidt <@ryandesign.com>.
3438
3439 2007-04-02  Bruno Haible  <bruno@clisp.org>
3440
3441         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
3442         i386.
3443
3444 2007-04-01  Simon Josefsson  <simon@josefsson.org>
3445
3446         * modules/crypto/arcfour: Moved from ../.
3447         * modules/crypto/arcfour-tests: Moved from ../.
3448         * modules/crypto/arctwo: Moved from ../.
3449         * modules/crypto/arctwo-tests: Moved from ../.
3450         * modules/crypto/des: Moved from ../.
3451         * modules/crypto/des-tests: Moved from ../.
3452         * modules/crypto/gc-arcfour: Moved from ../.
3453         * modules/crypto/gc-arcfour-tests: Moved from ../.
3454         * modules/crypto/gc-arctwo: Moved from ../.
3455         * modules/crypto/gc-arctwo-tests: Moved from ../.
3456         * modules/crypto/gc-des: Moved from ../.
3457         * modules/crypto/gc-des-tests: Moved from ../.
3458         * modules/crypto/gc-hmac-md5: Moved from ../.
3459         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
3460         * modules/crypto/gc-hmac-sha1: Moved from ../.
3461         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
3462         * modules/crypto/gc-md2: Moved from ../.
3463         * modules/crypto/gc-md2-tests: Moved from ../.
3464         * modules/crypto/gc-md4: Moved from ../.
3465         * modules/crypto/gc-md4-tests: Moved from ../.
3466         * modules/crypto/gc-md5: Moved from ../.
3467         * modules/crypto/gc-md5-tests: Moved from ../.
3468         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
3469         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
3470         * modules/crypto/gc-random: Moved from ../.
3471         * modules/crypto/gc-rijndael: Moved from ../.
3472         * modules/crypto/gc-rijndael-tests: Moved from ../.
3473         * modules/crypto/gc-sha1: Moved from ../.
3474         * modules/crypto/gc-sha1-tests: Moved from ../.
3475         * modules/crypto/gc-tests: Moved from ../.
3476         * modules/crypto/hmac-md5: Moved from ../.
3477         * modules/crypto/hmac-md5-tests: Moved from ../.
3478         * modules/crypto/hmac-sha1: Moved from ../.
3479         * modules/crypto/hmac-sha1-tests: Moved from ../.
3480         * modules/crypto/md2: Moved from ../.
3481         * modules/crypto/md2-tests: Moved from ../.
3482         * modules/crypto/md4: Moved from ../.
3483         * modules/crypto/md4-tests: Moved from ../.
3484         * modules/crypto/md5: Moved from ../.
3485         * modules/crypto/md5-tests: Moved from ../.
3486         * modules/crypto/memxor: Moved from ../.
3487         * modules/crypto/rijndael: Moved from ../.
3488         * modules/crypto/rijndael-tests: Moved from ../.
3489         * modules/crypto/sha1: Moved from ../.
3490
3491 2007-03-30  James Youngman  <jay@gnu.org>
3492
3493         * tests/test-stat-time.c (prepare_test): use chmod() rather than
3494         rename() to change the ctime of a file (because ctime is unaffected
3495         by rename on jfs2 on AIX 5.1).
3496         (main): Start by doing cleanup, in case a previous run failed leaving
3497         test files behind.
3498
3499 2007-03-31  Bruno Haible  <bruno@clisp.org>
3500
3501         Support old proprietary implementations of iconv.
3502         * modules/iconv_open: New file.
3503         * lib/iconv_.h: New file.
3504         * m4/iconv_h.m4: New file.
3505         * lib/iconv_open.c: New file.
3506         * lib/iconv_open-aix.gperf: New file.
3507         * lib/iconv_open-hpux.gperf: New file.
3508         * lib/iconv_open-irix.gperf: New file.
3509         * lib/iconv_open-osf.gperf: New file.
3510         * m4/iconv_open.m4: New file.
3511         * modules/linebreak (Depends-on): Add iconv_open.
3512         * modules/striconv (Depends-on): Likewise.
3513         * modules/striconveh (Depends-on): Likewise.
3514         * modules/unicodeio (Depends-on): Likewise.
3515         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
3516         (iconv_t)(-1).
3517         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
3518         conversion if cd is (iconv_t)(-1).
3519         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
3520         is not possible.
3521
3522 2007-03-31  Bruno Haible  <bruno@clisp.org>
3523
3524         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3525         work on Solaris either. Protect also second use of "autodetect_jp".
3526
3527 2007-03-31  Bruno Haible  <bruno@clisp.org>
3528
3529         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
3530         the function is not present.
3531
3532 2007-03-31  Bruno Haible  <bruno@clisp.org>
3533
3534         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
3535         the function is not present.
3536
3537 2007-03-31  Bruno Haible  <bruno@clisp.org>
3538
3539         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
3540         a bug in HP-UX iconv_open().
3541
3542 2007-03-31  Bruno Haible  <bruno@clisp.org>
3543
3544         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
3545         (Mathematics <math.h>): New section, add fpieee.
3546         (Input/output <stdio.h>): Add fseterr.
3547         (Mathematics <math.h>): New section, add printf-frexp.
3548         (Container data structures): Add sublist.
3549         (Core language properties): Add fpucw, inline.
3550         (Functions for greatest-width integer types <inttypes.h>): Add
3551         imaxabs, imaxdiv, inttypes.
3552         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
3553         isnanl-nolibm, ldexp.
3554         (Mathematics <math.h>): New section, add printf-frexpl.
3555         (Support for systems lacking POSIX:2001): Add fprintf-posix,
3556         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
3557         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
3558         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
3559         (Unicode string functions): Add unistr/u*-mbtoucr.
3560         (Java): Add javacomp-script, javaexec-script.
3561         (C#): Add csharpcomp-script, csharpexec-script.
3562         (Support for building libraries and executables): Add havelib,
3563         relocatable-*.
3564         (Support for maintaining and releasing projects): Renamed from
3565         'Support for maintaining and release projects'. Add announce-gen.
3566
3567 2007-03-31  Bruno Haible  <bruno@clisp.org>
3568
3569         * README: Talk primarily about git.
3570         (git and CVS): Renamed from CVS.
3571         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
3572         gnulib is available through git.
3573         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
3574
3575 2007-03-30  Bruno Haible  <bruno@clisp.org>
3576
3577         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
3578         * lib/poll_.h: Likewise.
3579         * lib/stat_.h: Likewise.
3580         * lib/sys_time_.h: Likewise.
3581         * lib/sysexit_.h: Likewise.
3582         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
3583         * lib/stdbool_.h: Likewise.
3584         * lib/byteswap_.h: Add double-inclusion guard.
3585
3586 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
3587
3588         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
3589
3590 2007-03-30  Karl Berry  <karl@gnu.org>
3591
3592         * config/srclist-update: double space after USA in the license
3593         substitution, since that's how it's usually (?) written.
3594
3595 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
3596
3597         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
3598         reported by Bruno Haible.
3599
3600 2007-03-29  Bruno Haible  <bruno@clisp.org>
3601
3602         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
3603         a bug in AIX iconv().
3604
3605 2007-03-29  Bruno Haible  <bruno@clisp.org>
3606
3607         * modules/ldexpl-tests: New file.
3608         * tests/test-ldexpl.c: New file.
3609
3610 2007-03-29  Bruno Haible  <bruno@clisp.org>
3611
3612         * lib/ldexpl.c: Include fpucw.h.
3613         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
3614         multiplication.
3615         * modules/ldexpl (Depends-on): Add fpucw.
3616
3617 2007-03-29  Bruno Haible  <bruno@clisp.org>
3618
3619         * modules/ldexpl: New file.
3620         * m4/ldexpl.m4: New file.
3621         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
3622         set.
3623         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
3624         REPLACE_LDEXPL.
3625         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
3626         REPLACE_LDEXPL.
3627         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
3628         gl_FUNC_LDEXPL_WORKS.
3629         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
3630         * modules/mathl (Files): Remove lib/ldexpl.c.
3631         (Depends-on): Add ldexpl.
3632
3633 2007-03-29  Bruno Haible  <bruno@clisp.org>
3634
3635         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
3636
3637 2007-03-29  Bruno Haible  <bruno@clisp.org>
3638
3639         * tests/test-striconveh.c (main): Don't assume that a direct conversion
3640         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
3641         and possibly also HP-UX.
3642         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3643         work on AIX, IRIX, HP-UX, OSF/1.
3644         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
3645         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
3646         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
3647         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
3648         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
3649         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
3650
3651 2007-03-29  Bruno Haible  <bruno@clisp.org>
3652
3653         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
3654
3655 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3656
3657         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
3658         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
3659
3660 2007-03-29  Eric Blake  <ebb9@byu.net>
3661
3662         * lib/acl-internal.h: Remove redundant include.
3663         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
3664         Cygwin when a file is locked.
3665
3666 2007-03-29  Bruno Haible  <bruno@clisp.org>
3667
3668         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
3669         file.
3670         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
3671
3672 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3673
3674         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
3675         try to remove a parent directory if the child couldn't be removed
3676         (except for the first rmdir, which could fail because the child
3677         doesn't exist).  Problem reported by Jeff Blaine in
3678         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
3679
3680 2007-03-28  Bruno Haible  <bruno@clisp.org>
3681
3682         * lib/striconveh.c (utf8conv_carefully): New function.
3683         (mem_cd_iconveh_internal): Invoke it.
3684
3685 2007-03-28  Bruno Haible  <bruno@clisp.org>
3686
3687         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
3688         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
3689         input.
3690         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
3691         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
3692         unistr/u8-uctomb.
3693
3694 2007-03-28  Bruno Haible  <bruno@clisp.org>
3695
3696         * modules/unistr/u8-mbtoucr: New file.
3697         * lib/unistr/u8-mbtoucr.c: New file.
3698         * modules/unistr/u16-mbtoucr: New file.
3699         * lib/unistr/u16-mbtoucr.c: New file.
3700         * modules/unistr/u16-mbtoucr: New file.
3701         * lib/unistr/u16-mbtoucr.c: New file.
3702         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
3703
3704 2007-03-27  Simon Josefsson  <simon@josefsson.org>
3705             Bruno Haible  <bruno@clisp.org>
3706
3707         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
3708         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
3709         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
3710
3711         * m4/stdio_h.m4: Add stubs for vasprintf too.
3712
3713         * modules/stdio: Support vasprintf in sed command.
3714
3715         * modules/vasprintf: Depend on stdio for prototypes.  Remove
3716         vasprintf.h.  Add stdio module indicator.
3717
3718         * lib/stdio_.h: Declare asprintf and vasprintf, based on
3719         vasprintf.h.
3720
3721         * lib/vasprintf.h: File removed.
3722
3723         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
3724         * lib/vasprintf.c: Ditto.
3725         * lib/xvasprintf.c: Ditto.
3726         * tests/test-vasprintf-posix.c: Ditto.
3727         * tests/test-vasprintf.c: Ditto.
3728
3729 2007-03-27  Bruno Haible  <bruno@clisp.org>
3730
3731         Make vasnprintf multithread-safe.
3732         * lib/vasnprintf.c (decimal_point_char): New function.
3733         (VASNPRINTF): Use it.
3734         Suggested by Simon Josefsson.
3735
3736 2007-03-27  Eric Blake  <ebb9@byu.net>
3737
3738         Support sub-second birthtime on cygwin.
3739         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
3740         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
3741         (get_stat_birthtime): Also work with st_birthtim.
3742
3743 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
3744
3745         * lib/stat-time.h (USE_BIRTHTIME): Remove.
3746         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
3747         (get_stat_birthtime_ns): Do not try to use "spare" fields.
3748         (get_stat_birthtime_ns): Simplify compile-time tests.
3749         (get_stat_birthtime): Change the API to look like
3750         get_stat_mtime etc., except return a negative tv_nsec on error.
3751         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
3752         Don't check for "spare" fields.
3753         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
3754         or for struct stat.st_birthtime, as these tests aren't used.
3755         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
3756
3757 2007-03-27  Bruno Haible  <bruno@clisp.org>
3758
3759         * lib/stat-time.h: Include <sys/stat.h>.
3760
3761 2007-03-27  James Youngman  <jay@gnu.org>
3762
3763         * lib/stat-time.h (get_stat_birthtime): New function for
3764           retrieving st_birthtime as provided by UFS2 (hence *BSD).
3765         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
3766           and its variants.
3767         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
3768         * modules/stat-time-test: New file.
3769         * tests/test-stat-time.c: New test, devised by Bruno Haible.
3770
3771 2007-03-26  Bruno Haible  <bruno@clisp.org>
3772
3773         Better support of signalling NaNs.
3774         * lib/atanl.c: Include isnanl.h.
3775         (atanl): Perform test for NaN at the beginning of the function and
3776         through a call to isnanl.
3777         * lib/cosl.c: Include isnanl.h.
3778         (cosl): Perform test for NaN at the beginning of the function and
3779         through a call to isnanl.
3780         * lib/ldexpl.c: Include isnanl.h.
3781         (ldexpl): Perform test for NaN through a call to isnanl.
3782         * lib/logl.c: Include isnanl.h.
3783         (logl): Perform test for NaN at the beginning of the function and
3784         through a call to isnanl.
3785         * lib/sinl.c: Include isnanl.h.
3786         (sinl): Perform test for NaN at the beginning of the function and
3787         through a call to isnanl.
3788         * lib/sqrtl.c: Include isnanl.h.
3789         (sqrtl): Perform test for NaN at the beginning of the function and
3790         through a call to isnanl.
3791         * lib/tanl.c: Include isnanl.h.
3792         (tanl): Perform test for NaN at the beginning of the function and
3793         through a call to isnanl.
3794         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
3795         * modules/mathl (Depends-on): Add isnanl.
3796
3797 2007-03-26  Eric Blake  <ebb9@byu.net>
3798
3799         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
3800         regression in logic sense of previous patch.
3801
3802 2007-03-26  Bruno Haible  <bruno@clisp.org>
3803
3804         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
3805         unportable shell command "if ! ...".
3806         Reported by Ralf Wildenhues.
3807
3808 2007-03-25  Bruno Haible  <bruno@clisp.org>
3809
3810         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
3811         <sysexits.h> file, and only add EX_CONFIG.
3812         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
3813         absolute file name and whether it is sufficient. Substitute also
3814         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
3815         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
3816         ABSOLUTE_SYSEXITS_H into sysexits.h.
3817
3818 2007-03-25  Bruno Haible  <bruno@clisp.org>
3819
3820         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
3821         hints is NULL.
3822
3823 2007-03-25  Bruno Haible  <bruno@clisp.org>
3824
3825         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
3826         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
3827
3828 2007-03-25  Bruno Haible  <bruno@clisp.org>
3829
3830         * lib/vasnprintf.c: Include langinfo.h.
3831         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
3832         multithread-safe.
3833         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
3834         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
3835         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
3836         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
3837         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
3838         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
3839         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
3840         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
3841         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
3842         Reported by Simon Josefsson.
3843
3844 2007-03-25  Bruno Haible  <bruno@clisp.org>
3845
3846         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
3847         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
3848         * modules/vasnprintf (Depends-on): Add stdint.
3849
3850 2007-03-25  Bruno Haible  <bruno@clisp.org>
3851
3852         * modules/fpieee: New file.
3853         * m4/fpieee.m4: New file.
3854         * modules/isnan-nolibm (Depends-on): Add fpieee.
3855         * modules/isnanl-nolibm (Depends-on): Add fpieee.
3856         * modules/isnanl (Depends-on): Add fpieee.
3857
3858 2007-03-25  Bruno Haible  <bruno@clisp.org>
3859
3860         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
3861
3862 2007-03-25  Bruno Haible  <bruno@clisp.org>
3863
3864         Avoid test failures on IRIX 6.5.
3865         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
3866         (main): Use it.
3867         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
3868         macros.
3869         (main): Use them.
3870
3871 2007-03-25  Bruno Haible  <bruno@clisp.org>
3872
3873         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
3874         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
3875         exists but doesn't work.
3876         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
3877         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
3878         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
3879         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
3880
3881 2007-03-25  Bruno Haible  <bruno@clisp.org>
3882
3883         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
3884         returns inf. Needed on IRIX 6.5.
3885
3886 2007-03-25  Bruno Haible  <bruno@clisp.org>
3887
3888         * tests/test-frexpl.c: Include isnanl-nolibm.h.
3889         (main): Use isnanl instead of x != x idiom.
3890         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
3891
3892         * tests/test-frexp.c: Include isnan.h.
3893         (main): Use isnan instead of x != x idiom.
3894         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
3895
3896 2007-03-25  Bruno Haible  <bruno@clisp.org>
3897
3898         * tests/test-frexp.c (NaN): New function/macro.
3899         (main): Use it instead of 0.0 / 0.0.
3900         * tests/test-isnan.c (NaN): New function/macro.
3901         (main): Use it instead of 0.0 / 0.0.
3902         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
3903         (test_function): Use it instead of 0.0 / 0.0.
3904         * tests/test-vasprintf-posix.c (NaN): New function/macro.
3905         (test_function): Use it instead of 0.0 / 0.0.
3906         * tests/test-snprintf-posix.h (NaN): New function/macro.
3907         (test_function): Use it instead of 0.0 / 0.0.
3908         * tests/test-sprintf-posix.h (NaN): New function/macro.
3909         (test_function): Use it instead of 0.0 / 0.0.
3910         * tests/test-fprintf-posix.h (NaN): New function/macro.
3911         (test_function): Use it instead of 0.0 / 0.0.
3912         * tests/test-printf-posix.h (NaN): New function/macro.
3913         (test_function): Use it instead of 0.0 / 0.0.
3914
3915         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
3916
3917 2007-03-25  Bruno Haible  <bruno@clisp.org>
3918
3919         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
3920
3921 2007-03-25  Bruno Haible  <bruno@clisp.org>
3922
3923         * lib/regexec.c (merge_state_with_log): Make static.
3924
3925 2007-03-25  Bruno Haible  <bruno@clisp.org>
3926
3927         * lib/trigl.c (kernel_rem_pio2): Make static.
3928
3929 2007-03-25  Bruno Haible  <bruno@clisp.org>
3930
3931         * lib/sincosl.c (sincosl_table): Make static.
3932
3933 2007-03-25  Bruno Haible  <bruno@clisp.org>
3934
3935         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
3936         if the compiler does not support C99.
3937
3938 2007-03-25  Bruno Haible  <bruno@clisp.org>
3939
3940         * modules/time (Makefile.am): Ensure all rule action lines start with a
3941         tab.
3942
3943 2007-03-24  Bruno Haible  <bruno@clisp.org>
3944
3945         * modules/tsearch-tests: New file.
3946         * tests/test-tsearch.sh: New file.
3947         * tests/test-tsearch.c: New file, mostly copied from glibc.
3948
3949         * modules/search-tests: New file.
3950         * tests/test-search.c: New file.
3951
3952         * modules/search: New file.
3953         * lib/search_.h: New file, incorporating lib/tsearch.h.
3954         * m4/search_h.m4: New file.
3955         * lib/tsearch.h: Remove file.
3956         * lib/tsearch.c: Include search.h instead of tsearch.h.
3957         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
3958         HAVE_TSEARCH.
3959         * modules/tsearch (Files): Remove lib/tsearch.h.
3960         (Depends-on): Add search.
3961         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
3962         (Include): Change tsearch.h into search.h.
3963
3964 2007-03-24  Bruno Haible  <bruno@clisp.org>
3965
3966         * modules/fpucw: New file.
3967         * lib/fpucw.h: New file.
3968         * lib/frexp.c: Include fpucw.h.
3969         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3970         (FUNC): Use them.
3971         * lib/printf-frexp.c: Include fpucw.h.
3972         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3973         (FUNC): Use them.
3974         * lib/vasnprintf.c: Include fpucw.h.
3975         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
3976         'long double' calculations.
3977         * tests/test-frexpl.c: Include fpucw.h.
3978         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3979         * tests/test-printf-frexpl.c: Include fpucw.h.
3980         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3981         * modules/frexpl (Depends-on): Add fpucw.
3982         * modules/printf-frexpl (Depends-on): Likewise.
3983         * modules/fprintf-posix (Depends-on): Likewise.
3984         * modules/snprintf-posix (Depends-on): Likewise.
3985         * modules/sprintf-posix (Depends-on): Likewise.
3986         * modules/vasnprintf-posix (Depends-on): Likewise.
3987         * modules/vasprintf-posix (Depends-on): Likewise.
3988         * modules/vfprintf-posix (Depends-on): Likewise.
3989         * modules/vsnprintf-posix (Depends-on): Likewise.
3990         * modules/vsprintf-posix (Depends-on): Likewise.
3991         * modules/frexpl-tests (Depends-on): Likewise.
3992         * modules/printf-frexpl-tests (Depends-on): Likewise.
3993
3994 2007-03-24  Bruno Haible  <bruno@clisp.org>
3995
3996         * lib/float+.h: New file.
3997         * lib/isnan.c: Include float+.h.
3998         (SIZE): New macro.
3999         (FUNC): Compare only SIZE bytes of the value.
4000         * lib/vasnprintf.c: Include float+.h.
4001         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
4002         SIZEOF_LDBL or SIZEOF_DBL bytes.
4003         * modules/isnan-nolibm (Files): Add lib/float+.h.
4004         * modules/isnanl-nolibm (Files): Add lib/float+.h.
4005         * modules/isnanl (Files): Add lib/float+.h.
4006         * modules/vasnprintf (Files): Add lib/float+.h.
4007
4008 2007-03-24  Bruno Haible  <bruno@clisp.org>
4009
4010         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
4011         include isnanl-nolibm.h.
4012
4013 2007-03-24  Bruno Haible  <bruno@clisp.org>
4014
4015         * tests/test-read-file.c (main): Don't produce spurious output for
4016         expected situations. Make the test fail if it encountered unexpected
4017         results.
4018
4019 2007-03-24  Bruno Haible  <bruno@clisp.org>
4020
4021         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
4022         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
4023
4024 2007-03-24  Bruno Haible  <bruno@clisp.org>
4025
4026         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
4027
4028 2007-03-24  Bruno Haible  <bruno@clisp.org>
4029
4030         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
4031         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
4032
4033         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
4034         * modules/utf8-ucs4: Turn into a symbolic link to module
4035         unistr/u8-mbtouc.
4036
4037         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
4038         utf8-ucs4-unsafe.
4039         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
4040         unistr/u8-mbtouc-unsafe.
4041
4042         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
4043         * modules/utf16-ucs4: Turn into a symbolic link to module
4044         unistr/u16-mbtouc.
4045
4046         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
4047         utf16-ucs4-unsafe.
4048         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
4049         unistr/u16-mbtouc-unsafe.
4050
4051         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
4052         * modules/ucs4-utf8: Turn into a symbolic link to module
4053         unistr/u8-ubtomb.
4054
4055         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
4056         * modules/ucs4-utf16: Turn into a symbolic link to module
4057         unistr/u16-ubtomb.
4058
4059 2007-03-24  Bruno Haible  <bruno@clisp.org>
4060
4061         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
4062         Enable the function only if HAVE_INLINE.
4063         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
4064         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4065         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
4066         Enable the function only if HAVE_INLINE.
4067         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
4068         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4069         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
4070         Enable the function only if HAVE_INLINE.
4071         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
4072         Enable the function only if HAVE_INLINE.
4073         * modules/utf8-ucs4: Update.
4074         * modules/utf8-ucs4-unsafe: Update.
4075         * modules/utf16-ucs4: Update.
4076         * modules/utf16-ucs4-unsafe: Update.
4077         * modules/ucs4-utf8: Update.
4078         * modules/ucs4-utf16: Update.
4079
4080 2007-03-24  Bruno Haible  <bruno@clisp.org>
4081
4082         * lib/utf8-ucs4.h: Remove file.
4083         * lib/utf8-ucs4-unsafe.h: Remove file.
4084         * lib/utf16-ucs4.h: Remove file.
4085         * lib/utf16-ucs4-unsafe.h: Remove file.
4086         * lib/ucs4-utf8.h: Remove file.
4087         * lib/ucs4-utf16.h: Remove file.
4088         * lib/unistr.h: Include their previous contents.
4089         * m4/utf-ucs4.m4: Remove file.
4090         * m4/ucs4-utf.m4: Remove file.
4091         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
4092         (Depends-on): Add unistr/base.
4093         (configure.ac): Remove gl_UTF_UCS4.
4094         (Makefile.am): Update.
4095         (Include): Change to unistr.h.
4096         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
4097         (Depends-on): Add unistr/base.
4098         (configure.ac): Remove gl_UTF_UCS4.
4099         (Makefile.am): Update.
4100         (Include): Change to unistr.h.
4101         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
4102         (Depends-on): Add unistr/base.
4103         (configure.ac): Remove gl_UTF_UCS4.
4104         (Makefile.am): Update.
4105         (Include): Change to unistr.h.
4106         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
4107         (Depends-on): Add unistr/base.
4108         (configure.ac): Remove gl_UTF_UCS4.
4109         (Makefile.am): Update.
4110         (Include): Change to unistr.h.
4111         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
4112         (Depends-on): Add unistr/base.
4113         (configure.ac): Remove gl_UCS4_UTF.
4114         (Makefile.am): Update.
4115         (Include): Change to unistr.h.
4116         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
4117         (Depends-on): Add unistr/base.
4118         (configure.ac): Remove gl_UCS4_UTF.
4119         (Makefile.am): Update.
4120         (Include): Change to unistr.h.
4121         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
4122         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
4123         utf8-ucs4-unsafe.h.
4124         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
4125         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
4126         utf16-ucs4-unsafe.h.
4127         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
4128         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
4129         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
4130         * lib/unistr/u8-strchr.c: Likewise.
4131         * lib/unistr/u8-strrchr.c: Likewise.
4132         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
4133         * lib/unistr/u16-strchr.c: Likewise.
4134         * lib/unistr/u16-strrchr.c: Likewise.
4135         * lib/striconveh.c: Update.
4136         * lib/linebreak.c: Update.
4137
4138 2007-03-24  Bruno Haible  <bruno@clisp.org>
4139
4140         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
4141         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
4142
4143 2007-03-22  Bruno Haible  <bruno@clisp.org>
4144
4145         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
4146
4147 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
4148
4149         * MODULES.html.sh (File system functions): New module write-any-file.
4150         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
4151         * m4/write-any-file.m4: New files.
4152
4153 2007-03-23  Eric Blake  <ebb9@byu.net>
4154
4155         * gnulib-tool: Rearrange space-tab sequences, since some editors
4156         like to eat them.
4157
4158 2007-03-23  Eric Blake  <ebb9@byu.net>
4159
4160         * lib/version-etc.c (version_etc_va): Update license wording to
4161         be more concise.  Recommended by Richard Stallman.
4162
4163 2007-03-22  Bruno Haible  <bruno@clisp.org>
4164
4165         * lib/poll.c (MSG_PEEK): New fallback definition.
4166
4167 2007-03-22  Bruno Haible  <bruno@clisp.org>
4168
4169         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
4170         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
4171         (main): Update.
4172         Fixes a compilation error on BeOS.
4173
4174 2007-03-22  Bruno Haible  <bruno@clisp.org>
4175
4176         * modules/frexpl-tests: New file.
4177         * tests/test-frexpl.c: New file.
4178
4179         * modules/frexpl: New file.
4180         * m4/frexpl.m4: New file.
4181         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
4182         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
4183         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
4184         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
4185         (Depends-on): Add frexpl. Remove isnanl-nolibm.
4186         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
4187
4188 2007-03-22  Bruno Haible  <bruno@clisp.org>
4189
4190         * lib/frexpl.c: Share code with lib/frexp.c.
4191         * modules/mathl (Files): Add lib/frexp.c.
4192         (Depends-on): Add isnanl-nolibm.
4193
4194 2007-03-22  Bruno Haible  <bruno@clisp.org>
4195
4196         * modules/printf-frexp (Files): Add m4/frexp.m4.
4197         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
4198         only if the found frexp function actually works.
4199
4200 2007-03-22  Bruno Haible  <bruno@clisp.org>
4201
4202         * lib/frexp.c: Remove older implementation that uses divisions.
4203
4204 2007-03-21  Bruno Haible  <bruno@clisp.org>
4205
4206         * modules/frexp-tests: New file.
4207         * tests/test-frexp.c: New file.
4208
4209         * modules/frexp: New file.
4210         * lib/frexp.c: New file.
4211         * m4/frexp.m4: New file.
4212         * lib/math_.h (frexp): New declaration.
4213         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
4214         REPLACE_FREXP.
4215         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
4216
4217 2007-03-21  Bruno Haible  <bruno@clisp.org>
4218
4219         * modules/isnanl-tests: New file.
4220         * tests/test-isnanl.c: New file.
4221
4222         * modules/isnanl: New file.
4223         * lib/isnanl.h: New file.
4224         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
4225         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
4226         gl_FUNC_ISNANL_WORKS.
4227         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
4228         New macros.
4229
4230 2007-03-21  Bruno Haible  <bruno@clisp.org>
4231
4232         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
4233         lib/isnanl.h.
4234         (Include): Update.
4235         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
4236         * lib/vasnprintf.c: Update.
4237         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
4238         tests/test-isnanl.h, remove tests/test-isnanl.c.
4239         (Makefile.am): Update.
4240         * tests/test-isnanl-nolibm.c: New file.
4241         * tests/test-isnanl.h: New file.
4242         * tests/test-isnanl.c: Remove file.
4243
4244 2007-03-21  Jim Meyering  <jim@meyering.net>
4245
4246         When trying to open ".", treat ESTALE like EACCES.
4247         * lib/savewd.c (savewd_save): Resort to forking not just upon
4248         failure with EACCES, but also when errno is ESTALE.
4249
4250 2007-03-20  Bruno Haible  <bruno@clisp.org>
4251
4252         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
4253         Needed on AIX 5.1. Reported by Matthew Woehlke.
4254
4255 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4256
4257         Suggestions by Bruno Haible:
4258         * lib/acl-internal.h: Include "gettext.h" rather than rolling
4259         our own.
4260         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
4261         * modules/acl (Depends-on): Add gettext.
4262
4263 2007-03-19  Bruno Haible  <bruno@clisp.org>
4264
4265         * modules/iconvme: Remove file.
4266         * lib/iconvme.h: Remove file.
4267         * lib/iconvme.c: Remove file.
4268         * m4/iconvme.m4: Remove file.
4269
4270 2007-03-19  Bruno Haible  <bruno@clisp.org>
4271
4272         * doc/relocatable-maint.texi: Break long shell script line.
4273         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4274
4275 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4276
4277         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
4278         handle file_has_acl.
4279         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
4280         * lib/acl.c: Move header inclusions and related macro defns into
4281         lib/acl-internal.h.
4282         (S_ISLNK): Remove defn, since that's now done for us.
4283         (file_has_acl): Move to lib/file-has-acl.c.
4284         Call acl_trivial if available.  This is the crucial part of the fix.
4285         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
4286         shared within the library.  Rewrite a bit, partly to make it compatible
4287         with the GNU coding style.
4288         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
4289         Remove unnecessary double-quotes.
4290         Don't test for acl_to_text; the build will catch that.
4291         Replace acl_entries if it doesn't exist and it is needed.
4292         Check for -lsec and acl_trivial (as used on Solaris 10).
4293         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
4294         lib/file-has-acl.c.
4295         (Depends-on): Add sys_stat, for S_ISLNK.
4296
4297 2007-03-19  Ben Pfaff  <blp@gnu.org>
4298
4299         * doc/gnulib.texi: Fix typos.
4300         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4301
4302 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4303
4304         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
4305         If size is zero here, buf must be zero.
4306
4307 2007-03-19  Simon Josefsson  <simon@josefsson.org>
4308
4309         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
4310         <bruno@clisp.org>.
4311
4312 2007-03-18  Bruno Haible  <bruno@clisp.org>
4313
4314         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
4315         Suggested by Eric Blake.
4316
4317 2007-03-18  Ben Pfaff  <blp@gnu.org>
4318
4319         * doc/relocatable.texi: Recommend using as prefix a directory
4320         that does not exist and will never be created.  Based on
4321         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
4322         and others.
4323
4324 2007-03-17  Bruno Haible  <bruno@clisp.org>
4325
4326         * lib/fchownat.c: Include lchown.h.
4327
4328 2007-03-17  Bruno Haible  <bruno@clisp.org>
4329
4330         Fix endless loop when the given allocated size was > INT_MAX.
4331         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
4332         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
4333         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
4334         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
4335         * lib/sprintf.c (sprintf): Likewise.
4336
4337 2007-03-17  Bruno Haible  <bruno@clisp.org>
4338
4339         * tests/test-argp-2.sh (func_compare): Output a context diff.
4340
4341 2007-03-17  Bruno Haible  <bruno@clisp.org>
4342
4343         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
4344         locale's decimal-point character.
4345
4346 2007-03-17  Bruno Haible  <bruno@clisp.org>
4347
4348         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
4349         before comparing it. Needed because on some platforms (e.g. x86) a
4350         'long double' occupies less bytes than sizeof (long double).
4351
4352 2007-03-17  Bruno Haible  <bruno@clisp.org>
4353
4354         * tests/test-crc.c (main): Make printf statements 64-bit clean.
4355         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
4356         * tests/test-getaddrinfo.c (simple): Likewise.
4357         * tests/test-read-file.c (main): Likewise.
4358
4359 2007-03-17  Bruno Haible  <bruno@clisp.org>
4360
4361         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
4362
4363 2007-03-17  Bruno Haible  <bruno@clisp.org>
4364
4365         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
4366         unused variable.
4367
4368 2007-03-17  Bruno Haible  <bruno@clisp.org>
4369
4370         * tests/test-c-strcasecmp.c: Include c-strcase.h.
4371         * tests/test-c-strncasecmp.c: Likewise.
4372
4373 2007-03-17  Bruno Haible  <bruno@clisp.org>
4374
4375         * modules/stdlib (Depends-on): Add unistd.
4376         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
4377         Needed for MacOS X 10.3.
4378
4379 2007-03-17  Bruno Haible  <bruno@clisp.org>
4380
4381         * lib/unistr/u-strdup.h: Include <stdlib.h>.
4382
4383 2007-03-17  Bruno Haible  <bruno@clisp.org>
4384
4385         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
4386
4387 2007-03-17  Bruno Haible  <bruno@clisp.org>
4388
4389         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
4390         to reflect files copied from gnulib (with or without modifications).
4391         Suggested by Jim Meyering.
4392
4393 2007-03-17  Eric Blake  <ebb9@byu.net>
4394
4395         * NEWS: Document stdlib change from 2007-02-18.
4396
4397 2007-03-17  Jim Meyering  <jim@meyering.net>
4398
4399         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
4400         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
4401         someone uses a name containing shell meta-characters.
4402         Reported by Alfred M. Szmidt.
4403
4404         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
4405
4406 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4407
4408         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
4409         and copy gettext configuration files only if configure.ac contains
4410         a use of AM_GNU_GETTEXT_VERSION.
4411
4412 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4413
4414         * build-aux/bootstrap (gnulib_name): New variable.
4415         (gnulib_tool_options): Use it.
4416
4417 2007-03-13  Simon Josefsson  <simon@josefsson.org>
4418
4419         * tests/test-des.c: Use new namespace.
4420
4421 2007-03-15  Bruno Haible  <bruno@clisp.org>
4422
4423         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
4424         Reported by James Youngman <jay@gnu.org>.
4425
4426 2007-03-15  Bruno Haible  <bruno@clisp.org>
4427
4428         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
4429         declared prototype. Needed with cc on OSF/1 5.1.
4430
4431 2007-03-15  Bruno Haible  <bruno@clisp.org>
4432
4433         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
4434         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
4435         (struct gl_list_implementation): Add dispose_fn argument to the
4436         'create_empty', 'create' methods.
4437         (struct gl_list_impl_base): Add field 'dispose_fn'.
4438         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
4439         argument.
4440         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
4441         dispose_fn argument.
4442         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
4443         dispose_fn on the dropped values.
4444         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
4445         dispose_fn argument.
4446         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
4447         dropped values.
4448         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
4449         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4450         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
4451         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4452         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
4453         argument.
4454         (gl_tree_list_free): Call dispose_fn on the dropped values.
4455         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
4456         the dropped values.
4457         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4458         Add dispose_fn argument.
4459         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
4460         Call dispose_fn on the dropped values.
4461         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
4462         Add dispose_fn argument.
4463         (gl_sublist_create): Initialize the 'dispose_fn' field.
4464         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
4465         * tests/test-array_list.c (main): Update.
4466         * tests/test-carray_list.c (main): Update.
4467         * tests/test-avltree_list.c (main): Update.
4468         * tests/test-rbtree_list.c (main): Update.
4469         * tests/test-avltreehash_list.c (main): Update.
4470         * tests/test-rbtreehash_list.c (main): Update.
4471         * tests/test-linked_list.c (main): Update.
4472         * tests/test-linkedhash_list.c (main): Update.
4473         * tests/test-array_oset.c (main): Update.
4474
4475 2007-03-15  Bruno Haible  <bruno@clisp.org>
4476
4477         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
4478         (gl_oset_create_empty): Add dispose_fn argument.
4479         (struct gl_oset_implementation): Add dispose_fn argument to
4480         'create_empty' method.
4481         (struct gl_oset_impl_base): Add dispose_fn field.
4482         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
4483         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
4484         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
4485         values.
4486         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
4487         (gl_tree_oset_free): Call dispose_fn on the dropped values.
4488         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4489         dropped value.
4490         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4491         dropped value.
4492         * tests/test-array_oset.c (main): Update.
4493         * tests/test-avltree_oset.c (main): Update.
4494         * tests/test-rbtree_oset.c (main): Update.
4495         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
4496
4497 2007-03-13  Bruno Haible  <bruno@clisp.org>
4498
4499         * tests/test-stdbool.c (i): Update after last patch.
4500
4501 2007-03-12  Bruno Haible  <bruno@clisp.org>
4502
4503         * lib/quotearg.c: Include <wctype.h> early, before the definition of
4504         the iswprint macro. Needed on Solaris 2.5.1.
4505
4506 2007-03-12  Bruno Haible  <bruno@clisp.org>
4507
4508         * tests/test-printf-frexp.c (main): Declare x as volatile.
4509
4510 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4511
4512         * doc/gnulib.texi (Build robot for gnulib): New section.
4513
4514 2007-03-12  Jim Meyering  <jim@meyering.net>
4515
4516         * build-aux/bootstrap: New file.
4517         * build-aux/bootstrap.conf: New file, from coreutils.
4518
4519 2007-03-11  Bruno Haible  <bruno@clisp.org>
4520
4521         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
4522
4523 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4524
4525         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
4526         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
4527         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
4528
4529 2007-03-11  Bruno Haible  <bruno@clisp.org>
4530
4531         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
4532         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
4533
4534 2007-03-11  Bruno Haible  <bruno@clisp.org>
4535
4536         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
4537         formula. Needed for SunPRO C 5.0.
4538
4539 2007-03-11  Bruno Haible  <bruno@clisp.org>
4540
4541         * modules/long-options (Depends-on): Add getopt.
4542
4543 2007-03-11  Bruno Haible  <bruno@clisp.org>
4544
4545         * modules/modechange (Depends-on): Add stdbool.
4546
4547 2007-03-11  Bruno Haible  <bruno@clisp.org>
4548
4549         * modules/i-ring (Depends-on): Add stdbool.
4550
4551 2007-03-11  Bruno Haible  <bruno@clisp.org>
4552
4553         * modules/gc-des (Depends-on): Add stdbool.
4554
4555 2007-03-11  Bruno Haible  <bruno@clisp.org>
4556
4557         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
4558
4559 2007-03-11  Bruno Haible  <bruno@clisp.org>
4560
4561         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
4562
4563 2007-03-11  Bruno Haible  <bruno@clisp.org>
4564
4565         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
4566
4567 2007-03-11  Bruno Haible  <bruno@clisp.org>
4568
4569         * lib/vasnprintf.c (sprintf): Undefine.
4570
4571 2007-03-11  Bruno Haible  <bruno@clisp.org>
4572
4573         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
4574         initializers in SunPRO C and Compaq C compilers.
4575
4576 2007-03-11  Bruno Haible  <bruno@clisp.org>
4577
4578         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
4579         decrementing code ANSI C compliant.
4580
4581 2007-03-11  Bruno Haible  <bruno@clisp.org>
4582
4583         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
4584         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
4585
4586 2007-03-11  Bruno Haible  <bruno@clisp.org>
4587
4588         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
4589         <stdbool.h> substitute doesn't pass.
4590
4591 2007-03-11  Bruno Haible  <bruno@clisp.org>
4592
4593         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
4594
4595 2007-03-11  Bruno Haible  <bruno@clisp.org>
4596
4597         * gnulib-tool (func_create_megatestdir): Create also an autobuild
4598         script, for submission to autobuild.josefsson.org.
4599
4600 2007-03-10  Bruno Haible  <bruno@clisp.org>
4601
4602         * modules/canonicalize-lgpl-tests: New file.
4603         * tests/test-canonicalize-lgpl.sh: New file.
4604         * tests/test-canonicalize-lgpl.c: New file.
4605
4606         * modules/c-strcase-tests: New file.
4607         * tests/test-c-strcase.sh: New file.
4608         * tests/test-c-strcasecmp.c: New file.
4609         * tests/test-c-strncasecmp.c: New file.
4610
4611         * modules/atexit-tests: New file.
4612         * tests/test-atexit.sh: New file.
4613         * tests/test-atexit.c: New file.
4614
4615 2007-03-10  Bruno Haible  <bruno@clisp.org>
4616
4617         * tests/test-binary-io.sh: Use temporary filenames that are not so
4618         likely to clash with those of other tests (in a parallel make).
4619         * tests/test-binary-io.c: Likewise.
4620
4621 2007-03-10  Bruno Haible  <bruno@clisp.org>
4622
4623         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
4624         fallback; use #error instead.
4625         Suggested by Simon Josefsson.
4626
4627 2007-03-10  Bruno Haible  <bruno@clisp.org>
4628
4629         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
4630         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
4631         first and the last.
4632
4633 2007-03-10  Bruno Haible  <bruno@clisp.org>
4634
4635         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
4636
4637 2007-03-10  Bruno Haible  <bruno@clisp.org>
4638
4639         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
4640         "make distcheck".
4641         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
4642         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
4643         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
4644
4645 2007-03-10  Bruno Haible  <bruno@clisp.org>
4646
4647         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
4648         variable.
4649         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
4650         variable.
4651
4652 2007-03-09  Eric Blake  <ebb9@byu.net>
4653         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
4654
4655         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
4656         types are not being provided by gnulib.
4657         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
4658         types are supported.
4659
4660 2007-03-10  Bruno Haible  <bruno@clisp.org>
4661
4662         * lib/stdio_.h (__attribute__): New macro.
4663         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
4664         vsprintf): Specify __attribute__ __format__ for GCC.
4665         Suggested by Eric Blake.
4666
4667 2007-03-09  Bruno Haible  <bruno@clisp.org>
4668
4669         * modules/printf-posix-tests: New file.
4670         * tests/test-printf-posix.sh: New file.
4671         * tests/test-printf-posix.c: New file.
4672
4673         * modules/printf-posix: New file.
4674         * lib/printf.c: New file.
4675         * m4/printf-posix-rpl.m4: New file.
4676         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
4677         REPLACE_PRINTF.
4678         * lib/stdio_.h (printf): New declaration.
4679         (format, __format__, ____printf____, ____scanf____, ____strftime____,
4680         ____strfmon____): New macros.
4681         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
4682         REPLACE_PRINTF.
4683
4684 2007-03-09  Bruno Haible  <bruno@clisp.org>
4685
4686         * tests/test-vasnprintf-posix2.sh: New file.
4687         * tests/test-vasnprintf-posix2.c: New file.
4688         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
4689         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
4690         (Makefile.am): Activate test-vasnprintf-posix2.sh.
4691
4692         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
4693         a locale dependent decimal point, rather than always '.'.
4694
4695 2007-03-09  Eric Blake  <ebb9@byu.net>
4696
4697         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
4698         spite of platforms like Tandem/NSK that define it to -1.
4699
4700 2007-03-08  Bruno Haible  <bruno@clisp.org>
4701
4702         * modules/vprintf-posix-tests: New file.
4703         * tests/test-vprintf-posix.sh: New file.
4704         * tests/test-vprintf-posix.c: New file.
4705         * tests/test-printf-posix.h: New file.
4706
4707         * modules/vprintf-posix: New file.
4708         * lib/vprintf.c: New file.
4709         * m4/vprintf-posix.m4: New file.
4710         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
4711         REPLACE_VPRINTF.
4712         * lib/stdio_.h (vprintf): New declaration.
4713         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
4714         REPLACE_VPRINTF.
4715
4716 2007-03-08  Bruno Haible  <bruno@clisp.org>
4717
4718         * modules/fprintf-posix-tests: New file.
4719         * tests/test-fprintf-posix.sh: New file.
4720         * tests/test-fprintf-posix.c: New file.
4721
4722         * modules/fprintf-posix: New file.
4723         * lib/fprintf.c: New file.
4724         * m4/fprintf-posix.m4: New file.
4725         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
4726         REPLACE_FPRINTF.
4727         * lib/stdio_.h (fprintf): New declaration.
4728         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
4729         REPLACE_FPRINTF.
4730
4731 2007-03-08  Bruno Haible  <bruno@clisp.org>
4732
4733         * modules/vfprintf-posix-tests: New file.
4734         * tests/test-vfprintf-posix.sh: New file.
4735         * tests/test-vfprintf-posix.c: New file.
4736         * tests/test-fprintf-posix.h: New file.
4737         * tests/test-fprintf-posix.out: New file.
4738
4739         * modules/vfprintf-posix: New file.
4740         * lib/vfprintf.c: New file.
4741         * m4/vfprintf-posix.m4: New file.
4742         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
4743         REPLACE_VFPRINTF.
4744         * lib/stdio_.h (vfprintf): New declaration.
4745         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
4746         REPLACE_VFPRINTF.
4747
4748 2007-03-08  Bruno Haible  <bruno@clisp.org>
4749
4750         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
4751
4752 2007-03-08  Bruno Haible  <bruno@clisp.org>
4753
4754         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
4755         instead of 'expr' invocations.
4756         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4757         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4758         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4759         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
4760         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4761         Suggested by Paul Eggert.
4762
4763 2007-03-08  Bruno Haible  <bruno@clisp.org>
4764
4765         * modules/fseterr-tests: New file.
4766         * tests/test-fseterr.c: New file.
4767
4768         * modules/fseterr: New file.
4769         * lib/fseterr.h: New file.
4770         * lib/fseterr.c: New file.
4771
4772 2007-03-08  Bruno Haible  <bruno@clisp.org>
4773
4774         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
4775         * lib/getopt_.h: Likewise.
4776         * lib/mbswidth.h: Likewise.
4777         * lib/setenv.h: Likewise.
4778         * lib/vasnprintf.h: Likewise.
4779         * lib/vasprintf.h: Likewise.
4780         * lib/verror.h: Likewise.
4781         * lib/xsetenv.h: Likewise.
4782         * lib/xvasprintf.h: Likewise.
4783
4784 2007-03-08  Jim Meyering  <jim@meyering.net>
4785
4786         * users.txt: Add parted.
4787
4788         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
4789
4790 2007-03-07  Bruno Haible  <bruno@clisp.org>
4791
4792         * m4/printf.m4: Make the shell script snippets copy&pastable.
4793
4794 2007-03-02  Bruno Haible  <bruno@clisp.org>
4795
4796         * lib/netinet_in_.h: New file.
4797         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
4798         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
4799         * modules/netinet_in (Files): Add lib/netinet_in_.h.
4800         (Depends-on): Add absolute-header.
4801         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
4802         into netinet/in.h.
4803
4804 2007-03-03  Bruno Haible  <bruno@clisp.org>
4805
4806         * lib/sys_select_.h: New file.
4807         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
4808         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
4809         * modules/sys_select (Files): Add lib/sys_select_.h.
4810         (Depends-on): Add absolute-header.
4811         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
4812         into sys/select.h.
4813
4814 2007-03-02  Bruno Haible  <bruno@clisp.org>
4815
4816         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
4817         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
4818         values.
4819         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
4820         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
4821         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
4822         * modules/sys_socket (Depends-on): Add absolute-header.
4823         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
4824         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
4825         (Include): Remove requirement of inclusion of <sys/types.h>.
4826
4827 2007-03-02  Bruno Haible  <bruno@clisp.org>
4828
4829         * lib/byteswap_.h (bswap_32): Fix formula.
4830
4831 2007-03-06  Bruno Haible  <bruno@clisp.org>
4832
4833         * modules/sprintf-posix-tests: New file.
4834         * tests/test-sprintf-posix.c: New file.
4835
4836         * modules/sprintf-posix: New file.
4837         * lib/sprintf.c: New file.
4838         * m4/sprintf-posix.m4: New file.
4839         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
4840         REPLACE_SPRINTF.
4841         * lib/stdio_.h (sprintf): New declaration.
4842         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
4843         REPLACE_SPRINTF.
4844
4845 2007-03-06  Bruno Haible  <bruno@clisp.org>
4846
4847         * modules/vsprintf-posix-tests: New file.
4848         * tests/test-vsprintf-posix.c: New file.
4849         * tests/test-sprintf-posix.h: New file.
4850
4851         * modules/vsprintf-posix: New file.
4852         * lib/vsprintf.c: New file.
4853         * m4/vsprintf-posix.m4: New file.
4854         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
4855         REPLACE_VSPRINTF.
4856         * lib/stdio_.h (vsprintf): New declaration.
4857         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
4858         REPLACE_VSPRINTF.
4859
4860 2007-03-06  Bruno Haible  <bruno@clisp.org>
4861
4862         * modules/vsnprintf (Depend-on): Remove minmax.
4863
4864 2007-03-06  Bruno Haible  <bruno@clisp.org>
4865
4866         * modules/snprintf-posix-tests: New file.
4867         * tests/test-snprintf-posix.c: New file.
4868
4869         * modules/snprintf-posix: New file.
4870         * m4/snprintf-posix.m4: New file.
4871         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
4872         gl_FUNC_SNPRINTF.
4873         (gl_FUNC_SNPRINTF): Invoke it.
4874         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
4875         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
4876         is set.
4877         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
4878
4879 2007-03-06  Bruno Haible  <bruno@clisp.org>
4880
4881         * modules/vsnprintf-posix-tests: New file.
4882         * tests/test-vsnprintf-posix.c: New file.
4883         * tests/test-snprintf-posix.h: New file.
4884
4885         * modules/vsnprintf-posix: New file.
4886         * m4/vsnprintf-posix.m4: New file.
4887         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
4888         gl_FUNC_VSNPRINTF.
4889         (gl_FUNC_VSNPRINTF): Invoke it.
4890         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
4891         * lib/stdio_.h (vsnprintf): Define as a replacement if
4892         REPLACE_VSNPRINTF is set.
4893         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
4894
4895 2007-03-06  Bruno Haible  <bruno@clisp.org>
4896
4897         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
4898         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
4899
4900 2007-03-06  Bruno Haible  <bruno@clisp.org>
4901
4902         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
4903         (asinl): Declare also if HAVE_DECL_ASINL is set.
4904         (atanl): Declare also if HAVE_DECL_ATANL is set.
4905         (ceill): Declare also if HAVE_DECL_CEILL is set.
4906         (cosl): Declare also if HAVE_DECL_COSL is set.
4907         (expl): Declare also if HAVE_DECL_EXPL is set.
4908         (floorl): Declare also if HAVE_DECL_FLOORL is set.
4909         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
4910         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
4911         (logl): Declare also if HAVE_DECL_LOGL is set.
4912         (sinl): Declare also if HAVE_DECL_SINL is set.
4913         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
4914         (tanl): Declare also if HAVE_DECL_TANL is set.
4915         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
4916         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
4917         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
4918         declaration of frexpl, ldexpl.
4919         * modules/printf-frexpl (Depends-on): Add math.
4920         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
4921
4922 2007-03-05  Bruno Haible  <bruno@clisp.org>
4923
4924         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
4925         frexpl and ldexpl are declared.
4926         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
4927
4928 2007-03-05  Bruno Haible  <bruno@clisp.org>
4929
4930         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
4931         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
4932
4933 2007-03-05  Bruno Haible  <bruno@clisp.org>
4934
4935         * lib/stdio_.h: Include <stddef.h>.
4936
4937 2007-03-05  Bruno Haible  <bruno@clisp.org>
4938
4939         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
4940
4941 2007-03-05  Bruno Haible  <bruno@clisp.org>
4942
4943         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
4944         NetBSD 4, from Ralf Wildenhues.
4945
4946 2007-03-04  Bruno Haible  <bruno@clisp.org>
4947
4948         * lib/vasprintf.h: Update #if logic for the case when the functions
4949         exist but are overridden.
4950
4951 2007-03-04  Bruno Haible  <bruno@clisp.org>
4952
4953         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
4954         implementations: glibc-2.4 and MacOS X 10.3.
4955         * tests/test-vasnprintf-posix.c (test_function): Test also the case
4956         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
4957         * tests/test-vasprintf-posix.c (test_function): Likewise.
4958
4959 2007-03-04  Bruno Haible  <bruno@clisp.org>
4960
4961         * modules/vasprintf-posix-tests: New file.
4962         * tests/test-vasprintf-posix.c: New file.
4963
4964         * modules/vasprintf-posix: New file.
4965         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
4966         defined.
4967         * m4/vasprintf-posix.m4: New file.
4968         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
4969         gl_FUNC_VASPRINTF.
4970         (gl_FUNC_VASPRINTF): Invoke it.
4971         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
4972         here.
4973         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
4974
4975 2007-03-04  Bruno Haible  <bruno@clisp.org>
4976
4977         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
4978         REPLACE_GETTIMEOFDAY.
4979         * modules/sys_time (Makefile.am): Likewise.
4980         * m4/sys_time_h.m4: Likewise.
4981         * m4/gettimeofday.m4: Likewise.
4982
4983 2007-03-04  Bruno Haible  <bruno@clisp.org>
4984
4985         * modules/vasnprintf-posix-tests: New file.
4986         * tests/test-vasnprintf-posix.c: New file.
4987
4988         * modules/vasnprintf-posix: New file.
4989         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
4990         printf-frexpl.h.
4991         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
4992         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
4993         REPLACE_VASNPRINTF is defined.
4994         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
4995         gl_FUNC_VASNPRINTF.
4996         (gl_FUNC_VASNPRINTF): Invoke it.
4997         * m4/vasnprintf-posix.m4: New file.
4998         * m4/printf.m4: New file.
4999
5000 2007-03-04  Bruno Haible  <bruno@clisp.org>
5001
5002         Compile progreloc.c only if --enable-relocatable is specified.
5003         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
5004         if --enable-relocatable was specified.
5005         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
5006         lib_SOURCES.
5007
5008 2007-03-04  Jim Meyering  <jim@meyering.net>
5009
5010         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
5011         Use it consistently, rather than enumerating errno constants.
5012
5013 2007-03-04  Bruno Haible  <bruno@clisp.org>
5014
5015         * modules/xvasprintf-tests: New file.
5016         * tests/test-xvasprintf.c: New file.
5017
5018         * modules/vasprintf-tests: New file.
5019         * tests/test-vasprintf.c: New file.
5020
5021         * modules/vasnprintf-tests: New file.
5022         * tests/test-vasnprintf.c: New file.
5023
5024         * modules/vsnprintf-tests: New file.
5025         * tests/test-vsnprintf.c: New file.
5026
5027         * modules/snprintf-tests: New file.
5028         * tests/test-snprintf.c: New file.
5029
5030 2007-03-04  Bruno Haible  <bruno@clisp.org>
5031
5032         Compile relocatable.c only if --enable-relocatable is specified.
5033         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
5034         gl_RELOCATABLE_LIBRARY.
5035         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
5036         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
5037         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
5038         gl_RELOCATABLE_LIBRARY.
5039         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
5040         (Makefile.am): Remove lib_SOURCES.
5041         * modules/relocatable-lib-lgpl (configure.ac): Invoke
5042         gl_RELOCATABLE_LIBRARY.
5043         (Makefile.am): Remove lib_SOURCES.
5044         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
5045         always.
5046         * modules/relocatable-prog-wrapper (configure.ac): Invoke
5047         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
5048
5049 2007-03-04  Bruno Haible  <bruno@clisp.org>
5050
5051         * modules/argmatch-tests: New file.
5052         * tests/test-argmatch.c: New file.
5053
5054         * tests/test-allocsa.c (main): Halve the number of loop runs.
5055
5056         * modules/alloca-opt-tests: New file.
5057         * tests/test-alloca-opt.c: New file.
5058
5059 2007-03-04  Jim Meyering  <jim@meyering.net>
5060
5061         Work around difference between Linux ACLs and Solaris 10 ZFS.
5062         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
5063         for EINVAL.
5064
5065 2007-03-03  Bruno Haible  <bruno@clisp.org>
5066
5067         * modules/relocatable-prog (Depends-on): Add back progreloc's
5068         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
5069
5070 2007-03-03  Bruno Haible  <bruno@clisp.org>
5071
5072         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
5073         * modules/relocatable-lib: New file.
5074
5075 2007-03-03  Bruno Haible  <bruno@clisp.org>
5076
5077         * modules/relocatable-prog: Renamed from modules/relocatable.
5078         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
5079
5080 2007-03-03  Bruno Haible  <bruno@clisp.org>
5081
5082         * modules/relocatable-script (Files): Add doc/relocatable.texi,
5083         m4/relocatable-lib.m4.
5084         (Depends-on): Remove 'relocatable'.
5085         (configure.ac): Add gl_RELOCATABLE_NOP.
5086
5087 2007-03-03  Bruno Haible  <bruno@clisp.org>
5088
5089         * modules/relocatable-prog-wrapper: New file.
5090         * modules/relocatable (Depends-on): Add it. Remove all other
5091         dependencies except progname.
5092         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
5093
5094         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
5095         (gl_FUNC_STRERROR): Nop.
5096         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
5097
5098         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
5099         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
5100
5101         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
5102         (gl_FUNC_READLINK): Update.
5103
5104         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
5105
5106 2007-03-03  Bruno Haible  <bruno@clisp.org>
5107
5108         * lib/xreadlink.c: Include <unistd.h> unconditionally.
5109         * modules/xreadlink (Depends-on): Add unistd.
5110         * modules/xreadlink-with-size (Depends-on): Likewise.
5111
5112 2007-03-03  Bruno Haible  <bruno@clisp.org>
5113
5114         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
5115         extracted from gt_FUNC_SETENV.
5116         (gt_FUNC_SETENV): Remove macro.
5117         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
5118         remove gt_FUNC_SETENV.
5119
5120 2007-03-03  Bruno Haible  <bruno@clisp.org>
5121
5122         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
5123         ENABLE_RELOCATABLE here.
5124         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
5125
5126 2007-03-03  Bruno Haible  <bruno@clisp.org>
5127
5128         * modules/rbtreehash-list-tests (Depends-on): Add progname.
5129         * tests/test-rbtreehash_list.c: Include progname.h.
5130         (main): Call set_program_name.
5131
5132         * modules/rbtree-oset-tests (Depends-on): Add progname.
5133         * tests/test-rbtree_oset.c: Include progname.h.
5134         (main): Call set_program_name.
5135
5136         * modules/rbtree-list-tests (Depends-on): Add progname.
5137         * tests/test-rbtree_list.c: Include progname.h.
5138         (main): Call set_program_name.
5139
5140         * modules/linked-list-tests (Depends-on): Add progname.
5141         * tests/test-linked_list.c: Include progname.h.
5142         (main): Call set_program_name.
5143
5144 2007-03-03  Bruno Haible  <bruno@clisp.org>
5145
5146         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
5147         All uses of __restrict changed to _Restrict_.
5148         * lib/glob_.h (__restrict): Remove macro.
5149
5150 2007-03-02  Bruno Haible  <bruno@clisp.org>
5151
5152         * modules/gettext (configure.ac): Require gettext infrastructure
5153         from version 0.16.1.
5154
5155 2007-03-02  Bruno Haible  <bruno@clisp.org>
5156
5157         * modules/linkedhash-list-tests (Depends-on): Add progname.
5158         * tests/test-linkedhash_list.c: Include progname.h.
5159         (main): Call set_program_name.
5160
5161         * modules/carray-list-tests (Depends-on): Add progname.
5162         * tests/test-carray_list.c: Include progname.h.
5163         (main): Call set_program_name.
5164
5165         * modules/avltreehash-list-tests (Depends-on): Add progname.
5166         * tests/test-avltreehash_list.c: Include progname.h.
5167         (main): Call set_program_name.
5168
5169         * modules/avltree-oset-tests (Depends-on): Add progname.
5170         * tests/test-avltree_oset.c: Include progname.h.
5171         (main): Call set_program_name.
5172
5173         * modules/avltree-list-tests (Depends-on): Add progname.
5174         * tests/test-avltree_list.c: Include progname.h.
5175         (main): Call set_program_name.
5176
5177         * modules/array-oset-tests (Depends-on): Add progname.
5178         * tests/test-array_oset.c: Include progname.h.
5179         (main): Call set_program_name.
5180
5181         * modules/array-list-tests (Depends-on): Add progname.
5182         * tests/test-array_list.c: Include progname.h.
5183         (main): Call set_program_name.
5184
5185         * modules/argp-tests (Depends-on): Add progname.
5186         * tests/test-argp.c: Include argp.h first. Include progname.h.
5187         (main): Call set_program_name.
5188
5189 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
5190
5191         * doc/gnulib-tool.texi (Initial import): Reword description of
5192         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
5193         limited effect even if defined after the first system include.
5194
5195 2007-03-01  Bruno Haible  <bruno@clisp.org>
5196
5197         * build-aux/config.libpath: Update to libtool-1.5.22.
5198         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
5199
5200 2007-03-01  Bruno Haible  <bruno@clisp.org>
5201
5202         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
5203         foo_CFLAGS.
5204         Reported by Ralf Wildenhues.
5205
5206 2007-03-01  Bruno Haible  <bruno@clisp.org>
5207
5208         * build-aux/install-reloc: Remove object files left over by some
5209         compilers.
5210         Reported by Ralf Wildenhues.
5211
5212 2007-03-01  Bruno Haible  <bruno@clisp.org>
5213
5214         * build-aux/install-reloc: Break long lines.
5215
5216 2007-03-01  Bruno Haible  <bruno@clisp.org>
5217
5218         * doc/relocatable.texi: Document that it may not work on OpenBSD.
5219         Reported by Ralf Wildenhues.
5220
5221 2007-03-01  Bruno Haible  <bruno@clisp.org>
5222
5223         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
5224         include ordering constraints.
5225
5226 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5227
5228         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
5229         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
5230         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
5231         as another example.
5232         * lib/time_.h: Fix misspelling.
5233         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5234         Require gl_HEADER_TIME_H_DEFAULTS.
5235         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
5236         * m4/time_r.m4 (gl_TIME_R): Likewise.
5237         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
5238
5239 2007-03-01  Bruno Haible  <bruno@clisp.org>
5240
5241         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
5242         * m4/utimens.m4 (gl_UTIMENS): Likewise.
5243
5244 2007-03-01  Jim Meyering  <jim@meyering.net>
5245
5246         * modules/xreadlink (Maintainer): Add my name.
5247         * modules/xreadlink-with-size (Depends-on): Alphabetize.
5248
5249 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
5250             Bruno Haible  <bruno@clisp.org>
5251
5252         * build-aux/install-reloc: Compile also c-ctype.c.
5253         * build-aux/relocatable.sh.in: New file.
5254         * doc/relocatable.texi: New file.
5255         * doc/relocatable-maint.texi: New file.
5256         * doc/gnulib.texi: Include relocatable-maint.texi.
5257         * lib/progreloc.c: Include unistd.h unconditionally.
5258         * lib/relocwrapper.c: Include unistd.h unconditionally.
5259         Include c-ctype.h.
5260         (add_dotbin): Use c_tolower.
5261         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
5262         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
5263         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
5264         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
5265         to m4/relocatable-lib.m4.
5266         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
5267         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
5268         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
5269         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
5270         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
5271         * modules/relocatable: New file.
5272         * modules/relocatable-lib: New file.
5273         * modules/relocatable-script: New file.
5274
5275 2007-02-28  Bruno Haible  <bruno@clisp.org>
5276
5277         Import --enable-relocatable infrastructure.
5278         * build-aux/config.libpath: New file, from GNU gettext.
5279         * build-aux/install-reloc: New file, from GNU gettext.
5280         * build-aux/reloc-ldflags: New file, from GNU gettext.
5281         * lib/relocatable.h: New file, from GNU gettext.
5282         * lib/relocatable.c: New file, from GNU gettext.
5283         * lib/relocwrapper.c: New file, from GNU gettext.
5284         * m4/relocatable.m4: New file, from GNU gettext.
5285
5286 2007-02-28  Bruno Haible  <bruno@clisp.org>
5287
5288         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
5289
5290         * modules/xreadlink: New file, from GNU gettext with modifications.
5291         * lib/xreadlink.c: New file, from GNU gettext.
5292         * lib/xreadlink.h: Add comments.
5293         (xreadlink): New declaration.
5294
5295         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
5296         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
5297         lib/xreadlink-with-size.c.
5298         (configure.ac): Remove gl_XREADLINK invocation.
5299         (Makefile.am): Augment lib_SOURCES.
5300         * m4/xreadlink.m4: Remove file.
5301         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
5302         (xreadlink_with_size): Renamed from xreadink.
5303         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
5304         * modules/canonicalize (Depends-on): Replace xreadlink with
5305         xreadlink-with-size.
5306         * lib/canonicalize.c (canonicalize_filename_mode): Update.
5307
5308 2007-02-25  Jim Meyering  <jim@meyering.net>
5309
5310         * build-aux/announce-gen: When complaining about excess arguments,
5311         list them.
5312
5313 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
5314
5315         * README: Document signed integer overflow situation more
5316         accurately.
5317
5318 2007-02-25  Bruno Haible  <bruno@clisp.org>
5319
5320         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
5321         'a' or 'A' conversion.
5322
5323 2007-02-25  Bruno Haible  <bruno@clisp.org>
5324
5325         * modules/filename: Renamed from modules/pathname.
5326         (Files): Replace lib/pathname.h with lib/filename.h. Replace
5327         lib/concatpath.c with lib/concat-filename.c.
5328         (Makefile.am): Update.
5329         (Include): Replace pathname.h with filename.h.
5330         * lib/filename.h: Renamed from lib/pathname.h.
5331         (concatenated_filename): Renamed from concatenated_pathname.
5332         * lib/concat-filename.c: Renamed from lib/concatpath.c.
5333         (concatenated_filename): Renamed from concatenated_pathname.
5334         * lib/findprog.c: Include filename.h instead of pathname.h.
5335         (find_in_path): Update.
5336         * lib/javacomp.c: Include filename.h instead of pathname.h.
5337         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
5338         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
5339         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
5340         is_oldgcj_14_13_usable, is_javac_usable): Update.
5341         * lib/javaexec.c: Include filename.h instead of pathname.h.
5342         (execute_java_class): Update.
5343         * modules/findprog: Update.
5344         * modules/javacomp: Update.
5345         * modules/javaexec: Update.
5346         * MODULES.html.sh (File system functions): Add 'filename', remove
5347         'pathname'.
5348
5349 2007-02-25  Bruno Haible  <bruno@clisp.org>
5350
5351         * modules/printf-frexpl-tests: New file.
5352         * tests/test-printf-frexpl.c: New file.
5353
5354         * modules/printf-frexpl: New file.
5355         * lib/printf-frexpl.h: New file.
5356         * lib/printf-frexpl.c: New file.
5357         * m4/printf-frexpl.m4: New file.
5358
5359 2007-02-25  Bruno Haible  <bruno@clisp.org>
5360
5361         * modules/printf-frexp-tests: New file.
5362         * tests/test-printf-frexp.c: New file.
5363
5364         * modules/printf-frexp: New file.
5365         * lib/printf-frexp.h: New file.
5366         * lib/printf-frexp.c: New file.
5367         * m4/printf-frexp.m4: New file.
5368
5369 2007-02-25  Bruno Haible  <bruno@clisp.org>
5370
5371         Assume automake >= 1.10 for the tests.
5372         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
5373         * modules/arctwo-tests: Likewise.
5374         * modules/argp-tests: Likewise.
5375         * modules/avltree-list-tests: Likewise.
5376         * modules/avltree-oset-tests: Likewise.
5377         * modules/avltreehash-list-tests: Likewise.
5378         * modules/carray-list-tests: Likewise.
5379         * modules/crc-tests: Likewise.
5380         * modules/des-tests: Likewise.
5381         * modules/gc-arcfour-tests: Likewise.
5382         * modules/gc-arctwo-tests: Likewise.
5383         * modules/gc-des-tests: Likewise.
5384         * modules/gc-hmac-md5-tests: Likewise.
5385         * modules/gc-hmac-sha1-tests: Likewise.
5386         * modules/gc-md2-tests: Likewise.
5387         * modules/gc-md4-tests: Likewise.
5388         * modules/gc-md5-tests: Likewise.
5389         * modules/gc-pbkdf2-sha1-tests: Likewise.
5390         * modules/gc-rijndael-tests: Likewise.
5391         * modules/gc-sha1-tests: Likewise.
5392         * modules/gc-tests: Likewise.
5393         * modules/getaddrinfo-tests: Likewise.
5394         * modules/hmac-md5-tests: Likewise.
5395         * modules/hmac-sha1-tests: Likewise.
5396         * modules/linked-list-tests: Likewise.
5397         * modules/linkedhash-list-tests: Likewise.
5398         * modules/lock-tests: Likewise.
5399         * modules/md2-tests: Likewise.
5400         * modules/md4-tests: Likewise.
5401         * modules/md5-tests: Likewise.
5402         * modules/rbtree-list-tests: Likewise.
5403         * modules/rbtree-oset-tests: Likewise.
5404         * modules/rbtreehash-list-tests: Likewise.
5405         * modules/read-file-tests: Likewise.
5406         * modules/rijndael-tests: Likewise.
5407         * modules/stdint-tests: Likewise.
5408         * modules/tls-tests: Likewise.
5409
5410 2007-02-24  Bruno Haible  <bruno@clisp.org>
5411
5412         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
5413         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
5414         function; instead check whether isnan with a double argument links.
5415         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
5416         function; instead check whether isnan with a 'long double' argument
5417         links.
5418         Reported by Eric Blake <ebb9@byu.net>.
5419
5420 2007-02-24  Bruno Haible  <bruno@clisp.org>
5421
5422         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
5423         defined.
5424         * lib/isnanl.c: Remove all code. Just include isnan.c.
5425         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
5426
5427 2007-02-25  Jim Meyering  <jim@meyering.net>
5428
5429         Avoid conflicting types for 'unsetenv' on FreeBSD.
5430         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
5431         conflicting with FreeBSD's (5.0 and 6.1) function declaration
5432         in stdlib.h.
5433
5434 2007-02-24  Bruno Haible  <bruno@clisp.org>
5435
5436         * modules/isnanl-nolibm-tests: New file.
5437         * tests/test-isnanl.c: New file.
5438
5439         * modules/isnanl-nolibm: New file.
5440         * lib/isnanl.h: New file.
5441         * lib/isnanl.c: New file.
5442         * m4/isnanl.m4: New file.
5443
5444 2007-02-24  Bruno Haible  <bruno@clisp.org>
5445
5446         * modules/isnan-nolibm-tests: New file.
5447         * tests/test-isnan.c: New file.
5448
5449         * modules/isnan-nolibm: New file.
5450         * lib/isnan.h: New file.
5451         * lib/isnan.c: New file.
5452         * m4/isnan.m4: New file.
5453
5454 2007-02-24  Bruno Haible  <bruno@clisp.org>
5455
5456         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
5457         assume that an exponent fits in 20 bits.
5458
5459 2007-02-24  Jim Meyering  <jim@meyering.net>
5460
5461         * m4/regex.m4: Update the description of the configure-time option,
5462         --without-included-regex, to state accurately what the defaults are,
5463         and perhaps to give people an idea why using this option is risky.
5464
5465 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
5466
5467         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
5468         loops on small arguments.  This attempts to avoid the problem
5469         Bruno Haible reported for AIX 4.3.2 in
5470         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
5471
5472 2007-02-23  Bruno Haible  <bruno@clisp.org>
5473
5474         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
5475         Needed for help2man.
5476
5477 2007-02-23  Karl Berry  <karl@gnu.org>
5478
5479         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
5480         exists, foo.h should be cvs-ignored, not committed.
5481
5482 2007-02-23  Eric Blake  <ebb9@byu.net>
5483
5484         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
5485         * lib/stat-time.h (includes): Likewise.
5486         * lib/utimecmp.c (includes): Likewise.
5487         * lib/utimens.h (includes): Likewise.
5488         * lib/getdate.y (includes): Also include "timespec.h" for use
5489         internal to the module.
5490         * modules/utimens (Depends-on): Revert yesterday's patch.
5491         * modules/nanosleep (Depends-on): Add missing dependency.
5492
5493 2007-02-22  Bruno Haible  <bruno@clisp.org>
5494
5495         * lib/glob.c: Don't include getlogin_r.h.
5496
5497 2007-02-22  Jim Meyering  <jim@meyering.net>
5498
5499         * modules/utimens (Depends-on): Add timespec, required for
5500         utimens.h's inclusion of timespec.h.
5501
5502 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
5503
5504         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
5505         long unreadable paths in GNU/Linux.  Problem reported by Andreas
5506         Schwab in
5507         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
5508         I'll try to think of a better way to fix the Solaris problem.
5509
5510         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
5511         like glibc; on Solaris 10, it fails with errno == EINVAL.
5512         POSIX says the behavior is unspecified if the first argument is NULL,
5513         so play it safe and never pass NULL to the system getcwd.
5514
5515 2007-02-21  Jim Meyering  <jim@meyering.net>
5516
5517         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
5518         of gettimeofday.  It would conflict with the one now always
5519         provided via sys_time_.h.  Reported by Matthew Woehlke, as
5520         an IRIX 6.5 build failure.
5521
5522 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
5523
5524         Minor fixups to port to Solaris 10 with Sun C 5.8.
5525         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
5526         * modules/getcwd (Depends-on): Add dirfd.
5527         * lib/putenv.c (putenv): #undef it.
5528         (rpl_putenv): New decl.
5529         (malloc, free): Include <stdlib.h> rather than prototyping separately.
5530
5531 2007-02-20  Bruno Haible  <bruno@clisp.org>
5532
5533         * modules/stdio-tests: New file.
5534         * tests/test-stdio.c: New file.
5535
5536         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
5537         (Depends-on): Add stdio.
5538         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5539         (Include): Use <stdio.h> instead of vsnprintf.h.
5540         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
5541         HAVE_DECL_VSNPRINTF.
5542         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
5543
5544         * modules/snprintf (Files): Remove lib/snprintf.h.
5545         (Depends-on): Add stdio.
5546         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5547         (Include): Use <stdio.h> instead of snprintf.h.
5548         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
5549         HAVE_DECL_SNPRINTF.
5550         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
5551         * lib/getaddrinfo.c: Likewise.
5552
5553         * modules/stdio: New file.
5554         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
5555         * lib/snprintf.h: Remove file.
5556         * lib/vsnprintf.h: Remove file.
5557         * lib/.cppi-disable: Remove snprintf.h.
5558         * m4/stdio_h.m4: New file.
5559         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
5560
5561 2007-02-20  Jim Meyering  <jim@meyering.net>
5562
5563         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
5564         used by e.g., mingw.  From Bruno Haible.
5565
5566 2007-02-19  Bruno Haible  <bruno@clisp.org>
5567
5568         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
5569         warnings.
5570         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5571
5572 2007-02-19  Bruno Haible  <bruno@clisp.org>
5573
5574         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
5575         from mingw users.
5576
5577 2007-02-19  Bruno Haible  <bruno@clisp.org>
5578
5579         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
5580         warnings.
5581         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
5582
5583 2007-02-19  Jim Meyering  <jim@meyering.net>
5584
5585         Don't use FD after a successful "fdopendir (fd)".
5586         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
5587         Reset it by calling dirfd on the just-obtained DIR*.
5588
5589         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
5590         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
5591
5592 2007-02-18  Bruno Haible  <bruno@clisp.org>
5593
5594         * lib/readlink.c: Include <unistd.h>.
5595         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
5596         HAVE_READLINK.
5597         * modules/readlink (Depends-on): Add unistd.
5598         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5599         (Include): Add <unistd.h>.
5600
5601         * lib/getlogin_r.h: Remove file.
5602         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
5603         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
5604         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
5605         HAVE_DECL_GETLOGIN_R.
5606         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
5607         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5608         (Include): Use <unistd.h> instead of getlogin_r.h.
5609
5610         * lib/getcwd.h: Remove file.
5611         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
5612         * lib/xgetcwd.c: Likewise.
5613         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
5614         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
5615         * modules/getcwd (Files): Remove lib/getcwd.h.
5616         (Depends-on): Add unistd.
5617         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5618         (Include): Use <unistd.h> instad of getcwd.h.
5619
5620         * lib/ftruncate.c: Include <unistd.h> first.
5621         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
5622         Set HAVE_FTRUNCATE.
5623         * modules/ftruncate (Depends-on): Add unistd.
5624         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5625
5626         * lib/fchdir.c: Include <unistd.h> first.
5627         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
5628         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
5629         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
5630         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5631         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
5632
5633         * lib/dup2.c: Include <unistd.h> first.
5634         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
5635         HAVE_DUP2.
5636         * modules/dup2 (Depends-on): Add unistd.
5637         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5638
5639         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
5640         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
5641         REPLACE_CHOWN. Don't define chown as a macro here.
5642         * modules/chown (Depends-on): Add unistd.
5643         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5644
5645         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
5646         Add definition for GL_LINK_WARNING.
5647         (chown, dup2): New declarations.
5648         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
5649         link warning.
5650         (ftruncate): New declaration.
5651         (getcwd): New declaration, taken from old getcwd.h.
5652         (getlogin_r): New declaration, taken from old getlogin_r.h.
5653         (readlink): New declaration.
5654         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
5655         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
5656         (gl_PREREQ_UNISTD): Remove macro.
5657         (gl_UNISTD_MODULE_INDICATOR): New macro.
5658         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
5659         many new variables. Don't set UNISTD_H.
5660         * modules/unistd (Description): Change.
5661         (Depends-on): Add link-warning.
5662         (configure.ac): Update.
5663         (Makefile.am): Create unistd.h always. Substitute many new variables
5664         into it.
5665
5666 2007-02-18  Bruno Haible  <bruno@clisp.org>
5667
5668         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
5669         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
5670         HAVE_GETSUBOPT.
5671         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
5672         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
5673         * lib/getsubopt.h: Remove file.
5674         * modules/getsubopt (Files): Remove lib/getsubopt.h.
5675         (Depends-on): Add stdlib.
5676         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5677         (Includes): Use <stdlib.h> instead of getsubopt.h.
5678         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
5679         Set HAVE_GETSUBOPT.
5680         * lib/getsubopt.c: Don't include getsubopt.h.
5681
5682 2007-02-18  Bruno Haible  <bruno@clisp.org>
5683
5684         * modules/fchdir (Depends-on): Add dup2.
5685
5686 2007-02-18  Bruno Haible  <bruno@clisp.org>
5687
5688         * lib/stdlib_.h: Handle glibc's special invocation convention
5689         specially.
5690
5691 2007-02-18  Bruno Haible  <bruno@clisp.org>
5692
5693         * modules/stdlib-tests: New file.
5694         * tests/test-stdlib.c: New file.
5695
5696         * modules/mkstemp (Files): Remove lib/mkstemp.h.
5697         (Depends-on): Add stdlib.
5698         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5699         (Includes): Use <stdlib.h> instead of mkstemp.h.
5700         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5701         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
5702         * lib/mkstemp.c: Don't include mkstemp.h.
5703         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
5704         * lib/stdlib--.h: Don't include mkstemp.h.
5705
5706         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
5707         (Depends-on): Add stdlib.
5708         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5709         (Includes): Use <stdlib.h> instead of mkdtemp.h.
5710         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5711         HAVE_MKDTEMP.
5712         * lib/mkdtemp.c: Don't include mkdtemp.h.
5713         * lib/clean-temp.c: Don't include mkdtemp.h.
5714
5715         * modules/exit (Files): Remove lib/exit.h.
5716         (Depends-on): Add stdlib.
5717         (Makefile.am): Remove lib_SOURCES.
5718         (Include): Use <stdlib.h> instead of exit.h.
5719         * lib/argmatch.c: Don't include exit.h.
5720         * lib/execute.c: Likewise.
5721         * lib/pagealign_alloc.c: Likewise.
5722         * lib/pipe.c: Likewise.
5723         * lib/wait-process.c: Likewise.
5724         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
5725         * lib/exitfail.c: Likewise.
5726         * lib/savewd.c: Likewise.
5727         * lib/xsetenv.c: Likewise.
5728
5729         * modules/stdlib: New file.
5730         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
5731         and extra comments about mkstemp().
5732         * lib/exit.h: Remove file.
5733         * lib/mkdtemp.h: Remove file.
5734         * lib/mkstemp.h: Remove file.
5735         * m4/stdlib_h.m4: New file.
5736         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
5737
5738 2007-02-18  Bruno Haible  <bruno@clisp.org>
5739
5740         * modules/math-tests: New file.
5741         * tests/test-math.c: New file.
5742
5743         * modules/math: New file.
5744         * modules/mathl (Files): Remove lib/mathl.h.
5745         (Depends-on): Add math.
5746         (Makefile.am): Don't mention mathl.h.
5747         (Include): Use <math.h> instead of mathl.h.
5748         * lib/math_.h: New file.
5749         * lib/mathl.h: Remove file.
5750         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
5751         mathl.h.
5752         * lib/asinl.c: Likewise.
5753         * lib/atanl.c: Likewise.
5754         * lib/ceill.c: Likewise.
5755         * lib/cosl.c: Likewise.
5756         * lib/expl.c: Likewise.
5757         * lib/floorl.c: Likewise.
5758         * lib/frexpl.c: Likewise.
5759         * lib/ldexpl.c: Likewise.
5760         * lib/logl.c: Likewise.
5761         * lib/sincosl.c: Likewise.
5762         * lib/sinl.c: Likewise.
5763         * lib/sqrtl.c: Likewise.
5764         * lib/tanl.c: Likewise.
5765         * lib/trigl.c: Likewise.
5766         * m4/math_h.m4: New file.
5767         * MODULES.html.sh (Mathematics): Add math.
5768
5769 2007-02-17  Bruno Haible  <bruno@clisp.org>
5770
5771         * modules/wctype-tests: New file.
5772         * tests/test-wctype.c: New file.
5773
5774         * modules/wchar-tests: New file.
5775         * tests/test-wchar.c: New file.
5776
5777         * modules/unistd-tests: New file.
5778         * tests/test-unistd.c: New file.
5779
5780         * modules/time-tests: New file.
5781         * tests/test-time.c: New file.
5782
5783         * modules/sysexits-tests: New file.
5784         * tests/test-sysexits.c: New file.
5785
5786         * modules/sys_time-tests: New file.
5787         * tests/test-sys_time.c: New file.
5788
5789         * modules/sys_stat-tests: New file.
5790         * tests/test-sys_stat.c: New file.
5791
5792         * modules/sys_socket-tests: New file.
5793         * tests/test-sys_socket.c: New file.
5794
5795         * modules/sys_select-tests: New file.
5796         * tests/test-sys_select.c: New file.
5797
5798         * modules/string-tests: New file.
5799         * tests/test-string.c: New file.
5800
5801         * modules/stdbool-tests: New file.
5802         * tests/test-stdbool.c: New file.
5803
5804         * modules/netinet_in-tests: New file.
5805         * tests/test-netinet_in.c: New file.
5806
5807         * modules/inttypes-tests: New file.
5808         * tests/test-inttypes.c: New file.
5809
5810         * modules/fcntl-tests: New file.
5811         * tests/test-fcntl.c: New file.
5812
5813         * modules/byteswap-tests: New file.
5814         * tests/test-byteswap.c: New file.
5815
5816         * modules/arpa_inet-tests: New file.
5817         * tests/test-arpa_inet.c: New file.
5818
5819 2007-02-17  Bruno Haible  <bruno@clisp.org>
5820
5821         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
5822         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
5823         if the corresponding module is not enabled. Emit link warnings if
5824         the function is used nevertheless.
5825         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
5826         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
5827         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
5828         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
5829         * modules/inttypes (Depends-on): Add link-warning.
5830         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5831         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
5832         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
5833         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
5834         * modules/imaxdiv (configure.ac): Likewise.
5835         * modules/strtoimax (configure.ac): Likewise.
5836         * modules/strtoumax (configure.ac): Likewise.
5837
5838 2007-02-17  Bruno Haible  <bruno@clisp.org>
5839
5840         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
5841         gl_STRING_MODULE_INDICATOR_DEFAULTS.
5842         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
5843         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
5844
5845 2007-02-17  Bruno Haible  <bruno@clisp.org>
5846
5847         * modules/link-warning: New file.
5848         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
5849         * lib/string_.h (GL_LINK_WARNING): Remove definition.
5850         * modules/string (Depends-on): Add link-warning.
5851         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5852         string.h.
5853         * MODULES.html.sh (Support for building libraries and executables): Add
5854         link-warning.
5855
5856 2007-02-17  Bruno Haible  <bruno@clisp.org>
5857
5858         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
5859         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
5860         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
5861         long lines.
5862
5863 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
5864             Bruno Haible  <bruno@clisp.org>
5865
5866         * modules/tmpfile: New file.
5867         * lib/tmpfile.c: New file.
5868         * m4/tmpfile.m4: New file.
5869         * MODULES.html.sh (func_all_modules): New section "Input/output".
5870
5871 2007-02-15  Bruno Haible  <bruno@clisp.org>
5872
5873         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
5874         (supports_delete_on_close): New function.
5875         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
5876
5877 2007-02-14  Bruno Haible  <bruno@clisp.org>
5878
5879         * modules/mbspcasecmp-tests: New file.
5880         * tests/test-mbspcasecmp.sh: New file.
5881         * tests/test-mbspcasecmp.c: New file.
5882
5883         New module mbspcasecmp.
5884         * modules/mbspcasecmp: New file.
5885         * lib/mbspcasecmp.c: New file.
5886         * lib/string_.h (strncasecmp): Change warning message.
5887         (mbspcasecmp): New declaration.
5888         * m4/mbspcasecmp.m4: New file.
5889         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5890         GNULIB_MBSPCASECMP.
5891         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
5892         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
5893
5894 2007-02-14  Bruno Haible  <bruno@clisp.org>
5895
5896         * modules/mbsncasecmp-tests: New file.
5897         * tests/test-mbsncasecmp.sh: New file.
5898         * tests/test-mbsncasecmp.c: New file.
5899
5900         New module mbsncasecmp.
5901         * modules/mbsncasecmp: New file.
5902         * lib/mbsncasecmp.c: New file.
5903         * lib/string_.h (mbsncasecmp): New declaration.
5904         * m4/mbsncasecmp.m4: New file.
5905         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5906         GNULIB_MBSNCASECMP.
5907         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
5908         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
5909
5910 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
5911
5912         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
5913         Verify that it doesn't overlap with our flags.
5914         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
5915         do not have the desired effect in multibyte locales; instead, use
5916         mbscasecmp.
5917         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
5918         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
5919         we don't require GNU fnmatch ourselves (if our users require it, they
5920         should do so explicitly).
5921
5922         Fix regex code so it doesn't rely on strcasecmp.
5923         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
5924         Otherwise, include gnulib's langinfo.h.
5925         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
5926         undesirable behavior in non-C locales.  Instead, rely on localecharset.
5927         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
5928         * modules/regex (FILES): Remove m4/codeset.m4.
5929         (Depends-on): Add localcharset.  Remove strcase.
5930
5931 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5932
5933         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
5934         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
5935
5936 2007-02-13  Bruno Haible  <bruno@clisp.org>
5937
5938         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
5939         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5940
5941 2007-02-12  Bruno Haible  <bruno@clisp.org>
5942
5943         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
5944         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
5945         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
5946         time warning rather than a link error.
5947
5948 2007-02-12  Bruno Haible  <bruno@clisp.org>
5949
5950         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
5951         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
5952         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5953
5954 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5955
5956         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
5957         args, not 2.
5958
5959 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5960
5961         New module 'time', so that apps can include <time.h> as per
5962         POSIX and GNU instead of separate include files like time_r.h
5963         and timegm.h.  This implementation tries out a simpler approach
5964         for replacing decls in standard include files (as compared to
5965         the string module), somewhat as an experiment.
5966
5967         * config/srclist.txt: Comment out mktime.c for now.
5968         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
5969         since it doesn't apply any more.  Use generic wording instead.
5970         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
5971         'time'.
5972         * lib/time_.h, m4/time_h.m4, modules/time: New files.
5973         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
5974         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
5975         Don't include <sys/types.h>; no longer needed since we assume C89.
5976         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
5977         * lib/strftime.c: Likewise.
5978         * lib/time_r.c: Likewise.
5979         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
5980         * lib/nanosleep.c: Include <time.h> first, to check interface.
5981         * lib/strptime.c: Likewise.
5982         * lib/time_r.c: Likewise.
5983         * lib/timegm.c: Likewise.
5984         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
5985         needed.
5986         * lib/timegm.c: Don't include timegm.h; no longer needed.
5987         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
5988         time.h now handles any problems in that area.
5989         (struct timespec, nanosleep): Remove; time.h now arranges for these.
5990         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
5991         that time.h defines struct timespec.
5992         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
5993         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
5994         handles that.
5995         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
5996         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
5997         needed.  Set REPLACE_LOCALTIME.
5998         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
5999         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
6000         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
6001         nanosleep; time_h.m4 now does that.  Don't require
6002         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
6003         module handles this now.
6004         * modules/getdate (Depends-on): Remove timespec.  Add time.
6005         * modules/nanosleep (Depends-on): Likewise.
6006         * modules/stat-time (Depends-on): Likewise.
6007         * modules/nanosleep (Include): Include time.h, not timespec.h.
6008         * modules/strptime (Files): Remove lib/strptime.h.
6009         (Depends-on): Add extensions, time.
6010         (Include): Include time.h, not strptime.h.
6011         * modules/time_r (Files): Remove lib/time_r.h.
6012         (Depends-on): Add time.
6013         (Include): Include time.h, not time_r.h.
6014         * modules/timegm: Likewise.
6015         * modules/timespec (Description): Now does timespec-related decls
6016         of our own, instead of struct timespec itself.
6017         (Depends-on): Add time; remove extensions.
6018         (Maintainer): Add self.
6019         * modules/utimecmp (Depends-on): Add time; remove timespec.
6020         * modules/utimens (Depends-on): Likewise.
6021         * modules/xnanosleep (Depends-on): Likewise.
6022
6023 2007-02-11  Bruno Haible  <bruno@clisp.org>
6024
6025         * lib/c-strstr.c: Include allocsa.h.
6026         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6027         * lib/c-strcasestr.c: Include allocsa.h.
6028         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6029         * lib/strcasestr.c: Include allocsa.h.
6030         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6031         * lib/mbsstr.c: Include allocsa.h.
6032         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6033         allocsa/freesa instead of malloc/free.
6034         * lib/mbscasestr.c: Include allocsa.h.
6035         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6036         allocsa/freesa instead of malloc/free.
6037         * modules/c-strstr (Depends-on): Add allocsa.
6038         * modules/c-strcasestr (Depends-on): Likewise.
6039         * modules/strcasestr (Depends-on): Likewise.
6040         * modules/mbsstr (Depends-on): Likewise.
6041         * modules/mbscasestr (Depends-on): Likewise.
6042
6043 2007-02-11  Bruno Haible  <bruno@clisp.org>
6044
6045         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
6046
6047         * modules/mbsspn-tests: New file.
6048         * tests/test-mbsspn.sh: New file.
6049         * tests/test-mbsspn.c: New file.
6050
6051 2007-02-11  Bruno Haible  <bruno@clisp.org>
6052
6053         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
6054
6055         * modules/mbspbrk-tests: New file.
6056         * tests/test-mbspbrk.sh: New file.
6057         * tests/test-mbspbrk.c: New file.
6058
6059 2007-02-11  Bruno Haible  <bruno@clisp.org>
6060
6061         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
6062         unneeded cast.
6063
6064         * modules/mbscspn-tests: New file.
6065         * tests/test-mbscspn.sh: New file.
6066         * tests/test-mbscspn.c: New file.
6067
6068 2007-02-11  Bruno Haible  <bruno@clisp.org>
6069
6070         * modules/mbscasecmp-tests: New file.
6071         * tests/test-mbscasecmp.sh: New file.
6072         * tests/test-mbscasecmp.c: New file.
6073
6074 2007-02-11  Bruno Haible  <bruno@clisp.org>
6075
6076         Ensure O(n) worst-case complexity of mbscasestr.
6077         * lib/mbscasestr.c: Include stdbool.h.
6078         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6079         functions.
6080         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
6081         the bookkeeping indicates that it's worth it.
6082         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
6083
6084         * modules/mbscasestr-tests: New file.
6085         * tests/test-mbscasestr1.c: New file.
6086         * tests/test-mbscasestr2.sh: New file.
6087         * tests/test-mbscasestr2.c: New file.
6088         * tests/test-mbscasestr3.sh: New file.
6089         * tests/test-mbscasestr3.c: New file.
6090         * tests/test-mbscasestr4.sh: New file.
6091         * tests/test-mbscasestr4.c: New file.
6092         * m4/locale-tr.m4: New file.
6093
6094 2007-02-11  Bruno Haible  <bruno@clisp.org>
6095
6096         Ensure O(n) worst-case complexity of mbsstr.
6097         * lib/mbsstr.c: Include stdbool.h.
6098         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6099         functions.
6100         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
6101         bookkeeping indicates that it's worth it.
6102         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
6103
6104         * modules/mbsstr-tests: New file.
6105         * tests/test-mbsstr1.c: New file.
6106         * tests/test-mbsstr2.sh: New file.
6107         * tests/test-mbsstr2.c: New file.
6108         * tests/test-mbsstr3.sh: New file.
6109         * tests/test-mbsstr3.c: New file.
6110         * m4/locale-fr.m4: New file.
6111
6112 2007-02-11  Bruno Haible  <bruno@clisp.org>
6113
6114         * lib/mbsrchr.c (mbsrchr): Fix bug.
6115
6116         * modules/mbsrchr-tests: New file.
6117         * tests/test-mbsrchr.sh: New file.
6118         * tests/test-mbsrchr.c: New file.
6119
6120 2007-02-11  Bruno Haible  <bruno@clisp.org>
6121
6122         * lib/mbschr.c (mbschr): Fix bug.
6123
6124         * modules/mbschr-tests: New file.
6125         * tests/test-mbschr.sh: New file.
6126         * tests/test-mbschr.c: New file.
6127         * m4/locale-zh.m4: New file.
6128
6129 2007-02-11  Bruno Haible  <bruno@clisp.org>
6130
6131         Support for copying multibyte string iterators.
6132         * lib/mbiter.h: Include <string.h>.
6133         (mbiter_multi_copy): New function.
6134         (mbi_copy): New macro.
6135         * lib/mbuiter.h: Include <string.h>.
6136         (mbuiter_multi_copy): New function.
6137         (mbui_copy): New macro.
6138
6139 2007-02-11  Bruno Haible  <bruno@clisp.org>
6140
6141         New module mbslen.
6142         * modules/mbslen: New file.
6143         * lib/mbslen.c: New file.
6144         * lib/string_.h (mbslen): New declaration.
6145         * m4/mbslen.m4: New file.
6146         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6147         GNULIB_MBSLEN.
6148         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
6149         * MODULES.html.sh (Internationalization functions): Add mbslen.
6150
6151 2007-02-11  Bruno Haible  <bruno@clisp.org>
6152
6153         Ensure O(n) worst-case complexity of strcasestr substitute.
6154         * lib/strcasestr.c: Include stdbool.h.
6155         (knuth_morris_pratt): New function.
6156         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6157         bookkeeping indicates that it's worth it.
6158         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
6159
6160         * modules/strcasestr-tests: New file.
6161         * tests/test-strcasestr.c: New file.
6162
6163 2007-02-11  Bruno Haible  <bruno@clisp.org>
6164
6165         Ensure O(n) worst-case complexity of c_strcasestr.
6166         * lib/c-strcasestr.c: Include stdbool.h, string.h.
6167         (knuth_morris_pratt): New function.
6168         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
6169         the bookkeeping indicates that it's worth it.
6170         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
6171
6172         * modules/c-strcasestr-tests: New file.
6173         * tests/test-c-strcasestr.c: New file.
6174
6175 2007-02-11  Bruno Haible  <bruno@clisp.org>
6176
6177         Ensure O(n) worst-case complexity of c_strstr.
6178         * lib/c-strstr.c: Include stdbool.h, string.h.
6179         (knuth_morris_pratt): New function.
6180         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6181         bookkeeping indicates that it's worth it.
6182         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
6183
6184         * lib/c-strstr.c: Complete rewrite for maintainability.
6185
6186         * modules/c-strstr-tests: New file.
6187         * tests/test-c-strstr.c: New file.
6188
6189 2007-02-11  Bruno Haible  <bruno@clisp.org>
6190
6191         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
6192         5.2.1 and earlier, whereby \055 was treated just like the range
6193         delimiter '-'.
6194         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
6195
6196 2007-02-08  Bruno Haible  <bruno@clisp.org>
6197
6198         * modules/regex (Depends-on): Add stdbool.
6199         Reported by Dalibor Topic <robilad@kaffe.org>.
6200
6201 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
6202
6203         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
6204         Prefer returning from main to exiting from it.
6205         Remove unnecessary parens after sizeof.
6206
6207 2007-02-05  Bruno Haible  <bruno@clisp.org>
6208
6209         New module mbssep.
6210         * modules/mbssep: New file.
6211         * lib/mbssep.c: New file.
6212         * lib/string_.h (strsep): Add a conditional link warning.
6213         (mbssep): New declaration.
6214         * m4/mbssep.m4: New file.
6215         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6216         GNULIB_MBSSEP.
6217         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
6218         * MODULES.html.sh (Internationalization functions): Add mbssep.
6219
6220 2007-02-05  Bruno Haible  <bruno@clisp.org>
6221
6222         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
6223         Optimize search in case of 1 delimiter.
6224
6225 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6226
6227         * lib/acl.h: Include sys/types.h before sys/acl.h.
6228
6229 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6230
6231         Merge upstream fix for glibc bugzilla #3957:
6232
6233         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
6234
6235         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
6236         bit for RE_HAT_LISTS_NOT_NEWLINE.
6237         (build_charclass_op): Remove bogus comment.
6238
6239 2007-02-05  Simon Josefsson  <simon@josefsson.org>
6240
6241         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
6242
6243 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6244
6245         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
6246         * lib/memmem.c [!defined _LIBC]: Include config.h.
6247
6248 2007-02-04  Bruno Haible  <bruno@clisp.org>
6249
6250         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
6251         warning message.
6252
6253 2007-02-04  Bruno Haible  <bruno@clisp.org>
6254
6255         New module mbstok_r.
6256         * modules/mbstok_r: New file.
6257         * lib/mbstok_r.c: New file.
6258         * lib/string_.h (strtok_r): Change argument names to match the
6259         comments. Add a conditional link warning.
6260         (mbstok_r): New declaration.
6261         * m4/mbstok_r.m4: New file.
6262         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6263         GNULIB_MBSTOK_R.
6264         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
6265         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
6266
6267 2007-02-04  Bruno Haible  <bruno@clisp.org>
6268
6269         New module mbsspn.
6270         * modules/mbsspn: New file.
6271         * lib/mbsspn.c: New file.
6272         * lib/string_.h (strspn): Add a conditional link warning.
6273         (mbsspn): New declaration.
6274         * m4/mbsspn.m4: New file.
6275         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6276         GNULIB_MBSSPN.
6277         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
6278         * MODULES.html.sh (Internationalization functions): Add mbsspn.
6279
6280 2007-02-04  Bruno Haible  <bruno@clisp.org>
6281
6282         New module mbspbrk.
6283         * modules/mbspbrk: New file.
6284         * lib/mbspbrk.c: New file.
6285         * lib/string_.h (strpbrk): Add a conditional link warning.
6286         (mbspbrk): New declaration.
6287         * m4/mbspbrk.m4: New file.
6288         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6289         GNULIB_MBSPBRK.
6290         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
6291         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
6292
6293 2007-02-04  Bruno Haible  <bruno@clisp.org>
6294
6295         New module mbscspn.
6296         * modules/mbscspn: New file.
6297         * lib/mbscspn.c: New file.
6298         * lib/string_.h (strcspn): Add a conditional link warning.
6299         (mbscspn): New declaration.
6300         * m4/mbscspn.m4: New file.
6301         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6302         GNULIB_MBSCSPN.
6303         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
6304         * MODULES.html.sh (Internationalization functions): Add mbscspn.
6305
6306 2007-02-04  Bruno Haible  <bruno@clisp.org>
6307
6308         New module mbscasestr, reduced goal of strcasestr.
6309         * modules/mbscasestr: New file.
6310         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
6311         (mbscasestr): Renamed from strcasestr.
6312         * lib/strcasestr.c: Don't include mbuiter.h.
6313         (strcasestr): Remove support for multibyte locales.
6314         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
6315         Change the conditional link warning.
6316         (mbscasestr): New declaration.
6317         * m4/mbscasestr.m4: New file.
6318         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
6319         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
6320         REPLACE_STRCASESTR.
6321         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
6322         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6323         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6324         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
6325         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
6326         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6327         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
6328         (Depends-on): Remove mbuiter.
6329         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
6330
6331 2007-02-04  Bruno Haible  <bruno@clisp.org>
6332
6333         Simplify handling of strncasecmp.
6334         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
6335         the conditional link warning.
6336         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6337         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
6338         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
6339         * modules/strcase (configure.ac): Don't invoke
6340         gl_STRING_MODULE_INDICATOR.
6341         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
6342
6343 2007-02-04  Bruno Haible  <bruno@clisp.org>
6344
6345         New module mbscasecmp, reduced goal of strcasecmp.
6346         * modules/mbscasecmp: New file.
6347         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
6348         (mbscasecmp): Renamed from strcasecmp.
6349         * lib/strcasecmp.c: Don't include mbuiter.h.
6350         (strcasecmp): Remove support for multibyte locales.
6351         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
6352         Change the conditional link warning.
6353         (mbscasecmp): New declaration.
6354         * m4/mbscasecmp.m4: New file.
6355         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
6356         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
6357         REPLACE_STRCASECMP.
6358         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
6359         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6360         GNULIB_MBSCASECMP.
6361         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
6362         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
6363         * modules/strcase (Files): Remove m4/mbrtowc.m4.
6364         (Depends-on): Remove mbuiter.
6365         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
6366
6367 2007-02-04  Bruno Haible  <bruno@clisp.org>
6368
6369         New module mbsstr. Remove module strstr.
6370         * modules/mbsstr: New file.
6371         * modules/strstr: Remove file.
6372         * lib/mbsstr.c: Renamed from lib/strstr.c.
6373         (mbsstr): Renamed from strstr.
6374         * lib/string_.h (strstr): Remove declaration. Change the conditional
6375         link warning.
6376         (mbsstr): New declaration.
6377         * m4/mbsstr.m4: New file.
6378         * m4/strstr.m4: Remove file.
6379         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
6380         REPLACE_STRSTR.
6381         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
6382         Don't initialize GNULIB_STRSTR.
6383         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
6384         substitute GNULIB_STRSTR and REPLACE_STRSTR.
6385         * MODULES.html.sh (Internationalization functions): Add mbsstr.
6386         (Support for systems lacking ANSI C 89): Remove strstr.
6387
6388 2007-02-04  Bruno Haible  <bruno@clisp.org>
6389
6390         New module mbsrchr.
6391         * modules/mbsrchr: New file.
6392         * lib/mbsrchr.c: New file.
6393         * lib/string_.h (strrchr): Add a conditional link warning.
6394         (mbsrchr): New declaration.
6395         * m4/mbsrchr.m4: New file.
6396         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6397         GNULIB_MBSRCHR.
6398         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
6399         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
6400
6401 2007-02-04  Bruno Haible  <bruno@clisp.org>
6402
6403         New module mbschr.
6404         * modules/mbschr: New file.
6405         * lib/mbschr.c: New file.
6406         * lib/string_.h (strchr): Add a conditional link warning.
6407         (mbschr): New declaration.
6408         * m4/mbschr.m4: New file.
6409         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6410         GNULIB_MBSCHR.
6411         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
6412         * MODULES.html.sh (Internationalization functions): Add mbschr.
6413
6414 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6415
6416         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
6417
6418         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
6419
6420 2007-02-04  Bruno Haible  <bruno@clisp.org>
6421
6422         New module description section 'configure.ac-early'.
6423         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
6424         (func_get_autoconf_early_snippet): New function.
6425         (func_import, func_create_testdir): Use it. Remove special cases for
6426         modules 'extensions' and 'lock'.
6427         * modules/extensions (configure.ac-early): Require
6428         gl_USE_SYSTEM_EXTENSIONS.
6429         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
6430
6431 2007-02-04  Bruno Haible  <bruno@clisp.org>
6432
6433         Make use of gcj-4.3's -fsource and -ftarget option.
6434         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
6435         and if so try the options -fsource and -ftarget.
6436         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
6437         source_version, ftarget_option, target_version arguments.
6438         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
6439         (is_envjavac_oldgcj_14_14_usable): Renamed from
6440         is_envjavac_gcj_14_14_usable.
6441         (is_envjavac_oldgcj_14_13_usable): Renamed from
6442         is_envjavac_gcj_14_13_usable.
6443         (is_gcj_present): Update.
6444         (is_gcj_43, is_gcj43_usable): New functions.
6445         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
6446         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
6447         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
6448         try the options -fsource and -ftarget.
6449
6450 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
6451
6452         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
6453         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
6454         larger value.
6455
6456 2007-02-03  Jim Meyering  <jim@meyering.net>
6457
6458         Give tools a better chance to allocate space for very large buffers.
6459         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
6460
6461         Make pwd and readlink work also when run with an unreadable parent dir
6462         on systems with openat support.
6463         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
6464         provided getcwd function, even when we have openat support.
6465         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
6466
6467 2007-02-02  Bruno Haible  <bruno@clisp.org>
6468
6469         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6470         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
6471         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
6472         portability problems if one of these functions is only used on specific
6473         platforms.
6474         Reported by Paul Eggert.
6475
6476 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
6477
6478         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
6479         is causing more trouble than it's curing.
6480         * lib/regex_internal.h (__mempcpy): Remove.
6481         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
6482         (and make the code a tad smaller to boot).
6483         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
6484
6485 2007-02-02  Jim Meyering  <jim@meyering.net>
6486
6487         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
6488         section, not in the Makefile.am: one.
6489
6490 2007-02-02  Eric Blake  <ebb9@byu.net>
6491
6492         * lib/strchrnul.c: Always include config.h first.
6493
6494         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
6495         gnulib strstr is not necessary here.
6496
6497 2007-02-02  Simon Josefsson  <simon@josefsson.org>
6498
6499         * m4/socklen.m4: Fix typo.
6500
6501 2007-02-02  Eric Blake  <ebb9@byu.net>
6502
6503         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
6504         * modules/netinet_in (Makefile.am): Likewise.
6505
6506 2007-02-01  Bruno Haible  <bruno@clisp.org>
6507
6508         * lib/string_.h (GL_LINK_WARNING): New macro.
6509         (strcasecmp, strstr, strcasestr): If provided by the system,
6510         conditionally define as a macro that leads to a warning instead of to
6511         an error.
6512         (strncasecmp): Conditionally define as a macro that leads to a warning.
6513
6514 2007-02-01  Karl Berry  <karl@gnu.org>
6515
6516         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
6517
6518 2007-02-01  Bruno Haible  <bruno@clisp.org>
6519
6520         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
6521         renamings.
6522
6523 2007-02-01  Eric Blake  <ebb9@byu.net>
6524
6525         * modules/regex (Depends-on): Revert dependence on mempcpy.
6526         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
6527         module's definition of mempcpy.
6528         Reported by Paul Eggert.
6529
6530 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
6531
6532         * lib/string_.h: If the gnulib module XYZ is not present, undefine
6533         the symbol XYZ before redefining it.  This fixes a problem with
6534         programs that don't use XYZ, when compiled on systems that define
6535         XYZ to something else.
6536
6537 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
6538
6539         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
6540         occurs when "mkdir -m foo" creates a setgid directory that is (1)
6541         writeable to group or other and (2) is intended to have a special
6542         mode bit that is set or cleared.  In such a case, the directory
6543         should be neither group- nor other-writeable until the special
6544         mode bits are right.
6545
6546 2007-01-31  Eric Blake  <ebb9@byu.net>
6547
6548         * modules/mountlist (Depends-on): Add strstr.
6549
6550         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
6551         bug.
6552         * modules/string (Makefile.am): Remove redundant replacement.
6553         * modules/regex (Depends-on): Add mempcpy.
6554
6555 2007-01-31  Bruno Haible  <bruno@clisp.org>
6556
6557         New module description field 'Link'.
6558         * gnulib-tool (func_usage): Document --extract-link-directive.
6559         (sed_extract_prog): Recognize 'Link' directive.
6560         (func_get_link_directive): New function.
6561         (func_import): Show summary of link directives.
6562         Handle --extract-link-directive option.
6563         * modules/acl (Link): New section.
6564         * modules/clock-time (Link): New section.
6565         * modules/euidaccess (Link): New section.
6566         * modules/gettext (Link): New section.
6567         * modules/iconv (Link): New section.
6568         * modules/lock (Link): New section.
6569         * modules/nanosleep (Link): New section.
6570         * modules/readline (Link): New section.
6571
6572 2007-01-27  Bruno Haible  <bruno@clisp.org>
6573
6574         Enforce the use of gnulib modules for unportable <string.h> functions.
6575         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
6576         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
6577         (gl_HEADER_STRING_H_BODY): Require it.
6578         * lib/string_.h: If the gnulib module XYZ is not present, redefine
6579         the symbol XYZ to one that gives a link error.
6580         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
6581         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
6582         * modules/mempcpy (configure.ac): Likewise.
6583         * modules/memrchr (configure.ac): Likewise.
6584         * modules/stpcpy (configure.ac): Likewise.
6585         * modules/stpncpy (configure.ac): Likewise.
6586         * modules/strcase (configure.ac): Likewise.
6587         * modules/strcasestr (configure.ac): Likewise.
6588         * modules/strchrnul (configure.ac): Likewise.
6589         * modules/strdup (configure.ac): Likewise.
6590         * modules/strndup (configure.ac): Likewise.
6591         * modules/strnlen (configure.ac): Likewise.
6592         * modules/strpbrk (configure.ac): Likewise.
6593         * modules/strsep (configure.ac): Likewise.
6594         * modules/strstr (configure.ac): Likewise.
6595         * modules/strtok_r (configure.ac): Likewise.
6596
6597 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
6598
6599         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
6600
6601 2007-01-30  Jim Meyering  <jim@meyering.net>
6602
6603         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
6604
6605 2007-01-29  Bruno Haible  <bruno@clisp.org>
6606
6607         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
6608         * lib/execute.c: Likewise.
6609         * lib/pipe.c: Likewise.
6610         * lib/printf-args.h: Likewise.
6611         * lib/printf-args.c: Likewise.
6612         * lib/printf-parse.c: Likewise.
6613         * lib/vasnprintf.c: Likewise.
6614
6615 2007-01-29  Eric Blake  <ebb9@byu.net>
6616
6617         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
6618         declaration.
6619
6620 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
6621
6622         * lib/strptime.h (strptime): Use 'restrict' for args where
6623         POSIX requires this.
6624         * lib/strptime.c (strptime): Likewise.
6625         Change license notice from LGPL to GPL, since gnulib-tool will
6626         change this as needed.
6627         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
6628         defined.
6629         Include "strptime.h" first, to check interface.
6630         Do not #undef _LIBC and _NL_CURRENT.
6631         Do not include <stdlib.h>; no longer needed.
6632         Include "time_r.h" and declare ptime_locale_status
6633         only if _LIBC is not defined.
6634         (__P): Remove unused macro.
6635         (match_string): Bring back glibc version, but use it only if _LIBC
6636         is defined.
6637         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
6638         Remove unnecessary assertion and abort() call.
6639         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
6640         * m4/strptime.m4: Fix serial number comment.
6641         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
6642         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
6643         (Depends-on): Add time_r.
6644
6645 2007-01-29  Bruno Haible  <bruno@clisp.org>
6646
6647         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
6648         strptime.
6649         * modules/strptime (Depends-on): Add stdbool.
6650         * lib/strptime.h: Include <time.h> always. Add comments.
6651
6652 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
6653
6654         * modules/strptime: New file.
6655         * lib/strptime.h: New file.
6656         * lib/strptime.c: New file.
6657         * m4/strptime.m4: New file.
6658
6659 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
6660
6661         * MODULES.html.sh: New module mpsort.
6662         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
6663
6664         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
6665         a circularity problem with HP-UX ia64 reported by Bob Proulx in
6666         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
6667         All uses changed.
6668         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
6669         All uses changed.
6670         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
6671         to _Restrict_.
6672         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
6673         the parameter matches the prototype.
6674
6675 2007-01-28  Jim Meyering  <jim@meyering.net>
6676
6677         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
6678         sys/time.h here, reverting that part of the previous patch:
6679         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
6680
6681 2007-01-28  Bruno Haible  <bruno@clisp.org>
6682
6683         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
6684         value of $(SYS_TIME_H).
6685         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
6686         remove it conditionally, too. [added by Jim Meyering]
6687         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
6688         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6689         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
6690         GETTIMEOFDAY_REPLACEMENT to 1.
6691
6692 2007-01-28  Bruno Haible  <bruno@clisp.org>
6693
6694         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
6695         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
6696         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
6697         Set UNISTD_H instead of UNISTD_H2.
6698         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
6699
6700 2007-01-28  Bruno Haible  <bruno@clisp.org>
6701
6702         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
6703         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
6704
6705 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6706
6707         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
6708         (func_create_testdir): Ensure C locale for `grep' and `tr'
6709         character ranges.
6710         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
6711         ACLOCAL_AMFLAGS parsing state machine.
6712
6713 2007-01-27  Bruno Haible  <bruno@clisp.org>
6714
6715         * modules/unistr/base: Update.
6716
6717 2007-01-27  Bruno Haible  <bruno@clisp.org>
6718
6719         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
6720         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
6721         * modules/unistr/u32-mbtouc-unsafe: Renamed from
6722         modules/unistr/u32-mbtouc.
6723         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
6724         * lib/unistr.h: Update.
6725         * lib/linebreak.c: Update.
6726         * modules/unistr/u32-mbtouc: Renamed from
6727         modules/unistr/u32-mbtouc-safe.
6728         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
6729         * lib/unistr.h: Update.
6730         * lib/unistr/u32-to-u8.c: Update.
6731         * lib/unistr/u32-to-u16.c: Update.
6732
6733 2007-01-27  Bruno Haible  <bruno@clisp.org>
6734
6735         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
6736         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
6737         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
6738         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
6739         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
6740         * modules/unistr/u16-mbtouc-unsafe: Renamed from
6741         modules/unistr/u16-mbtouc.
6742         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
6743         * lib/unistr.h: Update.
6744         * lib/linebreak.c: Update.
6745         * modules/linebreak: Update.
6746         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
6747         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
6748         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
6749         * modules/unistr/u16-mbtouc: Renamed from
6750         modules/unistr/u16-mbtouc-safe.
6751         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
6752         * lib/unistr.h: Update.
6753         * lib/unistr/u16-to-u8.c: Update.
6754         * modules/unistr/u16-to-u8: Update.
6755         * lib/unistr/u16-to-u32.c: Update.
6756         * modules/unistr/u16-to-u32: Update.
6757
6758 2007-01-27  Bruno Haible  <bruno@clisp.org>
6759
6760         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
6761         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
6762         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
6763         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
6764         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
6765         * modules/unistr/u8-mbtouc-unsafe: Renamed from
6766         modules/unistr/u8-mbtouc.
6767         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
6768         * lib/unistr.h: Update.
6769         * lib/striconveh.c: Update.
6770         * modules/striconveh: Update.
6771         * lib/linebreak.c: Update.
6772         * modules/linebreak: Update.
6773         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
6774         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
6775         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
6776         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
6777         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
6778         * lib/unistr.h: Update.
6779         * lib/striconveh.c: Update.
6780         * modules/striconveh: Update.
6781         * lib/unistr/u8-to-u16.c: Update.
6782         * modules/unistr/u8-to-u16: Update.
6783         * lib/unistr/u8-to-u32.c: Update.
6784         * modules/unistr/u8-to-u32: Update.
6785
6786 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6787
6788         Sync from Libtool.
6789         * lib/argz.c: Do not include strings.h nor memory.h, include
6790         string.h unconditionally.  Patch by Simon Josefsson.
6791
6792 2007-01-27  Bruno Haible  <bruno@clisp.org>
6793
6794         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
6795         from gl_HEADER_STRING_H_BODY.
6796         (gl_HEADER_STRING_H_BODY): Require it.
6797         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
6798         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
6799         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
6800         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
6801         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
6802         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
6803         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
6804         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
6805         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
6806         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
6807         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
6808         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
6809         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
6810         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
6811         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6812
6813 2007-01-27  Bruno Haible  <bruno@clisp.org>
6814
6815         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
6816         check_PROGRAMS into noinst_PROGRAMS.
6817         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
6818         check_PROGRAMS in this case.
6819         (func_import): Set for_test to false.
6820         (func_create_testdir): Set for_test to true.
6821
6822 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
6823             Bruno Haible  <bruno@clisp.org>
6824
6825         * modules/strcasestr (Files): Remove lib/strcasestr.h.
6826         (Depends-on): Add string.
6827         (Includes): Use <string.h> instead of strcasestr.h.
6828         * modules/string (Makefile.am): Also substitute the value of
6829         REPLACE_STRCASESTR.
6830         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
6831         assume strcasestr is declared in <string.h> not <strings.h>. Also
6832         set REPLACE_STRCASESTR.
6833         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
6834         REPLACE_STRCASESTR.
6835         * lib/strcasestr.h: Remove file.
6836         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
6837         * lib/string_.h (strcasestr): New declaration.
6838
6839 2007-01-27  Bruno Haible  <bruno@clisp.org>
6840
6841         * lib/string_.h: Use 'extern'.
6842
6843 2007-01-27  Jim Meyering  <jim@meyering.net>
6844
6845         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
6846         of set-but-not-used local, "q".
6847
6848         * lib/mempcpy.c: Include <config.h> before <string.h>.
6849         This fixes a compilation error on HP-UX, due to the system's
6850         "restrict"-using mempcpy prototype.
6851
6852 2007-01-26  Bruno Haible  <bruno@clisp.org>
6853
6854         Small optimization.
6855         * lib/javacomp.c: Include c-strstr.h.
6856          (is_envjavac_gcj): Use c_strstr instead of strstr.
6857         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
6858
6859 2007-01-26  Bruno Haible  <bruno@clisp.org>
6860
6861         * MODULES.html.sh (Unicode string functions): Add the new modules.
6862
6863         * modules/uniconv/u32-strconv-to-locale: New file.
6864         * lib/uniconv/u32-strconv-to-locale.c: New file.
6865
6866         * modules/uniconv/u16-strconv-to-locale: New file.
6867         * lib/uniconv/u16-strconv-to-locale.c: New file.
6868
6869         * modules/uniconv/u8-strconv-to-locale: New file.
6870         * lib/uniconv/u8-strconv-to-locale.c: New file.
6871
6872         * modules/uniconv/u32-strconv-from-locale: New file.
6873         * lib/uniconv/u32-strconv-from-locale.c: New file.
6874
6875         * modules/uniconv/u16-strconv-from-locale: New file.
6876         * lib/uniconv/u16-strconv-from-locale.c: New file.
6877
6878         * modules/uniconv/u8-strconv-from-locale: New file.
6879         * lib/uniconv/u8-strconv-from-locale.c: New file.
6880
6881         * modules/uniconv/u32-strconv-to-enc: New file.
6882         * lib/uniconv/u32-strconv-to-enc.c: New file.
6883         * modules/uniconv/u32-strconv-to-enc-tests: New file.
6884         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
6885
6886         * modules/uniconv/u16-strconv-to-enc: New file.
6887         * lib/uniconv/u16-strconv-to-enc.c: New file.
6888         * lib/uniconv/u-strconv-to-enc.h: New file.
6889         * modules/uniconv/u16-strconv-to-enc-tests: New file.
6890         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
6891
6892         * modules/uniconv/u8-strconv-to-enc: New file.
6893         * lib/uniconv/u8-strconv-to-enc.c: New file.
6894         * modules/uniconv/u8-strconv-to-enc-tests: New file.
6895         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
6896
6897         * modules/uniconv/u32-strconv-from-enc: New file.
6898         * lib/uniconv/u32-strconv-from-enc.c: New file.
6899         * modules/uniconv/u32-strconv-from-enc-tests: New file.
6900         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
6901
6902         * modules/uniconv/u16-strconv-from-enc: New file.
6903         * lib/uniconv/u16-strconv-from-enc.c: New file.
6904         * modules/uniconv/u16-strconv-from-enc-tests: New file.
6905         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
6906
6907         * modules/uniconv/u8-strconv-from-enc: New file.
6908         * lib/uniconv/u8-strconv-from-enc.c: New file.
6909         * lib/uniconv/u-strconv-from-enc.h: New file.
6910         * modules/uniconv/u8-strconv-from-enc-tests: New file.
6911         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
6912
6913         * modules/uniconv/u32-conv-from-enc: New file.
6914         * lib/uniconv/u32-conv-from-enc.c: New file.
6915         * modules/uniconv/u32-conv-from-enc-tests: New file.
6916         * tests/uniconv/test-u32-conv-from-enc.c: New file.
6917
6918         * modules/uniconv/u16-conv-from-enc: New file.
6919         * lib/uniconv/u16-conv-from-enc.c: New file.
6920         * lib/uniconv/u-conv-from-enc.h: New file.
6921         * modules/uniconv/u16-conv-from-enc-tests: New file.
6922         * tests/uniconv/test-u16-conv-from-enc.c: New file.
6923
6924         * modules/uniconv/u8-conv-from-enc: New file.
6925         * lib/uniconv/u8-conv-from-enc.c: New file.
6926         * modules/uniconv/u8-conv-from-enc-tests: New file.
6927         * tests/uniconv/test-u8-conv-from-enc.c: New file.
6928
6929         * modules/uniconv/base: New file.
6930         * lib/uniconv.h: New file.
6931
6932 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
6933
6934         * doc/gnulib-tool.texi (Initial import): Update to match current
6935         behavior with strdup module.
6936         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
6937         * lib/memmem.h: Remove; all uses removed.  This is now done
6938         by <string.h>.
6939         * lib/mempcpy.h: Likewise.
6940         * lib/memrchr.h: Likewise.
6941         * lib/stpcpy.h: Likewise.
6942         * lib/stpncpy.h: Likewise.
6943         * lib/strcase.h: Likewise.
6944         * lib/strchrnul.h: Likewise.
6945         * lib/strdup.h: Likewise.
6946         * lib/strndup.h: Likewise.
6947         * lib/strnlen.h: Likewise.
6948         * lib/strpbrk.h: Likewise.
6949         * lib/strsep.h: Likewise.
6950         * lib/strstr.h: Likewise.
6951         * lib/strtok_r.h: Likewise.
6952         * lib/string_.h: New file.
6953         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
6954         Rely on <string.h> instead.
6955         * lib/canon-host.c: Likewise.
6956         * lib/chdir-long.c: Likewise.
6957         * lib/concatpath.c: Likewise.
6958         * lib/exclude.c: Likewise.
6959         * lib/fchdir.c: Likewise.
6960         * lib/getaddrinfo.c: Likewise.
6961         * lib/getcwd.c: Likewise.
6962         * lib/getsubopt.c: Likewise.
6963         * lib/glob.c: Likewise.
6964         * lib/hard-locale.c: Likewise.
6965         * lib/iconvme.c: Likewise.
6966         * lib/javacomp.c: Likewise.
6967         * lib/mempcpy.c: Likewise.
6968         * lib/memrchr.c: Likewise.
6969         * lib/regex_internal.h: Likewise.
6970         * lib/stpncpy.c: Likewise.
6971         * lib/strcasecmp.c: Likewise.
6972         * lib/strchrnul.c: Likewise.
6973         * lib/strdup.c: Likewise.
6974         * lib/striconv.c: Likewise.
6975         * lib/striconveh.c: Likewise.
6976         * lib/striconveha.c: Likewise.
6977         * lib/strncasecmp.c: Likewise.
6978         * lib/strndup.c: Likewise.
6979         * lib/strnlen.c: Likewise.
6980         * lib/strsep.c: Likewise.
6981         * lib/strstr.c: Likewise.
6982         * lib/strtok_r.c: Likewise.
6983         * lib/userspec.c: Likewise.
6984         * lib/w32spawn.h: Likewise.
6985         * lib/xstrndup.c: Likewise.
6986         * lib/mountlist.c (strstr): Remove decl.
6987         * m4/string_h.m4: New file.
6988         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
6989         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
6990         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
6991         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
6992         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
6993         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
6994         Set REPLACE_STRCASECMP if necessary.
6995         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
6996         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
6997         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
6998         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
6999         HAVE_DECL_STRDUP if necessary.
7000         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
7001         since gl_FUNC_STRNDUP does that now.
7002         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
7003         Check for decl here...
7004         (gl_PREREQ_STRNLEN): ... not here.
7005         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
7006         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
7007         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
7008         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
7009         necessary.
7010         * modules/string: New file.
7011         * modules/memmem (Files): Remove special-purpose include file.
7012         (Depends-on): Add string.
7013         (Include): Include <string.h>, not the removed file.
7014         * modules/mempcpy: Likewise.
7015         * modules/memrchr: Likewise.
7016         * modules/stpcpy: Likewise.
7017         * modules/stpncpy: Likewise.
7018         * modules/strcase: Likewise.
7019         * modules/strchrnul: Likewise.
7020         * modules/strdup: Likewise.
7021         * modules/strndup: Likewise.
7022         * modules/strnlen: Likewise.
7023         * modules/strpbrk: Likewise.
7024         * modules/strsep: Likewise.
7025         * modules/strstr: Likewise.
7026         * modules/strtok_r: Likewise.
7027         * tests/test-dirname.c: Don't include "strdup.h", since
7028         <string.h> now suffices.
7029         * tests/test-memmem.c: Don't include "memmem.h", since
7030         <string.h> now suffices.
7031
7032 2007-01-25  Bruno Haible  <bruno@clisp.org>
7033
7034         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
7035         *resultp is 0.
7036
7037         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
7038         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
7039         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
7040         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
7041
7042         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
7043         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
7044         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
7045         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
7046         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
7047         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
7048
7049 2007-01-24  Bruno Haible  <bruno@clisp.org>
7050
7051         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
7052         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
7053         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
7054         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
7055         gl_FUNC_FTS_CORE.
7056         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
7057         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
7058         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
7059         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
7060         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
7061         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
7062         gl_FUNC_FCHOWNAT.
7063         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
7064         gl_FUNC_STRFTIME.
7065         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
7066         Reported by Ralf Wildenhues.
7067
7068 2007-01-24  Bruno Haible  <bruno@clisp.org>
7069
7070         Drop AC_REQUIRE calls that are redundant with the module dependencies.
7071         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
7072         gl_GETADDRINFO.
7073         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
7074         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
7075         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
7076
7077 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
7078
7079         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
7080         Don't use 'exit'; just return from 'main'.
7081         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
7082
7083         * lib/fnmatch_.h: Readjust white space and comments to match
7084         glibc, to avoid spurious diffs.
7085
7086 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7087
7088         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
7089         2004-12-01 change by Jakub Jelinek, since this code won't compile
7090         if !LIBC.  Problem reported by Bob Proulx.
7091
7092 2007-01-23  Bruno Haible  <bruno@clisp.org>
7093
7094         * lib/striconveh.c: Include c-strcaseeq.h.
7095         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
7096         * modules/striconveh (Depends-on): Add c-strcaseeq.
7097
7098 2007-01-23  Bruno Haible  <bruno@clisp.org>
7099
7100         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
7101
7102         * modules/c-strcaseeq: New file.
7103         * lib/c-strcaseeq.h: New file.
7104
7105         * modules/streq: New file.
7106         * lib/streq.h: New file.
7107
7108 2007-01-23  Bruno Haible  <bruno@clisp.org>
7109
7110         * modules/striconveha-tests: New file.
7111         * tests/test-striconveha.c: New file.
7112
7113         * lib/striconveha.h: Include <stdbool.h>.
7114         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
7115         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
7116         (mem_iconveha_notranslit): Renamed from mem_iconveha.
7117         (mem_iconveha): New function.
7118         (str_iconveha_notranslit): Renamed from str_iconveha.
7119         (str_iconveha): New function.
7120         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
7121         c-strcase.
7122
7123 2007-01-23  Bruno Haible  <bruno@clisp.org>
7124
7125         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
7126         encodings without forgiving before trying any encoding with handler.
7127         (str_iconveha): Try all encodings without forgiving before trying any
7128         encoding with handler.
7129
7130 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7131
7132         Import the following changes from libc.
7133
7134         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7135
7136         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
7137
7138         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
7139
7140         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
7141         normal_bracket label.
7142
7143         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
7144
7145         [BZ #361]
7146         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
7147         to normal_bracket after fetching the next character.
7148
7149 2007-01-22  Bruno Haible  <bruno@clisp.org>
7150
7151         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
7152         argument.
7153         * lib/striconveh.c (iconv_carefully_1): New function.
7154         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
7155         argument.
7156         (str_cd_iconveh): Update.
7157         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
7158         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
7159         * tests/test-striconveh.c (MAGIC): New macro.
7160         (new_offsets): New function.
7161         (main): Test call with and without offsets.
7162
7163 2007-01-22  Bruno Haible  <bruno@clisp.org>
7164
7165         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
7166         * modules/sys_select (Makefile.am): Likewise.
7167         * modules/sys_socket (Makefile.am): Likewise.
7168         * modules/sys_time (Makefile.am): Likewise.
7169
7170 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7171
7172         * modules/gettimeofday (License): Change from GPL to LGPL, since
7173         gettimeofday is a library function.
7174
7175 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7176
7177         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
7178
7179 2007-01-21  Bruno Haible  <bruno@clisp.org>
7180
7181         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
7182
7183 2007-01-21  Bruno Haible  <bruno@clisp.org>
7184
7185         * modules/striconveha: New file.
7186         * lib/striconveha.h: New file.
7187         * lib/striconveha.c: New file.
7188         * MODULES.html.sh (Internationalization functions): Add striconveha.
7189         * lib/striconv.c (str_iconv): Optimize the case of an empty input
7190         string.
7191         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
7192
7193 2007-01-21  Bruno Haible  <bruno@clisp.org>
7194
7195         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
7196         * lib/striconveh.c (str_iconveh): Likewise.
7197
7198 2007-01-21  Bruno Haible  <bruno@clisp.org>
7199
7200         * lib/striconveh.h (mem_iconveh): New declaration.
7201         * lib/striconveh.c (mem_iconveh): New function.
7202         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
7203
7204 2007-01-21  Bruno Haible  <bruno@clisp.org>
7205
7206         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
7207
7208         * lib/striconveh.h (mem_cd_iconveh): Change specification.
7209         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
7210         original result buffer.
7211         (str_cd_iconveh): Update.
7212         * tests/test-striconveh.c (main): Update.
7213
7214         * lib/striconv.h (mem_cd_iconv): Change specification.
7215         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
7216         result buffer.
7217         (str_cd_iconv): Update.
7218         * tests/test-striconv.c (main): Update.
7219
7220 2007-01-21  Bruno Haible  <bruno@clisp.org>
7221
7222         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
7223
7224 2007-01-20  Jim Meyering  <jim@meyering.net>
7225
7226         * lib/userspec.c (parse_with_separator): If a user or group string
7227         starts with "+", skip the corresponding name-to-ID look-up, since
7228         such a look-up must fail: user and group names may not include "+".
7229
7230 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
7231
7232         * lib/poll.c: Include sys/time.h and time.h unconditionally,
7233         since we now assume the sys_time module.
7234         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
7235         check for sys/time.h; no longer needed.
7236         * modules/poll (Depends-on): Depend on sys_time.
7237
7238 2007-01-18  Bruno Haible  <bruno@clisp.org>
7239
7240         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
7241         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7242
7243         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
7244         gettimeofday.
7245
7246         * tests/test-gettimeofday.c: Include <time.h>.
7247         (dummy): Remove variable.
7248
7249         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
7250         gl_HEADER_SYS_TIME_H.
7251         (gl_HEADER_SYS_TIME_H): New macro.
7252
7253         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
7254         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7255         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
7256         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
7257         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7258         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
7259         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
7260         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7261         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
7262         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
7263         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7264
7265         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
7266         last change; it caused a compilation error when cross-compiling to
7267         Cygwin.
7268
7269 2007-01-18  Jim Meyering  <jim@meyering.net>
7270
7271         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
7272         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
7273         than the race-prone "test -d sys || mkdir sys".
7274         (configure.ac): Use AC_PROG_MKDIR_P.
7275         * modules/sys_select: Likewise.
7276         * modules/sys_socket: Likewise.
7277         * modules/sys_time: Likewise.
7278
7279 2007-01-18  Eric Blake  <ebb9@byu.net>
7280
7281         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
7282         replace gettimeofday.
7283         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
7284         name, to avoid infinite recursion.
7285
7286 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
7287
7288         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
7289         module sys_time.
7290         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
7291         assume timespec.h defines struct timeval.
7292         * lib/settime.c: Likewise.
7293         * lib/utimens.c: Likewise.
7294         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
7295         since we now assume the gettimeofday module.
7296         * lib/tempname.c (__gen_tempname): Likewise.
7297         * lib/gettimeofday.h: Remove.
7298         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
7299         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
7300         Include <time.h>, for 'time()'.
7301         (localtime_buffer_addr): Also use this workaround if
7302         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
7303         to simplify the uses.  All uses changed.
7304         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
7305         that #undef is inside {}, and 'const' follows type name consistently.
7306         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
7307         (gettimeofday): Do not use the maximum possible value for
7308         tv->tv_usec, since that might break usages other than ls.c.
7309         Instead, we'll leave ls.c alone.  This undoes today's patch
7310         by Bruno.  Add a compile-time warning for 1s-clock resolution;
7311         we've never observed the problem but might as well keep the
7312         canary.
7313         * lib/nanosleep.c: Include timespec.h first, for interface check.
7314         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
7315         now assume the sys_time module.
7316         * lib/tempname.c: Likewise.
7317         * lib/timespec.h: Likewise.
7318         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
7319         needed.
7320         * lib/strftime.c: Likewise.
7321         * lib/timespec.h: Likewise.
7322         * lib/posixtm.c: Include posixtm.h first, for interface check.
7323         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
7324         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
7325         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
7326         * lib/sys_time_.h: New file.
7327         * lib/timespec.h (struct timespec): Use long int, not long.
7328         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7329         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
7330         Remove obsolescent call to AC_HEADER_TIME.
7331         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
7332         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7333         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7334         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
7335         Likewise.
7336         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
7337         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
7338         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
7339         into the sys_time module.  Check for gettimeofday just once.
7340         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
7341         for gettimeofday signature to just check the signature.  Merely
7342         compile it, since linking doesn't test signature.  Improve test for
7343         whether gettimeofday.o is actually needed.
7344         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
7345         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
7346         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
7347         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7348         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
7349         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
7350         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
7351         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
7352         than worrying about sys/time.h.
7353         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7354         Don't bother worrying about TIME_WITH_SYS_TIME.
7355         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
7356         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
7357         * m4/sys_time_h.m4: New file.
7358         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
7359         Don't include sys/time.h.  Return from main rather than exiting.
7360         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
7361         all uses changed.
7362         * modules/gethrxtime (Depends-on): Add sys_time.
7363         * modules/gettime (Depends-on): Likewise.
7364         * modules/gettimeofday (Depends-on): Likewise.
7365         * modules/nanosleep (Depends-on): Likewise.
7366         * modules/settime (Depends-on): Likewise.
7367         * modules/tempname (Depends-on): Likewise.
7368         * modules/utimens (Depends-on): Likewise.
7369         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
7370         (Include:) Change back to <sys/time.h>.
7371         (Maintainer:) Add self.
7372         * modules/sys_time: New file.
7373         * modules/tempname (Depends-on): Add gettimeofday.
7374         * tests/test-gettimeofday.c: Include <sys/time.h>
7375         rather than gettimeofday.h.
7376
7377 2007-01-17  Bruno Haible  <bruno@clisp.org>
7378
7379         * gnulib-tool (func_get_license): Revert last patch. Instead, let
7380         the license default to GPL.
7381         (func_create_testdir): Don't complain if a module is LGPL and its
7382         tests module depends on GPLed modules.
7383
7384 2007-01-17  Bruno Haible  <bruno@clisp.org>
7385
7386         * lib/gettimeofday.c (gettimeofday): Add code for the case
7387         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
7388         maximum possible value for tv->tv_usec, rather than the minimum one.
7389
7390 2005-10-08  Martin Lambers  <marlam@marlam.de>
7391 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7392 2007-01-16  Bruno Haible  <bruno@clisp.org>
7393
7394         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
7395         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
7396         gl_FUNC_GETTIMEOFDAY.
7397         (Include): Add gettimeofday.h.
7398         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
7399         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
7400         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
7401         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
7402         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
7403         * lib/gettimeofday.h: New file.
7404         * lib/gettimeofday.c: Include <sys/timeb.h>.
7405         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
7406         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7407         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
7408         fall back on time().
7409
7410         * tests/test-gettimeofday.c: New file.
7411         * modules/gettimeofday-tests: New file.
7412
7413 2007-01-16  Eric Blake  <ebb9@byu.net>
7414
7415         * modules/fnmatch (Depends-on): Depend on wchar.
7416         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
7417         * m4/fnmatch.m4: Likewise.
7418         * modules/mbchar (Makefile.am): Assume <wchar.h>.
7419         * m4/mbchar.m4: Likewise.
7420         * modules/mbswidth (Depends-on): Depend on wchar.
7421         * lib/mbswidth.c: Assume <wchar.h>.
7422         * m4/mbswidth.m4: Likewise.
7423         * modules/quotearg (Depends-on): Depend on wchar.
7424         * lib/quotearg.c: Assume <wchar.h>.
7425         * m4/quotearg.m4: Likewise.
7426         * modules/regex (Depends-on): Depend on wchar.
7427         * lib/regex_internal.h: Assume <wchar.h>.
7428         * m4/regex.m4: Likewise.
7429         * modules/stdint (Depends-on): Depend on wchar.
7430         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
7431         * m4/stdint.m4: Likewise.
7432         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
7433         * modules/strftime (Depends-on): Depend on wchar.
7434         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
7435         * modules/strtol (Depends-on): Depend on wchar.
7436         * lib/strtol.c: Assume <wchar.h>.
7437         * modules/wcwidth (Depends-on): Depend on wchar.
7438         * lib/wcwidth.h: Assume <wchar.h>.
7439         * m4/wcwidth.m4: Likewise.
7440
7441 2007-01-16  Bruno Haible  <bruno@clisp.org>
7442
7443         * modules/csharpexec-script: New, created from...
7444         * modules/csharpexec: ... this.
7445
7446 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
7447
7448         * modules/javaexec-script: New, created from...
7449         * modules/javaexec: ... this.
7450
7451 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7452
7453         * modules/poll (Dependencies): Add sys_select.
7454
7455 2007-01-15  Jim Meyering  <jim@meyering.net>
7456
7457         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
7458         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
7459         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
7460         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
7461
7462 2007-01-15  Bruno Haible  <bruno@clisp.org>
7463
7464         * modules/striconveh: New file.
7465         * lib/striconveh.h: New file.
7466         * lib/striconveh.c: New file.
7467         * MODULES.html.sh (Internationalization functions): Add striconveh.
7468
7469         * modules/striconveh-tests: New file.
7470         * tests/test-striconveh.c: New file.
7471
7472 2007-01-15  Bruno Haible  <bruno@clisp.org>
7473
7474         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
7475         not from GNU libiconv or GNU libc.
7476
7477 2007-01-15  Bruno Haible  <bruno@clisp.org>
7478
7479         * doc/gnulib-intro.texi (Copyright): Explain the different license
7480         terms for module descriptions, autoconf macros, tests, documentation.
7481
7482 2007-01-14  Bruno Haible  <bruno@clisp.org>
7483
7484         * modules/striconv-tests: New file.
7485         * tests/test-striconv.c: New file.
7486
7487 2007-01-14  Bruno Haible  <bruno@clisp.org>
7488
7489         * modules/iconv-tests: New file.
7490         * tests/test-iconv.c: New file.
7491
7492 2007-01-14  Bruno Haible  <bruno@clisp.org>
7493
7494         * gnulib-tool (func_get_license): For test modules, use the license of
7495         the main module.
7496
7497 2007-01-14  Bruno Haible  <bruno@clisp.org>
7498
7499         * modules/iconv (Include): Clarify that <iconv.h> can only be included
7500         if iconv is found to exist.
7501
7502 2007-01-14  Bruno Haible  <bruno@clisp.org>
7503
7504         * modules/c-ctype-tests: New file.
7505         * tests/test-c-ctype.c: New file.
7506
7507 2007-01-14  Bruno Haible  <bruno@clisp.org>
7508
7509         * modules/binary-io-tests: New file.
7510         * tests/test-binary-io.sh: New file.
7511         * tests/test-binary-io.c: New file.
7512
7513 2007-01-14  Bruno Haible  <bruno@clisp.org>
7514
7515         * modules/array-oset-tests: New file.
7516         * tests/test-array_oset.c: New file.
7517
7518 2007-01-14  Bruno Haible  <bruno@clisp.org>
7519
7520         * modules/array-list-tests: New file.
7521         * tests/test-array_list.c: New file.
7522
7523 2007-01-14  Bruno Haible  <bruno@clisp.org>
7524
7525         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
7526         and make.
7527         Reported by Simon Josefsson in
7528         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
7529
7530 2007-01-14  Bruno Haible  <bruno@clisp.org>
7531
7532         * modules/allocsa-tests: New file.
7533         * tests/test-allocsa.c: New file.
7534
7535 2007-01-14  Bruno Haible  <bruno@clisp.org>
7536
7537         * modules/fchdir (Depends-on): Add absolute-header.
7538         * modules/unistd (Depends-on): Likewise.
7539
7540 2006-12-30  Bruno Haible  <bruno@clisp.org>
7541
7542         * modules/fchdir: New file.
7543         * modules/unistd (Files): Add lib/unistd_.h.
7544         (Makefile.am): Generate unistd.h from unistd_.h.
7545         * lib/fchdir.c: New file.
7546         * lib/dirent_.h: New file.
7547         * lib/unistd_.h: New file.
7548         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
7549         * m4/fchdir.m4: New file.
7550         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
7551         (gl_HEADER_UNISTD): Invoke it.
7552         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
7553         function.
7554         * lib/backupfile.c (opendir, closedir): Undefine.
7555         * lib/chown.c (open, close): Undefine.
7556         * lib/clean-temp.c (open, close): Undefine.
7557         * lib/copy-file.c (open, close): Undefine.
7558         * lib/execute.c (open, close): Undefine.
7559         * lib/fsusage.c (open, close): Undefine.
7560         * lib/gc-gnulib.c (open, close): Undefine.
7561         * lib/getcwd.c (opendir, closedir): Undefine.
7562         * lib/glob.c (opendir, closedir): Undefine.
7563         * lib/javacomp.c (open, close): Undefine.
7564         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
7565         * lib/openat-proc.c (open, close): Undefine.
7566         * lib/pagealign_alloc.c (open, close): Undefine.
7567         * lib/pipe.c (open, close): Undefine.
7568         * lib/progreloc.c (open, close): Undefine.
7569         * lib/savedir.c (opendir, closedir): Undefine.
7570         * lib/utime.c (open, close): Undefine.
7571         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
7572
7573 2007-01-10  Bruno Haible  <bruno@clisp.org>
7574
7575         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
7576
7577 2007-01-12  Eric Blake  <ebb9@byu.net>
7578
7579         Provide a robust <wchar.h>.  Further simplifications are now
7580         possible in other modules, but not included here.
7581         * modules/wchar: New module.
7582         * m4/wchar.m4: New file.
7583         * lib/wchar_.h: Likewise.
7584         * modules/mbchar (Depends-on): Depend on wchar, as the first use
7585         of the new module.
7586         * MODULES.html.sh (Extended multibyte and wide character utilities):
7587         New section.
7588
7589 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
7590
7591         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
7592         to a reasonable default for memory allocation.
7593         (xreadlink): Don't allocate a huge buffer, to work around a buggy
7594         file system that reports garbage st_size values for symlinks.
7595         Problem reported by Liyang Hu.
7596
7597 2007-01-11  Simon Josefsson  <simon@josefsson.org>
7598
7599         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
7600         Emacs .#* auto-save files).
7601
7602 2007-01-11  Bruno Haible  <bruno@clisp.org>
7603
7604         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
7605         directory.
7606
7607 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7608
7609         Use @...@ consistently in lib/wctype_.h.
7610         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
7611         on it being set to 1 or 0.
7612         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
7613         go back to AC_SUBSTing it.
7614         * modules/wctype (Makefile.am): Undo previous change.
7615
7616 2007-01-10  Eric Blake  <ebb9@byu.net>
7617
7618         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
7619         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
7620         * modules/wctype (Makefile.am): Likewise.
7621         Reported by Chris McGuire.
7622
7623 2007-01-10  Jim Meyering  <jim@meyering.net>
7624
7625         fts.c: a small readability/maintainability improvement
7626         * lib/fts.c (fts_read): Make this code slightly more readable and
7627         maintainable by hoisting the "sp->fts_cur = p" assignments to
7628         immediately follow the statements that set P.  Derived from
7629         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
7630
7631 2007-01-10  Eric Blake  <ebb9@byu.net>
7632
7633         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
7634         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
7635         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
7636         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
7637         Reported by Chris McGuire.
7638
7639 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7640
7641         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
7642         in sed script.
7643
7644 2007-01-09  Bruno Haible  <bruno@clisp.org>
7645
7646         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
7647         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
7648         variables.
7649         (func_module): Use them.
7650
7651 2007-01-09  Bruno Haible  <bruno@clisp.org>
7652
7653         * modules/unistr/base: New file.
7654         * lib/unistr.h: New file.
7655
7656         * modules/unistr/u8-to-u16: New file.
7657         * lib/unistr/u8-to-u16.c: New file.
7658
7659         * modules/unistr/u8-to-u32: New file.
7660         * lib/unistr/u8-to-u32.c: New file.
7661
7662         * modules/unistr/u16-to-u8: New file.
7663         * lib/unistr/u16-to-u8.c: New file.
7664
7665         * modules/unistr/u16-to-u32: New file.
7666         * lib/unistr/u16-to-u32.c: New file.
7667
7668         * modules/unistr/u32-to-u8: New file.
7669         * lib/unistr/u32-to-u8.c: New file.
7670
7671         * modules/unistr/u32-to-u16: New file.
7672         * lib/unistr/u32-to-u16.c: New file.
7673
7674         * modules/unistr/u8-check: New file.
7675         * modules/unistr/u16-check: New file.
7676         * modules/unistr/u32-check: New file.
7677         * lib/unistr/u8-check.c: New file.
7678         * lib/unistr/u16-check.c: New file.
7679         * lib/unistr/u32-check.c: New file.
7680
7681         * modules/unistr/u8-chr: New file.
7682         * modules/unistr/u16-chr: New file.
7683         * modules/unistr/u32-chr: New file.
7684         * lib/unistr/u8-chr.c: New file.
7685         * lib/unistr/u16-chr.c: New file.
7686         * lib/unistr/u32-chr.c: New file.
7687
7688         * modules/unistr/u8-cmp: New file.
7689         * modules/unistr/u16-cmp: New file.
7690         * modules/unistr/u32-cmp: New file.
7691         * lib/unistr/u8-cmp.c: New file.
7692         * lib/unistr/u16-cmp.c: New file.
7693         * lib/unistr/u32-cmp.c: New file.
7694
7695         * modules/unistr/u8-cpy: New file.
7696         * modules/unistr/u16-cpy: New file.
7697         * modules/unistr/u32-cpy: New file.
7698         * lib/unistr/u8-cpy.c: New file.
7699         * lib/unistr/u16-cpy.c: New file.
7700         * lib/unistr/u32-cpy.c: New file.
7701         * lib/unistr/u-cpy.h: New file.
7702
7703         * modules/unistr/u8-cpy-alloc: New file.
7704         * modules/unistr/u16-cpy-alloc: New file.
7705         * modules/unistr/u32-cpy-alloc: New file.
7706         * lib/unistr/u8-cpy-alloc.c: New file.
7707         * lib/unistr/u16-cpy-alloc.c: New file.
7708         * lib/unistr/u32-cpy-alloc.c: New file.
7709         * lib/unistr/u-cpy-alloc.h: New file.
7710
7711         * modules/unistr/u8-endswith: New file.
7712         * modules/unistr/u16-endswith: New file.
7713         * modules/unistr/u32-endswith: New file.
7714         * lib/unistr/u8-endswith.c: New file.
7715         * lib/unistr/u16-endswith.c: New file.
7716         * lib/unistr/u32-endswith.c: New file.
7717         * lib/unistr/u-endswith.h: New file.
7718
7719         * modules/unistr/u8-mblen: New file.
7720         * modules/unistr/u16-mblen: New file.
7721         * modules/unistr/u32-mblen: New file.
7722         * lib/unistr/u8-mblen.c: New file.
7723         * lib/unistr/u16-mblen.c: New file.
7724         * lib/unistr/u32-mblen.c: New file.
7725
7726         * modules/unistr/u8-mbtouc: New file.
7727         * modules/unistr/u16-mbtouc: New file.
7728         * modules/unistr/u32-mbtouc: New file.
7729         * lib/unistr/u8-mbtouc.c: New file.
7730         * lib/unistr/u16-mbtouc.c: New file.
7731         * lib/unistr/u32-mbtouc.c: New file.
7732
7733         * modules/unistr/u8-mbtouc-safe: New file.
7734         * modules/unistr/u16-mbtouc-safe: New file.
7735         * modules/unistr/u32-mbtouc-safe: New file.
7736         * lib/unistr/u8-mbtouc-safe.c: New file.
7737         * lib/unistr/u16-mbtouc-safe.c: New file.
7738         * lib/unistr/u32-mbtouc-safe.c: New file.
7739
7740         * modules/unistr/u8-move: New file.
7741         * modules/unistr/u16-move: New file.
7742         * modules/unistr/u32-move: New file.
7743         * lib/unistr/u8-move.c: New file.
7744         * lib/unistr/u16-move.c: New file.
7745         * lib/unistr/u32-move.c: New file.
7746         * lib/unistr/u-move.h: New file.
7747
7748         * modules/unistr/u8-next: New file.
7749         * modules/unistr/u16-next: New file.
7750         * modules/unistr/u32-next: New file.
7751         * lib/unistr/u8-next.c: New file.
7752         * lib/unistr/u16-next.c: New file.
7753         * lib/unistr/u32-next.c: New file.
7754
7755         * modules/unistr/u8-prev: New file.
7756         * modules/unistr/u16-prev: New file.
7757         * modules/unistr/u32-prev: New file.
7758         * lib/unistr/u8-prev.c: New file.
7759         * lib/unistr/u16-prev.c: New file.
7760         * lib/unistr/u32-prev.c: New file.
7761
7762         * modules/unistr/u8-set: New file.
7763         * modules/unistr/u16-set: New file.
7764         * modules/unistr/u32-set: New file.
7765         * lib/unistr/u8-set.c: New file.
7766         * lib/unistr/u16-set.c: New file.
7767         * lib/unistr/u32-set.c: New file.
7768         * lib/unistr/u-set.h: New file.
7769
7770         * modules/unistr/u8-startswith: New file.
7771         * modules/unistr/u16-startswith: New file.
7772         * modules/unistr/u32-startswith: New file.
7773         * lib/unistr/u8-startswith.c: New file.
7774         * lib/unistr/u16-startswith.c: New file.
7775         * lib/unistr/u32-startswith.c: New file.
7776         * lib/unistr/u-startswith.h: New file.
7777
7778         * modules/unistr/u8-stpcpy: New file.
7779         * modules/unistr/u16-stpcpy: New file.
7780         * modules/unistr/u32-stpcpy: New file.
7781         * lib/unistr/u8-stpcpy.c: New file.
7782         * lib/unistr/u16-stpcpy.c: New file.
7783         * lib/unistr/u32-stpcpy.c: New file.
7784         * lib/unistr/u-stpcpy.h: New file.
7785
7786         * modules/unistr/u8-stpncpy: New file.
7787         * modules/unistr/u16-stpncpy: New file.
7788         * modules/unistr/u32-stpncpy: New file.
7789         * lib/unistr/u8-stpncpy.c: New file.
7790         * lib/unistr/u16-stpncpy.c: New file.
7791         * lib/unistr/u32-stpncpy.c: New file.
7792         * lib/unistr/u-stpncpy.h: New file.
7793
7794         * modules/unistr/u8-strcat: New file.
7795         * modules/unistr/u16-strcat: New file.
7796         * modules/unistr/u32-strcat: New file.
7797         * lib/unistr/u8-strcat.c: New file.
7798         * lib/unistr/u16-strcat.c: New file.
7799         * lib/unistr/u32-strcat.c: New file.
7800         * lib/unistr/u-strcat.h: New file.
7801
7802         * modules/unistr/u8-strchr: New file.
7803         * modules/unistr/u16-strchr: New file.
7804         * modules/unistr/u32-strchr: New file.
7805         * lib/unistr/u8-strchr.c: New file.
7806         * lib/unistr/u16-strchr.c: New file.
7807         * lib/unistr/u32-strchr.c: New file.
7808
7809         * modules/unistr/u8-strcmp: New file.
7810         * modules/unistr/u16-strcmp: New file.
7811         * modules/unistr/u32-strcmp: New file.
7812         * lib/unistr/u8-strcmp.c: New file.
7813         * lib/unistr/u16-strcmp.c: New file.
7814         * lib/unistr/u32-strcmp.c: New file.
7815
7816         * modules/unistr/u8-strcpy: New file.
7817         * modules/unistr/u16-strcpy: New file.
7818         * modules/unistr/u32-strcpy: New file.
7819         * lib/unistr/u8-strcpy.c: New file.
7820         * lib/unistr/u16-strcpy.c: New file.
7821         * lib/unistr/u32-strcpy.c: New file.
7822         * lib/unistr/u-strcpy.h: New file.
7823
7824         * modules/unistr/u8-strcspn: New file.
7825         * modules/unistr/u16-strcspn: New file.
7826         * modules/unistr/u32-strcspn: New file.
7827         * lib/unistr/u8-strcspn.c: New file.
7828         * lib/unistr/u16-strcspn.c: New file.
7829         * lib/unistr/u32-strcspn.c: New file.
7830         * lib/unistr/u-strcspn.h: New file.
7831
7832         * modules/unistr/u8-strdup: New file.
7833         * modules/unistr/u16-strdup: New file.
7834         * modules/unistr/u32-strdup: New file.
7835         * lib/unistr/u8-strdup.c: New file.
7836         * lib/unistr/u16-strdup.c: New file.
7837         * lib/unistr/u32-strdup.c: New file.
7838         * lib/unistr/u-strdup.h: New file.
7839
7840         * modules/unistr/u8-strlen: New file.
7841         * modules/unistr/u16-strlen: New file.
7842         * modules/unistr/u32-strlen: New file.
7843         * lib/unistr/u8-strlen.c: New file.
7844         * lib/unistr/u16-strlen.c: New file.
7845         * lib/unistr/u32-strlen.c: New file.
7846         * lib/unistr/u-strlen.h: New file.
7847
7848         * modules/unistr/u8-strmblen: New file.
7849         * modules/unistr/u16-strmblen: New file.
7850         * modules/unistr/u32-strmblen: New file.
7851         * lib/unistr/u8-strmblen.c: New file.
7852         * lib/unistr/u16-strmblen.c: New file.
7853         * lib/unistr/u32-strmblen.c: New file.
7854
7855         * modules/unistr/u8-strmbtouc: New file.
7856         * modules/unistr/u16-strmbtouc: New file.
7857         * modules/unistr/u32-strmbtouc: New file.
7858         * lib/unistr/u8-strmbtouc.c: New file.
7859         * lib/unistr/u16-strmbtouc.c: New file.
7860         * lib/unistr/u32-strmbtouc.c: New file.
7861
7862         * modules/unistr/u8-strncat: New file.
7863         * modules/unistr/u16-strncat: New file.
7864         * modules/unistr/u32-strncat: New file.
7865         * lib/unistr/u8-strncat.c: New file.
7866         * lib/unistr/u16-strncat.c: New file.
7867         * lib/unistr/u32-strncat.c: New file.
7868         * lib/unistr/u-strncat.h: New file.
7869
7870         * modules/unistr/u8-strncmp: New file.
7871         * modules/unistr/u16-strncmp: New file.
7872         * modules/unistr/u32-strncmp: New file.
7873         * lib/unistr/u8-strncmp.c: New file.
7874         * lib/unistr/u16-strncmp.c: New file.
7875         * lib/unistr/u32-strncmp.c: New file.
7876
7877         * modules/unistr/u8-strncpy: New file.
7878         * modules/unistr/u16-strncpy: New file.
7879         * modules/unistr/u32-strncpy: New file.
7880         * lib/unistr/u8-strncpy.c: New file.
7881         * lib/unistr/u16-strncpy.c: New file.
7882         * lib/unistr/u32-strncpy.c: New file.
7883         * lib/unistr/u-strncpy.h: New file.
7884
7885         * modules/unistr/u8-strnlen: New file.
7886         * modules/unistr/u16-strnlen: New file.
7887         * modules/unistr/u32-strnlen: New file.
7888         * lib/unistr/u8-strnlen.c: New file.
7889         * lib/unistr/u16-strnlen.c: New file.
7890         * lib/unistr/u32-strnlen.c: New file.
7891         * lib/unistr/u-strnlen.h: New file.
7892
7893         * modules/unistr/u8-strpbrk: New file.
7894         * modules/unistr/u16-strpbrk: New file.
7895         * modules/unistr/u32-strpbrk: New file.
7896         * lib/unistr/u8-strpbrk.c: New file.
7897         * lib/unistr/u16-strpbrk.c: New file.
7898         * lib/unistr/u32-strpbrk.c: New file.
7899         * lib/unistr/u-strpbrk.h: New file.
7900
7901         * modules/unistr/u8-strrchr: New file.
7902         * modules/unistr/u16-strrchr: New file.
7903         * modules/unistr/u32-strrchr: New file.
7904         * lib/unistr/u8-strrchr.c: New file.
7905         * lib/unistr/u16-strrchr.c: New file.
7906         * lib/unistr/u32-strrchr.c: New file.
7907
7908         * modules/unistr/u8-strspn: New file.
7909         * modules/unistr/u16-strspn: New file.
7910         * modules/unistr/u32-strspn: New file.
7911         * lib/unistr/u8-strspn.c: New file.
7912         * lib/unistr/u16-strspn.c: New file.
7913         * lib/unistr/u32-strspn.c: New file.
7914         * lib/unistr/u-strspn.h: New file.
7915
7916         * modules/unistr/u8-strstr: New file.
7917         * modules/unistr/u16-strstr: New file.
7918         * modules/unistr/u32-strstr: New file.
7919         * lib/unistr/u8-strstr.c: New file.
7920         * lib/unistr/u16-strstr.c: New file.
7921         * lib/unistr/u32-strstr.c: New file.
7922         * lib/unistr/u-strstr.h: New file.
7923
7924         * modules/unistr/u8-strtok: New file.
7925         * modules/unistr/u16-strtok: New file.
7926         * modules/unistr/u32-strtok: New file.
7927         * lib/unistr/u8-strtok.c: New file.
7928         * lib/unistr/u16-strtok.c: New file.
7929         * lib/unistr/u32-strtok.c: New file.
7930         * lib/unistr/u-strtok.h: New file.
7931
7932         * modules/unistr/u8-uctomb: New file.
7933         * modules/unistr/u16-uctomb: New file.
7934         * modules/unistr/u32-uctomb: New file.
7935         * lib/unistr/u8-uctomb.c: New file.
7936         * lib/unistr/u16-uctomb.c: New file.
7937         * lib/unistr/u32-uctomb.c: New file.
7938
7939         * MODULES.html.sh (Unicode string functions): Add the new modules.
7940
7941 2007-01-08  Bruno Haible  <bruno@clisp.org>
7942
7943         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
7944         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
7945         subdirectories.
7946
7947 2007-01-08  Karl Berry  <karl@gnu.org>
7948
7949         * doc/error.texi: mention that main() fns must set program_name
7950         when progname is used.
7951
7952 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
7953
7954         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
7955         WCTYPE_H is empty, for the benefit of builds from non-distclean
7956         directories.  Problem reported by Eric Blake in
7957         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
7958
7959 2007-01-08  Bruno Haible  <bruno@clisp.org>
7960
7961         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
7962         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
7963         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
7964         PROVIDE_CANONICALIZE_FILENAME_MODE.
7965         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
7966
7967 2007-01-08  Bruno Haible  <bruno@clisp.org>
7968
7969         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
7970         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
7971         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
7972         * lib/fts.c: Likewise.
7973         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
7974
7975 2006-12-25  Bruno Haible  <bruno@clisp.org>
7976
7977         * modules/utf8-ucs4-safe: New file.
7978         * lib/utf8-ucs4-safe.h: New file.
7979         * lib/unistr/utf8-ucs4-safe.c: New file.
7980
7981         * modules/utf16-ucs4-safe: New file.
7982         * lib/utf16-ucs4-safe.h: New file.
7983         * lib/unistr/utf16-ucs4-safe.c: New file.
7984
7985         * MODULES.html.sh (Unicode string functions): Add the new modules.
7986
7987 2007-01-08  Bruno Haible  <bruno@clisp.org>
7988
7989         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
7990         (Depends-on): Add unitypes.
7991         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7992         (u8_mbtouc_aux): Move out to separate file.
7993         (u8_mbtouc): Use ucs4_t, uint8_t types.
7994         * lib/unistr/utf8-ucs4.c: New file.
7995
7996         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
7997         (Depends-on): Add unitypes.
7998         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7999         (u16_mbtouc_aux): Move out to separate file.
8000         (u16_mbtouc): Use ucs4_t, uint16_t types.
8001         * lib/unistr/utf16-ucs4.c: New file.
8002
8003         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
8004         (Depends-on): Add unitypes.
8005         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
8006         (u8_uctomb_aux): Move out to separate file.
8007         (u8_uctomb): Use ucs4_t, uint8_t types.
8008         * lib/unistr/ucs4-utf8.c: New file.
8009
8010         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
8011         (Depends-on): Add unitypes.
8012         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
8013         (u16_uctomb_aux): Move out to separate file.
8014         (u16_uctomb): Use ucs4_t, uint16_t types.
8015         * lib/unistr/ucs4-utf16.c: New file.
8016
8017 2006-12-25  Bruno Haible  <bruno@clisp.org>
8018
8019         * modules/unitypes: New file.
8020         * lib/unitypes.h: New file.
8021         * MODULES.html.sh (func_all_modules): New section "Unicode string
8022         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
8023         this section. Add unitypes.
8024
8025 2007-01-08  Bruno Haible  <bruno@clisp.org>
8026
8027         Avoid variable names that conflict with those from libtool.
8028         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
8029         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
8030         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
8031         library_names_spec to acl_library_names_spec, hardcode_* to
8032         acl_hardcode_*.
8033         Reported by Ralf Wildenhues.
8034
8035 2007-01-08  Bruno Haible  <bruno@clisp.org>
8036
8037         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
8038         definition.
8039         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
8040         definition.
8041         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
8042         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
8043         definition.
8044         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
8045         definition.
8046         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
8047         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
8048         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
8049         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
8050         definition.
8051         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
8052         definition.
8053         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
8054         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
8055         GC_USE_<algorithm>.
8056         * lib/gc-libgcrypt.c: Likewise.
8057         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
8058         * modules/gc-arctwo (configure.ac): Likewise.
8059         * modules/gc-des (configure.ac): Likewise.
8060         * modules/gc-hmac-md5 (configure.ac): Likewise.
8061         * modules/gc-hmac-sha1 (configure.ac): Likewise.
8062         * modules/gc-md2 (configure.ac): Likewise.
8063         * modules/gc-md4 (configure.ac): Likewise.
8064         * modules/gc-md5 (configure.ac): Likewise.
8065         * modules/gc-random (configure.ac): Likewise.
8066         * modules/gc-rijndael (configure.ac): Likewise.
8067         * modules/gc-sha1 (configure.ac): Likewise.
8068
8069 2007-01-08  Bruno Haible  <bruno@clisp.org>
8070
8071         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
8072         macro definition.
8073         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
8074         definition.
8075         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
8076         definition.
8077         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
8078         * modules/fcntl-safer (configure.ac): Likewise.
8079         * modules/fopen-safer (configure.ac): Likewise.
8080         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
8081         GNULIB_FWRITEERROR macro definition.
8082
8083 2007-01-08  Bruno Haible  <bruno@clisp.org>
8084
8085         * m4/gnulib-common.m4: New file.
8086         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
8087         (func_get_filelist): Add m4/gnulib-common.m4.
8088
8089 2007-01-08  Bruno Haible  <bruno@clisp.org>
8090
8091         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
8092         command.
8093
8094 2007-01-08  Jim Meyering  <jim@meyering.net>
8095
8096         Use a more robust test for a "can't happen" condition.
8097         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
8098         narrowed the st_size value.  Presuming the "can't happen" condition
8099         is true, that narrowing could conceivably convert an invalid st_size
8100         value into a valid one.  Instead, use a change based on Matthew
8101         Woehlke's original patch.
8102
8103         Slight readability improvement: use an assert-like macro
8104         in place of literal "abort ()" uses.
8105         * lib/fts.c (fts_assert): Define.
8106         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
8107         Use this macro instead of a bare 'abort'.
8108
8109 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
8110
8111         Don't worry about using IRIX 5.3's wctype.h broken definitions;
8112         simply work around them.
8113         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
8114         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
8115         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
8116         declaring.
8117         Don't bother to define as macros, since the standard doesn't require it.
8118         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
8119         longer worry about IRIX 5.3.
8120         (HAVE_WCTYPE_CTMP_BUG): Remove.
8121
8122 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8123
8124         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
8125         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
8126         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
8127         Problems reported by Georg Schwarz for IRIX 5.3.
8128
8129         * gnulib-tool (autoconf_minversion): Take the maximum version number
8130         found, not the minimum.  Problem reported by James Youngman.
8131
8132 2007-01-03  Karl Berry  <karl@gnu.org>
8133
8134         * doc/error.texi: new file, explaining interaction with progname.
8135         * doc/gnulib.texi: include it.  Update copyright.
8136
8137 2007-01-03  Simon Josefsson  <simon@josefsson.org>
8138
8139         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
8140         AC_CANONICAL_HOST, to improve autobuild outputs.
8141
8142 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
8143             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
8144
8145         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
8146         sockets, server sockets, and other file descriptors.  Count errors
8147         to compute the return value.  Reorder the code a bit to be easier
8148         to follow.  Don't set event bits that were not requested (except
8149         POLLERR and POLLHUP).
8150
8151 2007-01-01  Bruno Haible  <bruno@clisp.org>
8152
8153         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
8154
8155 2007-01-03  Jim Meyering  <jim@meyering.net>
8156
8157         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
8158
8159 2007-01-02  Bruno Haible  <bruno@clisp.org>
8160
8161         * modules/settime (Include): Require timespec.h.
8162         * modules/nanosleep (Include): Likewise.
8163
8164 2007-01-01  Bruno Haible  <bruno@clisp.org>
8165
8166         * gnulib-tool (func_emit_copyright_notice): Bump year.
8167         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
8168
8169 2007-01-01  Bruno Haible  <bruno@clisp.org>
8170
8171         Improve support for OpenBSD.
8172         * build-aux/config.rpath (libname_spec): Export.
8173         (library_names_spec): New variable. Export.
8174         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
8175         library_names_spec from the config.rpath output. Locate shared library
8176         through the name pattern in library_names_spec.
8177
8178 2007-01-01  Eric Blake  <ebb9@byu.net>
8179
8180         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
8181
8182 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
8183
8184         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
8185         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
8186         assume the C locale, and avoid an "eval" that could cause trouble.
8187         Problem with SORT reported by Bob Proulx.
8188
8189         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
8190         Define.  Trivial patch from Henning Nielsen Lund, originally
8191         sent to bug-grep@gnu.org today.
8192
8193 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
8194
8195         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
8196         struct stat.  Problem reported by Henning Nielsen Lund.
8197         * lib/acl.c: Include acl.h first, to check interface.  Don't
8198         bother to include sys/types.h and sys/stat.h again.
8199
8200 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
8201
8202         Import the following change from libc; problem reported by
8203         Sven Verdoolaege.
8204
8205         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
8206
8207         [BZ #1373]
8208         * lib/argp.h: Remove __NTH for __argp_usage inline function.
8209
8210 2006-12-28  Jim Meyering  <jim@meyering.net>
8211
8212         * build-aux/announce-gen: Do not assume that the package
8213         builds any of tar.gz, tar.bz2, and .xdelta files.
8214         Suggestion from Simon Josefsson.
8215
8216 2006-12-28  Simon Josefsson  <simon@josefsson.org>
8217
8218         * modules/announce-gen: New file.
8219
8220 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
8221
8222         * lib/mbchar.h: Just include <wctype.h>; the wctype module
8223         handles its gotchas now.
8224         * lib/mbswidth.c: Likewise.
8225         * lib/wcwidth.h: Likewise.
8226         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
8227         and iswcntrl; the wctype module does this stuff now.
8228         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
8229         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8230         * modules/mbchar (Depends-on): Add wctype.
8231         * modules/mbswidth (Depends-on): Likewise.
8232         * modules/wcwidth (Depends-on): Likewise.
8233
8234 2006-12-27  Eric Blake  <ebb9@byu.net>
8235
8236         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
8237         module uses more than what <wctype.h> is required to provide.
8238
8239 2006-12-26  Eric Blake  <ebb9@byu.net>
8240
8241         * gnulib-tool (sed_extract_prog): Avoid space-tab.
8242
8243 2006-12-26  Eric Blake  <ebb9@byu.net>
8244
8245         * modules/absolute-header: New module.
8246         * modules/fcntl (Depends-on): Depend on it.
8247         * modules/inttypes (Depends-on): Likewise.
8248         * modules/stdint (Depends-on): Likewise.
8249         * modules/sys_stat (Depends-on): Likewise.
8250         * modules/wctype (Depends-on): Likewise.
8251         * MODULES.html.sh (Support for building libraries and
8252         executables): Document it.
8253
8254 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
8255
8256         * gnulib-tool (SED): Remove, undoing previous change.
8257         The problem was that it broke coreutils on Solaris, because
8258         "sed --posix" leaked into a makefile.
8259         (sed): New alias, if 'alias' and GNU sed.
8260
8261 2006-12-24  Jim Meyering  <jim@meyering.net>
8262
8263         Work around an fchownat bug in glibc-2.4:
8264         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
8265         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
8266         in spite of the -P option.
8267         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
8268         New macros.
8269         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
8270         * modules/openat (Files): Add lib/fchownat.c.
8271         * lib/openat.c (fchownat): Don't define here.  Move to...
8272         * lib/fchownat.c: ...this new file.
8273
8274 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
8275
8276         Fix bug reported by Bruno Haible in
8277         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
8278         where quotearg.c didn't compile on Mac OS X 10.2 because it
8279         lacks <wchar.h> and wint_t.
8280         * lib/wctype_.h (__wctype_wint_t): New type.
8281         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
8282         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
8283         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
8284         Arg is now of type __wctype_wint_t, not wint_t.
8285         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
8286         substitute HAVE_WINT_T.
8287         * modules/wctype (Files): Add m4/wint_t.m4.
8288         (wctype.h): Substitute HAVE_WINT_T.
8289
8290 2006-12-23  Bruno Haible  <bruno@clisp.org>
8291
8292         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
8293
8294 2006-12-23  Bruno Haible  <bruno@clisp.org>
8295
8296         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
8297         S_ISLNK.
8298         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
8299         mingw.
8300
8301 2006-12-22  Bruno Haible  <bruno@clisp.org>
8302
8303         * lib/copy-file.c: Include acl.h.
8304         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
8305         Close the file descriptors only after being done with copy_acl.
8306         * modules/copy-file (Depends-on): Add acl.
8307
8308 2006-12-22  Bruno Haible  <bruno@clisp.org>
8309
8310         * gnulib-tool (SED): New variable.
8311         Use $SED instead of sed everywhere.
8312
8313 2006-12-22  Bruno Haible  <bruno@clisp.org>
8314
8315         * modules/no-c++: New file.
8316         * m4/no-c++.m4: New file.
8317         * MODULES.html.sh (Support for building libraries and executables):
8318         Add no-c++.
8319
8320 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
8321
8322         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8323         Include <limits.h>, and use its INT_MAX to rewrite the
8324         j loop so that it does not overflow 'int'.  Problem reported by
8325         Ralf Wildenhues in
8326         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
8327         Play it safe by shifting left by 1 rather than multiplying by 2,
8328         as GCC is less likely to optimize this away when the value
8329         is signed (when it assumes overflow leads to undefined behavior).
8330         Also, don't assume time_t uses two's complement.
8331
8332 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
8333
8334         * MODULES.html.sh: New module wctype.
8335         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
8336         * lib/fnmatch.c: Don't bother to include <wchar.h> before
8337         <wctype.h>, since the new wctype module should fix this.
8338         * lib/quotearg.c: Include <wctype.h> unconditionally, since
8339         the wctype module should arrange for it.
8340         * lib/regex_internal.h: Likewise.
8341         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
8342         since the wctype module should handle this now.
8343         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
8344         * modules/fnmatch (Depends-on): Add wctype.
8345         * modules/quotearg (Depends-on): Likewise.
8346         * modules/regex (Depends-on): Likewise.
8347
8348 2006-12-19  Bruno Haible  <bruno@clisp.org>
8349
8350         * lib/strdup.h [C++]: Wrap definitions in extern "C".
8351         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
8352
8353 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8354
8355         * modules/savewd (Depends-on): Fix dependency on fcntl.
8356
8357 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8358
8359         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
8360         conforms to C99, rather than relying on the user's environment
8361         setting of STDINT_H.
8362
8363 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8364         and Eric Blake  <ebb9@byu.net>
8365
8366         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
8367         This is more consistent with the other defines here.
8368         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
8369         Port to z/OS.  Problem reported by Paul Gilmartin.
8370         Change local vars to use gl_ prefix rather than ac_.
8371         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
8372         with other defines.
8373         * modules/double-slash-root: New module.
8374         * modules/dirname (Files): Remove m4/double-slash-root.m4.
8375         (Depends-on): Add double-slash-root.
8376         * MODULES.html.sh (File system functions): Mention new module.
8377
8378 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
8379
8380         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
8381         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
8382         This is for the benefit of gzip, which doesn't do i18n.
8383
8384 2006-12-12  Jim Meyering  <jim@meyering.net>
8385
8386         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
8387         Reported by Andreas Schwab <schwab@suse.de>.
8388
8389 2006-12-12  Bruno Haible  <bruno@clisp.org>
8390
8391         Merge these changes.
8392         2006-09-05  Bruno Haible  <bruno@clisp.org>
8393         * lib/iconvme.c (iconv_string): No need to save and restore errno when
8394         iconv_alloc succeeded.
8395         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
8396         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
8397         test for " && dest " at the end - dest is always != NULL there. Call
8398         iconv with 4xNULL arguments initially, to reset the state. Call iconv
8399         with 2xNULL arguments, also to flush the state storage. Handle the
8400         IRIX iconv behaviour. Realloc the final result, to throw away unused
8401         memory.
8402
8403 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
8404
8405         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
8406         and fchmodat unconditionally, since glibc 2.4 has them.
8407         Problem reported by Arkadiusz Miskiewicz.
8408
8409 2006-12-10  Bruno Haible  <bruno@clisp.org>
8410
8411         * gnulib-tool (func_import): Show the include files only for those
8412         modules that are copied and specified.
8413         Reported by Karl Berry.
8414
8415 2006-12-08  Jim Meyering  <jim@meyering.net>
8416
8417         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
8418         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
8419
8420         * build-aux/announce-gen: Add two new options, both optional:
8421         --bootstrap-tools=TOOL_LIST
8422               a comma-separated list of tools, e.g.,
8423               autoconf,automake,bison,gnulib
8424         --gnulib-snapshot-date=DATE
8425               if gnulib is in the bootstrap tool list,
8426               then report this as the snapshot date.
8427               If not specified, use the current date/time.
8428               If you specify a date here, be sure it's UTC.
8429
8430 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8431
8432         * tests/test-argp-2.sh: Fix test to match actual output.
8433         (func_compare): Fix sed script to be portable.
8434
8435 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
8436
8437         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
8438         workaround for this case.  It is not autoconfigured now; offhand
8439         it's hard to see how to autoconfigure it.
8440
8441 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
8442
8443         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
8444         a directory that is about to be chowned.  Such a directory's
8445         initial file permissions should permit the owner only and this
8446         should not be changed until after the chown, since the group and
8447         other bits would be incorrect if they granted permission before
8448         the chown.
8449
8450         Fix porting problem for iswctype reported by Georg Schwarz in:
8451         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
8452         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
8453         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
8454         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
8455         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
8456
8457 2006-12-03  Jim Meyering  <jim@meyering.net>
8458
8459         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
8460         p->fts_statp may not yet be defined.
8461         (fts_read): Instead, set it in the caller, once p->fts_statp is
8462         sure to be defined, and corresponds to a top-level directory.
8463         This bug made du -x fail.  Here's the coreutils test case:
8464         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
8465         Reported by Mike Frysinger.
8466
8467 2006-12-01  Jim Meyering  <jim@meyering.net>
8468
8469         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
8470         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
8471         Reported by Simon Josefsson.
8472
8473 2006-11-30  Jim Meyering  <jim@meyering.net>
8474
8475         * m4/warning.m4: Use the all-permissive copyright notice
8476         recommended by RMS (rather than LGPL).
8477         * m4/vararrays.m4: Likewise.
8478         * m4/flexmember.m4: Likewise.
8479
8480 2006-11-29  Bruno Haible  <bruno@clisp.org>
8481
8482         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8483         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
8484         using +=.
8485         Reported by Simon Josefsson <simon@josefsson.org>.
8486
8487 2006-11-28  James Youngman <jay@gnu.org>
8488
8489         * README: Advise users that they might find the bug-gnulib@gnu.org
8490         and autotools-announce@gnu.org mailing lists useful.
8491
8492 2006-11-28  Bruno Haible  <bruno@clisp.org>
8493
8494         * m4/ptrdiff_max.m4: Remove file.
8495
8496 2006-11-21  Bruno Haible  <bruno@clisp.org>
8497
8498         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
8499         _AC_COMPUTE_INT.
8500         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8501         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
8502         _AC_COMPUTE_INT.
8503         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8504         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
8505         _AC_COMPUTE_INT.
8506         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8507
8508 2006-11-28  Jim Meyering  <jim@meyering.net>
8509
8510         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
8511         warning from "gcc -Wshadow" about shadowing the builtin.
8512
8513 2006-11-27  Bruno Haible  <bruno@clisp.org>
8514
8515         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
8516         _AC_COMPUTE_INT.
8517         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8518
8519 2006-11-27  Bruno Haible  <bruno@clisp.org>
8520             Paul Eggert  <eggert@cs.ucla.edu>
8521
8522         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
8523
8524 2006-11-26  Bruno Haible  <bruno@clisp.org>
8525
8526         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8527         noinst_LTLIBRARIES.
8528
8529 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
8530             Bruno Haible  <bruno@clisp.org>
8531
8532         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
8533         if compiling with "gcc -ansi".
8534
8535 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
8536
8537         Fix some incompatibilities with gcc -ansi -pedantic.
8538         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
8539         if compiling pedantically with GCC, unless it's C99 or later.
8540         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
8541         it mishandles gcc -ansi -pedantic as well.
8542         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
8543         if gcc -pedantic.
8544         * lib/regexec.c (check_node_accept_bytes): Don't use auto
8545         initializers for struct if -pedantic, unless it's C99 or later.
8546
8547 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
8548
8549         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
8550         Don't close an fd more than once. Identical atimes indicate
8551         success, not failure.
8552
8553 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
8554
8555         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
8556
8557 2006-11-23  Jim Meyering  <jim@meyering.net>
8558
8559         * build-aux/announce-gen: New file.  From coreutils.
8560
8561 2006-11-22  Jim Meyering  <jim@meyering.net>
8562
8563         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
8564         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
8565         (fts_read): Use a temporary to narrow the overused st_size member
8566         before using it in a switch statement.  Reported by Matthew Woehlke.
8567
8568         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
8569         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
8570
8571 2006-11-20  Bruno Haible  <bruno@clisp.org>
8572
8573         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
8574         changequote instead of pairs of brackets.
8575         Reported by Andreas Schwab <schwab@suse.de>.
8576
8577 2006-11-21  Jim Meyering  <jim@meyering.net>
8578
8579         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
8580         so as to remain compatible with older compilers.
8581         Patch from Michael Deutschmann.
8582
8583 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
8584
8585         * MODULES.html.sh (File system functions): Add openat.
8586
8587         * lib/openat.h (rpl_fstatat): New macro, if
8588         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
8589         (fstatat): Define to rpl_fstatat under the same conditions,
8590         unless COMPILING_FSTATAT.
8591         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
8592         seems to have the bug.
8593         * lib/fstatat.c: New file.
8594         * modules/openat (Files): Add it.
8595
8596 2006-11-20  Bruno Haible  <bruno@clisp.org>
8597
8598         * Makefile: New file.
8599
8600 2006-11-20  Jim Meyering  <jim@meyering.net>
8601
8602         The beginnings of syntax-related checks for gnulib.
8603         * lib/Makefile: New file.
8604         * lib/t-idcache: New script.  Ensure that the two halves of
8605         idcache.c stay in sync.
8606
8607         * lib/idcache.c: Adjust comments in user- and group- portions to
8608         be more accurate, and to be consistent with one another.
8609
8610 2006-11-20  Jim Meyering  <jim@meyering.net>
8611
8612         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
8613         continue using the flexible array member (thus, this module performs
8614         half as many malloc calls), with the addition that...
8615         (getgroup, getuser): Consistently record a non-match via an empty
8616         "name" string, and map an empty string match to a NULL return value.
8617         * modules/idcache (Depends-on): Re-add flexmember.
8618
8619         * lib/idcache.c (getuser): Remove all uses of the register keyword.
8620         (getuidbyname, getgroup, getgidbyname): Likewise.
8621
8622         Use cleaner syntax: NULL rather than 0.
8623         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
8624
8625 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
8626
8627         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
8628         It mishandled the case where the group was missing.
8629         Problem reported by Greg Schafer.
8630         * modules/idcache: Likewise.
8631
8632 2006-11-18  Jim Meyering  <jim@meyering.net>
8633
8634         * check-module (%exempt_header): Add exception for some
8635         conditionally-included headers.
8636
8637         * modules/i-ring (Depends-on): Add verify.
8638         (License): Change to LGPL.
8639
8640 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
8641
8642         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
8643         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
8644         and inttostr.h.  Use snprintf rather than uinttostr, so that
8645         LGPLed code doesn't depend on GPLed.
8646
8647 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
8648
8649         * modules/inline (License): Change from GPL to LGPL.
8650
8651 2006-11-17  Jim Meyering  <jim@meyering.net>
8652
8653         * modules/d-type (License): Switch to LGPL.
8654
8655 2006-11-15  Bruno Haible  <bruno@clisp.org>
8656
8657         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
8658
8659 2006-11-15  Eric Blake  <ebb9@byu.net>
8660
8661         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
8662         the module dependency.
8663
8664 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8665             Bruno Haible  <bruno@clisp.org>
8666
8667         * gnulib-tool (func_create_testdir): Add license consistency check.
8668
8669 2006-11-15  Eric Blake  <ebb9@byu.net>
8670
8671         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
8672         random "(cached)" in configure output.
8673
8674 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8675
8676         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
8677         test for conforming inttypes.h is both announced and cached.
8678
8679         * MODULES.html.sh (seen_modules, seen_files): New variables.
8680         (func_module): Rewrite to use a few less gnulib-tool and sed
8681         invocations.  Avoid a couple of quadratic algorithms for ...
8682         (missed_modules, missed_files): ... these, with ...
8683         (func_append, func_tmpdir): ... these new functions, from
8684         gnulib-tool.  Analogously, install traps for cleanup.
8685
8686         * tests/test-gc.c (main): Remove unused variables.
8687         * tests/test-read-file.c: Include stdlib.h, for 'free'.
8688
8689 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
8690
8691         * modules/inttostr (License): Change to LGPL.
8692
8693 2006-11-14  Eric Blake  <ebb9@byu.net>
8694
8695         * modules/tempname (License): Change to LGPL.
8696
8697 2006-11-14  Eric Blake  <ebb9@byu.net>
8698
8699         * doc/functions.texi (Function Portability): *printf functions on
8700         Cygwin now understand all POSIX size specifiers.
8701
8702 2006-11-14  Bruno Haible  <bruno@clisp.org>
8703
8704         * modules/c-ctype (License): Change to LGPL.
8705
8706 2006-11-12  Bruno Haible  <bruno@clisp.org>
8707
8708         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
8709         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
8710         for GNOME libraries, for which the include files are installed in
8711         subdirectories of $prefix/include.
8712
8713 2006-11-12  Bruno Haible  <bruno@clisp.org>
8714
8715         * m4/lib-link.m4: Require at least autoconf-2.54.
8716         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
8717         name to underscores for the --with option.
8718
8719 2006-11-13  Bruno Haible  <bruno@clisp.org>
8720
8721         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
8722         the tests directory.
8723         Reported by Ralf Wildenhues.
8724
8725 2006-11-13  Bruno Haible  <bruno@clisp.org>
8726
8727         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
8728         (func_emit_initmacro_end): Undo the override here.
8729         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
8730         Works around the famous automake error in coreutils.
8731
8732 2006-11-13  Eric Blake  <ebb9@byu.net>
8733
8734         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
8735         element, not its node.
8736
8737 2006-11-12  Bruno Haible  <bruno@clisp.org>
8738
8739         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
8740         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
8741
8742 2006-11-12  Bruno Haible  <bruno@clisp.org>
8743
8744         * gnulib-tool: New option --local-symlink.
8745         (func_usage): Document it.
8746         (lsymbolic): New variable.
8747         (func_import, func_create_testdir): If --symlink was not specified,
8748         test whether --local-symlink was specified and the file comes from
8749         the local_gnulib_dir.
8750
8751 2006-11-12  Bruno Haible  <bruno@clisp.org>
8752
8753         * gnulib-tool (func_ln): New function.
8754         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
8755
8756 2006-11-12  Bruno Haible  <bruno@clisp.org>
8757
8758         Finish support for source files in subdirectories.
8759         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
8760         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
8761         AUTOMAKE_OPTIONS.
8762         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
8763
8764 2006-11-12  Bruno Haible  <bruno@clisp.org>
8765
8766         * gnulib-tool (func_get_automake_snippet): Synthesize also an
8767         EXTRA_lib_SOURCES augmentation.
8768         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
8769
8770 2006-11-12  Jim Meyering  <jim@meyering.net>
8771
8772         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
8773         file descriptors.  This also averts a failure on systems with
8774         native openat support when a traversed directory lacks "x" access.
8775         * lib/fts_.h: Include "i-ring.h"
8776         (struct FTS) [fts_fd_ring]: New member.
8777         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
8778         (FCHDIR): Add parentheses.
8779         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
8780         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
8781         When descending, rather than simply closing the previous
8782         fts_cwd_fd value, push that file descriptor onto the ring.
8783         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
8784         (fts_open): Initialize the new fd_ring member.
8785         (fts_close): Clear the ring.
8786         (fts_safe_changedir): When possible, use our new fd_ring to skip
8787         the diropen and fstat and dev/ino comparison that would normally
8788         accompany a virtual `chdir ("..")'.
8789
8790         * modules/fts (Depends-on): Add i-ring.
8791         * modules/i-ring: New module.
8792         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
8793         * m4/i-ring.m4: New file.
8794
8795 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8796
8797         * gnulib-tool (func_create_testdir): Fix replacement of
8798         `build-aux' in configure.ac.  Run autotools in gltests
8799         subdirectory.
8800         (func_create_testdir, func_create_megatestdir, test): There is
8801         no need for '--force' in most autotool invocations in a new
8802         tree.  Actually fail the whole test if any of the tools, or the
8803         configure or make stages fail.
8804
8805         Sync from Automake.
8806         * build-aux/gnupload: Revert last change.  Add pointer to upload
8807         instructions of the GNU Maintenance Instructions.
8808         Suggestion by Karl Berry.
8809
8810 2006-11-10  Jim Meyering  <jim@meyering.net>
8811
8812         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
8813
8814 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8815
8816         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
8817         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
8818         (bind_textdomain_codeset) [! ENABLE_NLS]:
8819         Evaluate all the arguments.  That way, callers get compatible behavior
8820         if the arguments have side effects.  Also, it avoids some GCC
8821         diagnostics in some cases; Joel E. Denny reported problems when Bison
8822         was configured with --enable-gcc-warnigs.
8823
8824 2006-11-10  Jim Meyering  <jim@meyering.net>
8825
8826         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
8827         relevant options in CFLAGS (like -O, -fno-inline) are taken into
8828         account.
8829
8830 2006-11-10  Jim Meyering  <jim@meyering.net>
8831
8832         * modules/inline: New file/module.
8833         * modules/xalloc (Files): Remove m4/inline.m4.
8834         (Depends-on): Add inline, instead.
8835         * modules/oset: Likewise.
8836         * modules/list: Likewise.
8837
8838 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8839
8840         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
8841         Problem reported by Matthew Woehlke.
8842
8843 2006-11-09  Bruno Haible  <bruno@clisp.org>
8844
8845         * lib/tempname.c (gen_tempname): Remove variant that invokes
8846         __gen_tempname.
8847         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
8848         __gen_tempname.
8849
8850 2006-11-08  Bruno Haible  <bruno@clisp.org>
8851
8852         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
8853         to 'yes' instead of 'cross-compiling'.
8854
8855 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
8856
8857         * lib/quotearg.h (quotearg_free): New decl.
8858         * lib/quotearg.c (quotearg_free): New function.
8859         (slot0, nslots, slotvec0, slotvec):
8860         Now file-scope so that quotearg_free can get at them.
8861
8862 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8863
8864         Sync from Automake.
8865         * build-aux/gnupload: Add missing 'gnu' to example URL.
8866         Report by Karl Berry.
8867
8868 2006-11-08  Bruno Haible  <bruno@clisp.org>
8869
8870         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
8871         Suggested by Paul Eggert.
8872
8873 2006-11-08  Jim Meyering  <jim@meyering.net>
8874
8875         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
8876         It's already included if !_LIBC.
8877         (fts_safe_changedir): Add a comment.
8878
8879 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8880
8881         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
8882         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
8883         Matthew Woehlke.
8884
8885         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
8886         definitions up, to avoid colliding with change below.
8887         (static_inline) [HAVE_INLINE]: New macro.
8888         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
8889         Provide extern decls when !HAVE_INLINE.  Do not define unless
8890         static_inline is defined, either by us or by xmalloc.c.  Use
8891         static_inline rather than static inline.
8892         (XCALLOC): Optimize sizeof(T) = 1 case.
8893         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
8894
8895 2006-11-07  Bruno Haible  <bruno@clisp.org>
8896
8897         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
8898         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
8899         AC_C_INLINE.
8900         * modules/xalloc (Files): Add m4/inline.m4.
8901
8902 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8903
8904         * README: Fix typo.
8905         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
8906         (Miscellanous Notes): ...from this.
8907
8908 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8909
8910         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
8911         Mention that offsetof should be used instead of sizeof.
8912         From Bruno Haible.
8913
8914 2006-11-07  Bruno Haible  <bruno@clisp.org>
8915
8916         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
8917
8918 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8919
8920         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8921         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
8922         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8923         (gl_tree_add_before, gl_tree_add_after):
8924         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
8925         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
8926         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
8927         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
8928         (gl_linked_add_after, gl_linked_add_at): Likewise.
8929         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
8930         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8931         (gl_tree_add_before, gl_tree_add_after): Likewise.
8932         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
8933         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
8934         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
8935
8936 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8937
8938         * lib/gl_oset.h: Use C comment style, not C++ comment style.
8939
8940 2006-11-06  Bruno Haible  <bruno@clisp.org>
8941
8942         * m4/inline.m4: New file.
8943         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
8944         * modules/list (Files): Add m4/inline.m4.
8945         * modules/oset (Files): Likewise.
8946
8947 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8948
8949         * lib/idcache.c: Include <stddef.h>, for offsetof.
8950         (struct userid.name): Change from char * to a flexible array member.
8951         All uses changed.
8952         * modules/idcache (Depends-on): Add flexmember.
8953
8954         * MODULES.html.sh (Core language properties): New module flexmember.
8955         * modules/flexmember, m4/flexmember.m4: New files.
8956
8957         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
8958         inline functions that are identical with the old xnmalloc_inline,
8959         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
8960         that we can avoid some unnecessary integer multiplications and
8961         divisions in the common case where the element size is known at
8962         compile time.
8963         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
8964         needed.
8965         (xnboundedmalloc): Remove.
8966         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
8967         arguments, for consistency with rest of this header.
8968         (xcharalloc): Rewrite using XNMALLOC.
8969         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
8970         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
8971         versions have been moved to lib/xalloc.h and renamed to be the
8972         non-*_inline versions.
8973         (xmalloc, xrealloc): Implement without reference to the xnmalloc
8974         and xnrealloc functions, since those functions are now inline and
8975         now call us.
8976         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
8977         renaming described above.
8978         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
8979         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
8980         captures the dependency in AC_C_INLINE.
8981
8982         New module canonicalize-lgpl, proposed by Charles Wilson in
8983         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
8984         with a few small changes afterwards.
8985         * MODULES.html.sh (File system functions): New module
8986         canonicalize-lgpl.
8987         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
8988         and canonicalize_file_name.
8989         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
8990         * modules/canonicalize-lgpl: New files.
8991
8992 2006-11-05  Bruno Haible  <bruno@clisp.org>
8993
8994         * gnulib-tool (func_import, func_create_testdir): Create directories
8995         also for files in subdirectories of lib/.
8996
8997 2006-11-05  Bruno Haible  <bruno@clisp.org>
8998
8999         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
9000         ANSI C compliant.
9001
9002 2006-11-03  Bruno Haible  <bruno@clisp.org>
9003
9004         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9005         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
9006         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
9007         (xnboundedmalloc): New inline function.
9008         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
9009         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
9010         xmalloc.
9011         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
9012         xmalloc.
9013         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
9014         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
9015         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
9016         xmalloc.
9017         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9018         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
9019         xmalloc.
9020         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
9021         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9022         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
9023         xmalloc.
9024         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9025         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
9026         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9027         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
9028         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
9029         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
9030         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
9031
9032 2006-11-03  Bruno Haible  <bruno@clisp.org>
9033
9034         * lib/c-ctype.h [C++]: Define functions without name mangling.
9035         * lib/fwriteerror.h [C++]: Likewise.
9036         * lib/gcd.h [C++]: Likewise.
9037         * lib/linebreak.h [C++]: Likewise.
9038
9039 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
9040
9041         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
9042         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
9043         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
9044         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9045         Check for functions and headers just once.
9046         Check for declaration of canonicalize_file_name.
9047         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
9048
9049 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9050
9051         * gnulib-tool (func_import): Fix typo in actioncmd.
9052
9053 2006-11-02  Bruno Haible  <bruno@clisp.org>
9054
9055         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
9056         newline sequence in the Makefile.am snippet as a space, like "make"
9057         does.
9058         Reported by Roger Persson <perrog@gmail.com>.
9059
9060 2006-11-01  Bruno Haible  <bruno@clisp.org>
9061
9062         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
9063         already declared in <string.h>.
9064         * lib/strcase.h (strncasecmp): Don't declare it if yes.
9065
9066 2006-11-01  Bruno Haible  <bruno@clisp.org>
9067
9068         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
9069         * lib/strcase.h: Include <string.h>.
9070         (strcasecmp): Define to rpl_strcasecmp here.
9071
9072 2006-11-01  Bruno Haible  <bruno@clisp.org>
9073
9074         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
9075
9076 2006-11-01  Eric Blake  <ebb9@byu.net>
9077
9078         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
9079
9080         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
9081
9082 2006-10-29  Bruno Haible  <bruno@clisp.org>
9083
9084         Make it compile in C++ mode.
9085         * lib/full-write.c (full_rw): Add a cast.
9086
9087 2006-11-01  Bruno Haible  <bruno@clisp.org>
9088
9089         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
9090         be POSIX compliant.
9091         Reported by Roger Persson <perrog@gmail.com>.
9092
9093 2006-11-01  Eric Blake  <ebb9@byu.net>
9094
9095         * lib/getopt_.h: Fix comments.
9096
9097 2006-10-31  Eric Blake  <ebb9@byu.net>
9098
9099         * modules/tmpdir (Depends-on): Add sys_stat.
9100         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
9101         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
9102         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
9103         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
9104         tempname.
9105
9106 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
9107
9108         Avoid some C++ diagnostics reported by Bruno Haible.
9109         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
9110         xmalloc.
9111         (quotearg_alloc): Use xcharalloc rather than xmalloc.
9112         (struct slotvec): Move to top level.
9113         (quotearg_n_options): Rewrite to avoid xmalloc.
9114         * lib/xalloc.h (xcharalloc): New function.
9115         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
9116         [defined __cplusplus]: Add function template that provides result
9117         type propagation.  This part of the change is from Bruno Haible.
9118
9119 2006-10-29  Bruno Haible  <bruno@clisp.org>
9120
9121         Make it compile in C++ mode.
9122         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
9123         * lib/strnlen1.c (strnlen1): Cast memchr result.
9124         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
9125         * lib/clean-temp.c (string_equals, string_hash): Add casts.
9126         (create_temp_dir): Rename local variable 'template'.
9127         (compile_csharp_using_sscli): Add cast.
9128         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
9129         * lib/findprog.c (find_in_path): Likewise.
9130         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
9131         * lib/wait-process.c (register_slave_subprocess): Likewise.
9132
9133 2006-10-22  Bruno Haible  <bruno@clisp.org>
9134
9135         * modules/tsearch: New file.
9136         * lib/tsearch.h: New file.
9137         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
9138         * m4/tsearch.m4: New file.
9139         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
9140
9141 2006-10-29  Eric Blake  <ebb9@byu.net>
9142
9143         * lib/arcfour.c: Assume config.h.
9144         * lib/arctwo.c: Likewise.
9145         * lib/base64.c: Likewise.
9146         * lib/check-version.c: Likewise.
9147         * lib/crc.c: Likewise.
9148         * lib/des.c: Likewise.
9149         * lib/gc-gnulib.c: Likewise.
9150         * lib/gc-libgcrypt.c: Likewise.
9151         * lib/gc-pbkdf2-sha1.c: Likewise.
9152         * lib/getaddrinfo.c: Likewise.
9153         * lib/getdelim.c: Likewise.
9154         * lib/getline.c: Likewise.
9155         * lib/hmac-md5.c: Likewise.
9156         * lib/hmac-sha1.c: Likewise.
9157         * lib/iconvme.c: Likewise.
9158         * lib/md2.c: Likewise.
9159         * lib/md4.c: Likewise.
9160         * lib/memxor.c: Likewise.
9161         * lib/read-file.c: Likewise.
9162         * lib/readline.c: Likewise.
9163         * lib/rijndael-alg-fst.c: Likewise.
9164         * lib/rijndael-api-fst.c: Likewise.
9165         * lib/xgetdomainname.c: Likewise.
9166
9167 2006-10-28  Eric Blake  <ebb9@byu.net>
9168
9169         * lib/xstrndup.c: Assume config.h.
9170
9171 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9172
9173         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
9174         stat-macros.h is now for our own macros, whereas stat_h is for
9175         macros in the <sys/stat.h> name space.
9176         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
9177         (STAT_MACROS_H): Remove.
9178         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
9179         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
9180         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
9181         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
9182         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
9183         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
9184         Move these macros to ...
9185         * lib/stat_.h: here.  Don't include stat-macros.h.
9186         * lib/canonicalize.c: Don't include stat-macros.h.
9187         * lib/chown.c: Likewise.
9188         * lib/euidaccess.c: Likewise.
9189         * lib/file-type.c: Likewise.
9190         * lib/filemode.c: Likewise.
9191         * lib/glob.c: Likewise.
9192         * lib/isapipe.c: Likewise.
9193         * lib/lchown.c: Likewise.
9194         * lib/lstat.c: Likewise.
9195         * lib/mkdir-p.c: Likewise.
9196         * lib/rmdir.c: Likewise.
9197         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
9198         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
9199         unless mkdir isn't declared, to speed up 'configure'.
9200         Always create sys/stat.h, since it's unlikely any real sys/stat.h
9201         would define all the S_* symbols.
9202         * modules/canonicalize (Depends-on):
9203         Depend on sys_stat, not stat-macros.
9204         * modules/chown: Likewise.
9205         * modules/euidaccess: Likewise.
9206         * modules/filemode: Likewise.
9207         * modules/file-type: Likewise.
9208         * modules/glob: Likewise.
9209         * modules/isapipe: Likewise.
9210         * modules/lchown: Likewise.
9211         * modules/lstat: Likewise.
9212         * modules/mkancesdirs: Likewise.
9213         * modules/rmdir: Likewise.
9214         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
9215         * modules/modechange: Likewise.
9216         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
9217         (configure.ac): Remove gl_STAT_MACROS.
9218         * modules/sys_stat (Depends-on): Remove stat-macros.
9219
9220 2006-10-27  Bruno Haible  <bruno@clisp.org>
9221
9222         * m4/signed.m4: Remove file.
9223         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
9224         invocation.
9225         * modules/vasnprintf (Files): Remove m4/signed.m4.
9226
9227 2006-10-27  Bruno Haible  <bruno@clisp.org>
9228
9229         Update to GNU gettext 0.16.
9230         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
9231         m4/inttypes-h.m4, m4/signed.m4.
9232         * m4/gettext.m4: Update to GNU gettext 0.16.
9233         * m4/intl.m4: New file, from GNU gettext.
9234         * m4/intldir.m4: New file, from GNU gettext.
9235         * config/srclist.txt: Update
9236
9237 2006-10-27  Eric Blake  <ebb9@byu.net>
9238
9239         * MODULES.html.sh: Document tempname.
9240         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
9241         dependencies.
9242         (Files): Move lib/tempname.c...
9243         * modules/tempname: ...to this new module.
9244         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
9245         (gl_PREREQ_TEMPNAME): Move...
9246         * m4/tempname.m4: ...to this new file.
9247         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
9248         * modules/sys_stat (Depends-on): Add stat-macros.
9249         * lib/stat_.h (includes): Pick up stat macros.
9250         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
9251         if stat macros are broken.
9252         * lib/tempname.c (includes): No need to include "stat-macros.h".
9253         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
9254         (direxists, __path_search) [!_LIBC]: Don't compile these in
9255         gnulib; the tmpdir module covers that.
9256         * lib/tempname.h: New file.
9257
9258 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
9259
9260         * COPYING: Explain how gnulib-tool converts licence headers.
9261         Almost all wording by Eric Blake.
9262
9263 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
9264
9265         * lib/mbchar.h (is_basic_table): Make read-only.
9266         * lib/mbchar.c (is_basic_table): Likewise.
9267         Reported by John Darrington.
9268
9269 2006-10-25  Bruno Haible  <bruno@clisp.org>
9270
9271         * lib/progname.h (set_program_name): Undefine before defining.
9272
9273 2006-10-25  Bruno Haible  <bruno@clisp.org>
9274
9275         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
9276         false for non-gcc C++ compilers.
9277         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
9278
9279 2006-10-24  Bruno Haible  <bruno@clisp.org>
9280
9281         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
9282         iconv implementations like Irix iconv.
9283
9284 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9285
9286         * modules/vararrays: New file.
9287         * m4/vararrays.m4: New file, taken from diffutils.
9288         * MODULES.html.sh: New module vararrays.
9289
9290 2006-10-24  Karl Berry  <karl@gnu.org>
9291
9292         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
9293         Don't call GNU Unix.
9294
9295 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9296
9297         * users.txt: Add Libtool.
9298
9299         Sync from Libtool:
9300
9301         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9302
9303         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
9304         to gnulib's policy of including config.h unconditionally.
9305
9306 2006-10-24  Bruno Haible  <bruno@clisp.org>
9307
9308         * modules/wcwidth (Files): Add m4/wint_t.m4.
9309         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
9310         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
9311
9312 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9313
9314         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
9315         to pacify GCC with some -W flags enabled.  Problem reported by
9316         Bruno Haible.
9317
9318 2006-10-24  Jim Meyering  <jim@meyering.net>
9319
9320         * MODULES.html.sh: Remove uinttostr.  It's not a module.
9321         Reported by Karl Berry.
9322
9323 2006-10-23  Bruno Haible  <bruno@clisp.org>
9324
9325         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
9326
9327 2006-10-24  Bruno Haible  <bruno@clisp.org>
9328
9329         * lib/gl_list.h: Use C comment style, not C++ comment style.
9330
9331 2006-10-23  Eric Blake  <ebb9@byu.net>
9332
9333         * lib/getaddrinfo.c (includes): Add missing include.
9334
9335 2006-10-23  Bruno Haible  <bruno@clisp.org>
9336             Paul Eggert  <eggert@cs.ucla.edu>
9337
9338         Ability to rename obstack_free.
9339         * lib/obstack.h (__obstack_free): New macro. Declare instead of
9340         obstack_free.
9341         (obstack_free): Invoke the __obstack_free macro.
9342         * lib/obstack.c (obstack_free): Use __obstack_free macro.
9343
9344 2006-10-23  Bruno Haible  <bruno@clisp.org>
9345             Paul Eggert  <eggert@cs.ucla.edu>
9346
9347         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
9348         __argc, __argv from the declaration. (They are defined as macros on
9349         mingw.)
9350
9351 2006-10-22  Bruno Haible  <bruno@clisp.org>
9352
9353         * doc/gnulib-intro.texi: New file.
9354         * doc/gnulib.texi: Include it.
9355
9356 2006-10-21  Bruno Haible  <bruno@clisp.org>
9357
9358         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
9359         "Introduction", "Miscellanous Notes", "Particular Modules".
9360
9361 2006-10-21  Bruno Haible  <bruno@clisp.org>
9362
9363         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9364         Change mostlyclean-local rule to avoid sh syntax error from bash
9365         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
9366
9367 2006-10-23  Jim Meyering  <jim@meyering.net>
9368
9369         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
9370         in place of snprintf.
9371
9372         * modules/inttostr (Files): Add lib/uinttostr.c.
9373         * lib/uinttostr.c (inttostr): New file/function.
9374         * lib/inttostr.h (uinttostr): Declare.
9375         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
9376         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9377         Add uinttostr.
9378         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
9379
9380 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9381
9382         * lib/canonicalize.c (ELOOP): Define if not already defined.
9383         Problem reported by Bruno Haible in
9384         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
9385
9386 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9387
9388         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
9389         Problem reported by Perry Smith and Ville Laurikari.
9390
9391         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
9392         uses.
9393
9394 2006-10-19  Bruno Haible  <bruno@clisp.org>
9395
9396         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
9397         for mingw.
9398
9399 2006-10-19  Bruno Haible  <bruno@clisp.org>
9400
9401         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
9402         Needed for mingw.
9403
9404 2006-10-19  Bruno Haible  <bruno@clisp.org>
9405
9406         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
9407
9408 2006-10-19  Bruno Haible  <bruno@clisp.org>
9409
9410         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
9411         it.
9412
9413 2006-10-19  Bruno Haible  <bruno@clisp.org>
9414
9415         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
9416         invocation.
9417
9418 2006-10-19  Bruno Haible  <bruno@clisp.org>
9419
9420         * gnulib-tool (func_create_testdir): Don't include ftruncate and
9421         mountlist by default.
9422
9423 2006-10-16  Bruno Haible  <bruno@clisp.org>
9424
9425         * lib/c-strstr.c: Include c-strstr.h.
9426
9427 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9428
9429         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
9430         in a slash.
9431
9432 2006-10-18  Bruno Haible  <bruno@clisp.org>
9433
9434         * lib/lock.h [C++]: Wrap definitions in extern "C".
9435
9436 2006-10-18  Bruno Haible  <bruno@clisp.org>
9437
9438         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
9439         gl_LIBOBJS list.
9440
9441 2006-10-18  Bruno Haible  <bruno@clisp.org>
9442
9443         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
9444
9445 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
9446
9447         * lib/xstrtol.h: Include gettext.h.
9448         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
9449         Problem reported by Eric Blake.
9450         * modules/xstrtol (Depends-on): Add gettext-h.
9451
9452 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
9453
9454         * lib/strftime.c (advance): New macro.
9455         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
9456         incomplete type, so you can't add 0 to it.  Problem and patch
9457         reported by Eelco Dolstra for dietlibc.
9458
9459 2006-10-18  Jim Meyering  <jim@meyering.net>
9460
9461         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
9462         type for a local, and rename it: s/up/user_proc/.
9463
9464 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9465
9466         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
9467         READ_UTMP_USER_PROCESS.
9468         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
9469
9470 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9471
9472         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
9473         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
9474
9475 2006-10-17  Eric Blake  <ebb9@byu.net>
9476
9477         * lib/sigprocmask.c (sigprocmask): Fix typo.
9478
9479         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
9480
9481         * modules/clean-temp (Makefile.am): Don't add to make output...
9482         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
9483         config.h.
9484
9485 2006-10-17  Bruno Haible  <bruno@clisp.org>
9486
9487         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
9488         differently if DEFAULT_TEXT_DOMAIN is set.
9489
9490 2006-10-16  Bruno Haible  <bruno@clisp.org>
9491
9492         * lib/clean-temp.c: Include fwriteerror.h.
9493
9494 2006-10-16  Bruno Haible  <bruno@clisp.org>
9495
9496         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
9497
9498 2006-10-16  Bruno Haible  <bruno@clisp.org>
9499
9500         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
9501         * lib/sigprocmask.h: Include <sys/types.h>.
9502         (sigset_t): Use the system's definition if present.
9503
9504 2006-10-17  Eric Blake  <ebb9@byu.net>
9505
9506         * lib/xvasprintf.c (includes): Assume config.h.
9507         * lib/xasprintf.c (includes): Likewise.
9508
9509 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
9510
9511         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
9512         at least as wide as intmax_t.
9513
9514 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
9515
9516         (Imported from Automake.)
9517         * build-aux/gnupload: Update to version 1.1 of directive file.
9518
9519 2006-10-16  Eric Blake  <ebb9@byu.net>
9520
9521         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
9522         match Automake 1.10a.
9523
9524 2006-10-14  Bruno Haible  <bruno@clisp.org>
9525
9526         * modules/sigprocmask: New file.
9527         * lib/sigprocmask.h: New file.
9528         * lib/sigprocmask.c: New file.
9529         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
9530         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
9531         request sigprocmask.o.
9532         (gl_PREREQ_SIGPROCMASK): New macro.
9533         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
9534         (Depends-on): Add sigprocmask.
9535         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
9536         gt_SIGNALBLOCKING. Test for 'raise' only once.
9537         * lib/fatal-signal.c: Include sigprocmask.h.
9538         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
9539         unblock_fatal_signals): Define always.
9540         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
9541         sigprocmask.
9542
9543 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9544
9545         Sync from Automake.
9546         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
9547         which incorrectly sets the mode of an existing destination
9548         directory.  In some cases the unpatched install-sh could do the
9549         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
9550         system.  We hope this is rare in practice, but it's clearly worth
9551         fixing.  Problem reported by Alex Unleashed in
9552         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
9553         Also, don't bother to check for -m bugs unless we're using -m;
9554         suggested by Stepan Kasal.
9555
9556 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9557
9558         Sync from Automake.
9559         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
9560         `-c' flag, so they appear at the same position as in %FASTDEP%
9561         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
9562         which ignores unknown options only after the first non-option.
9563         Bug report against M4 by Nelson H. F. Beebe.
9564
9565 2006-10-13  Jim Meyering  <jim@meyering.net>
9566
9567         Fix a bug in yesterday's change.
9568         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
9569         p->fts_statp->st_dev would be used uninitialized.
9570         Ensures that we always call fts_stat on the very first entry.
9571         Miklos Szeredi reported that find -xdev stopped working.
9572
9573 2006-10-12  Bruno Haible  <bruno@clisp.org>
9574
9575         * gnulib-tool (func_get_automake_snippet): Append an automatically
9576         computed EXTRA_DIST augmentation.
9577         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
9578         * modules/alloca-opt (Makefile.am): Likewise.
9579         * modules/allocsa (Makefile.am): Likewise.
9580         * modules/arcfour (Makefile.am): Likewise.
9581         * modules/arctwo (Makefile.am): Likewise.
9582         * modules/argmatch (Makefile.am): Likewise.
9583         * modules/argz (Makefile.am): Likewise.
9584         * modules/atexit (Makefile.am): Likewise.
9585         * modules/backupfile (Makefile.am): Likewise.
9586         * modules/byteswap (Makefile.am): Likewise.
9587         * modules/c-strtod (Makefile.am): Likewise.
9588         * modules/c-strtold (Makefile.am): Likewise.
9589         * modules/calloc (Makefile.am): Likewise.
9590         * modules/canon-host (Makefile.am): Likewise.
9591         * modules/canonicalize (Makefile.am): Likewise.
9592         * modules/chdir-long (Makefile.am): Likewise.
9593         * modules/chdir-safer (Makefile.am): Likewise.
9594         * modules/check-version (Makefile.am): Likewise.
9595         * modules/chown (Makefile.am): Likewise.
9596         * modules/cloexec (Makefile.am): Likewise.
9597         * modules/close-stream (Makefile.am): Likewise.
9598         * modules/closeout (Makefile.am): Likewise.
9599         * modules/crc (Makefile.am): Likewise.
9600         * modules/csharpexec (Makefile.am): Likewise.
9601         * modules/cycle-check (Makefile.am): Likewise.
9602         * modules/des (Makefile.am): Likewise.
9603         * modules/dev-ino (Makefile.am): Likewise.
9604         * modules/dirfd (Makefile.am): Likewise.
9605         * modules/dirname (Makefile.am): Likewise.
9606         * modules/dup2 (Makefile.am): Likewise.
9607         * modules/eealloc (Makefile.am): Likewise.
9608         * modules/error (Makefile.am): Likewise.
9609         * modules/euidaccess (Makefile.am): Likewise.
9610         * modules/exclude (Makefile.am): Likewise.
9611         * modules/exitfail (Makefile.am): Likewise.
9612         * modules/fcntl-safer (Makefile.am): Likewise.
9613         * modules/fcntl (Makefile.am): Likewise.
9614         * modules/file-type (Makefile.am): Likewise.
9615         * modules/fileblocks (Makefile.am): Likewise.
9616         * modules/filemode (Makefile.am): Likewise.
9617         * modules/filenamecat (Makefile.am): Likewise.
9618         * modules/fnmatch (Makefile.am): Likewise.
9619         * modules/fopen-safer (Makefile.am): Likewise.
9620         * modules/fpending (Makefile.am): Likewise.
9621         * modules/fprintftime (Makefile.am): Likewise.
9622         * modules/free (Makefile.am): Likewise.
9623         * modules/fsusage (Makefile.am): Likewise.
9624         * modules/ftruncate (Makefile.am): Likewise.
9625         * modules/fts (Makefile.am): Likewise.
9626         * modules/gc-arcfour (Makefile.am): Likewise.
9627         * modules/gc-des (Makefile.am): Likewise.
9628         * modules/gc-hmac-md5 (Makefile.am): Likewise.
9629         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
9630         * modules/gc-md4 (Makefile.am): Likewise.
9631         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9632         * modules/gc-sha1 (Makefile.am): Likewise.
9633         * modules/gc (Makefile.am): Likewise.
9634         * modules/getaddrinfo (Makefile.am): Likewise.
9635         * modules/getcwd (Makefile.am): Likewise.
9636         * modules/getdelim (Makefile.am): Likewise.
9637         * modules/getdomainname (Makefile.am): Likewise.
9638         * modules/getgroups (Makefile.am): Likewise.
9639         * modules/gethostname (Makefile.am): Likewise.
9640         * modules/gethrxtime (Makefile.am): Likewise.
9641         * modules/getline (Makefile.am): Likewise.
9642         * modules/getloadavg (Makefile.am): Likewise.
9643         * modules/getlogin_r (Makefile.am): Likewise.
9644         * modules/getndelim2 (Makefile.am): Likewise.
9645         * modules/getopt (Makefile.am): Likewise.
9646         * modules/getpagesize (Makefile.am): Likewise.
9647         * modules/getpass-gnu (Makefile.am): Likewise.
9648         * modules/getpass (Makefile.am): Likewise.
9649         * modules/getsubopt (Makefile.am): Likewise.
9650         * modules/gettime (Makefile.am): Likewise.
9651         * modules/gettimeofday (Makefile.am): Likewise.
9652         * modules/getugroups (Makefile.am): Likewise.
9653         * modules/getusershell (Makefile.am): Likewise.
9654         * modules/glob (Makefile.am): Likewise.
9655         * modules/group-member (Makefile.am): Likewise.
9656         * modules/hard-locale (Makefile.am): Likewise.
9657         * modules/hash (Makefile.am): Likewise.
9658         * modules/hmac-md5 (Makefile.am): Likewise.
9659         * modules/hmac-sha1 (Makefile.am): Likewise.
9660         * modules/human (Makefile.am): Likewise.
9661         * modules/idcache (Makefile.am): Likewise.
9662         * modules/imaxabs (Makefile.am): Likewise.
9663         * modules/imaxdiv (Makefile.am): Likewise.
9664         * modules/inet_ntop (Makefile.am): Likewise.
9665         * modules/inet_pton (Makefile.am): Likewise.
9666         * modules/intprops (Makefile.am): Likewise.
9667         * modules/inttostr (Makefile.am): Likewise.
9668         * modules/inttypes (Makefile.am): Likewise.
9669         * modules/isapipe (Makefile.am): Likewise.
9670         * modules/javaversion (Makefile.am): Likewise.
9671         * modules/lchmod (Makefile.am): Likewise.
9672         * modules/lchown (Makefile.am): Likewise.
9673         * modules/localcharset (Makefile.am): Likewise.
9674         * modules/long-options (Makefile.am): Likewise.
9675         * modules/lstat (Makefile.am): Likewise.
9676         * modules/malloc (Makefile.am): Likewise.
9677         * modules/mathl (Makefile.am): Likewise.
9678         * modules/mbchar (Makefile.am): Likewise.
9679         * modules/md2 (Makefile.am): Likewise.
9680         * modules/md4 (Makefile.am): Likewise.
9681         * modules/md5 (Makefile.am): Likewise.
9682         * modules/memcasecmp (Makefile.am): Likewise.
9683         * modules/memchr (Makefile.am): Likewise.
9684         * modules/memcmp (Makefile.am): Likewise.
9685         * modules/memcoll (Makefile.am): Likewise.
9686         * modules/memcpy (Makefile.am): Likewise.
9687         * modules/memmem (Makefile.am): Likewise.
9688         * modules/memmove (Makefile.am): Likewise.
9689         * modules/mempcpy (Makefile.am): Likewise.
9690         * modules/memrchr (Makefile.am): Likewise.
9691         * modules/memset (Makefile.am): Likewise.
9692         * modules/memxor (Makefile.am): Likewise.
9693         * modules/mkancesdirs (Makefile.am): Likewise.
9694         * modules/mkdir-p (Makefile.am): Likewise.
9695         * modules/mkdir (Makefile.am): Likewise.
9696         * modules/mkdtemp (Makefile.am): Likewise.
9697         * modules/mkstemp (Makefile.am): Likewise.
9698         * modules/mktime (Makefile.am): Likewise.
9699         * modules/modechange (Makefile.am): Likewise.
9700         * modules/mountlist (Makefile.am): Likewise.
9701         * modules/nanosleep (Makefile.am): Likewise.
9702         * modules/obstack (Makefile.am): Likewise.
9703         * modules/openat (Makefile.am): Likewise.
9704         * modules/pagealign_alloc (Makefile.am): Likewise.
9705         * modules/pathmax (Makefile.am): Likewise.
9706         * modules/physmem (Makefile.am): Likewise.
9707         * modules/poll (Makefile.am): Likewise.
9708         * modules/posixtm (Makefile.am): Likewise.
9709         * modules/posixver (Makefile.am): Likewise.
9710         * modules/putenv (Makefile.am): Likewise.
9711         * modules/quote (Makefile.am): Likewise.
9712         * modules/quotearg (Makefile.am): Likewise.
9713         * modules/raise (Makefile.am): Likewise.
9714         * modules/read-file (Makefile.am): Likewise.
9715         * modules/readline (Makefile.am): Likewise.
9716         * modules/readlink (Makefile.am): Likewise.
9717         * modules/readtokens (Makefile.am): Likewise.
9718         * modules/readutmp (Makefile.am): Likewise.
9719         * modules/realloc (Makefile.am): Likewise.
9720         * modules/regex (Makefile.am): Likewise.
9721         * modules/rename-dest-slash (Makefile.am): Likewise.
9722         * modules/rename (Makefile.am): Likewise.
9723         * modules/rijndael (Makefile.am): Likewise.
9724         * modules/rmdir (Makefile.am): Likewise.
9725         * modules/rpmatch (Makefile.am): Likewise.
9726         * modules/safe-read (Makefile.am): Likewise.
9727         * modules/safe-write (Makefile.am): Likewise.
9728         * modules/same-inode (Makefile.am): Likewise.
9729         * modules/same (Makefile.am): Likewise.
9730         * modules/save-cwd (Makefile.am): Likewise.
9731         * modules/savedir (Makefile.am): Likewise.
9732         * modules/setenv (Makefile.am): Likewise.
9733         * modules/settime (Makefile.am): Likewise.
9734         * modules/sha1 (Makefile.am): Likewise.
9735         * modules/sig2str (Makefile.am): Likewise.
9736         * modules/snprintf (Makefile.am): Likewise.
9737         * modules/stat-macros (Makefile.am): Likewise.
9738         * modules/stat-time (Makefile.am): Likewise.
9739         * modules/stdbool (Makefile.am): Likewise.
9740         * modules/stdint (Makefile.am): Likewise.
9741         * modules/stdlib-safer (Makefile.am): Likewise.
9742         * modules/stpcpy (Makefile.am): Likewise.
9743         * modules/stpncpy (Makefile.am): Likewise.
9744         * modules/strcase (Makefile.am): Likewise.
9745         * modules/strcasestr (Makefile.am): Likewise.
9746         * modules/strchrnul (Makefile.am): Likewise.
9747         * modules/strcspn (Makefile.am): Likewise.
9748         * modules/strdup (Makefile.am): Likewise.
9749         * modules/strerror (Makefile.am): Likewise.
9750         * modules/strftime (Makefile.am): Likewise.
9751         * modules/strndup (Makefile.am): Likewise.
9752         * modules/strnlen (Makefile.am): Likewise.
9753         * modules/strpbrk (Makefile.am): Likewise.
9754         * modules/strsep (Makefile.am): Likewise.
9755         * modules/strstr (Makefile.am): Likewise.
9756         * modules/strtod (Makefile.am): Likewise.
9757         * modules/strtoimax (Makefile.am): Likewise.
9758         * modules/strtok_r (Makefile.am): Likewise.
9759         * modules/strtol (Makefile.am): Likewise.
9760         * modules/strtoll (Makefile.am): Likewise.
9761         * modules/strtoul (Makefile.am): Likewise.
9762         * modules/strtoull (Makefile.am): Likewise.
9763         * modules/strtoumax (Makefile.am): Likewise.
9764         * modules/strverscmp (Makefile.am): Likewise.
9765         * modules/sys_socket (Makefile.am): Likewise.
9766         * modules/sys_stat (Makefile.am): Likewise.
9767         * modules/sysexits (Makefile.am): Likewise.
9768         * modules/time_r (Makefile.am): Likewise.
9769         * modules/timegm (Makefile.am): Likewise.
9770         * modules/timespec (Makefile.am): Likewise.
9771         * modules/tmpfile-safer (Makefile.am): Likewise.
9772         * modules/trim (Makefile.am): Likewise.
9773         * modules/unistd-safer (Makefile.am): Likewise.
9774         * modules/unlinkdir (Makefile.am): Likewise.
9775         * modules/unlocked-io (Makefile.am): Likewise.
9776         * modules/userspec (Makefile.am): Likewise.
9777         * modules/utime (Makefile.am): Likewise.
9778         * modules/utimecmp (Makefile.am): Likewise.
9779         * modules/utimens (Makefile.am): Likewise.
9780         * modules/vasnprintf (Makefile.am): Likewise.
9781         * modules/vasprintf (Makefile.am): Likewise.
9782         * modules/vsnprintf (Makefile.am): Likewise.
9783         * modules/xalloc (Makefile.am): Likewise.
9784         * modules/xgetcwd (Makefile.am): Likewise.
9785         * modules/xnanosleep (Makefile.am): Likewise.
9786         * modules/xreadlink (Makefile.am): Likewise.
9787         * modules/xstrtod (Makefile.am): Likewise.
9788         * modules/xstrtol (Makefile.am): Likewise.
9789         * modules/xstrtold (Makefile.am): Likewise.
9790         * modules/yesno (Makefile.am): Likewise.
9791         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
9792
9793 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9794
9795         * modules/error (Makefile.am): Distribute files through
9796         EXTRA_DIST, not lib_SOURCES.
9797
9798 2006-10-12  Eric Blake  <ebb9@byu.net>
9799
9800         * modules/error (Makefile.am): Distribute files in /lib.
9801         * modules/obstack (Makefile.am): Likewise.
9802
9803 2006-10-12  Bruno Haible  <bruno@clisp.org>
9804
9805         * modules/acl (Makefile.am): Distribute all files in lib/ through
9806         EXTRA_DIST.
9807         * modules/arcfour (Makefile.am): Likewise.
9808         * modules/arctwo (Makefile.am): Likewise.
9809         * modules/argmatch (Makefile.am): Likewise.
9810         * modules/argz (Makefile.am): Likewise.
9811         * modules/atexit (Makefile.am): Likewise.
9812         * modules/backupfile (Makefile.am): Likewise.
9813         * modules/c-strtod (Makefile.am): Likewise.
9814         * modules/c-strtold (Makefile.am): Likewise.
9815         * modules/calloc (Makefile.am): Likewise.
9816         * modules/canon-host (Makefile.am): Likewise.
9817         * modules/canonicalize (Makefile.am): Likewise.
9818         * modules/chdir-long (Makefile.am): Likewise.
9819         * modules/chdir-safer (Makefile.am): Likewise.
9820         * modules/check-version (Makefile.am): Likewise.
9821         * modules/chown (Makefile.am): Likewise.
9822         * modules/cloexec (Makefile.am): Likewise.
9823         * modules/close-stream (Makefile.am): Likewise.
9824         * modules/closeout (Makefile.am): Likewise.
9825         * modules/crc (Makefile.am): Likewise.
9826         * modules/cycle-check (Makefile.am): Likewise.
9827         * modules/des (Makefile.am): Likewise.
9828         * modules/dirfd (Makefile.am): Likewise.
9829         * modules/dirname (Makefile.am): Likewise.
9830         * modules/dup2 (Makefile.am): Likewise.
9831         * modules/euidaccess (Makefile.am): Likewise.
9832         * modules/exclude (Makefile.am): Likewise.
9833         * modules/exitfail (Makefile.am): Likewise.
9834         * modules/fcntl-safer (Makefile.am): Likewise.
9835         * modules/file-type (Makefile.am): Likewise.
9836         * modules/fileblocks (Makefile.am): Likewise.
9837         * modules/filemode (Makefile.am): Likewise.
9838         * modules/filenamecat (Makefile.am): Likewise.
9839         * modules/fnmatch (Makefile.am): Likewise.
9840         * modules/fopen-safer (Makefile.am): Likewise.
9841         * modules/fpending (Makefile.am): Likewise.
9842         * modules/fprintftime (Makefile.am): Likewise.
9843         * modules/free (Makefile.am): Likewise.
9844         * modules/fsusage (Makefile.am): Likewise.
9845         * modules/ftruncate (Makefile.am): Likewise.
9846         * modules/fts (Makefile.am): Likewise.
9847         * modules/gc (Makefile.am): Likewise.
9848         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9849         * modules/getaddrinfo (Makefile.am): Likewise.
9850         * modules/getcwd (Makefile.am): Likewise.
9851         * modules/getdelim (Makefile.am): Likewise.
9852         * modules/getdomainname (Makefile.am): Likewise.
9853         * modules/getgroups (Makefile.am): Likewise.
9854         * modules/gethostname (Makefile.am): Likewise.
9855         * modules/gethrxtime (Makefile.am): Likewise.
9856         * modules/getline (Makefile.am): Likewise.
9857         * modules/getloadavg (Makefile.am): Likewise.
9858         * modules/getlogin_r (Makefile.am): Likewise.
9859         * modules/getopt (Makefile.am): Likewise.
9860         * modules/getpass (Makefile.am): Likewise.
9861         * modules/getpass-gnu (Makefile.am): Likewise.
9862         * modules/getsubopt (Makefile.am): Likewise.
9863         * modules/gettime (Makefile.am): Likewise.
9864         * modules/gettimeofday (Makefile.am): Likewise.
9865         * modules/getugroups (Makefile.am): Likewise.
9866         * modules/getusershell (Makefile.am): Likewise.
9867         * modules/glob (Makefile.am): Likewise.
9868         * modules/group-member (Makefile.am): Likewise.
9869         * modules/hard-locale (Makefile.am): Likewise.
9870         * modules/hash (Makefile.am): Likewise.
9871         * modules/hmac-md5 (Makefile.am): Likewise.
9872         * modules/hmac-sha1 (Makefile.am): Likewise.
9873         * modules/human (Makefile.am): Likewise.
9874         * modules/idcache (Makefile.am): Likewise.
9875         * modules/imaxabs (Makefile.am): Likewise.
9876         * modules/imaxdiv (Makefile.am): Likewise.
9877         * modules/inet_ntop (Makefile.am): Likewise.
9878         * modules/inet_pton (Makefile.am): Likewise.
9879         * modules/inttostr (Makefile.am): Likewise.
9880         * modules/isapipe (Makefile.am): Likewise.
9881         * modules/lchown (Makefile.am): Likewise.
9882         * modules/long-options (Makefile.am): Likewise.
9883         * modules/lstat (Makefile.am): Likewise.
9884         * modules/malloc (Makefile.am): Likewise.
9885         * modules/mathl (Makefile.am): Likewise.
9886         * modules/mbchar (Makefile.am): Likewise.
9887         * modules/md2 (Makefile.am): Likewise.
9888         * modules/md4 (Makefile.am): Likewise.
9889         * modules/md5 (Makefile.am): Likewise.
9890         * modules/memcasecmp (Makefile.am): Likewise.
9891         * modules/memchr (Makefile.am): Likewise.
9892         * modules/memcmp (Makefile.am): Likewise.
9893         * modules/memcoll (Makefile.am): Likewise.
9894         * modules/memcpy (Makefile.am): Likewise.
9895         * modules/memmem (Makefile.am): Likewise.
9896         * modules/memmove (Makefile.am): Likewise.
9897         * modules/mempcpy (Makefile.am): Likewise.
9898         * modules/memrchr (Makefile.am): Likewise.
9899         * modules/memset (Makefile.am): Likewise.
9900         * modules/memxor (Makefile.am): Likewise.
9901         * modules/mkancesdirs (Makefile.am): Likewise.
9902         * modules/mkdir (Makefile.am): Likewise.
9903         * modules/mkdir-p (Makefile.am): Likewise.
9904         * modules/mkdtemp (Makefile.am): Likewise.
9905         * modules/mkstemp (Makefile.am): Likewise.
9906         * modules/mktime (Makefile.am): Likewise.
9907         * modules/modechange (Makefile.am): Likewise.
9908         * modules/mountlist (Makefile.am): Likewise.
9909         * modules/nanosleep (Makefile.am): Likewise.
9910         * modules/openat (Makefile.am): Likewise.
9911         * modules/pagealign_alloc (Makefile.am): Likewise.
9912         * modules/physmem (Makefile.am): Likewise.
9913         * modules/poll (Makefile.am): Likewise.
9914         * modules/posixtm (Makefile.am): Likewise.
9915         * modules/posixver (Makefile.am): Likewise.
9916         * modules/putenv (Makefile.am): Likewise.
9917         * modules/quote (Makefile.am): Likewise.
9918         * modules/quotearg (Makefile.am): Likewise.
9919         * modules/raise (Makefile.am): Likewise.
9920         * modules/read-file (Makefile.am): Likewise.
9921         * modules/readline (Makefile.am): Likewise.
9922         * modules/readlink (Makefile.am): Likewise.
9923         * modules/readtokens (Makefile.am): Likewise.
9924         * modules/readutmp (Makefile.am): Likewise.
9925         * modules/realloc (Makefile.am): Likewise.
9926         * modules/regex (Makefile.am): Likewise.
9927         * modules/rename (Makefile.am): Likewise.
9928         * modules/rename-dest-slash (Makefile.am): Likewise.
9929         * modules/rijndael (Makefile.am): Likewise.
9930         * modules/rmdir (Makefile.am): Likewise.
9931         * modules/rpmatch (Makefile.am): Likewise.
9932         * modules/safe-read (Makefile.am): Likewise.
9933         * modules/safe-write (Makefile.am): Likewise.
9934         * modules/same (Makefile.am): Likewise.
9935         * modules/save-cwd (Makefile.am): Likewise.
9936         * modules/savedir (Makefile.am): Likewise.
9937         * modules/setenv (Makefile.am): Likewise.
9938         * modules/settime (Makefile.am): Likewise.
9939         * modules/sha1 (Makefile.am): Likewise.
9940         * modules/sig2str (Makefile.am): Likewise.
9941         * modules/snprintf (Makefile.am): Likewise.
9942         * modules/stdlib-safer (Makefile.am): Likewise.
9943         * modules/stpcpy (Makefile.am): Likewise.
9944         * modules/stpncpy (Makefile.am): Likewise.
9945         * modules/strcase (Makefile.am): Likewise.
9946         * modules/strcasestr (Makefile.am): Likewise.
9947         * modules/strchrnul (Makefile.am): Likewise.
9948         * modules/strcspn (Makefile.am): Likewise.
9949         * modules/strdup (Makefile.am): Likewise.
9950         * modules/strerror (Makefile.am): Likewise.
9951         * modules/strftime (Makefile.am): Likewise.
9952         * modules/strndup (Makefile.am): Likewise.
9953         * modules/strnlen (Makefile.am): Likewise.
9954         * modules/strpbrk (Makefile.am): Likewise.
9955         * modules/strsep (Makefile.am): Likewise.
9956         * modules/strstr (Makefile.am): Likewise.
9957         * modules/strtod (Makefile.am): Likewise.
9958         * modules/strtoimax (Makefile.am): Likewise.
9959         * modules/strtok_r (Makefile.am): Likewise.
9960         * modules/strtol (Makefile.am): Likewise.
9961         * modules/strtoll (Makefile.am): Likewise.
9962         * modules/strtoul (Makefile.am): Likewise.
9963         * modules/strtoull (Makefile.am): Likewise.
9964         * modules/strtoumax (Makefile.am): Likewise.
9965         * modules/strverscmp (Makefile.am): Likewise.
9966         * modules/time_r (Makefile.am): Likewise.
9967         * modules/timegm (Makefile.am): Likewise.
9968         * modules/tmpfile-safer (Makefile.am): Likewise.
9969         * modules/unistd-safer (Makefile.am): Likewise.
9970         * modules/unlinkdir (Makefile.am): Likewise.
9971         * modules/userspec (Makefile.am): Likewise.
9972         * modules/utime (Makefile.am): Likewise.
9973         * modules/utimecmp (Makefile.am): Likewise.
9974         * modules/utimens (Makefile.am): Likewise.
9975         * modules/vasnprintf (Makefile.am): Likewise.
9976         * modules/vasprintf (Makefile.am): Likewise.
9977         * modules/vsnprintf (Makefile.am): Likewise.
9978         * modules/xalloc (Makefile.am): Likewise.
9979         * modules/xgetcwd (Makefile.am): Likewise.
9980         * modules/xnanosleep (Makefile.am): Likewise.
9981         * modules/xreadlink (Makefile.am): Likewise.
9982         * modules/xstrtod (Makefile.am): Likewise.
9983         * modules/xstrtol (Makefile.am): Likewise.
9984         * modules/xstrtold (Makefile.am): Likewise.
9985         * modules/yesno (Makefile.am): Likewise.
9986
9987 2006-10-12  Jim Meyering  <jim@meyering.net>
9988
9989         * m4/getloadavg.m4: Revert the change below.
9990
9991         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
9992         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
9993         fail with a symlink, which is what coreutils' ./bootstrap now
9994         creates by default.
9995
9996 2006-10-12  Bruno Haible  <bruno@clisp.org>
9997
9998         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
9999         mingw.
10000         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
10001         MSVC and mingw explicitly.
10002
10003 2006-10-11  Simon Josefsson  <jas@extundo.com>
10004             Bruno Haible  <bruno@clisp.org>
10005
10006         Add support for multiple gnulib-tool invocations in the scope of a
10007         single configure.ac file.
10008         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
10009         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
10010         with the same contents as the _LIBADD variable.
10011         (func_emit_initmacro_start, func_emit_initmacro_end,
10012         func_emit_initmacro_done): New functions.
10013         (func_import, func_create_testdir): Invoke them. Allow the identifiers
10014         gl_LIBOBJS and gl_LTLIBOBJS.
10015
10016 2006-10-11  Bruno Haible  <bruno@clisp.org>
10017
10018         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
10019         (func_create_testdir): Don't create po/Makefile.am, don't invoke
10020         autoreconf. Instead, invoke autopoint explicitly but move back the
10021         *.m4 files from gnulib.
10022
10023 2006-10-11  Bruno Haible  <bruno@clisp.org>
10024
10025         * gnulib-tool (func_usage): Make module names after --create-testdir
10026         optional.
10027         (func_create_testdir): If no module was specified, use nearly all
10028         modules.
10029
10030 2006-10-12  Jim Meyering  <jim@meyering.net>
10031
10032         Big performance improvement for fts-based tools that use FTS_NOSTAT.
10033         Avoid spurious inode-mismatch problems on non-POSIX file systems.
10034         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
10035         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
10036         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
10037         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
10038         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
10039         (fts_set_stat_required): New function.
10040         (fts_open): Defer the calls to fts_stat, if possible or requested.
10041         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
10042         into fts_stat itself.
10043         (fts_read): Perform any required (deferred) fts_stat call.
10044         (fts_build): Likewise, for the directory we're about to open and read.
10045         In the readdir loop, carefully decide whether each entry will require
10046         an eventual call to fts_stat, using dirent.d_type info if available.
10047         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
10048         a command line argument into this function.  Update all callers.
10049         Map a return value of FTS_DOT to FTS_D for a command line argument.
10050         * modules/fts (Depends-on): Add d-type.  Alphabetize.
10051         Thanks to Miklos Szeredi for his tenacity and for the initial
10052         bug report about "find" failing on a FUSE-based file system.
10053
10054         * lib/fts.c (fts_open): Use consistent indentation.
10055
10056 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10057
10058         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
10059         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
10060         reported by Jim Meyering.  All uses of cache variables renamed
10061         to match Autoconf's.
10062         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
10063         the other one.
10064
10065         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
10066         Fix misspelling in diagnostic.
10067
10068 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10069
10070         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
10071         defined.  Problem reported by Matthew Woehlke.
10072
10073         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
10074         Add support for Tandem NonStop R series.
10075         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
10076         Use new macro.
10077
10078         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
10079         (has_trailing_slash): Omit size arg; all callers changed.
10080         Omit 'inline', since it doesn't help performance and we'd
10081         need to configure it.
10082         Don't count //, ///, etc. as having a trailing slash.
10083         As a side effect, this removes a C99ism reported by Matthew Woehlke.
10084         (rpl_rename_dest_slash): On failure, use rename's errno rather
10085         than (in some cases) an incorrect or junk errno.
10086         Simplify code by removing need to compute length; this does
10087         cause it to make two passes instead of one over the file name,
10088         but it's worth it.
10089
10090         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
10091         change, since Autoconf's version may no longer be appropriate now
10092         that we are using CVS Autoconf's version.  Add support for Tandem.
10093
10094 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10095             Bruno Haible  <bruno@clisp.org>
10096
10097         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
10098         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
10099         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
10100         gl_AC_TYPE_LONG_LONG.
10101
10102         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
10103         instead of HAVE_LONG_LONG.
10104         * lib/printf-args.c (printf_fetchargs): Likewise.
10105         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
10106         * lib/vasnprintf.c (VASNPRINTF): Likewise.
10107         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
10108         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
10109         gl_AC_TYPE_LONG_LONG.
10110
10111 2006-10-11  Bruno Haible  <bruno@clisp.org>
10112
10113         * m4/longlong.m4: Add comments.
10114         * m4/ulonglong.m4: Likewise.
10115
10116 2006-10-10  Bruno Haible  <bruno@clisp.org>
10117
10118         Make it possible to #define stpcpy, strdup to aliases.
10119         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
10120         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
10121
10122 2006-10-10  Bruno Haible  <bruno@clisp.org>
10123
10124         Make it possible to #define gcd to an alias.
10125         * lib/gcd.c: Include config.h.
10126
10127 2006-10-10  Bruno Haible  <bruno@clisp.org>
10128
10129         Make it possible to #define c_isascii to an alias.
10130         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
10131         defined. Undefine the macros before defining them, to avoid gcc
10132         warnings.
10133         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
10134         define NO_C_CTYPE_MACROS early.
10135
10136 2006-10-10  Bruno Haible  <bruno@clisp.org>
10137
10138         Make it possible to #define set_program_name to an alias.
10139         * lib/progname.c: Don't undefine set_program_name; instead, undefine
10140         ENABLE_RELOCATABLE early.
10141
10142 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10143
10144         Port to Tandem NSK OSS, which has 64-bit signed int but at most
10145         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
10146         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
10147         More generally, don't assume that 64-bit signed int is available
10148         if unsigned int is, and vice versa.
10149         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
10150         unsigned symbols, not on their signed counterparts.
10151         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
10152         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
10153         (UINT64_C, UINTMAX_C):
10154         Likewise.
10155         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
10156         unsigned counterparts.
10157         (Have_long_long, Unsigned): New macros.
10158         (Int): Renamed from INT.
10159         (strtoimax): Use the new macros.
10160         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
10161         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
10162         * modules/inttypes (inttypes.h): Substitute
10163         HAVE_UNSIGNED_LONG_LONG_INT.
10164         * modules/stdint (stdint.h): Likewise.
10165         (Files): Add m4/ulonglong.m4.
10166
10167 2006-10-10  Bruno Haible  <bruno@clisp.org>
10168
10169         Fix a gcc -Wshadow warning.
10170         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
10171         to 'bucket'.
10172         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
10173         gl_linked_indexof_from_to): Likewise.
10174         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
10175         Likewise.
10176         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
10177         Likewise.
10178         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
10179         Reported by Eric Blake.
10180
10181 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
10182
10183         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
10184         for NetBSD.  Problem reported by Bruno Haible.
10185
10186 2006-10-09  Jim Meyering  <jim@meyering.net>
10187
10188         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
10189         Patch from Bruno Haible.
10190
10191 2006-10-09  Jim Meyering  <jim@meyering.net>
10192
10193         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
10194         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
10195         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
10196
10197 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
10198
10199         Don't include <config.h> twice; this doesn't work in some cases,
10200         e.g., when config.h has "#define intmax_t long long int" and
10201         we include <config.h>, <inttypes.h>, <config.h> in that order.
10202         Problem reported by Matthew Woehlke in:
10203         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
10204         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
10205         * lib/fts-cycle.c: Don't include config.h.
10206         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
10207         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
10208         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
10209         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
10210         inttypes.h.
10211         * lib/xstrtoumax.c: Likewise.
10212         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
10213         __strtol and the like, so that this module is more like its siblings.
10214         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
10215         Remove; no longer needed now that we assume gnulib inttypes.h.
10216
10217 2006-10-08  Bruno Haible  <bruno@clisp.org>
10218
10219         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
10220         option.
10221
10222 2006-10-07  Jim Meyering  <jim@meyering.net>
10223
10224         * modules/inttypes (inttypes.h): Revert what seems to have been
10225         an inadvertent part of today's change: use "|", not "/" in the
10226         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
10227
10228 2006-10-07  Bruno Haible  <bruno@clisp.org>
10229
10230         * modules/sublist: New file.
10231
10232 2006-10-07  Bruno Haible  <bruno@clisp.org>
10233
10234         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
10235         * modules/argz (argz.h): Likewise.
10236         * modules/arpa_inet (arpa/inet.h): Likewise.
10237         * modules/byteswap (byteswap.h): Likewise.
10238         * modules/configmake (configmake.h): Likewise.
10239         * modules/fcntl (fcntl.h): Likewise.
10240         * modules/fnmatch (fnmatch.h): Likewise.
10241         * modules/getopt (getopt.h): Likewise.
10242         * modules/glob (glob.h): Likewise.
10243         * modules/inttypes (inttypes.h): Likewise.
10244         * modules/netinet_in (netinet/in.h): Likewise.
10245         * modules/poll (poll.h): Likewise.
10246         * modules/stdbool (stdbool.h): Likewise.
10247         * modules/stdint (stdint.h): Likewise.
10248         * modules/sys_select (sys/select.h): Likewise.
10249         * modules/sys_socket (sys/socket.h): Likewise.
10250         * modules/sys_stat (sys/stat.h): Likewise.
10251         * modules/sysexits (sysexits.h): Likewise.
10252         * modules/unistd (unistd.h): Likewise.
10253         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10254         Add a "DO NOT EDIT" comment to the generated file.
10255         (func_import): Likewise for gnulib-comp.m4.
10256
10257 2006-10-07  Bruno Haible  <bruno@clisp.org>
10258
10259         * lib/gl_sublist.h: New file.
10260         * lib/gl_sublist.c: New file.
10261
10262 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10263
10264         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
10265         name (relative to the original working directory) and the file
10266         name component (relative to the temporary working directory).  All
10267         callers changed.
10268         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
10269         * lib/mkdir-p.c (make_dir_parents): Likewise.
10270         * lib/mkdir-p.h (make_dir_parents): Likewise.
10271
10272 2006-10-06  Eric Blake  <ebb9@byu.net>
10273
10274         Define several macros for use by the clean-temp module.
10275         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
10276         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
10277         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
10278
10279         * lib/clean-temp.h (close_stream_temp): New declaration.
10280         * lib/clean-temp.c (includes): Pull in headers according to what
10281         other modules are in use.
10282         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
10283
10284 2006-10-06  Bruno Haible  <bruno@clisp.org>
10285
10286         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
10287         instead of fopen, fwriteerror.
10288
10289 2006-10-06  Bruno Haible  <bruno@clisp.org>
10290
10291         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
10292         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
10293         int.
10294         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
10295         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
10296         Return an error indicator.
10297         Suggested by Eric Blake.
10298
10299 2006-10-06  Bruno Haible  <bruno@clisp.org>
10300
10301         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
10302         Reported by Eric Blake.
10303
10304 2006-10-06  Bruno Haible  <bruno@clisp.org>
10305
10306         * modules/closeout (Description): Mention stderr too.
10307
10308 2006-10-06  Bruno Haible  <bruno@clisp.org>
10309         and Paul Eggert  <eggert@cs.ucla.edu>
10310
10311         * lib/closeout.c (close_stdout): Also close stderr.
10312         * lib/closeout.h: Update comment.
10313
10314 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10315
10316         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
10317         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
10318         * lib/dirchownmod.c: Include lchown.h.
10319         * lib/lchown.c: Don't include files that lchown.h now includes.
10320         Don't declare chown, since lchown.h now does that.
10321         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
10322         (lchown): Define to rpl_chown if lchown is declared but
10323         does not exist.  Declare using a prototype if lchown is not
10324         declared.  Add a copyright notice.
10325         * lib/mkstemp.h: Include <unistd.h>.
10326         * lib/openat.c: Include lchown.h.
10327
10328         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
10329         we now test for that separately.
10330         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
10331         rather than O_NOFOLLOW, when testing whether it's possible to
10332         avoid a race condition reliably.
10333         * lib/savewd.c (savewd_chdir): Likewise.
10334
10335         Remove macros that are no longer needed now that stdint.h is
10336         reliable.
10337         * lib/fsusage.c (UINTMAX_MAX): Remove.
10338         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
10339         * lib/utimecmp.c (SIZE_MAX): Remove.
10340
10341         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
10342
10343         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
10344         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
10345         O_NOATIME works.
10346
10347 2006-10-05  Bruno Haible  <bruno@clisp.org>
10348
10349         * lib/gl_list.h (gl_sortedlist_search_from_to,
10350         gl_sortedlist_indexof_from_to): New declarations.
10351         (gl_list_implementation): New fields sortedlist_search_from_to,
10352         sortedlist_indexof_from_to.
10353         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
10354         inline functions.
10355         * lib/gl_list.c (gl_sortedlist_search_from_to,
10356         gl_sortedlist_indexof_from_to): New functions.
10357         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
10358         function.
10359         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
10360         (gl_array_sortedlist_search_from_to): New function.
10361         (gl_array_list_implementation): Update.
10362         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
10363         function.
10364         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
10365         (gl_carray_sortedlist_search_from_to): New function.
10366         (gl_carray_list_implementation): Update.
10367         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
10368         gl_linked_sortedlist_indexof_from_to): New functions.
10369         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10370         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10371         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
10372         gl_tree_sortedlist_indexof_from_to): New functions.
10373         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10374         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10375         Update.
10376         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10377         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
10378         Update.
10379
10380 2006-10-05  Bruno Haible  <bruno@clisp.org>
10381
10382         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
10383         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
10384         (struct gl_list_implementation): Add fields search_from_to,
10385         indexof_from_to. Remove fields search, indexof.
10386         (gl_list_search): Use the search_from_to method.
10387         (gl_list_search_from, gl_list_search_from_to): New functions.
10388         (gl_list_indexof): Use the indexof_from_to method.
10389         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10390         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
10391         (gl_list_search_from, gl_list_search_from_to): New functions.
10392         (gl_list_indexof): Use the indexof_from_to method.
10393         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10394         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
10395         gl_array_indexof. Add start_index, end_index arguments.
10396         (gl_array_search_from_to): Renamed from gl_array_search. Add
10397         start_index, end_index arguments.
10398         (gl_array_remove, gl_array_list_implementation): Update.
10399         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
10400         gl_carray_indexof. Add start_index, end_index arguments.
10401         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
10402         start_index, end_index arguments.
10403         (gl_carray_remove, gl_carray_list_implementation): Update.
10404         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
10405         gl_linked_search. Add start_index, end_index arguments.
10406         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
10407         start_index, end_index arguments.
10408         (gl_linked_remove): Update.
10409         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10410         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10411         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
10412         field to 'size_t'.
10413         * lib/gl_anytree_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         (gl_tree_remove): Update.
10418         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10419         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10420         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
10421         function.
10422         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
10423         gl_tree_search. Add start_index, end_index arguments.
10424         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10425         start_index, end_index arguments.
10426         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10427         Update.
10428         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
10429
10430 2006-10-05  Bruno Haible  <bruno@clisp.org>
10431
10432         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
10433
10434         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
10435         fwriteerror_temp): New declarations.
10436         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
10437         (descriptors): New variable.
10438         (cleanup): First, close the descriptors.
10439         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
10440         fclose_temp, fwriteerror_temp): New functions.
10441
10442 2006-10-04  Jim Meyering  <jim@meyering.net>
10443
10444         * lib/fts.c (fts_open): Tiny comment change.
10445
10446 2006-10-04  Bruno Haible  <bruno@clisp.org>
10447
10448         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
10449         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
10450         gl_LOCK_BODY.
10451         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
10452         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
10453         gl_LOCK_EARLY_BODY.
10454         (gl_LOCK): Require gl_LOCK_BODY.
10455
10456 2006-10-04  Bruno Haible  <bruno@clisp.org>
10457
10458         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
10459         (gl_oset_search_atleast): New declaration.
10460         (struct gl_oset_implementation): Add field 'search_atleast'.
10461         (gl_oset_search_atleast): New inline function.
10462         * lib/gl_oset.c (gl_oset_search_atleast): New function.
10463         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
10464         (gl_array_oset_implementation): Update.
10465         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
10466         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
10467         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
10468
10469 2006-10-04  Bruno Haible  <bruno@clisp.org>
10470
10471         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
10472
10473 2006-10-03  Bruno Haible  <bruno@clisp.org>
10474
10475         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
10476         from gl_avltreehash_list_implementation.
10477
10478 2006-10-03  Bruno Haible  <bruno@clisp.org>
10479
10480         * lib/gl_oset.c (gl_oset_add): Fix return type.
10481
10482 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
10483
10484         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
10485
10486 2006-10-02  Eric Blake  <ebb9@byu.net>
10487
10488         * modules/strnlen (Depends-on): Add extensions.
10489
10490 2006-10-02  Eric Blake  <ebb9@byu.net>
10491
10492         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
10493         definition in 2.60+.
10494
10495 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
10496
10497         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
10498         checks.
10499
10500 2006-10-02  Bruno Haible  <bruno@clisp.org>
10501
10502         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
10503         to the AUTOMAKE_OPTIONS.
10504         Reported by Jim Meyering.
10505
10506 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10507
10508         Work around bug in Solaris 10 /proc file system:
10509         /proc/self/fd/NNN/.. isn't the parent directory of
10510         the directory whose file descriptor is NNN.  This needs to
10511         be worked around at run time, not compile time, since a
10512         program might be built on Solaris 8, where things work, and
10513         run on Solaris 10.
10514         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
10515         to use the following interface instead:
10516         (OPENAT_BUFFER_SIZE): New macro.
10517         (openat_proc_name): New function.
10518         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
10519         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
10520         Likewise.
10521         * lib/openat-proc.c: New file.
10522         * modules/openat (Files): Add lib/openat-proc.c.
10523         (Depends-on): Add same-inode, stdbool.
10524         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
10525
10526 2006-09-29  Bruno Haible  <bruno@clisp.org>
10527
10528         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
10529         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
10530         argument. Set stdout_closed before testing for ferror, not after.
10531         (fwriteerror, fwriteerror_no_ebadf): New functions.
10532
10533 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10534
10535         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
10536
10537 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
10538
10539         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
10540         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
10541
10542 2006-09-28  Jim Meyering  <jim@meyering.net>
10543
10544         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
10545         Include <unistd.h>.
10546
10547 2006-09-28  Bruno Haible  <bruno@clisp.org>
10548
10549         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
10550         * modules/linkedhash-list (Depends-on): Likewise.
10551         * modules/rbtreehash-list (Depends-on): Likewise.
10552
10553 2006-09-28  Bruno Haible  <bruno@clisp.org>
10554
10555         * lib/strndup.h: Simplify the redefinition of strndup.
10556         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
10557         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
10558
10559 2006-09-28  Bruno Haible  <bruno@clisp.org>
10560
10561         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
10562         * lib/gl_linkedhash_list.c: Likewise.
10563         * lib/gl_rbtreehash_list.c: Likewise.
10564
10565 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10566
10567         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
10568         getaddrinfo.
10569
10570         * lib/__fpending.h: Don't include <stdio_ext.h> unless
10571         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
10572         it causes <stdio_ext.h> to cause a compile-time error.
10573         Problem reported by Nelson H. F. Beebe.
10574         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
10575         of HAVE_DECL___PENDING.
10576
10577         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
10578         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
10579         declaration.
10580
10581 2006-09-27  Jim Meyering  <jim@meyering.net>
10582
10583         This file could end up with a definition for a function
10584         named __strndup, rather than rpl_strndup on a system with
10585         incomplete weak_alias support.
10586         * lib/strndup.c (strndup): Rename from __strndup.
10587         Remove #defines that used to map __strndup to strndup.
10588         Don't use K&R prototypes.
10589         Remove LIBC-related code, since this file is not sync'd with glibc.
10590         * lib/strndup.h: Revamp, accordingly.
10591         * m4/strndup.m4: Modernize.
10592
10593 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10594
10595         * modules/savewd (Depends-on): Add 'raise'.
10596         * lib/savewd.c: Include <signal.h>, for 'raise'.
10597
10598 2006-09-26  Jim Meyering  <jim@meyering.net>
10599
10600         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
10601         when we detect Darwin 8.7.0's acl_get_file bug.
10602         Rearrange to perform the new (below) run-test while $LIBS
10603         contains any acl-related library.  Set USE_ACL at the end.
10604         (gl_ACL_GET_FILE): New function.
10605
10606 2006-09-26  Eric Blake  <ebb9@byu.net>
10607
10608         * lib/verror.c: Include <config.h> unconditionally.
10609
10610 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
10611
10612         * modules/clock-time (Maintainer): Add self.
10613         * modules/getlogin_r (Depends-on): Add extensions.
10614
10615 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10616
10617         * modules/clock-time: New module.
10618         * modules/nanosleep (Depends-on): Add clock-time.
10619         * modules/gethrxtime (Depends-on): Likewise.
10620         * modules/gettime (Depends-on): Likewise.
10621         * modules/settime (Depends-on): Likewise.
10622
10623         * modules/fts-lgpl: Depend on openat.
10624         * modules/mkancesdirs: Depend on savewd.
10625         * modules/mkdir-p: Likewise.
10626
10627 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10628
10629         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
10630
10631         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
10632         `gl_have_arbitrary_file_name_length_limit' to
10633         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
10634         actually works between configure runs.
10635
10636 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10637             Bruno Haible  <bruno@clisp.org>
10638
10639         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
10640
10641 2006-09-25  Jim Meyering  <jim@meyering.net>
10642
10643         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
10644         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
10645
10646 2006-09-25  Eric Blake  <ebb9@byu.net>
10647
10648         * gnulib-tool (func_import, func_create_testdir): Fix typos in
10649         exec's in 2006-09-18 patch when shuffling fds.
10650
10651 2006-09-25  Bruno Haible  <bruno@clisp.org>
10652
10653         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
10654         Reported by Jim Meyering.
10655
10656 2006-09-24  Jim Meyering  <jim@meyering.net>
10657
10658         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
10659         compare a pointer against a literal "0".  That caused failures with
10660         at least HP-UX's hpcc.
10661
10662 2006-09-22  Simon Josefsson  <jas@extundo.com>
10663
10664         * modules/gc-sha1:
10665         * modules/gc-md4:
10666         * modules/gc-hmac-sha1:
10667         * modules/gc-hmac-md5:
10668         * modules/gc-des:
10669         * modules/gc-arcfour: Distribute more files.
10670
10671 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10672
10673         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
10674         (gl_linked_iterator_from_to): Initialize struct completely.
10675         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
10676         (gl_tree_iterator_from_to): Likewise
10677         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
10678         * lib/gl_array_list.c [lint] (gl_array_iterator)
10679         (gl_array_iterator_from_to): Likewise.
10680         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
10681         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
10682         (gl_carray_iterator_from_to): Likewise.
10683
10684         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
10685         * lib/md4.c (md4_process_block): Remove unused variable.
10686         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
10687         parentheses for clarity.
10688
10689 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10690
10691         * modules/bison-i18n (Depends-on): Add gettext.
10692
10693 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10694
10695         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
10696         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
10697         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
10698         also add missing comma that caused broken test.
10699         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
10700         stdlib.h, for `abort'.
10701         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
10702         variables.
10703         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
10704         include unistd.h if present, for `rmdir'.
10705         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
10706         variables.
10707         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
10708         in the process include standard headers for prototypes.
10709         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
10710         gets declared on GNU/Linux.
10711         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
10712         unistd.h, for `rmdir'.
10713         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
10714
10715         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
10716         always true.
10717         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
10718
10719         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
10720
10721 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10722
10723         * gnulib-tool (func_version): Create output all at once.  This
10724         may help avoid triggering unnecessary SIGPIPEs, and at any
10725         rate it doesn't hurt.
10726
10727 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10728             Bruno Haible  <bruno@clisp.org>
10729
10730         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
10731         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
10732         * m4/signed.m4 (bh_C_SIGNED): Likewise.
10733
10734         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
10735         (gl_FUNC_VASPRINTF): Invoke it.
10736
10737 2006-09-22  Bruno Haible  <bruno@clisp.org>
10738
10739         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
10740         getloadavg.c as first argument.
10741
10742 2006-09-22  Bruno Haible  <bruno@clisp.org>
10743
10744         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
10745         at the beginning of the gl_INIT macro.
10746         * modules/getloadavg (configure.ac): Pass $gl_source_base to
10747         gl_GETLOADAVG.
10748
10749 2006-09-22  Bruno Haible  <bruno@clisp.org>
10750
10751         * gnulib-tool (func_create_megatestdir): Don't include the config-h
10752         module.
10753         Suggested by Ralf Wildenhues.
10754
10755 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
10756
10757         Import this patch from libc:
10758
10759         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
10760
10761         * lib/regex_internal.c (re_string_reconstruct): Handle
10762         offset < pstr->valid_raw_len && pstr->offsets_needed case.
10763         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
10764         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
10765         re_string_context_at.
10766
10767         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
10768         now requires it.
10769         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
10770         gl_REGEX now does it for us.
10771         (gl_REGEX): Add test taken from
10772         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
10773
10774         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
10775         Check that large offsets work.  Modernize Autoconf usages.
10776         Prefer "yes" to mean a good thing rather than a bad.
10777         Don't put "#define mkstemp" in config.h, as this might interfere
10778         with standard system headers that "#define mkstemp mkstemp64".
10779
10780         * modules/mkstemp (Depends-on): Add extensions, so that
10781         mkstemp is visible on some platforms.
10782         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
10783         (Include): Change to "mkstemp.h" from <stdlib.h>.
10784         (Files): Add mkstemp.h.
10785
10786         * lib/mkstemp.h: New file, since some standard headers
10787         #define mkstemp.
10788         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
10789         Include "mkstemp.h".
10790         Make the _LIBC code resemble glibc original more,
10791         e.g., use K&R style.
10792         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
10793         (mkstemp): Remove, since mkstemp.h does this for us.
10794         * lib/stdlib--.h: Include mkstemp.h.
10795
10796         Import this patch from libc:
10797
10798         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10799
10800         * lib/tempname.c (__gen_tempname): Change attempts_min
10801         into a macro.  Use preprocessor to decide how to initialize
10802         attempts [Coverity CID 67].
10803
10804 2006-09-20  Bruno Haible  <bruno@clisp.org>
10805
10806         * lib/mkdtemp.c: Import from libc.
10807         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10808                 * sysdeps/posix/tempname.c (__gen_tempname): Change
10809                 attempts_min into a macro.  Use preprocessor to decide how to
10810                 initialize attempts [Coverity CID 67].
10811         2001-11-27  Paul Eggert  <eggert@twinsun.com>
10812                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
10813                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
10814
10815 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10816
10817         * gnulib-tool (func_exit): New function, to allow to pass the
10818         exit status portably through the trap.  Use everywhere.
10819         (--help, --version): Signal a write error.
10820         (trap): catch SIGPIPE, for write errors.
10821         Exit at the end of the trap, with the correct exit status.
10822
10823 2006-09-19  Karl Berry  <karl@gnu.org>
10824
10825         * doc/gnulib.texi: note about the license texinfo files.
10826
10827 2006-09-19  Eric Blake  <ebb9@byu.net>
10828
10829         * gnulib-tool: Avoid space-tab.
10830
10831 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10832
10833         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
10834         that prevented coreutils 6.1 from building.  Problem reported
10835         by Petter Reinholdtsen.
10836
10837 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10838
10839         * gnulib-tool (avoidlist): Fix typo that broke options like
10840         --avoid=lock that are used by coreutils bootstrap.
10841
10842 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
10843
10844         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
10845         more systematically.
10846
10847 2006-09-18  Jim Meyering  <jim@meyering.net>
10848
10849         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
10850
10851 2006-09-18  Bruno Haible  <bruno@clisp.org>
10852
10853         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
10854
10855 2006-09-18  Bruno Haible  <bruno@clisp.org>
10856
10857         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
10858         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
10859         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
10860         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
10861         * m4/gettext.m4: Require autoconf >= 2.52.
10862         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
10863         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
10864         of gl_cv_header_inttypes_h.
10865
10866 2006-09-18  Bruno Haible  <bruno@clisp.org>
10867
10868         * lib/javaversion.c: Include configmake.h.
10869
10870 2006-09-18  Bruno Haible  <bruno@clisp.org>
10871
10872         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
10873         avoid that the while loops be executed in a subshell.
10874
10875 2006-09-18  Bruno Haible  <bruno@clisp.org>
10876
10877         * MODULES.html.sh (func_module): Break long lines.
10878         Suggested by Bruce Korb <bkorb@gnu.org>.
10879
10880 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10881
10882         Speed up by a factor of 1.12.
10883         * gnulib-tool (nl): New variable.
10884         (func_import): Rewrite include directive extraction to only read each
10885         directive once.
10886
10887 2006-09-17  Bruno Haible  <bruno@clisp.org>
10888
10889         * modules/javaversion (Makefile.am): Remove DEFS setting.
10890         (Depends-on): Add configmake, for PKGDATADIR definition.
10891
10892 2006-09-17  Bruno Haible  <bruno@clisp.org>
10893
10894         * gnulib-tool (func_create_testdir): Rewrite all files at once.
10895
10896 2006-09-17  Bruno Haible  <bruno@clisp.org>
10897
10898         * gnulib-tool (func_append): New function, stolen from libtool.m4.
10899         (func_modules_transitive_closure, func_modules_add_dummy,
10900         func_modules_to_filelist, func_import, func_create_testdir,
10901         func_create_megatestdir, ...): Use it wherever possible.
10902         Suggested by Ralf Wildenhues.
10903
10904 2006-09-16  Karl Berry  <karl@gnu.org>
10905
10906         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
10907         to avoid sectioning errors.
10908         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
10909         [ifinfo]: blank line after @center-ed titles.
10910         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
10911         Spell FSF address consistently with others.
10912         (These changes approved by rms.)
10913
10914 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10915
10916         Speed up by a factor of 1.61.
10917         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
10918         already checked module names again.
10919
10920 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10921
10922         Speed up by a factor of 1.13.
10923         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
10924         for new_files, and the input to func_add_or_update.
10925
10926 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10927
10928         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
10929         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
10930
10931 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10932
10933         * modules/mkancesdirs (Depends-on): Add fcntl.
10934         * modules/savewd: New file.
10935         * MODULES.html.sh (File system functions): Add savewd.
10936
10937         * modules/configmake (Makefile.am): Add support for the
10938         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
10939
10940 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10941
10942         * m4/savewd.m4: New file.
10943
10944 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10945
10946         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
10947         (dirchownmod): New arg FD.  All callers changed.
10948         Use FD rather than opening the directory ourself, as opening is
10949         now the caller's responsibility.
10950         * lib/dirchownmod.h: Likewise.
10951         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
10952         hosts that require <sys/types.h> before <sys/stat.h>.  Include
10953         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
10954         (test_dir): Remove.
10955         (mkancesdirs): Return length of prefix of FILE that has already
10956         been made, or -2 if there is a child doing the work.  Redo
10957         algorithm so that it is O(N) rather than O(N**2).  Optimize away
10958         ".", and treat ".." specially since it might stray back into
10959         already-created areas.  Use a subprocess if necessary.  New arg
10960         WD; all users changed.  MAKE_DIR function should now return 1
10961         if it creates a directory that is not readable.  Return -2 if
10962         a child process is spun off.
10963         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
10964         Adjust signature to match code.
10965         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
10966         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
10967         all users changed.
10968         * lib/savewd.c, lib/savewd.h: New files.
10969
10970 2006-09-15  Jim Meyering  <jim@meyering.net>
10971
10972         * modules/rename-dest-slash: New module.
10973         * MODULES.html.sh (posix_compat): Add it here.
10974
10975         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
10976
10977 2006-09-15  Jim Meyering  <jim@meyering.net>
10978
10979         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
10980         file.
10981
10982         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
10983
10984 2006-09-15  Jim Meyering  <jim@meyering.net>
10985
10986         * lib/rename-dest-slash.c (has_trailing_slash): Use
10987         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
10988         (rpl_rename_dest_slash): Perform the cheaper trailing slash
10989         test before testing whether SRC is a directory.
10990         Suggestions from Bruno Haible.
10991
10992         Avoid a warning about an unused variable.
10993         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
10994         into the #ifdef block where it's used.
10995
10996         * lib/rename-dest-slash.c: New file.
10997
10998 2006-09-14  Bruno Haible  <bruno@clisp.org>
10999
11000         * lib/allocsa.c: Include <config.h> unconditionally.
11001         * lib/asnprintf.c: Likewise.
11002         * lib/asprintf.c: Likewise.
11003         * lib/c-strcasecmp.c: Likewise.
11004         * lib/c-strcasestr.c: Likewise.
11005         * lib/c-strncasecmp.c: Likewise.
11006         * lib/c-strstr.c: Likewise.
11007         * lib/classpath.c: Likewise.
11008         * lib/clean-temp.c: Likewise.
11009         * lib/concatpath.c: Likewise.
11010         * lib/copy-file.c: Likewise.
11011         * lib/csharpcomp.c: Likewise.
11012         * lib/csharpexec.c: Likewise.
11013         * lib/execute.c: Likewise.
11014         * lib/fatal-signal.c: Likewise.
11015         * lib/findprog.c: Likewise.
11016         * lib/fwriteerror.c: Likewise.
11017         * lib/gl_array_list.c: Likewise.
11018         * lib/gl_array_oset.c: Likewise.
11019         * lib/gl_avltree_list.c: Likewise.
11020         * lib/gl_avltree_oset.c: Likewise.
11021         * lib/gl_avltreehash_list.c: Likewise.
11022         * lib/gl_carray_list.c: Likewise.
11023         * lib/gl_linked_list.c: Likewise.
11024         * lib/gl_linkedhash_list.c: Likewise.
11025         * lib/gl_list.c: Likewise.
11026         * lib/gl_oset.c: Likewise.
11027         * lib/gl_rbtree_list.c: Likewise.
11028         * lib/gl_rbtree_oset.c: Likewise.
11029         * lib/gl_rbtreehash_list.c: Likewise.
11030         * lib/imaxabs.c: Likewise.
11031         * lib/imaxdiv.c: Likewise.
11032         * lib/javacomp.c: Likewise.
11033         * lib/javaexec.c: Likewise.
11034         * lib/javaversion.c: Likewise.
11035         * lib/linebreak.c: Likewise.
11036         * lib/localcharset.c: Likewise.
11037         * lib/lock.c: Likewise.
11038         * lib/mbchar.c: Likewise.
11039         * lib/mbswidth.c: Likewise.
11040         * lib/mkdtemp.c: Likewise.
11041         * lib/pipe.c: Likewise.
11042         * lib/printf-args.c: Likewise.
11043         * lib/printf-parse.c: Likewise.
11044         * lib/progname.c: Likewise.
11045         * lib/progreloc.c: Likewise.
11046         * lib/readlink.c: Likewise.
11047         * lib/sh-quote.c: Likewise.
11048         * lib/stpcpy.c: Likewise.
11049         * lib/stpncpy.c: Likewise.
11050         * lib/strcasecmp.c: Likewise.
11051         * lib/strcasestr.c: Likewise.
11052         * lib/strcspn.c: Likewise.
11053         * lib/striconv.c: Likewise.
11054         * lib/strncasecmp.c: Likewise.
11055         * lib/strnlen1.c: Likewise.
11056         * lib/strstr.c: Likewise.
11057         * lib/strtok_r.c: Likewise.
11058         * lib/tls.c: Likewise.
11059         * lib/tmpdir.c: Likewise.
11060         * lib/unicodeio.c: Likewise.
11061         * lib/unsetenv.c: Likewise.
11062         * lib/vasnprintf.c: Likewise.
11063         * lib/vasprintf.c: Likewise.
11064         * lib/wait-process.c: Likewise.
11065         * lib/xallocsa.c: Likewise.
11066         * lib/xsetenv.c: Likewise.
11067         * lib/xstriconv.c: Likewise.
11068
11069 2006-09-13  Simon Josefsson  <jas@extundo.com>
11070
11071         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
11072         that internally, suggested by Ralf Wildenhues
11073         <Ralf.Wildenhues@gmx.de>.
11074
11075 2006-09-13  Simon Josefsson  <jas@extundo.com>
11076
11077         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
11078         @LIBOBJS@.
11079         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11080
11081 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
11082
11083         * lib/_fpending.c: Include <config.h> unconditionally, since we no
11084         longer worry about uses that don't define HAVE_CONFIG_H.
11085         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
11086         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
11087         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
11088         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
11089         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
11090         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
11091         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
11092         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
11093         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
11094         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
11095         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
11096         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
11097         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
11098         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
11099         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
11100         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
11101         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
11102         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
11103         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
11104         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
11105         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
11106         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
11107         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
11108         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
11109         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
11110         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
11111         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
11112         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
11113         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
11114         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
11115         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
11116         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
11117         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
11118         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
11119         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
11120         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
11121         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
11122         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
11123         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
11124         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
11125         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
11126         Likewise.
11127
11128 2006-09-13  Eric Blake  <ebb9@byu.net>
11129
11130         * lib/getopt.c: Fix typo in last commit.
11131
11132 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11133
11134         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
11135         dgettext.
11136
11137 2006-09-12  Jim Meyering  <jim@meyering.net>
11138
11139         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
11140         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
11141         Reported by Nelson H. F. Beebe.
11142
11143 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11144
11145         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
11146         program_invocation_name and program_invocation_short_name are
11147         initialized.
11148         * lib/argp-namefrob.h: Move declarations of program_invocation_name
11149         and program_invocation_short_name to argp.h, so they are visible
11150         to user programs.
11151         * lib/argp.h: Likewise
11152
11153 2006-09-10  Bruno Haible  <bruno@clisp.org>
11154
11155         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11156         m4/inttypes_h.m4, m4/uintmax_t.m4.
11157
11158 2006-09-10  Bruno Haible  <bruno@clisp.org>
11159
11160         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
11161         gl_AC_TYPE_UINTMAX_T.
11162
11163 2006-09-10  Bruno Haible  <bruno@clisp.org>
11164
11165         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
11166
11167 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11168
11169         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
11170         convention.  Text proposed by Bruno Haible.
11171         (struct argp_option): Document the use of N_() wrappers.
11172
11173         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
11174         '\v', and translate the two parts separately, instead of feeding
11175         the whole string to gettext.  This allows to exclude
11176         '\v' from the strings visible to the translator by writing doc
11177         strings as N_("..") "\v" N_("..").
11178
11179 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
11180
11181         * config/srclist.txt: Undo latest change; the bug was fixed.
11182
11183 2006-09-09  Bruno Haible  <bruno@clisp.org>
11184
11185         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
11186         assignments if building a library without libtool.
11187         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
11188         in func_emit_lib_Makefile_am.
11189         (func_import): When building a static library libfoo.a, arrange to
11190         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
11191         (func_create_testdir): Likewise.
11192         * modules/gc (configure.ac, Makefile.am): If building statically,
11193         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
11194         * modules/iconvme (configure.ac, Makefile.am): Likewise.
11195         * modules/striconv (configure.ac, Makefile.am): Likewise.
11196         Based on a suggestion by Ralf Wildenhues.
11197
11198 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11199
11200         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
11201         Check for unistd.h too, since Autoconf doesn't assume POSIX.
11202         Also:
11203
11204         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11205         Add year_2050_test to catch glibc bug 2821
11206         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11207
11208         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11209         Prefer #ifdef to #if.
11210
11211         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
11212         Return from 'main' instead of calling 'exit'.
11213
11214 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11215
11216         * lib/mktime.c (guess_time_tm): Fix bug where mktime
11217         returned the maximum time_t value rather than (time_t) -1.
11218         Problem originally reported by William Bardwell
11219         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11220
11221         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11222         Moved to here ...
11223         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11224         ... from here.
11225
11226 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11227
11228         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
11229         2821 is fixed.
11230
11231 2006-09-08  Jim Meyering  <jim@meyering.net>
11232
11233         Don't make generated files read-only.  That would bother too many
11234         people.  However, do retain the ability to work when targets are
11235         read-only: remove the destination and temporary files before writing
11236         them (when generated via sed or echo), or by using the -f option for
11237         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
11238         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11239         * modules/byteswap, modules/configmake, modules/fcntl:
11240         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11241         * modules/localcharset, modules/netinet_in, modules/poll:
11242         * modules/stdbool, modules/stdint, modules/sys_select:
11243         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11244
11245 2006-09-08  Jim Meyering  <jim@meyering.net>
11246
11247         Avoid new build failure on FreeBSD 6.0.
11248         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
11249         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
11250         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
11251
11252 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11253
11254         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
11255
11256 2006-09-07  Jim Meyering  <jim@meyering.net>
11257
11258         Fix global typo in last change: use chmod u-w, not chmod u-x.
11259         Spotted by Paul Eggert and Bruce Korb.
11260         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11261         * modules/byteswap, modules/configmake, modules/fcntl:
11262         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11263         * modules/localcharset, modules/netinet_in, modules/poll:
11264         * modules/stdbool, modules/stdint, modules/sys_select:
11265         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11266
11267 2006-09-06  Jim Meyering  <jim@meyering.net>
11268
11269         Make generated files be read-only.
11270         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
11271         Ensure that each generated file is now read-only.
11272         * modules/argz: Likewise.
11273         * modules/arpa_inet: Likewise.
11274         * modules/byteswap: Likewise.
11275         * modules/configmake: Likewise.
11276         * modules/fcntl: Likewise.
11277         * modules/fnmatch: Likewise.
11278         * modules/getopt: Likewise.
11279         * modules/glob: Likewise.
11280         * modules/inttypes: Likewise.
11281         * modules/netinet_in: Likewise.
11282         * modules/poll: Likewise.
11283         * modules/stdbool: Likewise.
11284         * modules/stdint: Likewise.
11285         * modules/sys_select: Likewise.
11286         * modules/sys_socket: Likewise.
11287         * modules/sys_stat: Likewise.
11288         * modules/sysexits: Likewise.
11289         * modules/localcharset: Same as above, but continue using temporary
11290         file named "t-$@" (why different?) rather than the "$@-t" used
11291         everywhere else.
11292
11293         * modules/sysexits (Makefile.am): Replace literal occurrences
11294         of "sysexit.h" more readable, and more consistent, "$@".
11295
11296 2006-09-06  Bruno Haible  <bruno@clisp.org>
11297
11298         * modules/striconv: New file.
11299         * modules/xstriconv: New file.
11300         * MODULES.html.sh (Internationalization functions): Add striconv,
11301         xstriconv.
11302
11303 2006-09-06  Bruno Haible  <bruno@clisp.org>
11304
11305         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
11306         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
11307         not using libtool correctly.
11308
11309 2006-09-06  Bruno Haible  <bruno@clisp.org>
11310
11311         * lib/striconv.h: New file.
11312         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
11313         iconvstring.c.
11314         * lib/xstriconv.h: New file.
11315         * lib/xstriconv.c: New file.
11316
11317 2006-09-06  Bruno Haible  <bruno@clisp.org>
11318
11319         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
11320         lib_..._LDFLAGS.
11321
11322 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11323
11324         * lib/argz_.h: Sync from Libtool.
11325
11326         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
11327                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11328
11329         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
11330
11331 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11332
11333         * modules/trim: New file.
11334
11335 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11336
11337         * lib/trim.h: New file.
11338         * lib/trim.c: New file.
11339
11340 2006-09-05  Bruno Haible  <bruno@clisp.org>
11341
11342         * MODULES.html.sh (String handling): Add trim.
11343
11344 2006-09-04  Karl Berry  <karl@gnu.org>
11345
11346         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
11347         until next release.
11348
11349 2006-09-03  Bruno Haible  <bruno@clisp.org>
11350
11351         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
11352         correctly.
11353
11354 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11355
11356         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
11357         not gl_GETLOADAVG.  Omit unneeded semicolons.
11358         Problems reported by Ralf Wildenhues in
11359         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11360         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
11361         at the end, which is the usual gnulib style.
11362
11363         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
11364         of doing all the work ourselves.
11365         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
11366         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
11367
11368 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11369
11370         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
11371         Problem reported by Ralf Wildenhues in
11372         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11373
11374         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
11375         HAVE_STRUCT_STATFS_F_FSTYPENAME.
11376
11377 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11378
11379         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
11380         yesterday's patch by changing test -n to test -z.
11381
11382 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11383
11384         * modules/getloadavg (Files): Add m4/getloadavg.m4.
11385         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
11386         the former is now obsolescent.
11387
11388         * modules/chdir-long (Depends-on): Add fcntl.
11389
11390 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11391
11392         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
11393         obsolescent, and programs should use gnulib instead.
11394         * m4/getloadavg.m4: New file, with contents taken from Autoconf
11395         but with prefixes changed.
11396
11397 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11398
11399         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
11400         or stdbool.h, because they might not exist while configuring.
11401
11402         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
11403         Don't include unistd.h or limits.h; not needed, since chdir-long.h
11404         does that for us.
11405         (O_DIRECTORY): Remove.
11406
11407 2006-08-31  Eric Blake  <ebb9@byu.net>
11408
11409         * gnulib-tool: Don't let emacs change spaces to TAB.
11410
11411 2006-08-31  Bruno Haible  <bruno@clisp.org>
11412
11413         * gnulib-tool: When calling func_import more than once, do it in a
11414         subshell.
11415         Reported by Eric Blake <ebb9@byu.net>.
11416
11417 2006-08-31  Bruno Haible  <bruno@clisp.org>
11418
11419         * gnulib-tool (nl): Remove variable.
11420         (sed_transform_lib_file): Use more robust test for config-h module.
11421         (func_import): Fix typo in 2006-08-25 patch.
11422
11423 2006-08-31  Bruno Haible  <bruno@clisp.org>
11424
11425         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
11426         specified, augment Makefile.am variables instead of assigning them.
11427
11428 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11429
11430         Work around a bug in both the Linux and SunOS 64-bit kernels:
11431         nanosleep mishandles sleeps for longer than 2**31 seconds.
11432         Problem reported by Frank v Waveren in
11433         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11434         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
11435         Check for nanosleep bug.
11436         (LIB_NANOSLEEP): Append clock_gettime library if needed.
11437
11438 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11439
11440         Work around a bug in both the Linux and SunOS 64-bit kernels:
11441         nanosleep mishandles sleeps for longer than 2**31 seconds.
11442         Problem reported by Frank v Waveren in
11443         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11444         * lib/nanosleep.c (BILLION): New constant.
11445         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
11446         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
11447         implementation.
11448
11449 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11450
11451         * modules/nanosleep (Depends-on): Add gettime.
11452
11453 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11454         and Simon Josefsson  <jas@extundo.com>
11455         and Oskar Liljeblad  <oskar@osk.mine.nu>
11456
11457         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
11458         * gnulib-tool (func_import): New license type 'unmodifiable license
11459         text'.
11460         * modules/fdl: Use it.  Longer description.
11461         * module/gpl, module/lgpl: New files.
11462
11463 2006-08-30  Jim Meyering  <jim@meyering.net>
11464
11465         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
11466         shadowing the parameter.
11467
11468 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11469
11470         Sync from Libtool:
11471
11472         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11473
11474         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
11475         sharing with gnulib.  Report by Eric Blake.
11476
11477 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11478
11479         * modules/isapipe: New file.
11480         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
11481
11482 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11483
11484         * modules/configmake (Makefile.am): Add a comment, and omit
11485         the CONFIGMAKE_ prefix from generated macro names.  Suggested
11486         by Bruno Haible.
11487
11488 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11489
11490         * m4/isapipe.m4: New file.
11491
11492 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11493
11494         * lib/isapipe.c, lib/isapipe.h: New files.
11495
11496 2006-08-29  Jim Meyering  <jim@meyering.net>
11497
11498         * modules/configmake (Makefile.am): Make configmake.h depend on
11499         Makefile.  Otherwise, a stale configmake.h could hang around.
11500
11501 2006-08-29  Eric Blake  <ebb9@byu.net>
11502
11503         * lib/error.c (error_at_line, print_errno_message): Match libc, after
11504         resolution of upstream bug 3044.
11505
11506 2006-08-29  Bruno Haible  <bruno@clisp.org>
11507
11508         * modules/localcharset (Depends-on): Add configmake.
11509         (Makefile.am): Remove setting of LIBDIR through DEFS.
11510
11511 2006-08-29  Bruno Haible  <bruno@clisp.org>
11512
11513         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
11514         defined.
11515
11516 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11517
11518         * modules/fcntl: New file.
11519         * modules/chdir-safer (Depends-on): Add fcntl.
11520         * modules/fts: Likewise.
11521         * modules/mkdir-p: Likewise.
11522
11523         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
11524         This undoes the most recent change, since we're now addressing the
11525         problem in a different way.
11526
11527         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
11528         into output, since the output might be called Makefile.am even
11529         if $makefile_name is something different.
11530         (func_import): Use $makefile_am rather than
11531         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
11532         empty.
11533
11534         * modules/inttypes (Files): Add m4/inttypes-h.m4.
11535
11536 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11537
11538         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
11539         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
11540         recent change to stdint.m4, since we're now addressing the problem in a
11541         different way.
11542
11543 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11544
11545         * m4/fcntl_h.m4: New file.
11546
11547 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11548
11549         * lib/fcntl_.h: New file.
11550         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
11551         the fcntl module.
11552         * lib/dirchownmod.c: Likewise.
11553         * lib/fts.c: Likewise.
11554
11555         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
11556         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
11557         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
11558         just before including <inttypes.h>, to avoid circular inclusion.
11559
11560 2006-08-28  Jim Meyering  <jim@meyering.net>
11561
11562         * doc/visibility.texi: Actually read and correct the grammar of the
11563         sentence affected by yesterday's change.
11564
11565 2006-08-28  Eric Blake  <ebb9@byu.net>
11566
11567         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
11568         needs wrapper.
11569
11570 2006-08-28  Eric Blake  <ebb9@byu.net>
11571
11572         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
11573
11574 2006-08-28  Eric Blake  <ebb9@byu.net>
11575
11576         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
11577
11578 2006-08-28  Bruno Haible  <bruno@clisp.org>
11579
11580         * modules/c-strstr: New file, from GNU gettext.
11581         * MODULES.html.sh (String handling): Add c-strstr.
11582
11583 2006-08-28  Bruno Haible  <bruno@clisp.org>
11584
11585         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
11586         macros.
11587         Reported by Eric Blake.
11588
11589 2006-08-28  Bruno Haible  <bruno@clisp.org>
11590
11591         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
11592         (VASNPRINTF): Return a string of length > INT_MAX without failing.
11593         * lib/vasprintf.c: Include errno.h, limits.h.
11594         (EOVERFLOW): New fallback definition.
11595         (vasprintf): Test here whether the string length is > INT_MAX.
11596         * lib/vsnprintf.c: Include errno.h, limits.h.
11597         (EOVERFLOW): New fallback definition.
11598         (vsnprintf): Fix bug when generated string was too long for the buffer.
11599         Test here whether the string length is > INT_MAX.
11600
11601 2006-08-28  Bruno Haible  <bruno@clisp.org>
11602
11603         * lib/inttypes_.h (SCNX*): Remove definitions.
11604         Reported by Eric Blake.
11605
11606 2006-08-28  Bruno Haible  <bruno@clisp.org>
11607
11608         * lib/c-strstr.h: New file, from GNU gettext.
11609         * lib/c-strstr.c: New file, from GNU gettext.
11610
11611 2006-08-28  Bruno Haible  <bruno@clisp.org>
11612
11613         * gnulib-tool: Reorder some statements.
11614
11615 2006-08-28  Bruno Haible  <bruno@clisp.org>
11616
11617         * gnulib-tool: New option --makefile-name.
11618         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
11619         $makefile_name.
11620         (func_import): Write $makefile_name to the cache file, and read it from
11621         there unless explicitly specified. Use $makefile_name as file name
11622         instead of Makefile.am. Adjust the recommendations accordingly.
11623
11624 2006-08-28  Bruno Haible  <bruno@clisp.org>
11625
11626         * gnulib-tool (func_verify_module): Check against misapplying patch.
11627
11628 2006-08-28  Bruno Haible  <bruno@clisp.org>
11629
11630         * gnulib-tool (func_relativize, func_relconcat): New functions.
11631         Give an error if --local-dir is given with --update.
11632         Remove trailing slashes from $local_gnulib_dir.
11633         (func_import): Store the relativized $local_gnulib_dir in
11634         gnulib-cache.m4, and read it from there if not specified explicitly.
11635
11636 2006-08-28  Bruno Haible  <bruno@clisp.org>
11637
11638         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
11639         is the current directory. Respect also $local_gnulib_dir.
11640
11641 2006-08-28  Bruno Haible  <bruno@clisp.org>
11642             Simon Josefsson  <jas@extundo.com>
11643
11644         BeOS portability.
11645         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
11646
11647 2006-08-27  Jim Meyering  <jim@meyering.net>
11648
11649         * doc/visibility.texi: Remove duplicate word: "pointer".
11650
11651 2006-08-26  Bruno Haible  <bruno@clisp.org>
11652
11653         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
11654         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
11655         (Makefile.am): Create inttypes.h from inttypes_.h.
11656         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
11657
11658         * modules/imaxabs: New file.
11659
11660         * modules/imaxdiv: New file.
11661
11662 2006-08-26  Bruno Haible  <bruno@clisp.org>
11663
11664         * m4/inttypes.m4: New file.
11665         * m4/_inttypes_h.m4: Remove file.
11666         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
11667         PRI_MACROS_BROKEN.
11668         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
11669
11670         * m4/imaxabs.m4: New file.
11671
11672         * m4/imaxdiv.m4: New file.
11673
11674 2006-08-26  Bruno Haible  <bruno@clisp.org>
11675
11676         * lib/inttypes_.h: New file.
11677         * lib/inttypes.h: Remove file.
11678         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
11679
11680         * lib/imaxabs.c: New file.
11681
11682         * lib/imaxdiv.c: New file.
11683
11684 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11685
11686         New config-h module, so that "make" output needn't be cluttered
11687         by -DHAVE_CONFIG_H.
11688         * MODULES.html.sh (Support for building libraries and executables):
11689         Add config-h.
11690         * modules/config-h: New file.
11691         * gnulib-tool (nl, sed_transform_lib_file): New vars.
11692         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
11693         the config-h module is used.
11694
11695         New configmake module, so that "make" output needn't be cluttered
11696         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
11697         * MODULES.html.sh (Support for building libraries and executables):
11698         Add configmake.
11699         * modules/configmake: New file.
11700
11701 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11702
11703         * m4/config-h.m4: New file.
11704
11705 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11706
11707         * config/srclist.txt: Add elisp-comp.
11708
11709 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11710
11711         * MODULES.html.sh (Support for building libraries and executables):
11712         Add elisp-comp.
11713         * build-aux/elisp-comp: New file.
11714         * modules/elisp-comp: New file.
11715
11716 2006-08-24  Bruno Haible  <bruno@clisp.org>
11717
11718         * gnulib-tool (func_create_testdir): Use non-default values of
11719         sourcebase and m4base.
11720
11721 2006-08-24  Bruno Haible  <bruno@clisp.org>
11722
11723         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
11724         HTML structure.
11725
11726 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11727
11728         * modules/openat (Depends-on): Add lchown.
11729
11730 2006-08-23  Bruno Haible  <bruno@clisp.org>
11731
11732         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
11733         of gl_LOCK_EARLY instead of gl_LOCK.
11734
11735 2006-08-23  Bruno Haible  <bruno@clisp.org>
11736
11737         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
11738         on OSF/1 to no.
11739         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
11740
11741 2006-08-23  Bruno Haible  <bruno@clisp.org>
11742
11743         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
11744         as unusable.
11745
11746         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
11747         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
11748         (gl_LOCK): New macro.
11749
11750 2006-08-22  Simon Josefsson  <jas@extundo.com>
11751
11752         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
11753         to md5 module.
11754
11755 2006-08-22  Simon Josefsson  <jas@extundo.com>
11756
11757         * MODULES.html.sh: Add "Support for maintaining and release
11758         projects".
11759
11760         * build-aux/gnupload: New file, from coreutils.
11761
11762 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11763
11764         Avoid the need for AC_LIBSOURCES in m4 macros.
11765         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
11766         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
11767         * modules/check-version (EXTRA_DIST): Add check-version.h.
11768         * modules/crc (EXTRA_DIST): Add crc.h.
11769         * modules/des (EXTRA_DIST): Add des.h.
11770         * modules/gc (EXTRA_DIST): Add gc.h.
11771         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
11772         * modules/getline (EXTRA_DIST): Add getline.h.
11773         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
11774         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
11775         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
11776         * modules/md2 (EXTRA_DIST): Add md2.h.
11777         * modules/md4 (EXTRA_DIST): Add md4.h.
11778         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
11779         * modules/read-file (EXTRA_DIST): Add read-file.h.
11780         * modules/readline (EXTRA_DIST): Add readline.h.
11781         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
11782         rijndael-api-fst.h.
11783
11784 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11785
11786         * m4/rijndael.m4 (gl_ARCFOUR):
11787         * m4/arctwo.m4 (gl_ARCTWO):
11788         * m4/check-version.m4 (gl_CHECK_VERSION):
11789         * m4/crc.m4 (gl_CRC):
11790         * m4/des.m4 (gl_DES):
11791         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
11792         * m4/gc.m4 (gl_GC):
11793         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
11794         * m4/getline.m4 (gl_FUNC_GETLINE):
11795         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
11796         * m4/hmac-md5.m4 (gl_HMAC_MD5):
11797         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
11798         * m4/md2.m4 (gl_MD2):
11799         * m4/md4.m4 (gl_MD4):
11800         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
11801         * m4/read-file.m4 (gl_FUNC_READ_FILE):
11802         * m4/readline.m4 (gl_FUNC_READLINE):
11803         * m4/rijndael.m4 (gl_RIJNDAEL):
11804         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11805         to get the necessary .h files and whatnot.
11806
11807 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11808
11809         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
11810         gnulib rather than the other way around.
11811         * config/srclistvars.sh (COREUTILS): Remove.
11812
11813 2006-08-22  Jim Meyering  <jim@meyering.net>
11814
11815         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
11816
11817         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
11818
11819 2006-08-22  Eric Blake  <ebb9@byu.net>
11820
11821         * modules/regexprops-generic: New file.
11822         * MODULES.html.sh (Support for building documentation): List it.
11823
11824 2006-08-22  Eric Blake  <ebb9@byu.net>
11825
11826         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
11827         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
11828         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
11829         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
11830
11831 2006-08-22  Bruno Haible  <bruno@clisp.org>
11832
11833         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
11834         and lib_LTLIBRARIES like the other lib_* variables.
11835
11836 2006-08-22  Bruno Haible  <bruno@clisp.org>
11837
11838         * build-aux/x-to-1.in: New file, from GNU gettext.
11839
11840 2006-08-22  Bruno Haible  <bruno@clisp.org>
11841
11842         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
11843         <utmpx.h> exists.
11844
11845 2006-08-22  Bruno Haible  <bruno@clisp.org>
11846
11847         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
11848         <utmpx.h> exists.
11849
11850 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11851
11852         BeOS portability.
11853         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
11854         exist.
11855         Problem reported by Bruno Haible.
11856
11857 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11858
11859         Avoid the need for AC_LIBSOURCES in m4 macros.
11860         * modules/acl (EXTRA_DIST): Add acl.h.
11861         * modules/argmatch (Files): Add m4/argmatch.m4.
11862         (configure.ac): Add gl_ARGMATCH.
11863         (EXTRA_DIST): Renamed from lib_SOURCES, for
11864         consistency with the other modules.  Remove argmatch.c.
11865         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
11866         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
11867         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
11868         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
11869         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
11870         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
11871         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
11872         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
11873         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
11874         * modules/closeout (EXTRA_DIST): Add closeout.h.
11875         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
11876         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
11877         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
11878         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
11879         dirname.h; remove basename.c and stripslash.c.
11880         * modules/exclude (EXTRA_DIST): Add exclude.h.
11881         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
11882         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
11883         * modules/file-type (EXTRA_DIST): Add file-type.h.
11884         * modules/filemode (EXTRA_DIST): Add filemode.h.
11885         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
11886         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11887         * modules/fpending (EXTRA_DIST): Add __fpending.h.
11888         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
11889         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
11890         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
11891         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
11892         * modules/getdate (EXTRA_DIST): Add getdate.c.
11893         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
11894         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
11895         * modules/getpass (EXTRA_DIST): Add getpass.h.
11896         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
11897         * modules/group-member (EXTRA_DIST): Add group-member.h.
11898         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
11899         * modules/hash (EXTRA_DIST): Add hash.h.
11900         * modules/human (EXTRA_DIST): Add human.h.
11901         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
11902         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
11903         * modules/lchown (EXTRA_DIST): Add lchown.h.
11904         * modules/long-options (EXTRA_DIST): Add long-options.h.
11905         * modules/lstat (EXTRA_DIST): Add lstat.h.
11906         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
11907         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
11908         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
11909         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
11910         * modules/memxor (EXTRA_DIST): Add memxor.h.
11911         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
11912         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
11913         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
11914         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
11915         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
11916         * modules/physmem (EXTRA_DIST): Add physmem.h.
11917         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
11918         * modules/posixver (EXTRA_DIST): Add posixver.h.
11919         * modules/quote (EXTRA_DIST): Add quote.h.
11920         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
11921         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
11922         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
11923         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
11924         regex_internal.h regexec.c.
11925         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
11926         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
11927         * modules/same (EXTRA_DIST): Add same.h.
11928         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
11929         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
11930         * modules/savedir (EXTRA_DIST): Add savedir.h.
11931         * modules/sha1 (EXTRA_DIST): Add sha1.h.
11932         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
11933         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
11934         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
11935         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
11936         * modules/strdup (EXTRA_DIST): Add strdup.h.
11937         * modules/strftime (EXTRA_DIST): Add strftime.h.
11938         * modules/strndup (EXTRA_DIST): Add strndup.h.
11939         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
11940         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
11941         * modules/time_r (EXTRA_DIST): Add time_r.h.
11942         * modules/timespec (EXTRA_DIST): Add timespec.h.
11943         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11944         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
11945         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
11946         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
11947         * modules/userspec (EXTRA_DIST): Add userspec.h.
11948         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
11949         * modules/utimens (EXTRA_DIST): Add utimens.h.
11950         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
11951         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
11952         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
11953         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
11954         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
11955         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
11956         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
11957         * modules/yesno (EXTRA_DIST): Add yesno.h.
11958
11959 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11960
11961         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
11962
11963         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
11964         * m4/dev-ino.m4, same-inode.m4: Remove.
11965
11966         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
11967         * m4/acl.m4 (AC_FUNC_ACL):
11968         * m4/backupfile.m4 (gl_BACKUPFILE):
11969         * m4/c-strtod.m4 (gl_C99_STRTOLD):
11970         * m4/canon-host.m4 (gl_CANON_HOST):
11971         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
11972         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
11973         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
11974         * m4/cloexec.m4 (gl_CLOEXEC):
11975         * m4/close-stream.m4 (gl_CLOSE_STREAM):
11976         * m4/closeout.m4 (gl_CLOSEOUT):
11977         * m4/dirfd.m4 (gl_FUNC_DIRFD):
11978         * m4/dirname.m4 (gl_DIRNAME):
11979         * m4/exclude.m4 (gl_EXCLUDE):
11980         * m4/exitfail.m4 (gl_EXITFAIL):
11981         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
11982         * m4/file-type.m4 (gl_FILE_TYPE):
11983         * m4/filemode.m4 (gl_FILEMODE):
11984         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
11985         * m4/fpending.m4 (gl_FUNC_FPENDING):
11986         * m4/fprintftime.m4 (gl_FPRINTFTIME):
11987         * m4/fts.m4 (gl_FUNC_FTS):
11988         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
11989         * m4/getdate.m4 (gl_GETDATE):
11990         * m4/gethrxtime.m4 (gl_GETHRXTIME):
11991         * m4/getpagesize.m4 (gl_GETPAGESIZE):
11992         * m4/getpass.m4 (gl_FUNC_GETPASS):
11993         * m4/gettime.m4 (gl_GETTIME):
11994         * m4/getugroups.m4 (gl_GETUGROUPS):
11995         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
11996         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
11997         * m4/hard-locale.m4 (gl_HARD_LOCALE):
11998         * m4/hash.m4 (gl_HASH):
11999         * m4/idcache.m4 (gl_IDCACHE):
12000         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
12001         * m4/lchown.m4 (gl_FUNC_LCHOWN):
12002         * m4/long-options.m4 (gl_LONG_OPTIONS):
12003         * m4/lstat.m4 (gl_FUNC_LSTAT):
12004         * m4/md5.m4 (gl_MD5):
12005         * m4/memcasecmp.m4 (gl_MEMCASECMP):
12006         * m4/memcoll.m4 (gl_MEMCOLL):
12007         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
12008         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
12009         * m4/memxor.m4 (gl_MEMXOR):
12010         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
12011         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
12012         * m4/modechange.m4 (gl_MODECHANGE):
12013         * m4/mountlist.m4 (gl_MOUNTLIST):
12014         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
12015         * m4/openat.m4 (gl_FUNC_OPENAT):
12016         * m4/pathmax.m4 (gl_PATHMAX):
12017         * m4/physmem.m4 (gl_PHYSMEM):
12018         * m4/posixtm.m4 (gl_POSIXTM):
12019         * m4/posixver.m4 (gl_POSIXVER):
12020         * m4/quote.m4 (gl_QUOTE):
12021         * m4/quotearg.m4 (gl_QUOTEARG):
12022         * m4/readtokens.m4 (gl_READTOKENS):
12023         * m4/readutmp.m4 (gl_READUTMP):
12024         * m4/regex.m4 (gl_REGEX):
12025         * m4/safe-read.m4 (gl_SAFE_READ):
12026         * m4/safe-write.m4 (gl_SAFE_WRITE):
12027         * m4/same.m4 (gl_SAME):
12028         * m4/save-cwd.m4 (gl_SAVE_CWD):
12029         * m4/savedir.m4 (gl_SAVEDIR):
12030         * m4/settime.m4 (gl_SETTIME):
12031         * m4/sha1.m4 (gl_SHA1):
12032         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
12033         * m4/stat-macros.m4 (gl_STAT_MACROS):
12034         * m4/stat-time.m4 (gl_STAT_TIME):
12035         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
12036         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
12037         * m4/strdup.m4 (gl_FUNC_STRDUP):
12038         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
12039         * m4/strndup.m4 (gl_FUNC_STRNDUP):
12040         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
12041         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
12042         * m4/time_r.m4 (gl_TIME_R):
12043         * m4/timespec.m4 (gl_TIMESPEC):
12044         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
12045         * m4/unlinkdir.m4 (gl_UNLINKDIR):
12046         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
12047         * m4/userspec.m4 (gl_USERSPEC):
12048         * m4/utimecmp.m4 (gl_UTIMECMP):
12049         * m4/utimens.m4 (gl_UTIMENS):
12050         * m4/xalloc.m4 (gl_XALLOC):
12051         * m4/xgetcwd.m4 (gl_XGETCWD):
12052         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
12053         * m4/xreadlink.m4 (gl_XREADLINK):
12054         * m4/xstrtod.m4 (gl_XSTRTOD):
12055         * m4/yesno.m4 (gl_YESNO):
12056         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12057         to get the necessary .h files and whatnot.
12058
12059 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
12060             Bruno Haible  <bruno@clisp.org>
12061
12062         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
12063         /bin/sh understanding of '!' conditional negation.
12064
12065 2006-08-21  Jim Meyering  <jim@meyering.net>
12066
12067         * modules/openat (Depends-on): Really alphabetize.
12068
12069         * modules/acl (Depends-on): Add error and quote.
12070
12071         * check-module (find_included_lib_files): Add at-func.c to the
12072         ok-to-include-more-than-once white list.
12073
12074         * modules/openat (Depends-on): Add lstat.  Alphabetize.
12075
12076 2006-08-21  Bruno Haible  <bruno@clisp.org>
12077
12078         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12079         Emit a pkgdata_DATA variable only if some snippets add contents to it.
12080         Reported by Martin Lambers <marlam@marlam.de>.
12081
12082 2006-08-21  Bruno Haible  <bruno@clisp.org>
12083
12084         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
12085         specify an installation location, don't emit a noinst_LIBRARIES or
12086         noinst_LTLIBRARIES assignment.
12087
12088 2006-08-21  Bruno Haible  <bruno@clisp.org>
12089
12090         BeOS portability.
12091         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
12092         BeOS has mbrtowc() but no <wctype.h>.
12093
12094 2006-08-21  Bruno Haible  <bruno@clisp.org>
12095
12096         BeOS portability.
12097         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
12098         exist.
12099
12100 2006-08-21  Bruno Haible  <bruno@clisp.org>
12101
12102         BeOS portability.
12103         * lib/mbchar.h: Include <wctype.h> only if it exists.
12104
12105 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12106
12107         Remove files that are no longer needed by their respective modules.
12108         * m4/obstack.m4: Remove.
12109         * m4/strerror_r.m4: Remove.
12110         * m4/uint32_t.m4: Remove.
12111         * m4/uintptr_t.m4: Remove.
12112         * m4/ullong_max.m4: Remove.
12113         * m4/xstrtoimax.m4: Remove.
12114         * m4/xstrtoumax.m4: Remove.
12115
12116         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
12117         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
12118         dependencies now capture this.
12119
12120         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
12121         Do not use AC_LIBSOURCES, since gnulib modules now do this.
12122         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
12123         * m4/human.m4 (gl_HUMAN): Likewise.
12124         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
12125         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
12126
12127         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
12128
12129         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
12130         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
12131         stdint.
12132         * m4/human.m4 (gl_HUMAN): Likewise.
12133         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
12134         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
12135         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12136         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12137         * m4/xstrtol (gl_XSTRTOL): Likewise.
12138
12139         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
12140         AC_TYPE_LONG_LONG_INT.
12141         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12142         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
12143         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
12144         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12145
12146         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
12147         on stdbool.
12148
12149         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
12150         (gl_PREREQ_XSTRTOUL): Remove.
12151
12152         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
12153
12154         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
12155         mode.
12156
12157 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12158
12159         Add and change modules to make it easier for coreutils to use
12160         gnulib-tool.
12161         * modules/backupfile (Files): Remove m4/d-ino.m4.
12162         (Depends-on): Add d-ino.
12163         * modules/cycle-check (Depends-on): Add stdint.
12164         (lib_SOURCES): Add cycle-check.h.
12165         * modules/d-ino: New module.
12166         * modules/d-type: New module.
12167         * modules/error (Files): Remove m4/strerror_r.m4.
12168         * modules/filemode (Files): Add m4/st_dm_mode.m4.
12169         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
12170         m4/inttypes_h.m4, m4/uintmax_t.m4.
12171         (Depends-on): Add stdint.
12172         (lib_SOURCES): Add fsusage.h.
12173         * modules/getcwd (Files): Remove d-ino.m4.
12174         (Depends-on): Add d-ino.
12175         * modules/getndelim2 (Depends-on): Add stdint.
12176         * modules/glob (Files): Remove m4/d-type.m4.
12177         (Depends-on): Add d-type.
12178         * modules/host-os: New module.
12179         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
12180         m4/inttypes_h.m4, m4/uintmax_t.m4.
12181         * Depends-on: Add stdint.
12182         (lib_SOURCES): Add human.h.
12183         * modules/inttostr (Files): Remove m4/intmax_t.m4,
12184         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
12185         m4/uintmax_t.m4, m4/ulonglong.m4.
12186         (Depends-on): Add stdint.
12187         (EXTRA_DIST): Add inttostr.h.
12188         * modules/lchmod: New module.
12189         * modules/link-follow: New module.
12190         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
12191         (Depends-on): Add lchmod.
12192         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
12193         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
12194         (Depends-on): Add stdint.
12195         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
12196         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
12197         (Depends-on): Add stdint.
12198         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
12199         * modules/perl: New module.
12200         * modules/regex (Depends-on): Add stdint.
12201         * modules/rmdir-errno: New module.
12202         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12203         m4/intmax_t.m4.
12204         (Depends-on): Add stdint.
12205         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12206         m4/uintmax_t.m4.
12207         (Depends-on): Add stdint.
12208         * modules/unlink-busy: New module.
12209         * modules/utimecmp (Depends-on): Add stdint.
12210         * modules/uptime: New module.
12211         * modules/winsz-ioctl: New module.
12212         * modules/winsz-termios: New module.
12213         * modules/xnanosleep (Depends-on): Add nanosleep.
12214         * modules/ullong_max: Remove.
12215         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
12216         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
12217         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
12218         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
12219         (Depends-on): Add inttypes.
12220         (lib_SOURCES): Add xstrtol.h.
12221         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
12222         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
12223         * MODULES.html.sh: Move 'assert' into the assert section.
12224         Move 'dummy' into the linking section.
12225         Remove ullong_max.
12226         Add section for compatibility checks for POSIX:2001 functions,
12227         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
12228         winsz-ioctl, and winsz-termios into it.
12229         Add lchmod.
12230         Add top-level Misc section and put host-os, perl, and uptime
12231         into it.
12232
12233 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12234
12235         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
12236         now assume the stdint module.  Do not include inttypes.h.
12237         * lib/fsusage.h: Likewise.
12238         * lib/getndelim2.c: Likewise.
12239         * lib/human.h: Likewise.
12240         * lib/inttostr.h: Likewise.
12241         * lib/obstack.c: Likewise.
12242         * lib/regex_internal.h: Likewise.
12243         * lib/tempname.c: Likewise.
12244         * lib/utimecmp.c: Likewise.
12245         * lib/xstrtol.h: Likewise.
12246
12247         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
12248
12249         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
12250         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
12251         * lib/xtime.h: Likewise.
12252
12253 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12254
12255         * modules/openat (Files): Add lib/fchmodat.c.
12256         Fixes problem reported by Jay Youngman.
12257
12258 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12259
12260         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
12261         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
12262
12263 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
12264             Bruno Haible  <bruno@clisp.org>
12265
12266         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
12267         and is a script that invokes bison. Tighten the code. Add comments.
12268
12269 2006-08-18  Jim Meyering  <jim@meyering.net>
12270
12271         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
12272         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
12273         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
12274         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
12275
12276 2006-08-18  Bruno Haible  <bruno@clisp.org>
12277
12278         * modules/bison-i18n: New file.
12279         * MODULES.html.sh (Internationalization functions): Add it.
12280
12281 2006-08-18  Bruno Haible  <bruno@clisp.org>
12282
12283         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
12284         sys/statvfs.h. When getmntinfo was found, check its declaration and
12285         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
12286
12287 2006-08-18  Bruno Haible  <bruno@clisp.org>
12288
12289         * m4/bison-i18n.m4: New file, from bison.
12290
12291 2006-08-18  Bruno Haible  <bruno@clisp.org>
12292
12293         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
12294         (ME_DUMMY): Treat "kernfs" as a dummy.
12295         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
12296
12297 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12298
12299         Update from coreutils.
12300
12301         2006-08-15  Jim Meyering  <jim@meyering.net>
12302
12303         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
12304
12305         2006-01-17  Jim Meyering  <jim@meyering.net>
12306
12307         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
12308
12309         2006-01-11  Jim Meyering  <jim@meyering.net>
12310
12311         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
12312         Check for the lchmod function.
12313
12314 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12315
12316         Update from coreutils.
12317
12318         * lib/__fpending.h: Add copyright notice.
12319         * lib/fprintftime.h: Likewise.
12320         * lib/savedir.c: Use (C) in copyright notice.
12321         * lib/savedir.h: Likewise.
12322
12323         2006-08-15  Jim Meyering  <jim@meyering.net>
12324
12325         * lib/at-func.c: New file, with the logic of all emulated at-functions.
12326         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
12327         in support of the EXPECTED_ERRNO macro.
12328         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
12329         definitions.  Instead, define the appropriate symbols and include
12330         "at-func.c".
12331         * lib/mkdirat.c (mkdirat): Likewise.
12332         * lib/fchmodat.c (fchmodat): Likewise.
12333         (ENOSYS): Remove definition.
12334         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
12335         it.  Don't include "unistd--.h" -- it wasn't ever used.
12336
12337         2006-01-17  Jim Meyering  <jim@meyering.net>
12338
12339         Rewrite fts.c not to change the current working directory,
12340         by using openat, fstatat, fdopendir, etc..
12341
12342         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
12343         (HAVE_OPENAT_SUPPORT): Define.
12344         [_LIBC] (fchdir): Don't undef or define; no longer used.
12345         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
12346         Now, this `function' always succeeds, and consumes its file descriptor
12347         parameter -- so callers must not close such FDs.  Update callers.
12348         (diropen_fd, opendirat, cwd_advance_fd): New functions.
12349         (diropen): Add parameter, SP.  Adjust all callers.
12350         Implement using diropen_fd, rather than open.
12351         (fts_open): Initialize new member, fts_cwd_fd.
12352         Remove fts_rft-setting code.
12353         (fts_close): Close fts_cwd_fd, if necessary.
12354         (__opendir2): Define in terms of opendir or opendirat,
12355         depending on whether the FST_NOCHDIR flag is set.
12356         (fts_build): Since fts_safe_changedir consumes its FD, and since
12357         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
12358         and close the dup'd file descriptor upon failure.
12359         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
12360         (fts_safe_changedir): Tweak semantics to reflect that this function
12361         now calls cwd_advance_fd and hence consumes its FD argument.
12362         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
12363         [struct FTS] (fts_rft): Remove now-unused member.
12364         [struct FTS] (fts_cycle.state): Improve comment.
12365
12366         * lib/openat.c (openat_needs_fchdir): New function.
12367         * lib/openat.h (openat_needs_fchdir): Declare it.
12368
12369 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12370
12371         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
12372         Problem and fix reported by Pádraig Brady in
12373         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
12374
12375 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12376
12377         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
12378
12379 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12380
12381         * lib/memcoll.c (memcoll): Optimize for the common case where the
12382         arguments are bytewise equal.
12383
12384 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12385
12386         * doc/regexprops-generic.texi: Add a copyright notice.
12387
12388 2006-08-15  Bruno Haible  <bruno@clisp.org>
12389
12390         * modules/tmpdir (License): Change to LGPL.
12391
12392 2006-08-15  Bruno Haible  <bruno@clisp.org>
12393
12394         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
12395         module.
12396
12397 2006-08-14  Simon Josefsson  <jas@extundo.com>
12398
12399         * config/srclist.txt: Add gnupload.
12400
12401 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12402
12403         Change copyright notice from LGPL 2 to GPL 2, since that's the
12404         standard form used in the gnulib repository.
12405         * tests/test-lock.c: Likewise.
12406         * tests/test-stdint.c: Likewise.
12407         * tests/test-tls.c: Likewise.
12408
12409         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
12410         prelude-manager.  User shorter URLs for GNU projects, without '?'.
12411         Add copyright notice.
12412
12413         * check-module: Add copyright notice.  Output a copyright
12414         notice if "--version" is specified.
12415         * modules/COPYING: New file.
12416         * tests/test-getaddrinfo.c: Add copyright notice.
12417         * tests/test-verify.c: Likewise.
12418
12419 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12420
12421         Change copyright notice from LGPL 2 to GPL 2, since that's the
12422         standard form used in the gnulib repository.
12423         * lib/lock.c: LGPL -> GPL.
12424         * lib/lock.h: Likewise.
12425         * lib/strnlen1.c: Likewise.
12426         * lib/strnlen1.h: Likewise.
12427         * lib/tls.c: Likewise.
12428         * lib/tls.h: Likewise.
12429         * lib/tmpdir.c: Likewise.
12430
12431         * lib/TODO: Remove; this belongs only in coreutils.
12432
12433 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12434
12435         Add copyright notices to long-enough files that lack them, since
12436         otherwise the files aren't clearly free.  Use the same notice that
12437         getdate.texi already uses.
12438         * doc/alloca-opt.texi: Add copyright notice.
12439         * doc/alloca.texi: Likewise.
12440         * doc/ctime.texi: Likewise.
12441         * doc/functions.texi: Likewise.
12442         * doc/gcd.texi: Likewise.
12443         * doc/gnulib-tool.texi: Likewise.
12444         * doc/inet_ntoa.texi: Likewise.
12445         * doc/visibility.texi: Likewise.
12446
12447         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
12448         * doc/quote.texi: Add copyright notice.
12449
12450         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
12451         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
12452         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
12453         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
12454         is now obsolete, and give a pointer to the Sun list.
12455         Add copyright notice.
12456
12457 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12458
12459         * config/srclistvars.sh: Add copyright notice.
12460
12461 2006-08-14  Eric Blake  <ebb9@byu.net>
12462
12463         Import the following change from libc:
12464
12465         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
12466
12467         Upstream bug 2997.
12468         * lib/misc/error.c: Add space between program name and message if file
12469         name is missing.
12470
12471 2006-08-12  Karl Berry  <karl@gnu.org>
12472
12473         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
12474         remove, these originate in gnulib now.
12475
12476 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12477
12478         * doc/Makefile (standards.info standards.html standards.dvi):
12479         Also depend on make-stds.texi.
12480
12481 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12482
12483         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
12484         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
12485
12486         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
12487         in wchar_t.  Problem reported by Eric Blake.
12488
12489         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
12490         LEN is smaller than SIZE.  Suggested by Bruno Haible.
12491         Also, help the compiler to keep LEN in a register.
12492
12493 2006-08-11  Eric Blake  <ebb9@byu.net>
12494
12495         * users.txt: Sort.  Add tar.
12496
12497 2006-08-11  Bruno Haible  <bruno@clisp.org>
12498
12499         * users.txt: New file.
12500
12501 2006-08-11  Bruno Haible  <bruno@clisp.org>
12502
12503         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
12504         before <wchar.h>. Needed for OSF/1 and BSD/OS.
12505
12506 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12507
12508         * modules/snprintf (Depends-on): Remove minmax.
12509         (Maintainer): Add self and Bruno.
12510
12511 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12512
12513         * lib/.cppi-disable: Add snprintf.h, socket_.h.
12514         * lib/snprintf.c: Include <errno.h> and <limits.h>.
12515         (EOVERFLOW): Define if the system does not.
12516         Do not include "minmax.h"; it wasn't used.
12517         (snprintf): Don't assume size_t promotes to an unsigned type.
12518         Fix bug when generated string was too long for the buffer: the
12519         buffer's contents are supposed to be the initial prefix of the
12520         output.  Don't assume vasnprintf returns EOVERFLOW if the size
12521         exceeds INT_MAX; do the check ourselves.
12522
12523         Import the following changes from libc:
12524
12525         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
12526
12527         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
12528         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
12529         set wc to the byte which couldn't be converted.
12530         (re_string_reconstruct): Don't clear valid_raw_len before calling
12531         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
12532         tip_context using re_string_context_at.
12533
12534         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
12535
12536         * lib/posix/regex.h: g++ still cannot handled [restrict].
12537
12538         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
12539
12540         * lib/posix/regex.h: Remove special handling for VMS.
12541
12542 2006-08-10  Jim Meyering  <jim@meyering.net>
12543
12544         * modules/same-inode: New module.
12545         * modules/dev-ino: New module.
12546         * modules/cycle-check: Depend on these modules, rather than simply
12547         including their .h files.
12548         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
12549         required via m4/cycle-check.m4.
12550         * modules/same: Depend on new same-inode module, rather than
12551         including same-inode.h.
12552         * modules/chdir-safer: New file.
12553
12554         * modules/chown (Depends-on): Add stat-macros.
12555
12556 2006-08-10  Jim Meyering  <jim@meyering.net>
12557
12558         * m4/cycle-check.m4: New file.
12559         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
12560         * m4/dev-ino.m4, m4/same-inode.m4: New files.
12561
12562 2006-08-10  Eric Blake  <ebb9@byu.net>
12563
12564         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
12565         in from original proposal.
12566
12567 2006-08-10  Eric Blake  <ebb9@byu.net>
12568         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12569
12570         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
12571         namespace.
12572
12573 2006-08-10  Bruno Haible  <bruno@clisp.org>
12574
12575         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
12576         as well.
12577
12578 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12579
12580         Sync from coreutils.
12581
12582         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
12583
12584         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
12585         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
12586
12587 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12588
12589         * modules/restrict: Remove; no longer needed now that we assume
12590         Autoconf 2.59 or later.
12591         * MODULES.html.sh: Remove 'restrict'.
12592         * modules/argp (Depends-on): Remove 'restrict'.
12593         * modules/base64 (Depends-on): Likewise.
12594         * modules/gc (Depends-on): Likewise.
12595         * modules/getaddrinfo (Depends-on): Likewise.
12596         * modules/glob (Depends-on): Likewise.
12597         * modules/inet_ntop (Depends-on): Likewise.
12598         * modules/inet_pton (Depends-on): Likewise.
12599         * modules/memxor (Depends-on): Likewise.
12600         * modules/regex (Depends-on): Likewise.
12601         * modules/strtok_r (Depends-on): Likewise.
12602         * modules/time_r (Depends-on): Likewise.
12603
12604 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12605
12606         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
12607         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
12608         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
12609         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
12610         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
12611         * m4/memxor.m4 (gl_MEMXOR): Likewise.
12612         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
12613         gl_C_RESTRICT replaced by AC_C_RESTRICT.
12614
12615         Merge from coreutils.
12616         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
12617         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
12618         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
12619         * m4/time_r.m4 (gl_TIME_R): Likewise.
12620
12621 2006-08-09  Karl Berry  <karl@gnu.org>
12622
12623         * config/srclist.txt: no more gettext-tools, per Bruno.
12624
12625 2006-08-08  Eric Blake  <ebb9@byu.net>
12626
12627         * modules/verror: New module.
12628         * MODULES.html.sh: Document it.
12629
12630 2006-08-08  Eric Blake  <ebb9@byu.net>
12631
12632         * lib/verror.h, lib/verror.c: New files.
12633
12634 2006-08-08  Eric Blake  <ebb9@byu.net>
12635
12636         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
12637         verror_at_line output complies with GNU Coding Standards even when
12638         file is NULL.
12639
12640 2006-08-07  Bruno Haible  <bruno@clisp.org>
12641
12642         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
12643         versions of AIX.
12644         Reported by Ralf Wildenhues.
12645
12646 2006-08-07  Bruno Haible  <bruno@clisp.org>
12647
12648         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
12649         in an AC_DEFUN. Needed so that the autoconf snippets can use
12650         AC_REQUIRE.
12651
12652 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12653
12654         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12655         Initialize pkgdata_DATA.
12656         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
12657         overriding it.
12658
12659 2006-08-06  Eric Blake  <ebb9@byu.net>
12660
12661         * lib/error.h: Fold in some upstream changes from glibc.
12662         * lib/error.c: Likewise.
12663
12664 2006-08-04  Bruno Haible  <bruno@clisp.org>
12665
12666         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12667         Make the mostlyclean-local rule depend on mostlyclean-generic.
12668         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
12669
12670 2006-07-31  Bruno Haible  <bruno@clisp.org>
12671
12672         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
12673         <stdlib.h>, <string.h>.
12674
12675 2006-07-30  Bruno Haible  <bruno@clisp.org>
12676
12677         * modules/readlink (License): Change to LGPL.
12678
12679 2006-07-30  Bruno Haible  <bruno@clisp.org>
12680
12681         * modules/javaversion (Makefile.am): Distribute javaversion.java and
12682         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
12683         set PKGDATADIR to point to it.
12684
12685 2006-07-30  Bruno Haible  <bruno@clisp.org>
12686
12687         * modules/csharpexec (configure.ac): Comment out macro invocation.
12688         * modules/javaexec (configure.ac): Likewise.
12689         * modules/javacomp-script (configure.ac): Likewise.
12690
12691         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
12692
12693 2006-07-30  Bruno Haible  <bruno@clisp.org>
12694
12695         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
12696         linked-list.
12697
12698 2006-07-30  Bruno Haible  <bruno@clisp.org>
12699
12700         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
12701
12702 2006-07-30  Bruno Haible  <bruno@clisp.org>
12703
12704         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12705         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
12706         get removed.
12707
12708 2006-07-29  Bruno Haible  <bruno@clisp.org>
12709
12710         Make it possible for gnulib-tool to work with locally modified or
12711         augmented gnulib repositories.
12712         * gnulib-tool (func_usage): Document --local-dir option.
12713         (local_gnulib_dir): New variable.
12714         Handle --local-dir option.
12715         (func_lookup_file): New function.
12716         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
12717         (func_get_description, func_get_filelist, func_get_description,
12718         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
12719         func_get_automake_snippet, func_get_include_directive,
12720         func_get_license, func_get_maintainer): Use func_lookup_file.
12721         (func_import, func_create_testdir): Use func_lookup_file.
12722
12723 2006-07-29  Bruno Haible  <bruno@clisp.org>
12724
12725         * modules/setenv (Depends-on): Add unistd.
12726
12727 2006-07-29  Bruno Haible  <bruno@clisp.org>
12728
12729         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
12730
12731 2006-07-29  Bruno Haible  <bruno@clisp.org>
12732
12733         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
12734
12735 2006-07-29  Bruno Haible  <bruno@clisp.org>
12736
12737         * gnulib-tool (import, update): If there is no Makefile.am, look at
12738         aclocal.m4, instead of bailing out.
12739
12740 2006-07-29  Bruno Haible  <bruno@clisp.org>
12741
12742         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
12743         Categorize the options by when they are useful.
12744
12745 2006-07-29  Bruno Haible  <bruno@clisp.org>
12746
12747         * gnulib-tool (func_usage): Document option --no-libtool.
12748         Handle option --no-libtool.
12749         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
12750         for changed semantics of $libtool variable.
12751         (func_import): Likewise. If libtool is not used, show this through
12752         an option --no-libtool.
12753         (func_create_testdir): Update.
12754
12755 2006-07-29  Bruno Haible  <bruno@clisp.org>
12756
12757         * gnulib-tool (func_import): Extend error message about missing
12758         --doc-base.
12759
12760 2006-07-29  Bruno Haible  <bruno@clisp.org>
12761
12762         * gnulib-tool (func_import): Don't create the $docbase directory if
12763         there is no file to store there.
12764
12765 2006-07-29  Bruno Haible  <bruno@clisp.org>
12766
12767         * gnulib-tool (autoconf_minversion): If a --dir option is given and
12768         relevant, look for configure.ac there, not in the current directory.
12769         Also use a simple search for AC_PREREQ, not "autoconf --trace".
12770
12771 2006-07-29  Bruno Haible  <bruno@clisp.org>
12772
12773         * gnulib-tool (SORT): New variable.
12774         (func_usage): Undocument --assume-autoconf option.
12775         Remove --assume-autoconf option handling.
12776         (autoconf_minversion): Determine from the contents of configure.ac.
12777         (func_import): Remove autoconf_minversion handling.
12778         Suggested by Eric Blake.
12779
12780 2006-07-29  Bruno Haible  <bruno@clisp.org>
12781
12782         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
12783
12784 2006-07-29  Bruno Haible  <bruno@clisp.org>
12785
12786         * config/srclist.txt (*setenv.[ch]): Remove rules.
12787
12788 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12789
12790         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
12791
12792 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12793
12794         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
12795         arpa/inet.h.
12796
12797 2006-07-28  Simon Josefsson  <jas@extundo.com>
12798
12799         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
12800         * modules/inet_pton (Depends-on): Likewise.
12801
12802 2006-07-28  Simon Josefsson  <jas@extundo.com>
12803
12804         * m4/netinet_in_h.m4: New file.
12805
12806 2006-07-28  Simon Josefsson  <jas@extundo.com>
12807
12808         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
12809         #include's.
12810
12811 2006-07-28  Simon Josefsson  <jas@extundo.com>
12812
12813         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
12814         #include's.
12815
12816 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
12817
12818         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
12819         setgid on directories only if they set these bits.
12820         * lib/modechange.h: Remove obsolete comment about masks.
12821
12822 2006-07-28  Eric Blake  <ebb9@byu.net>
12823
12824         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
12825         macro expansion.
12826
12827 2006-07-28  Bruno Haible  <bruno@clisp.org>
12828
12829         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
12830
12831 2006-07-28  Bruno Haible  <bruno@clisp.org>
12832
12833         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
12834
12835 2006-07-28  Bruno Haible  <bruno@clisp.org>
12836
12837         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
12838         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
12839         Define fallbacks.
12840         Avoids link error on FreeBSD 4.x.
12841         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12842
12843         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
12844         encoding.
12845         * lib/mbswidth.c (iswcntrl): Likewise.
12846
12847 2006-07-27  Bruno Haible  <bruno@clisp.org>
12848
12849         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
12850         test.
12851
12852 2006-07-27  Bruno Haible  <bruno@clisp.org>
12853
12854         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
12855         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
12856         defined.
12857
12858 2006-07-26  Eric Blake  <ebb9@byu.net>
12859
12860         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
12861
12862 2006-07-26  Eric Blake  <ebb9@byu.net>
12863
12864         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
12865         like mingw that lack mkstemp.
12866         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
12867         avoid compilation warning on mingw.
12868
12869 2006-07-26  Bruno Haible  <bruno@clisp.org>
12870
12871         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
12872         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
12873         INT_FAST*_MIN, INTPTR_MIN.
12874
12875 2006-07-25  Bruno Haible  <bruno@clisp.org>
12876
12877         * modules/version-etc (Depends-on): Add stdarg.
12878
12879 2006-07-25  Bruno Haible  <bruno@clisp.org>
12880
12881         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
12882         complex commands.
12883
12884 2006-07-25  Bruno Haible  <bruno@clisp.org>
12885
12886         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
12887         defined in <stdarg.h> or config.h.
12888
12889 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12890
12891         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
12892         (gl_STDIO_SAFER): Remove.
12893
12894 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12895
12896         * MODULES.html.sh (File stream based Input/Output):
12897         Add fopen-safer, tmpfile-safer; remove stdio-safer.
12898         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
12899         * modules/fopen-safer, modules/tmpfile-safer: New files.
12900         * modules/stdio-safer: Remove.
12901
12902 2006-07-24  Bruno Haible  <bruno@clisp.org>
12903
12904         * modules/tmpdir: New file.
12905         * MODULES.html.sh (File system functions): Add it.
12906
12907 2006-07-24  Bruno Haible  <bruno@clisp.org>
12908
12909         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
12910         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
12911
12912 2006-07-24  Bruno Haible  <bruno@clisp.org>
12913
12914         * modules/clean-temp: New file.
12915
12916 2006-07-24  Bruno Haible  <bruno@clisp.org>
12917
12918         * m4/tmpdir.m4: New file, from GNU gettext.
12919
12920 2006-07-24  Bruno Haible  <bruno@clisp.org>
12921
12922         * lib/tmpdir.h: New file, from GNU gettext.
12923         * lib/tmpdir.c: New file, from GNU gettext.
12924
12925 2006-07-24  Bruno Haible  <bruno@clisp.org>
12926
12927         * lib/clean-temp.h: New file, from GNU gettext.
12928         * lib/clean-temp.c: New file, from GNU gettext.
12929
12930 2006-07-23  Eric Blake  <ebb9@byu.net>
12931
12932         * modules/stdio-safer (Files): Add tmpfile-safer.c.
12933         (Depends-on): Add binary-io.
12934
12935 2006-07-23  Eric Blake  <ebb9@byu.net>
12936
12937         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
12938
12939 2006-07-23  Eric Blake  <ebb9@byu.net>
12940
12941         * lib/tmpfile-safer.c: New file.
12942         * lib/stdio-safer.h (fopen_safer): Add prototype.
12943         * lib/stdio--.h (tmpfile): Make safer.
12944
12945 2006-07-23  Bruno Haible  <bruno@clisp.org>
12946
12947         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
12948         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
12949         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
12950         gl_linked_remove_at): Use it.
12951
12952 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12953         and Simon Josefsson <jas@extundo.com>
12954
12955         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
12956
12957         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
12958
12959 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12960
12961         * modules/close-stream: New file.
12962         * modules/closeout (Description): Make it clear that it exits
12963         with a diagnostic on error.
12964         (Depends-on): Add close-stream.  Remove fpending, stdbool.
12965         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
12966
12967 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12968
12969         * m4/close-stream.m4: New file.
12970
12971 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12972
12973         * lib/close-stream.c, lib/close-stream.h: New files.
12974
12975 2006-07-22  Bruno Haible  <bruno@clisp.org>
12976
12977         Merge from GNU gettext 0.15.
12978
12979         2006-05-01  Bruno Haible  <bruno@clisp.org>
12980
12981                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
12982
12983         2006-07-22  Bruno Haible  <bruno@clisp.org>
12984
12985                 * modules/javaversion: New file.
12986                 * MODULES.html.sh (Java): Add javaversion.
12987
12988         2006-03-12  Bruno Haible  <bruno@clisp.org>
12989
12990                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
12991
12992         2005-12-04  Bruno Haible  <bruno@clisp.org>
12993
12994                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
12995                 (untested).
12996
12997         2006-06-21  Bruno Haible  <bruno@clisp.org>
12998
12999                 Avoid warnings from recent versions of mcs.
13000                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
13001                 -o, -L, -r any more. Use options documented since mcs-1.0
13002                 instead. Similarly for -g.
13003
13004         2005-12-04  Bruno Haible  <bruno@clisp.org>
13005
13006                 * build-aux/csharpcomp.sh.in: Suffix for resources is
13007                 .resources, not .resource.
13008
13009         2005-07-09  Bruno Haible  <bruno@clisp.org>
13010
13011                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
13012                 add a .dll suffix.
13013                 Reported by Mark Junker <mjscod@gmx.de>.
13014
13015         2006-07-22  Bruno Haible  <bruno@clisp.org>
13016
13017                 * modules/gettext: Upgrade to gettext-0.15.
13018                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
13019                 m4/visibility.m4.
13020                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
13021
13022 2006-07-22  Bruno Haible  <bruno@clisp.org>
13023
13024         Merge from GNU gettext 0.15.
13025
13026         2006-03-25  Bruno Haible  <bruno@clisp.org>
13027
13028                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
13029
13030         2006-07-21  Bruno Haible  <bruno@clisp.org>
13031
13032                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
13033                 "1.1".
13034
13035         2006-05-09  Bruno Haible  <bruno@clisp.org>
13036
13037                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
13038                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
13039                 for the conftestver execution.
13040
13041         2006-05-01  Bruno Haible  <bruno@clisp.org>
13042
13043                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
13044                 optional target-version argument. Verify that the compiler
13045                 groks source of the specified source-version, or add -source
13046                 option as necessary. Verify that the compiler produces
13047                 bytecode in the specified target-version, or add -target and
13048                 -source options as necessary. Make the result of the test
13049                 available as variable CONF_JAVAC. Also log error output in
13050                 config.log.
13051
13052         2006-03-11  Bruno Haible  <bruno@clisp.org>
13053
13054                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
13055
13056         2006-05-09  Bruno Haible  <bruno@clisp.org>
13057
13058                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
13059                 CLASSPATH_SEPARATOR to a semicolon.
13060
13061         2006-03-12  Bruno Haible  <bruno@clisp.org>
13062
13063                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
13064                 available as variable CONF_JAVA, for subsequent autoconf
13065                 tests. Also log error output in config.log.
13066
13067         2006-07-19  Bruno Haible  <bruno@clisp.org>
13068
13069                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
13070                 that getline works on glibc2 systems. Needed to avoid trouble
13071                 in relocatable.c.
13072                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
13073
13074         2005-12-04  Bruno Haible  <bruno@clisp.org>
13075
13076                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
13077                 launcher (untested).
13078
13079         2005-12-04  Bruno Haible  <bruno@clisp.org>
13080
13081                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
13082
13083         2006-07-22  Bruno Haible  <bruno@clisp.org>
13084
13085                 * gettext.m4: Update from GNU gettext-0.15.
13086                 * nls.m4: Likewise.
13087                 * po.m4: Likewise.
13088                 * inttypes-pri.m4: Likewise.
13089                 * inttypes-h.m4: Renamed from inttypes.m4.
13090                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
13091
13092 2006-07-22  Bruno Haible  <bruno@clisp.org>
13093
13094         Merge from GNU gettext 0.15.
13095
13096         2005-07-05  Bruno Haible  <bruno@clisp.org>
13097
13098                 * printf-args.c (printf_fetchargs): Work around broken
13099                 definition of wint_t on mingw.
13100
13101         2005-02-12  Bruno Haible  <bruno@clisp.org>
13102
13103                 * xallocsa.h: Add extern "C" for C++.
13104
13105         2006-05-17  Bruno Haible  <bruno@clisp.org>
13106
13107                 Cygwin portability.
13108                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
13109
13110         2006-04-30  Bruno Haible  <bruno@clisp.org>
13111
13112                 * progreloc.c: Include <mach-o/dyld.h> if available.
13113                 (find_executable): Use _NSGetExecutablePath when possible.
13114
13115         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
13116
13117                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
13118                 function.
13119
13120         2005-12-29  Bruno Haible  <bruno@clisp.org>
13121
13122                 * progreloc.c (set_program_name_and_installdir): Fix
13123                 compilation error.
13124
13125         2005-12-04  Bruno Haible  <bruno@clisp.org>
13126
13127                 Cygwin portability.
13128                 * progreloc.c: Include <windows.h> also on Cygwin.
13129                 (find_executable): Add support for Cygwin.
13130                 (set_program_name_and_installdir): Handle also platforms with
13131                 nonempty EXEEXT.
13132
13133         2006-07-11  Bruno Haible  <bruno@clisp.org>
13134
13135                 * javacomp.c: Fix a comment.
13136                 Reported by Jim Meyering.
13137
13138         2006-04-30  Bruno Haible  <bruno@clisp.org>
13139
13140                 * javacomp.h (compile_java_class): Add source_version,
13141                 target_version arguments.
13142                 * javacomp.c: Rewritten to choose only a compiler that
13143                 respects the specified source_version and target_version.
13144
13145         2006-06-27  Bruno Haible  <bruno@clisp.org>
13146
13147                 Assume correct S_ISDIR macro.
13148                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
13149
13150         2006-07-22  Bruno Haible  <bruno@clisp.org>
13151
13152                 * javaversion.h: New file, from GNU gettext.
13153                 * javaversion.c: New file, from GNU gettext.
13154                 * javaversion.java: New file, from GNU gettext.
13155                 * javaversion.class: New file, from GNU gettext.
13156
13157         2006-05-17  Bruno Haible  <bruno@clisp.org>
13158
13159                 Cygwin portability.
13160                 * javaexec.c (execute_java_class): Test for jview program
13161                 also on Cygwin.
13162
13163         2006-04-09  Bruno Haible  <bruno@clisp.org>
13164
13165                 * fatal-signal.c: Don't include string.h.
13166                 (at_fatal_signal): Use a copying loop instead of memcpy.
13167
13168         2005-12-04  Bruno Haible  <bruno@clisp.org>
13169
13170                 * csharpexec.c: Add support for 'clix' launcher (untested).
13171                 (execute_csharp_using_sscli): New function.
13172                 (execute_csharp_program): Call it.
13173
13174         2006-06-21  Bruno Haible  <bruno@clisp.org>
13175
13176                 Avoid warnings from recent versions of mcs.
13177                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
13178                 -o, -L, -r any more. Use options documented since mcs-1.0
13179                 instead. Similarly for -g.
13180
13181         2005-07-09  Bruno Haible  <bruno@clisp.org>
13182
13183                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
13184                 add a .dll suffix.
13185                 Reported by Mark Junker <mjscod@gmx.de>.
13186
13187         2006-06-17  Bruno Haible  <bruno@clisp.org>
13188
13189                 * config.charset: Update for NetBSD 3.0.
13190
13191         2006-05-17  Bruno Haible  <bruno@clisp.org>
13192
13193                 Cygwin portability.
13194                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
13195
13196         2006-05-16  Bruno Haible  <bruno@clisp.org>
13197
13198                 * localcharset.c [CYGWIN]: Include <windows.h>.
13199                 (get_charset_aliases): For Cygwin, return the same CPxxx
13200                 aliases list as under WIN32.
13201                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
13202                 the environment variables. Fall back to GetACP().
13203
13204         2006-04-05  Bruno Haible  <bruno@clisp.org>
13205
13206                 * config.charset: Update Juan Manuel Guerrero's address.
13207
13208         2005-02-12  Bruno Haible  <bruno@clisp.org>
13209
13210                 * allocsa.h: Add extern "C" for C++.
13211
13212         2005-02-10  Bruno Haible  <bruno@clisp.org>
13213
13214                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
13215                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
13216
13217         2006-07-22  Bruno Haible  <bruno@clisp.org>
13218
13219                 * gettext.h: Update to GNU gettext-0.15.
13220
13221 2006-07-22  Bruno Haible  <bruno@clisp.org>
13222
13223         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
13224         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
13225         lib-prefix.m4, longdouble.m4, ssize_t.m4.
13226
13227 2006-07-21  Eric Blake  <ebb9@byu.net>
13228
13229         * modules/stdlib-safer: New file.
13230         * MODULES.html.sh (File stream based Input/Output): Add
13231         stdlib-safer.
13232
13233 2006-07-21  Eric Blake  <ebb9@byu.net>
13234
13235         * lib/stdlib-safer.h: New file from coreutils, required by
13236         stdlib--.h.
13237
13238 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
13239
13240         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
13241
13242 2006-07-20  Bruno Haible  <bruno@clisp.org>
13243
13244         * gnulib-tool: Recognize new option --assume-autoconf.
13245         (autoconf_minversion): New variable.
13246         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
13247
13248 2006-07-20  Bruno Haible  <bruno@clisp.org>
13249
13250         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
13251
13252 2006-07-19  Derek R. Price  <derek@ximbiot.com>
13253
13254         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
13255         Reindent and repaginate.
13256
13257 2006-07-19  Derek Price  <derek@ximbiot.com>
13258
13259         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
13260         Correct grammar.
13261
13262 2006-07-17  Bruno Haible  <bruno@clisp.org>
13263
13264         * modules/list: New file.
13265         * modules/array-list: New file.
13266         * modules/carray-list, modules/carray-list-tests: New files.
13267         * modules/linked-list, modules/linked-list-tests: New files.
13268         * modules/avltree-list, modules/avltree-list-tests: New files.
13269         * modules/rbtree-list, modules/rbtree-list-tests: New files.
13270         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
13271         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
13272         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
13273         * modules/oset: New file.
13274         * modules/array-oset: New file.
13275         * modules/avltree-oset, modules/avltree-oset-tests: New files.
13276         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
13277         * tests/test-carray_list.c: New file.
13278         * tests/test-linked_list.c: New file.
13279         * tests/test-avltree_list.c: New file.
13280         * tests/test-rbtree_list.c: New file.
13281         * tests/test-linkedhash_list.c: New file.
13282         * tests/test-avltreehash_list.c: New file.
13283         * tests/test-rbtreehash_list.c: New file.
13284         * tests/test-avltree_oset.c: New file.
13285         * tests/test-rbtree_oset.c: New file.
13286         * MODULES.html.sh (Container data structures): New section.
13287
13288 2006-07-17  Bruno Haible  <bruno@clisp.org>
13289
13290         * m4/gl_list.m4: New file.
13291
13292 2006-07-17  Bruno Haible  <bruno@clisp.org>
13293
13294         * lib/gl_list.h: New file.
13295         * lib/gl_list.c: New file.
13296         * lib/gl_array_list.h: New file.
13297         * lib/gl_array_list.c: New file.
13298         * lib/gl_carray_list.h: New file.
13299         * lib/gl_carray_list.c: New file.
13300         * lib/gl_linked_list.h: New file.
13301         * lib/gl_linked_list.c: New file.
13302         * lib/gl_anylinked_list1.h: New file.
13303         * lib/gl_anylinked_list2.h: New file.
13304         * lib/gl_avltree_list.h: New file.
13305         * lib/gl_avltree_list.c: New file.
13306         * lib/gl_anyavltree_list1.h: New file.
13307         * lib/gl_anyavltree_list2.h: New file.
13308         * lib/gl_rbtree_list.h: New file.
13309         * lib/gl_rbtree_list.c: New file.
13310         * lib/gl_anyrbtree_list1.h: New file.
13311         * lib/gl_anyrbtree_list2.h: New file.
13312         * lib/gl_anytree_list1.h: New file.
13313         * lib/gl_anytree_list2.h: New file.
13314         * lib/gl_linkedhash_list.h: New file.
13315         * lib/gl_linkedhash_list.c: New file.
13316         * lib/gl_anyhash_list1.h: New file.
13317         * lib/gl_anyhash_list2.h: New file.
13318         * lib/gl_avltreehash_list.h: New file.
13319         * lib/gl_avltreehash_list.c: New file.
13320         * lib/gl_rbtreehash_list.h: New file.
13321         * lib/gl_rbtreehash_list.c: New file.
13322         * lib/gl_anytreehash_list1.h: New file.
13323         * lib/gl_anytreehash_list2.h: New file.
13324
13325         * lib/gl_oset.h: New file.
13326         * lib/gl_oset.c: New file.
13327         * lib/gl_array_oset.h: New file.
13328         * lib/gl_array_oset.c: New file.
13329         * lib/gl_avltree_oset.h: New file.
13330         * lib/gl_avltree_oset.c: New file.
13331         * lib/gl_rbtree_oset.h: New file.
13332         * lib/gl_rbtree_oset.c: New file.
13333         * lib/gl_anytree_oset.h: New file.
13334
13335 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13336
13337         * m4/mkancesdirs.m4: New file.
13338         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
13339         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
13340         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
13341         it.
13342
13343 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13344
13345         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
13346         * lib/mkancesdirs.h: New files.
13347         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
13348         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
13349         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
13350         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
13351         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
13352         callers changed.  Revamp internals significantly, by not
13353         attempting to create directories that are temporarily more
13354         permissive than the final results.  Do not attempt to use
13355         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
13356         This removes some race conditions, fixes some bugs, and simplifies
13357         things.  Use new dirchownmod function to do owner and mode changes.
13358         * lib/mkdir-p.h: Likewise.
13359         * lib/modechange.c (octal_to_mode): New function.
13360         (struct mode_change): New member mentioned.
13361         (make_node_op_equals): New arg mentioned.  All callers changed.
13362         (mode_compile): Keep track of which mode bits the user has explicitly
13363         mentioned.
13364         (mode_adjust): New arg DIR, so that we implement the X op correctly.
13365         New arg PMODE_BITS, to keep track of which mode bits the user
13366         mentioned; it treats S_ISUID and S_ISGID speciall.
13367         All callers changed.
13368         * lib/modechange.h: Likewise.
13369
13370 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13371
13372         * MODULES.html.sh: Add mkancestors.
13373         * modules/mkancesdirs: New module.
13374         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
13375         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
13376         The chdir-safer and afs files are now orphans; I'll remove them
13377         unless someone speaks up.
13378         Add lib/dirchownmod.c, lib/dirchownmod.h.
13379         (Depends-on): Remove alloca, chown, save-cwd, dirname.
13380         Add lchown, mkancesdirs.
13381         (Maintainer): Add self.
13382
13383 2006-07-15  Karl Berry  <karl@gnu.org>
13384
13385         * gnulib-tool: help message wording/arrangement.
13386
13387 2006-07-14  Simon Josefsson  <jas@extundo.com>
13388
13389         * doc/gnulib.texi (Libtool and Windows): New section.
13390
13391 2006-07-12  Simon Josefsson  <jas@extundo.com>
13392
13393         * modules/gendocs (License): Fix license, approved by Karl.
13394
13395 2006-07-12  Eric Blake  <ebb9@byu.net>
13396
13397         * MODULES.html.sh: Add gendocs.
13398
13399 2006-07-11  Eric Blake  <ebb9@byu.net>
13400
13401         * modules/fdl: New module, to install doc/fdl.texi.
13402         * MODULES.html.sh: Add new section for documentation modules.
13403         * gnulib-tool: Avoid space-tab.
13404         (--doc-base): New option, to manage files from doc.
13405
13406 2006-07-11  Eric Blake  <ebb9@byu.net>
13407
13408         * m4/absolute-header.m4: Fix comments to match recent change.
13409
13410 2006-07-11  Eric Blake  <ebb9@byu.net>
13411
13412         * gnulib-tool: List --doc-base before --tests-base.
13413
13414 2006-07-11  Derek R. Price  <derek@ximbiot.com>
13415
13416         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
13417
13418 2006-07-11  Bruno Haible  <bruno@clisp.org>
13419
13420         * README: Mention where to put documentation.
13421
13422 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13423
13424         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
13425
13426 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13427
13428         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
13429         to stdint.m4.
13430
13431 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13432
13433         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
13434         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
13435         "no/such/file/stdint.h" when there is no such file, so that
13436         the resulting C code can be parsed by dodgy compilers.
13437         Problems reported by Bob Proulx.
13438
13439 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13440
13441         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
13442         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13443         macros into the GNU _D_EXACT_NAMLEN.
13444         * lib/savedir.c:  Likewise.
13445         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
13446
13447 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13448         and Paul Eggert  <eggert@cs.ucla.edu>
13449
13450         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
13451         * m4/savedir.m4:
13452         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13453         macros into the GNU _D_EXACT_NAMLEN.
13454
13455 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13456
13457         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
13458         around the absolute name, to work around a problem with the HP-UX
13459         11.23 native C compiler, reported by Bob Proulx.
13460
13461 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13462
13463         * doc/maintain.texi, make-stds.texi: Sync from
13464         <http://savannah.gnu.org/projects/gnustandards>.
13465
13466 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13467
13468         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
13469
13470 2006-07-09  Jim Meyering  <jim@meyering.net>
13471
13472         * m4/glob.m4: Remove a doubled word in a comment.
13473
13474 2006-07-09  Jim Meyering  <jim@meyering.net>
13475
13476         * lib/argp-pv.c: Remove a doubled word in a comment.
13477         * lib/check-version.c (check_version): Likewise.
13478         * lib/javacomp.c (compile_java_class): Likewise.
13479
13480 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13481
13482         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
13483         for the benefit of people using Autoconf 2.60.  If you want to
13484         support older Autoconf versions you can copy m4/onceonly_2_57.m4
13485         (or m4/onceonly.m4, if pre-2.57) manually.
13486
13487 2006-07-08  Jim Meyering  <jim@meyering.net>
13488
13489         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
13490         comment.
13491         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
13492         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
13493         comment.
13494
13495 2006-07-08  Jim Meyering  <jim@meyering.net>
13496
13497         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
13498
13499 2006-07-07  Simon Josefsson  <jas@extundo.com>
13500
13501         * tests/test-crc.c: Change expected crc value, the test vector
13502         were probably computed using the old broken crc.c?
13503
13504 2006-07-06  Simon Josefsson  <jas@extundo.com>
13505
13506         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
13507         now the canonical place for the M4 file).
13508
13509         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
13510         from the sys_socket dependency now.
13511
13512         * modules/inet_pton (Files): Ditto.
13513
13514         * modules/inet_ntop (Files): Ditto.
13515
13516 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13517
13518         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
13519         not gl_PREREQ_GETUSERSHELL.
13520
13521 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13522
13523         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
13524         with only one argument, for Autoconf 2.60.
13525         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
13526         expand to nothing, so add a shell command to avoid syntax error.
13527         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
13528
13529 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13530
13531         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
13532
13533 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13534
13535         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
13536         no longer needed.  Check for isblank decl.
13537         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
13538         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
13539         of existence.
13540
13541 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13542
13543         * lib/getloadavg.c: Use __VMS, not VMS.
13544         * lib/getopt.c: Likewise.
13545         * lib/getpagesize.h: Likewise.
13546         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
13547         and probably does not work.
13548
13549 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13550
13551         * lib/.cppi-disable: Add wcwidth.
13552         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
13553         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
13554         (ISGRAPH): Remove.  All uses changed to isgraph.
13555         (FOLD) [!defined _LIBC]: Remove special case.
13556         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
13557         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
13558         HAVE_ISBLANK.
13559         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
13560         case.
13561
13562 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
13563
13564         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
13565         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
13566         brackets.  Other minor changes to suppress some compiler
13567         warnings.
13568
13569 2006-07-06  Derek R. Price  <derek@ximbiot.com>
13570         and Paul Eggert  <eggert@cs.ucla.edu>
13571
13572         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
13573         of invoking obsolescent AC_HEADER_DIRENT macro.
13574         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
13575         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
13576         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
13577         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
13578         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
13579         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13580         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
13581         * m4/readdir.m4: Remove; no longer needed.
13582
13583 2006-07-06  Derek R. Price  <derek@ximbiot.com>
13584         and Paul Eggert  <eggert@cs.ucla.edu>
13585
13586         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
13587         Don't worry about this obsolete case any more.
13588         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
13589         directories.
13590         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
13591         worry about this obsolete case any more.
13592         * lib/fts.c: Likewise.
13593         * lib/getcwd.c: Likewise.
13594         * lib/glob.h: Likewise.
13595         * lib/savedir.c: Likewise.
13596
13597 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13598
13599         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
13600         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
13601         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
13602         needed.
13603         All uses removed.
13604         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13605         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
13606         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
13607         needed.
13608         * m4/getdate.m4 (gl_GETDATE): Likewise.
13609         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
13610         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
13611         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
13612         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13613         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
13614         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
13615         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
13616         needed.
13617
13618 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13619
13620         * lib/memcasecmp.c: Include <limits.h>.
13621         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
13622         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
13623         Don't assume isdigit succeeds only on '0' through '9'.
13624
13625 2006-07-05  Eric Blake  <ebb9@byu.net>
13626
13627         * modules/getaddrinfo (Depends-on): Add snprintf.
13628
13629 2006-07-05  Eric Blake  <ebb9@byu.net>
13630
13631         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
13632         to avoid 'header present but could not be compiled' on cygwin.
13633
13634 2006-07-05  Eric Blake  <ebb9@byu.net>
13635
13636         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
13637         missing from netdb.h.
13638         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
13639
13640 2006-07-05  Derek R. Price  <derek@ximbiot.com>
13641
13642         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
13643         no longer needed.
13644         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
13645         * m4/getdate.m4 (gl_GETDATE): Likewise.
13646         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
13647         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
13648         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
13649         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13650         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
13651
13652 2006-07-05  Derek R. Price  <derek@ximbiot.com>
13653
13654         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
13655         All uses of is_space replaced by isspace.
13656         * lib/exit.h: Don't talk about STDC_HEADERS.
13657         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
13658         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
13659         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
13660         replaced by isprint etc.
13661         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
13662         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13663         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
13664         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
13665         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
13666         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13667
13668 2006-07-05  Bruno Haible  <bruno@clisp.org>
13669
13670         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
13671         the function exists, before testing against AIX.
13672         Reported by Martin Lambers <marlam@marlam.de>.
13673
13674 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13675
13676         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
13677         From Mark D. Baushke.
13678
13679 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13680
13681         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
13682         to the absolute name, not just one, to bypass Sun C 5.8's
13683         "warning: #include of /usr/include/... may be non-portable".
13684
13685 2006-07-04  Eric Blake  <ebb9@byu.net>
13686
13687         * modules/dirname-tests: New test module.
13688         * tests/test-dirname.c: New file, replacing dirname.c
13689         TEST_DIRNAME section that was recently deleted.
13690
13691 2006-07-04  Bruno Haible  <bruno@clisp.org>
13692
13693         Assume ANSI C header files and <ctype.h> functions.
13694         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
13695         (mbsnwidth): Use isprint, iscntrl instead.
13696
13697 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13698
13699         Merge from coreutils.
13700         * MODULES.html.sh: Add xstrtold.
13701         * modules/xstrtold: New file.
13702         * modules/cycle-check (Files): Add lib/same-inode.h.
13703         * modules/dirname (Files): Add m4/double-slash-root.m4.
13704         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
13705         * modules/mkdir-p (Files): Add lib/same-inode.h.
13706         * modules/same (Files): Add lib/same-inode.h.
13707
13708 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13709
13710         * m4/absolute-header.m4: Renamed from full-header-path.m4.
13711         This is to keep the terminology clean; POSIX talks about
13712         "absolute pathnames", not "full pathnames", but the GNU
13713         Coding Standards say to use "path" for something else;
13714         so use "absolute" to keep both sides happy.
13715         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
13716         Set gl_absolute_header, not gl_full_header_path.
13717         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
13718         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
13719         All uses changed.
13720
13721         Merge from coreutils.
13722
13723         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13724
13725         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
13726         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
13727         want to require the building of c-strtod.o.
13728         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
13729         needs -lm directly.
13730         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
13731
13732         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13733
13734         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
13735         --as-needed option if available.  Problem reported by Albert Chin in
13736         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
13737         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
13738         cc merely issues a bunch of annoying warnings for --as-needed
13739         (this problem was reported by Bob Proulx).  Also, try linking with
13740         -lm to detect a bug in binutils 2.16 (this problem was reported
13741         by Ralf Wildenhues).
13742
13743         2006-06-18  Jim Meyering  <jim@meyering.net>
13744
13745         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
13746         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
13747         macro.
13748         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
13749         also check for glibc-2.4's abort-inducing bug.
13750
13751         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
13752         Low-probability clean-up should be to use rmdir to get rid of
13753         the just-created directory, not unlink.
13754
13755         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
13756         configure fail, and request a bug report to inform us about it.
13757         Add a comment that, barring reports to the contrary, in 2007 we'll
13758         assume ftruncate is universally available.
13759
13760         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13761
13762         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
13763
13764         2006-03-12  Jim Meyering  <jim@meyering.net>
13765
13766         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
13767         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
13768         * m4/same.m4 (gl_SAME): Likewise.
13769         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
13770
13771         2006-03-11  Eric Blake  <ebb9@byu.net>
13772
13773         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
13774         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
13775         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
13776         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
13777
13778 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13779
13780         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
13781         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
13782         reported by Mark D. Baushke, one in
13783         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
13784
13785         Merge from coreutils.
13786
13787         * lib/.cppi-disable: Add stdint_.h.
13788         * lib/.cvsignore: Add stdint.h.
13789
13790         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13791
13792         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
13793         both double and long double versions.
13794         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
13795         * lib/xstrtold.c: New file.
13796         * lib/xstrtod.h (xstrtold): New decl.
13797
13798         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13799
13800         * lib/filemode.c (setst): Remove.
13801         (strmode): Rewrite to avoid setst.  This makes the code shorter,
13802         (arguably) clearer, and the generated code is a bit smaller on my
13803         Debian GNU/Linux stable x86 host.
13804
13805         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13806
13807         * lib/filemode.c: Include "filemode.h" first, to test the interface.
13808         Assume that filemode.h includes sys/types.h and sys/stat.h.
13809         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
13810         (ftypelet): Reorder to put common cases first, for efficiency.
13811         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
13812         to do 'M'.
13813         (strmode): Renamed from mode_string, and now stores 12 bytes instead
13814         of 10, for compatibility with FreeBSD.  All callers changed.
13815         (filemodestring): Now stores 12 bytes instead of 10, and sets file
13816         types that can't be deduced solely from st_mode.  First arg is now a
13817         const pointer.
13818         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
13819         (strmode): Renamed from mode_string.
13820         (filemodestring): New decl.
13821         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
13822         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
13823         needed.
13824         (S_ISPORT, S_ISWHT): New macros, if not already defined.
13825
13826         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13827
13828         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
13829         fsusage.h now does that.  Include fsusage.h first, to test interface.
13830         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
13831         at most one method (the old code could have generated decls that
13832         didn't conform to C89, not that this was ever exercised).
13833         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
13834
13835         2006-03-19  Jim Meyering  <jim@meyering.net>
13836
13837         Work even in a chroot where d_ino values for entries in "/"
13838         don't match the stat.st_ino values for the same names.
13839         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
13840         number, iterate through all entries again, using lstat instead.
13841         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
13842         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
13843
13844         * lib/getcwd.c (__getcwd): Clarify a comment.
13845         Use memcpy in place of a call to strcpy.
13846
13847         2006-03-12  Jim Meyering  <jim@meyering.net>
13848
13849         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
13850         matches that of the current directory (which we're about to chdir ".."
13851         out of), then save the dev-ino of the parent, instead.
13852
13853         * lib/same-inode.h (SAME_INODE): New file/macro.
13854         * lib/chdir-safer.c (SAME_INODE): Remove definition.
13855         Include "same-inode.h", instead.
13856         * lib/same.c: Likewise.
13857         * lib/cycle-check.h: Include "same-inode.h".
13858         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
13859         * lib/cycle-check.c (SAME_INODE): Remove definition.
13860         * lib/root-dev-ino.h: Include "same-inode.h".
13861
13862         2006-03-11  Eric Blake  <ebb9@byu.net>
13863
13864         * lib/same.c (same_name): s/base_name/last_component/
13865         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
13866         * lib/filenamecat.c (file_name_concat): Likewise.
13867
13868         2006-03-11  Eric Blake  <ebb9@byu.net>,
13869                     Paul Eggert  <eggert@cs.ucla.edu>
13870
13871         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
13872         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
13873         drive prefix.
13874         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
13875         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
13876         (last_component): New method.
13877         * lib/dirname.c (dir_len): Determine when drive letters need a
13878         subsequent slash.  Preserve // when it is special.
13879         (dir_name): Don't append dot when drive letter is absolute.
13880         [TEST_DIRNAME]: Move into a full-blown gnulib test.
13881         * lib/basename.c (base_name): New semantics - malloc the result.
13882         Preserve // when it is special.  Preserve relative files that look
13883         like drive letters.
13884         (base_len): Preserve // when it is special.
13885         (last_component): New method, similar to old base_name semantics.
13886         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
13887         base_name.  Strip redundant slashes from ///.
13888
13889 2006-07-03  Jim Meyering  <jim@meyering.net>
13890
13891         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
13892         macro is used before the first cycle_check call.
13893
13894 2006-07-03  Eric Blake  <ebb9@byu.net>
13895
13896         * modules/dirname (Depends-on): Add xstrndup.
13897
13898 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13899
13900         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
13901         test cases, so that config.log is a bit easier to follow.
13902
13903 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13904
13905         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
13906         both are 64 bits, since this seems to be the tradition, and this
13907         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
13908         we ever run into a host that prefers long long to long in this
13909         case, we'll need another configure-time test.  Problem reported by
13910         Jim Meyering.
13911
13912 2006-07-02  Eric Blake  <ebb9@byu.net>
13913
13914         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
13915
13916 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13917
13918         * modules/inttypes (Depends-on): No longer depends on stdint.
13919         * modules/stdint (Description): Say more about assumptions.
13920         Say that the fast types might differ.  Say macros are used.
13921         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
13922         (Makefile.am): Revise list of substituted symbols to match
13923         new stdint.m4.
13924         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
13925         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
13926         * tests/test-stdint.c (verify_same_types)
13927         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
13928         the code conforms to C99/C89.
13929         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
13930         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
13931
13932 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13933
13934         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
13935         but fix a bug, by requiring at least 64 bits.
13936         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
13937         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
13938         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
13939         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
13940
13941         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
13942         changes.  Make 2.59 a prerequisite.  Check and substitute for
13943         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
13944         inttypes.h.  Do not use special include files; just use the
13945         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
13946         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
13947         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
13948         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
13949         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
13950         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
13951         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
13952         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
13953         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
13954         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
13955         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
13956         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
13957         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
13958         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
13959         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
13960         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
13961         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
13962         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
13963         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
13964         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
13965         WINT_MAX.  Check for C99 conformance more strictly, by detecting
13966         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
13967         not check for things that C99 does not require, e.g., int8_t.  If
13968         a test isn't needed unless <stdint.h> isn't working, and is
13969         unlikely to be needed for any other reason, then don't do it
13970         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
13971         size_t, since we assume C89 freestanding at least.  Do not check
13972         for sig_atomic_t, wchar_t, or wint_t, since the code now does
13973         the right thing even if the types are not defined.  Instead use:
13974         (gl_STDINT_TYPE_PROPERTIES): New macro.
13975         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
13976         testing whether <sys/types.h> clashes, as Autoconf does this for
13977         us now.  All uses removed.
13978         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
13979         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
13980         (gl_CHECK_TYPE_SAME):
13981         Remove; no longer needed.
13982         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
13983         exists, since we'll return 0 anyway in that case.
13984         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
13985
13986 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13987
13988         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
13989         possible collision with system files.
13990         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
13991         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
13992         WCHAR_MIN and WCHAR_MAX in this case.
13993         (<stddef.h>): Do not include; no longer needed.
13994         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
13995         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
13996         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
13997         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
13998         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
13999         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
14000         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
14001         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
14002         !defined(__c99))]: Include in this case too, since it's harmless
14003         now.
14004         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
14005         dangerous to do so.
14006         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
14007         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
14008         (_STDINT_MIN, _STDINT_MAX): New macros.
14009         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
14010         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
14011         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
14012         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
14013         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
14014         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
14015         macros, not typedefs; this simplifies things quite a bit.
14016         Use long int for all types narrower than int64_t.
14017         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
14018         Define in terms of long long int or int64_t or long int,
14019         not int64_t or int32_t.  This saves some compile-time testing.
14020         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
14021         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
14022         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
14023         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
14024         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
14025         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
14026         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
14027         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
14028         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
14029         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
14030         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14031         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14032         undef any previous version and define our own version, for
14033         simplicity and consistency with the new macros for types.
14034         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14035         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14036         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
14037         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
14038         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
14039         @WINT_T_SUFFIX@ to keep things simple here.
14040         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
14041         Simplify by assuming typical 8/16/32/64 host, since we're
14042         already doing that elsewhere anyway.
14043         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
14044         and assume long long int is 64 bits if available.  This
14045         speeds up 'configure'.
14046
14047 2006-07-01  Eric Blake  <ebb9@byu.net>
14048
14049         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
14050         Reported by Andreas Buening.
14051
14052 2006-07-01  Eric Blake  <ebb9@byu.net>
14053
14054         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
14055
14056 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14057
14058         * lib/getaddrinfo.c: fixed typo
14059
14060 2006-06-29  Jim Meyering  <jim@meyering.net>
14061
14062         * modules/strftime (Maintainer): Add my name, since with the
14063         FPRINTFTIME changes strftime.c has forked from glibc.
14064
14065 2006-06-29  Eric Blake  <ebb9@byu.net>
14066
14067         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
14068
14069 2006-06-29  Eric Blake  <ebb9@byu.net>
14070
14071         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
14072
14073 2006-06-29  Eric Blake  <ebb9@byu.net>
14074
14075         * lib/stat_.h: New file.
14076
14077 2006-06-29  Eric Blake  <ebb9@byu.net>
14078
14079         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
14080         unused static function.
14081
14082 2006-06-29  Eric Blake  <ebb9@byu.net>
14083
14084         * doc/functions.texi (Function Portability): Document missing lstat
14085         on mingw.
14086
14087 2006-06-29  Eric Blake  <ebb9@byu.net>
14088
14089         * MODULES.html.sh: Add sys_stat.
14090         * modules/sys_stat: New module.
14091         * modules/mkstemp (Depends-on): Add sys_stat.
14092
14093 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14094
14095         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
14096
14097 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14098
14099         * m4/c-bs-a.m4: Removed.
14100
14101 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14102
14103         * lib/strftime.c: Assume strftime() exists.
14104
14105 2006-06-29  Derek Price  <derek@ximbiot.com>
14106
14107         * modules/c-bs-a: Removed - \a is C89.
14108         * MODULES.html.sh: Remove c-bs-a.
14109
14110 2006-06-29  Bruno Haible  <bruno@clisp.org>
14111
14112         * modules/wcwidth (License): Change to LGPL.
14113
14114 2006-06-28  Simon Josefsson  <jas@extundo.com>
14115
14116         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
14117         on _WIN32.
14118
14119         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
14120         getnameinfo.
14121
14122 2006-06-28  Simon Josefsson  <jas@extundo.com>
14123
14124         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
14125
14126 2006-06-28  Simon Josefsson  <jas@extundo.com>
14127
14128         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
14129         functions there.  It will succeed on Windows XP, but on Windows
14130         2000 and (presumably) earlier, it will fail, and use the internal
14131         re-implementation.
14132         (use_win32_p): New function.
14133         (getaddrinfo): Use strtoul on servname, to support numeric ports.
14134         Support AI_NUMERICSERV to disable getservbyname.
14135         (getnameinfo): New function, only supports
14136         NI_NUMERICHOST|NI_NUMERICSERV for now.
14137
14138         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
14139         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
14140         getnameinfo.
14141
14142 2006-06-28  Eric Blake  <ebb9@byu.net>
14143
14144         * modules/wcwidth: New file.
14145         * modules/mbchar (Depends-on): Add wcwidth.
14146         * modules/mbswidth (Depends-on): Add wcwidth.
14147         * MODULES.html.sh: Add wcwidth.
14148
14149 2006-06-28  Eric Blake  <ebb9@byu.net>
14150
14151         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
14152         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
14153
14154 2006-06-28  Eric Blake  <ebb9@byu.net>
14155
14156         * lib/xvasprintf.h: Fix comments.
14157
14158 2006-06-28  Eric Blake  <ebb9@byu.net>
14159
14160         * lib/mbchar.h (wcwidth): Include wcwidth.h.
14161         * lib/mbswidth.c (wcwidth): Move from here...
14162         * lib/wcwidth.h: ...to this new file.
14163
14164 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14165
14166         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
14167
14168         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
14169         it's obsolete.
14170         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
14171
14172 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14173
14174         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
14175         Autoconf 2.60 says this stuff was obsolete.
14176
14177 2006-06-28  Bruno Haible  <bruno@clisp.org>
14178
14179         * modules/wcwidth (Files): Add m4/wchar_t.m4.
14180
14181 2006-06-28  Bruno Haible  <bruno@clisp.org>
14182
14183         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
14184         gt_TYPE_WCHAR_T.
14185
14186 2006-06-28  Bruno Haible  <bruno@clisp.org>
14187
14188         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
14189         declaration for wcwidth.
14190         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
14191
14192 2006-06-28  Bruno Haible  <bruno@clisp.org>
14193
14194         * lib/mkdtemp.c [MINGW]: Include <io.h>.
14195         (mkdir): Define using _mkdir.
14196
14197 2006-06-28  Bruno Haible  <bruno@clisp.org>
14198
14199         * lib/getaddrinfo.h: Fix POSIX URL.
14200         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
14201         _WIN32.
14202         (use_win32_p): Make static.
14203         (getaddrinfo): Reject service name if it is empty or does not consist
14204         solely of decimal digits, or if its value is > 65535.
14205         (getnameinfo): Remove useless casts.
14206
14207 2006-06-27  Simon Josefsson  <jas@extundo.com>
14208
14209         * modules/sys_select: New file, suggested by Bruno Haible, Paul
14210         Eggert and Martin Lambers.
14211
14212 2006-06-27  Simon Josefsson  <jas@extundo.com>
14213
14214         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
14215         Eggert and Martin Lambers.
14216
14217 2006-06-27  Bruno Haible  <bruno@clisp.org>
14218
14219         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
14220         result to 0, not to empty.
14221         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
14222
14223 2006-06-27  Bruno Haible  <bruno@clisp.org>
14224
14225         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
14226
14227 2006-06-26  Simon Josefsson  <jas@extundo.com>
14228
14229         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
14230         present.
14231
14232 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
14233
14234         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
14235         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
14236         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
14237
14238 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
14239
14240         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
14241
14242 2006-06-26  Bruno Haible  <bruno@clisp.org>
14243
14244         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
14245
14246 2006-06-26  Bruno Haible  <bruno@clisp.org>
14247
14248         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
14249
14250 2006-06-26  Bruno Haible  <bruno@clisp.org>
14251
14252         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
14253         SGI C compiler in pre-C99 mode.
14254         Suggested by Mark D. Baushke and Larry Jones.
14255
14256 2006-06-26  Bruno Haible  <bruno@clisp.org>
14257
14258         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
14259         WCHAR_MAX.
14260         Reported by Mark D. Baushke and Larry Jones.
14261
14262 2006-06-26  Bruno Haible  <bruno@clisp.org>
14263
14264         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
14265         in pre-C99 mode.
14266         Suggested by Mark D. Baushke and Larry Jones.
14267
14268 2006-06-23  Simon Josefsson  <jas@extundo.com>
14269             Bruno Haible  <bruno@clisp.org>
14270
14271         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
14272         Emit mostlyclean-local rule.
14273         (func_emit_tests_Makefile_am): Likewise.
14274         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
14275
14276 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
14277
14278         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
14279
14280 2006-06-23  Bruno Haible  <bruno@clisp.org>
14281
14282         * tests/test-stdint.c: Update to match ISO C 99 Technical
14283         Corrigendum 1.
14284
14285 2006-06-23  Bruno Haible  <bruno@clisp.org>
14286
14287         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
14288
14289 2006-06-23  Bruno Haible  <bruno@clisp.org>
14290
14291         * lib/stdint_.h: Treat IRIX like OpenBSD.
14292
14293 2006-06-23  Bruno Haible  <bruno@clisp.org>
14294
14295         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
14296         ISO C 99 Technical Corrigendum 1.
14297
14298 2006-06-22  Simon Josefsson  <jas@extundo.com>
14299
14300         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
14301         MinGW.
14302
14303 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14304
14305         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
14306         needed.  Some compiler complained about some of them.  Problem reported
14307         by Larry Jones in
14308         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
14309
14310 2006-06-21  Simon Josefsson  <jas@extundo.com>
14311
14312         * tests/test-getaddrinfo.c: New file.
14313
14314         * modules/getaddrinfo-tests: New file.
14315
14316         * MODULES.html.sh: Add inet_pton.
14317
14318         * modules/inet_pton: New file.
14319
14320 2006-06-21  Simon Josefsson  <jas@extundo.com>
14321
14322         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
14323         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
14324         of using the (limited) gnulib implementation on Windows XP.
14325
14326         * m4/inet_pton.m4: New file.
14327
14328 2006-06-21  Simon Josefsson  <jas@extundo.com>
14329
14330         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
14331         variable.
14332
14333         * lib/socket_.h: Don't define WINVER.
14334
14335         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
14336         slightly modified to work in gnulib.
14337
14338 2006-06-21  Simon Josefsson  <jas@extundo.com>
14339
14340         * doc/gnulib.texi (Windows sockets): Add.
14341
14342 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
14343
14344         * lib/read-file.c (fread_file): Start with buffer allocation of
14345         0 bytes rather than 1 byte; this simplifies the code.
14346         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
14347         code to free buffer and save/restore errno.
14348         (internal_read_file): Remove unused local.
14349
14350 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
14351
14352         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
14353         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
14354         Problem reported by Denis Excoffier in
14355         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
14356
14357 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14358
14359         * modules/sys_socket, modules/socklen: Include sys/types since
14360         FreeBSD 4.x's sys/socket.h needs it.
14361
14362 2006-06-19  Simon Josefsson  <jas@extundo.com>
14363
14364         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
14365
14366 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14367
14368         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
14369
14370 2006-06-19  Bruno Haible  <bruno@clisp.org>
14371
14372         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
14373         and FULL_PATH_INTTYPES_H in angle brackets.
14374         Reported by Mark D. Baushke <mdb@gnu.org>.
14375
14376 2006-06-17  Eric Blake  <ebb9@byu.net>
14377
14378         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
14379         errno.
14380
14381 2006-06-17  Bruno Haible  <bruno@clisp.org>
14382
14383         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
14384         <sys/inttypes.h>.
14385
14386 2006-06-17  Bruno Haible  <bruno@clisp.org>
14387
14388         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
14389         whether errno is declared. Assume <errno.h> declares errno.
14390
14391 2006-06-17  Bruno Haible  <bruno@clisp.org>
14392
14393         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
14394
14395 2006-06-17  Bruno Haible  <bruno@clisp.org>
14396
14397         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
14398         problem on Solaris 2.5.1.
14399
14400 2006-06-16  Eric Blake  <ebb9@byu.net>
14401
14402         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
14403         * lib/unicodeio.c [!defined errno]: Likewise.
14404         * lib/strtol.c [!defined errno]: Likewise.
14405         * lib/strtod.c [!defined errno]: Likewise.
14406
14407 2006-06-15  Eric Blake  <ebb9@byu.net>
14408
14409         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
14410
14411 2006-06-15  Eric Blake  <ebb9@byu.net>
14412
14413         * config/srclist.txt (ssize_t.m4): Lose sync.
14414
14415 2006-06-15  Bruno Haible  <bruno@clisp.org>
14416
14417         * modules/stdint (Files): Include m4/full-header-path.m4,
14418         m4/size_max.m4, m4/wchar_t.m4.
14419         (Makefile.am): Many more substitutions.
14420         * modules/stdint-tests: New file.
14421         * tests/test-stdint.c: New file.
14422
14423 2006-06-15  Bruno Haible  <bruno@clisp.org>
14424
14425         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
14426         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
14427         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
14428         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
14429         gl_CHECK_TYPE_SAME): New macros.
14430
14431 2006-06-15  Bruno Haible  <bruno@clisp.org>
14432
14433         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
14434
14435 2006-06-15  Bruno Haible  <bruno@clisp.org>
14436
14437         * lib/stdint_.h: Rewritten to be fully auto-configured.
14438         Fixes bug on HP-UX/IA64.
14439
14440 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
14441
14442         * lib/getdate.y (__attribute__): Don't define if already defined.
14443         Problem reported by Larry Jones.
14444         * lib/utimens.c (__attribute__): Likewise.
14445
14446 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
14447
14448         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
14449         reported by Andreas Schwab.
14450
14451 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14452             Bruno Haible  <bruno@clisp.org>
14453
14454         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
14455         check for the declaration of strnlen and a run test that exposes the
14456         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
14457         rpl_strndup.
14458
14459 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14460             Bruno Haible  <bruno@clisp.org>
14461
14462         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
14463
14464 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14465
14466         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
14467         compile test, for Tru64 4.0D.
14468
14469 2006-05-28  Karl Berry  <karl@gnu.org>
14470
14471         * config/srclist.txt (printf-args.c): lose sync.
14472
14473 2006-05-26  Martin Lambers  <marlam@marlam.de>
14474
14475         * lib/getpass.c: Updates the test for the native W32 API, and adds
14476         missing includes, thus fixing compilation warnings.
14477
14478 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14479
14480         * lib/exclude.c (exclude_fnmatch): New function.
14481         (excluded_file_name): Call exclude_fnmatch.
14482         * lib/exclude.h (excluded_file_name): New prototype
14483
14484 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
14485
14486         * lib/tempname.c (small_open, large_open): New macros.
14487         (__open, __open64) [!_LIBC]: Remove.
14488         (__gen_tempname): Use small_open and large_open instead of __open
14489         and __open64.  This fixes a portability bug on HP-UX 11.11i
14490         reported by Simon Wing-Tang in
14491         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
14492
14493 2006-05-24  Bruno Haible  <bruno@clisp.org>
14494
14495         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
14496         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
14497         Reported by Thorsten Maerz <torte@netztorte.de> via
14498         Aaron Stone <aaron@serendipity.cx>.
14499
14500 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14501
14502         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
14503         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
14504         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
14505         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
14506         not really conditional on the cache.
14507         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
14508
14509 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14510
14511         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
14512         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
14513         (my_usleep): Don't mishandle maximum value.
14514
14515 2006-05-19  Jim Meyering  <jim@meyering.net>
14516
14517         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
14518
14519 2006-05-17  Bruno Haible  <bruno@clisp.org>
14520
14521         Cygwin portability.
14522         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
14523
14524 2006-05-17  Bruno Haible  <bruno@clisp.org>
14525
14526         * lib/stdint_.h: Fix recognition of Cygwin.
14527
14528 2006-05-15  Bruno Haible  <bruno@clisp.org>
14529
14530         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
14531         on libtool patch by Ralf Wildenhues.
14532
14533 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14534
14535         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
14536         test for C99 conformance; (bool) 0.5 is an integer constant
14537         expression, but (bool) -0.5 is not.  Problem reported by Fedor
14538         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
14539
14540 2006-05-11  Simon Josefsson  <jas@extundo.com>
14541
14542         * m4/xvasprintf.m4: Fix obvious typo.
14543
14544 2006-05-11  Jim Meyering  <jim@meyering.net>
14545
14546         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
14547         James Lemley.
14548
14549 2006-05-10  Simon Josefsson  <jas@extundo.com>
14550
14551         * lib/md4.c: Typo fix, update copyright years.
14552         (K1, K2): Don't use L because it turn computations into 64-bit on
14553         64-bit platforms.
14554
14555 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
14556
14557         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
14558         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
14559         unwanted sign propagation, e.g., on hosts with 64-bit int.
14560         There still are some problems with reeelly weird theoretical hosts
14561         (e.g., 33-bit int) but it's not worth worrying about now.
14562         * lib/sha1.c (rol): Likewise.
14563         (K1, K2, K3, K4): Remove unnecessary L suffix.
14564
14565 2006-05-10  Bruno Haible  <bruno@clisp.org>
14566
14567         * lib/des.c: Cast to avoid warnings.
14568
14569 2006-05-09  Bruno Haible  <bruno@clisp.org>
14570
14571         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
14572         (Depends-on): Depend also on xsize, stdarg.
14573         (configure.ac): Add gl_XVASPRINTF.
14574
14575 2006-05-09  Bruno Haible  <bruno@clisp.org>
14576
14577         * m4/xvasprintf.m4: New file.
14578
14579 2006-05-09  Bruno Haible  <bruno@clisp.org>
14580
14581         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
14582         (EOVERFLOW): Define fallback value.
14583         (xstrcat): New function.
14584         (xvasprintf): Recognize the special case of a string concatenation.
14585
14586 2006-05-08  Eric Blake  <ebb9@byu.net>
14587
14588         * gnulib-tool (func_version): Base copyright year on CVS date.
14589         (func_emit_copyright_notice): New function.
14590         (func_emit_lib_Makefile_am): Use it.
14591         (func_emit_tests_Makefile_am): Likewise.
14592         (func_import): Likewise.
14593
14594 2006-05-08  Bruno Haible  <bruno@clisp.org>
14595
14596         * modules/stdarg: New file.
14597         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
14598
14599 2006-05-08  Bruno Haible  <bruno@clisp.org>
14600
14601         * m4/stdarg.m4: New file, from GNU gettext.
14602
14603 2006-05-08  Bruno Haible  <bruno@clisp.org>
14604
14605         * config/srclist.txt (build-aux/config.rpath): different from latest
14606         release.
14607
14608 2006-05-08  Bruno Haible  <bruno@clisp.org>
14609
14610         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
14611
14612 2006-05-05  Jim Meyering  <jim@meyering.net>
14613
14614         * m4/warning.m4: New file, derived from bison's file by the same name.
14615
14616 2006-05-03  Bruno Haible  <bruno@clisp.org>
14617
14618         * lib/stdint_.h: Shorter URL.
14619         * lib/inttypes.h: Likewise.
14620
14621 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14622
14623         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
14624
14625 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14626
14627         * lib/verify.h: Document the internals better.  Most of this change
14628         was written by Bruno Haible.
14629
14630 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14631
14632         * doc/verify.texi: New file, partly based on a proposal by
14633         Bruno Haible.
14634
14635 2006-05-02  Bruno Haible  <bruno@clisp.org>
14636
14637         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
14638         test from here...
14639         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
14640
14641 2006-04-29  Bruno Haible  <bruno@clisp.org>
14642
14643         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
14644         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
14645
14646 2006-04-29  Bruno Haible  <bruno@clisp.org>
14647
14648         * gnulib-tool: Make --update option actually work.
14649
14650 2006-04-29  Bruno Haible  <bruno@clisp.org>
14651
14652         * doc/gcd.texi: New file.
14653         * doc/gnulib.texi: Include it.
14654
14655 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
14656
14657         * lib/getdate.y (get_date): When adding relative date, start with the
14658         initial time, not with the result of the first mktime call.
14659
14660 2006-04-25  Bruno Haible  <bruno@clisp.org>
14661
14662         * gnulib-tool (func_import): Output the include directives in three
14663         blocks, sorted separately.
14664         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14665
14666 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14667
14668         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
14669         to define main with arguments, for C++.  Reported by Eric Blake.
14670         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
14671         Prefer 'int main ()' to 'int main (void)', for C++.
14672         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
14673         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
14674         for 'main', for C99 and C++.
14675
14676 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14677
14678         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
14679         Don't assume that exit status -1 is valid.
14680         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14681         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
14682         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
14683         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
14684         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
14685         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
14686         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
14687         functions can be used without declaring them, or that you can
14688         exit with status -1.
14689         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
14690
14691 2006-04-24  Karl Berry  <karl@gnu.org>
14692
14693         * config/srclist.txt (longdouble.m4): sync lost.
14694
14695 2006-04-24  Eric Blake  <ebb9@byu.net>
14696
14697         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
14698
14699 2006-04-24  Bruno Haible  <bruno@clisp.org>
14700
14701         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
14702         poll() implementation in AIX.
14703         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14704
14705 2006-04-24  Bruno Haible  <bruno@clisp.org>
14706
14707         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
14708         assigned exactly once.
14709
14710 2006-04-23  Claudio Fontana  <claudio@gnu.org>
14711             Bruno Haible  <bruno@clisp.org>
14712
14713         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
14714         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
14715         for AM_CPPFLAGS.
14716
14717 2006-04-23  Bruno Haible  <bruno@clisp.org>
14718
14719         * modules/copy-file: Depend on unistd.
14720         * modules/execute: Likewise.
14721         * modules/fatal-signal: Likewise.
14722         * modules/findprog: Likewise.
14723         * modules/mkdtemp : Likewise.
14724         * modules/pipe: Likewise.
14725         * modules/wait-process: Likewise.
14726
14727 2006-04-23  Bruno Haible  <bruno@clisp.org>
14728
14729         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
14730         condition was already detected.
14731         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14732
14733 2006-04-23  Bruno Haible  <bruno@clisp.org>
14734
14735         * lib/copy-file.c: Include <unistd.h> unconditionally.
14736         * lib/execute.c: Likewise.
14737         * lib/fatal-signal.c: Likewise.
14738         * lib/findprog.c: Likewise.
14739         * lib/mkdtemp.c: Likewise.
14740         * lib/pipe.h: Likewise.
14741         * lib/pipe.c: Likewise.
14742         * lib/wait-process.h: Likewise.
14743
14744 2006-04-23  Bruno Haible  <bruno@clisp.org>
14745
14746         * gnulib-tool (func_usage): Fix --import description. Document
14747         --update.
14748         (func_import): Create temporary file in a temporary directory, if
14749         --dry-run is specified. Silence errors from 'grep' when there are no
14750         m4 files in $m4dir.
14751         (func_create_testdir): Silence errors from 'grep' when there are no
14752         m4 files in $m4dir.
14753         Reported by Karl Berry <karl@freefriends.org>.
14754
14755 2006-04-20  Bruno Haible  <bruno@clisp.org>
14756
14757         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
14758         one argument, so that the code will be portable to Autoconf 2.60.
14759         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
14760         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
14761         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
14762
14763 2006-04-19  Derek Price  <derek@ximbiot.com>
14764             Eric Blake  <ebb9@byu.net>
14765
14766         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
14767         rather than "/full/path.h".  Update comment to match.  Shorten &
14768         generalize m4_translit call via AS_TR_CPP.
14769
14770 2006-04-19  Derek Price  <derek@ximbiot.com>
14771             Eric Blake  <ebb9@byu.net>
14772
14773         * lib/inttypes.h: Correct grammar in comment.
14774
14775 2006-04-18  Derek Price  <derek@ximbiot.com>
14776             Paul Eggert  <eggert@cs.ucla.edu>
14777
14778         * modules/inttypes: New file.
14779         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
14780
14781 2006-04-18  Derek Price  <derek@ximbiot.com>
14782             Paul Eggert  <eggert@cs.ucla.edu>
14783
14784         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
14785         New files.
14786
14787 2006-04-18  Derek Price  <derek@ximbiot.com>
14788             Paul Eggert  <eggert@cs.ucla.edu>
14789
14790         * lib/inttypes.h: New file.
14791         * lib/strtoimax.c: Assume <inttypes.h>.
14792
14793 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
14794
14795         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
14796         isn't mounted.  Problem reported by Kir Kolyshkin.
14797
14798 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14799
14800         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
14801         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
14802         Derek R. Price.
14803         * lib/regex.h (RE_DUP_MAX): Update comment to match current
14804         implementation.
14805
14806 2006-04-12  Eric Blake  <ebb9@byu.net>
14807
14808         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
14809         is now done automatically by the corresponding Autoconf macro.
14810
14811 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
14812
14813         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
14814         time_r.h.
14815
14816 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14817
14818         Merge regex changes from libc, removing some of our
14819         POSIX-conformance changes that were rejected and redoing them in a
14820         less-intrusive way.
14821
14822         * lib/regcomp.c (re_compile_internal, init_dfa):
14823         Length arg is now size_t, not Idx.  All uses changed.
14824         (peek_token): Forward decl now says internal_function.
14825         (__re_error_msgid, __re_error_msgid_idx):
14826         Now static rather than extern with attribute_hidden.
14827         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
14828         For some reason libc prefers K&R style defns for external functions.
14829         (regerror) [!defined _LIBC]: Likewise.
14830         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
14831         (seek_collating_symbol_entry, lookup_collation_sequence_value):
14832         (build_range_exp, build_collating_symbol):
14833         Use K&R-style defn.
14834         (re_compile_fastmap): Use '\0' to memset, not 0.
14835         (utf8_sb_map): Make the calculations more obvious.
14836         (init_dfa, parse_bracket_exp, build_charclass_op):
14837         Call calloc and cast result, as glibc does.
14838         (init_word_char, fetch_token, peek_token, peek_token_bracket):
14839         (build_range_exp, build_collating_symbol):
14840         Now internal functions.
14841
14842         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
14843
14844         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
14845         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
14846         Don't depend on VMS; depend on __VMS instead, for POSIX
14847         namespace cleanness.
14848         (regoff_t): Define to ssize_t, not long int.
14849
14850         Remove the REG_ macros named below.  Instead, make the old names
14851         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
14852         __USE_GNU_REGEX.
14853         (REG_BACKSLASH_ESCAPE_IN_LISTS):
14854         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
14855         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
14856         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
14857         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
14858         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
14859         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
14860         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
14861         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
14862         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
14863         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
14864         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
14865         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
14866         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
14867         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
14868         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
14869         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
14870         (REG_NREGS):
14871         Remove.  All uses replaced by the old RE_* names.
14872         (RE_BACKSLASH_ESCAPE_IN_LISTS):
14873         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
14874         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
14875         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
14876         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
14877         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
14878         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
14879         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
14880         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
14881         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
14882         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
14883         Don't bother having these macros be independent of each others'
14884         values, since they no longer exist in the POSIX name space.
14885
14886         Rename the following member names back to their old names,
14887         unless !__USE_GNU_REGEX.  All uses changed back.
14888         (buffer): Renamed from re_buffer.
14889         (allocated): Renamed from re_allocated.
14890         (used): Renamed from re_used.
14891         (syntax): Renamed from re_syntax.
14892         (fastmap): Renamed from re_fastmap.
14893         (translate): Renamed from re_translate.
14894         (can_be_null): Renamed from re_can_be_null.
14895         (regs_allocated): Renamed from re_regs_allocated.
14896         (fastmap_accurate): Renamed from re_fastmap_accurate.
14897         (no_sub): Renamed from re_no_sub.
14898         (not_bol): Renamed from re_not_bol.
14899         (not_eol): Renamed from re_not_eol.
14900         (newline_anchor): Renamed from re_newline_anchor.
14901         (num_regs): Renamed from rm_num_regs.
14902         (start): Renamed from rm_start.
14903         (end): Renamed from rm_end.
14904
14905         (free_state): Move up a bit.
14906
14907         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
14908         #define to be empty.
14909         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
14910         when that is what is intended.
14911         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
14912         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
14913         (MAX): New macro.
14914         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
14915         All uses changed back to re_malloc, etc.  It's now the caller's
14916         responsibility to check for overflow; all callers changed.
14917         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
14918         (re_x2nrealloc): Remove.
14919         (free_state): Remove decl.
14920
14921         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
14922         (re_set_registers, re_exec):
14923         Use K&R-style defn.
14924
14925         2006-01-31  Roland McGrath  <roland@redhat.com>
14926
14927         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
14928         Reported by Mike Frysinger <vapier@gentoo.org>.
14929
14930         2006-01-15  Andreas Jaeger  <aj@suse.de>
14931
14932         [BZ #1950]
14933         * lib/regex_internal.c (re_string_reconstruct): Adjust for
14934         build_wcs_upper_buffer change.
14935         (build_wcs_upper_buffer): Change return type.
14936
14937         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
14938
14939         * lib/regex_internal.h: Include <stdint.h> if available.
14940
14941         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
14942
14943         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
14944
14945         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
14946
14947         * lib/regcomp.c: Adjust for changed secondary hash function.
14948
14949         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
14950
14951         * lib/regex.h: Pretty printing.
14952         Clean up namespace a bit.
14953
14954         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
14955
14956         * lib/regexec.c (update_cur_sifted_state, check_arrival,
14957         check_arrival_add_next_nodes): Avoid using uninitialized variable.
14958
14959         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14960                     Ulrich Drepper  <drepper@redhat.com>
14961
14962         [BZ #1302]
14963         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
14964         changed.
14965         (bitset_word_t): Renamed from bitset_word.  All uses changed.
14966
14967         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
14968
14969         [BZ #281]
14970         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
14971         * lib/regcomp.c: Remove unnecessary uses of
14972         unsigned RE_TRANSLATE_TYPE.
14973         * lib/regex_internal.h: Likewise.
14974         * lib/regex_internal.c: Likewise.
14975         * lib/regexec.c: Likewise.
14976         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
14977
14978         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
14979
14980         * lib/regexec.c (find_recover_state): Remove unnecessary
14981         initialization.
14982         (transit_state_bkref): Make DFA a const pointer.
14983         (get_subexp): Likewise.
14984         (check_arrival): Likewise.
14985         (update_cur_sifted_state): Likewise.
14986         (re_search_internal): Likewise.
14987         (prune_impossible_nodes): Likewise.
14988         (acquire_init_state_context): Likewise.
14989         (proceed_next_node): Likewise.
14990         (set_regs): Likewise.
14991         (free_fail_stack_return): Likewise.
14992         (check_arrival_expand_ecl): Mark DFA parameter as const.
14993         (check_arrival_expand_ecl_sub): Likewise.
14994         (check_subexp_limits): Likewise.
14995         (sub_epsilon_src_nodes):  Likewise.
14996         (add_epsilon_src_nodes):  Likewise.
14997         (merge_state_array): Likewise.
14998         (update_regs): Likewise.
14999         (build_trtable): Likewise.
15000         (sift_states_backward): Mark MCTX parameter as const.
15001         (build_sifted_states): Likewise.
15002         (update_cur_sifted_state): Likewise.
15003         (sift_states_mkref): Likewise.
15004         (check_arrival_expand_ecl): Mark eclosure as const.
15005         (check_dst_limits_calc_pos_1): Likewise.
15006         * lib/regex_internal.h (re_match_context_t): Make dfa a const
15007         pointer.
15008
15009         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
15010
15011         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
15012         (transit_state_sb): Likewise.
15013         (transit_state_mb): Likewise.
15014         (sift_states_iter_mb): Likewise.
15015         (check_arrival_add_next_nodes): Likewise.
15016         (check_node_accept_bytes): Change first parameter to pointer-to-const.
15017         [_LIBC] (re_search_2_stub): Use mempcpy.
15018
15019         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
15020         mbrtowc for very simple UTF-8 case.
15021
15022         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
15023         a pointer-to-const.
15024         (re_acquire_state_context): Likewise.
15025         * lib/regex_internal.h: Adjust prototypes.
15026
15027         * lib/regex.c: Prevent using C++ compilers.
15028
15029         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
15030         (re_acquire_state_context): Likewise.
15031
15032 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15033
15034         * modules/regex (Depends-on): Add ssize_t.
15035
15036 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15037
15038         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
15039         translation table.
15040
15041 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15042
15043         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
15044
15045 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
15046             Bruno Haible  <bruno@clisp.org>
15047
15048         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
15049         <sys/types.h> and <inttypes.h>.
15050
15051 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15052
15053         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
15054         `__error_t_defined', so argp.h will not typedef the former.
15055
15056 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
15057
15058         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
15059         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
15060         glibc names.  Even if glibc is changed to conform to POSIX, the
15061         traditional names will be available anyway, since regex depends on
15062         the extensions module.  Also, fix a longstanding typo in the
15063         implementation of Spencer ERE test #75 from grep 2.3.  Problems
15064         reported by Emanuele Giaquinta.  Also, change sense of cached
15065         variable, so that the message makes sense.
15066
15067 2006-03-24  Simon Josefsson  <jas@extundo.com>
15068
15069         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
15070         including some doc fixes.
15071         (base64_encode_alloc): Fix +1 bug on allocation failures.
15072
15073 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15074
15075         * lib/base64.c (base64_encode): Do not read past end of array with
15076         unsanitized input on systems with CHAR_BIT > 8.
15077
15078 2006-03-24  Eric Blake  <ebb9@byu.net>
15079
15080         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
15081
15082 2006-03-22  Karl Berry  <karl@gnu.org>
15083
15084         * config/srclist.txt (*setenv.[ch]): get from coreutils.
15085         * config/srclistvars.sh (COREUTILS): new var.
15086
15087 2006-03-17  Jim Meyering  <jim@meyering.net>
15088
15089         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
15090         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
15091
15092 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15093
15094         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
15095         no longer needs it.  Instead, check that regoff_t is as least
15096         as wide as ptrdiff_t.
15097
15098         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
15099         so that our regex.h stays compatible with the installed regex.
15100         This is helpful for installers who configure --without-included-regex.
15101         Problem reported by Emanuele Giaquinta.
15102
15103 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15104
15105         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
15106         Typedef to long int, not to off_, as POSIX will likely change
15107         in that direction.
15108
15109 2006-03-15  Eric Blake  <ebb9@byu.net>
15110
15111         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
15112
15113 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15114
15115         * lib/argp-help.c (validate_uparams): Fix typo
15116         * lib/argp-parse.c (argp_default_options): Consistently begin help
15117         messages with a lowercase letter.
15118
15119 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
15120
15121         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
15122         overrun buffers and shouldn't be used (much as gets shouldn't be
15123         used).
15124         * lib/time_r.c (asctime_r, ctime_r): Likewise.
15125
15126 2006-03-08  Simon Josefsson  <jas@extundo.com>
15127
15128         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
15129         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15130
15131 2006-03-08  Simon Josefsson  <jas@extundo.com>
15132
15133         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
15134         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15135
15136 2006-03-08  Simon Josefsson  <jas@extundo.com>
15137
15138         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
15139         signal that configure disabled the device.
15140
15141 2006-03-08  Simon Josefsson  <jas@extundo.com>
15142
15143         * build-aux/maint.mk: Fix refresh-po, to handle no translated
15144         languages.
15145
15146 2006-03-07  Simon Josefsson  <jas@extundo.com>
15147
15148         * modules/getopt (Depends-on): Add unistd.
15149
15150         * modules/unistd: New file.
15151
15152 2006-03-07  Simon Josefsson  <jas@extundo.com>
15153
15154         * modules/gc-random: New file.
15155
15156 2006-03-07  Simon Josefsson  <jas@extundo.com>
15157
15158         * m4/unistd_h.m4: New file.
15159
15160 2006-03-07  Simon Josefsson  <jas@extundo.com>
15161
15162         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
15163         test to be side-effect free by storing the result in the cache
15164         variable gl_cv_lib_readline, and moving the assignment of
15165         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
15166         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15167
15168 2006-03-07  Simon Josefsson  <jas@extundo.com>
15169
15170         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
15171         error on missing devices (the functions will return an error).
15172
15173         * m4/gc.m4: Move random stuff to gc-random.m4
15174
15175 2006-03-07  Simon Josefsson  <jas@extundo.com>
15176
15177         * lib/unistd_.h: New file.
15178
15179 2006-03-07  Simon Josefsson  <jas@extundo.com>
15180
15181         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
15182
15183 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15184
15185         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
15186         Problem reported by Juan Manuel Guerrero.
15187
15188 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15189
15190         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
15191         the unistd module.
15192         * lib/getlogin_r.c: Likewise.
15193         * lib/getlogin_r.h: Likewise.
15194         * lib/glob.c: Likewise.
15195         * lib/pagealign_alloc.c: Likewise.
15196         * lib/unistd_.h: Remove; no longer needed.
15197
15198 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15199
15200         * MODULES.html.sh (Support for systems lacking POSIX:2001):
15201         Add unistd.
15202         * modules/c-stack (Depends-on): Add unistd.
15203         * modules/getlogin_r: Likewise.
15204         * modules/glob: Likewise.
15205         * modules/pagealign_alloc: Likewise.
15206         * modules/unistd (Files): Remove lib/unistd_.h.
15207         (EXTRA_DIST): Remove.
15208         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
15209         need unistd_.h.
15210         (MOSTLYCLEANFILES): Remove unistd.h-t.
15211
15212 2006-03-03  Simon Josefsson  <jas@extundo.com>
15213
15214         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
15215
15216 2006-03-03  Simon Josefsson  <jas@extundo.com>
15217
15218         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
15219         libidn and bison.
15220
15221 2006-03-03  Simon Josefsson  <jas@extundo.com>
15222
15223         * build-aux/maint.mk: Add indent target.
15224
15225 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
15226
15227         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
15228         our replacement poll.h in any case, to avoid a differing
15229         declaration from a system header.  Seen on AIX.
15230
15231 2006-03-01  Simon Josefsson  <jas@extundo.com>
15232
15233         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
15234         <kasal@ucw.cz>.
15235
15236 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15237
15238         * modules/gettime (Depends-on): Add extensions module.
15239         * modules/nanosleep (Depends-on): Likewise.
15240         * modules/settime (Depends-on): Likewise.
15241
15242 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15243
15244         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
15245         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
15246         pedantically.
15247         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15248         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
15249
15250         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
15251         not "==".  Reported by Ralf Wildenhues.
15252
15253 2006-03-01  Karl Berry  <karl@gnu.org>
15254
15255         * doc/Copyright/request-*: new files, synced from gnuorg.
15256
15257 2006-03-01  Karl Berry  <karl@gnu.org>
15258
15259         * config/srclist.txt (Copyright/*): new entries.
15260
15261 2006-02-28  Simon Josefsson  <jas@extundo.com>
15262
15263         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
15264
15265 2006-02-27  Simon Josefsson  <jas@extundo.com>
15266
15267         * lib/base64.h: Indent #define's.  From Jim Meyering
15268         <jim@meyering.net>.
15269
15270 2006-02-27  Jim Meyering  <jim@meyering.net>
15271
15272         Revert the change of 2006-02-24, so these files can continue
15273         to be sync'd from gettext.
15274         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
15275         of `config.h'.
15276
15277 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15278
15279         * modules/intprops: New file.
15280         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
15281         Add intprops.
15282         * modules/getloadavg (Files): Remove lib/intprops.h.
15283         (Depends-on): Add intprops.
15284         * modules/human: Likewise.
15285         * modules/inttostr: Likewise.
15286         * modules/openat: Likewise.
15287         * modules/sig2str: Likewise.
15288         * modules/userspec: Likewise.
15289         * modules/utimecmp: Likewise.
15290         * modules/xnanosleep: Likewise.
15291         * modules/xstrtol: Likewise.
15292
15293 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
15294
15295         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
15296         * modules/lock-tests (TESTS): Use $(EXEEXT).
15297         * modules/tls-tests: Likewise.
15298         * modules/argp-tests: Likewise.
15299         (check_PROGRAMS): New var, replacing...
15300         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
15301
15302 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15303
15304         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
15305         `config.h'.
15306
15307 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
15308
15309         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
15310
15311 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15312
15313         Sync from coreutils.
15314         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
15315         gl_CHDIR_SAFER.
15316
15317 2006-02-22  Jim Meyering  <jim@meyering.net>
15318
15319         Sync from coreutils.
15320         * m4/chdir-safer.m4: New file.
15321
15322 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
15323
15324         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
15325         AT_FDCWD exceeds INT_MAX.
15326         * lib/openat.h (AT_FDCWD): Likewise.
15327
15328 2006-02-17  Eric Blake  <address@hidden>
15329
15330         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
15331
15332 2006-02-16  Simon Josefsson  <jas@extundo.com>
15333
15334         * modules/getaddrinfo (Depends-on): Add sys_socket.
15335
15336 2006-02-15  Simon Josefsson  <jas@extundo.com>
15337
15338         * build-aux/maint.mk: Add dsyntax-check rule.
15339
15340 2006-02-15  Eric Blake  <ebb9@byu.net>
15341
15342         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
15343         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
15344         'present but cannot compile' warnings on cygwin.
15345         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
15346         use ws2tcpip.h if sys/socket.h works.
15347         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
15348         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
15349
15350 2006-02-14  Simon Josefsson  <jas@extundo.com>
15351
15352         * modules/maintainer-makefile (Files): Rename.
15353
15354         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
15355         and (the local) Makefile.cfg to maint-cfg.mk.
15356
15357         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
15358         to the latter.
15359
15360         * modules/maintainer-makefile: New module.
15361
15362         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
15363         severaly stripped to make it possible to build it up from scratch
15364         with reliable tests.
15365
15366         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
15367         fixes to permit overriding the default actions when configure and
15368         makefile are not available.
15369
15370 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
15371
15372         Sync from coreutils.
15373         * modules/lstat (Depends-on): Don't depend on xalloc.
15374         (License): Change from GPL to LGPL, since this is now simply a
15375         replacement for a libc function.
15376
15377 2006-02-14  Jim Meyering  <jim@meyering.net>
15378
15379         Sync from coreutils.
15380
15381         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
15382         failure on deficient systems, and simplify gnulib lgpl dependencies.
15383         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
15384         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
15385
15386         * lib/xalloc-die.c: Remove unused definition of N_.
15387
15388 2006-02-14  Jim Meyering  <jim@meyering.net>
15389
15390         Sync from coreutils.
15391         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
15392         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
15393         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
15394         double-quote uses of that variable, to accommodate the rare case in
15395         which getmntent is available in none of the libraries checked.  This
15396         happens at least on FreeBSD 5.0.
15397
15398 2006-02-13  Simon Josefsson  <jas@extundo.com>
15399
15400         * gnulib-tool (Usage): Fix --import, from
15401         karl@freefriends.org (Karl Berry).
15402
15403 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15404
15405         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
15406
15407 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
15408
15409         * lib/argp-namefrob.h: Restore changes accidentally lost during the
15410         "autoupdate" on 2005-12-12.
15411
15412 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15413
15414         * modules/closeout (Depends-on): Remove atexit.
15415
15416 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15417
15418         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
15419         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
15420
15421 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
15422
15423         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
15424         __EXTENSIONS__ if this causes compilation to fail.  Problem
15425         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
15426         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
15427
15428 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
15429
15430         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
15431         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
15432         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
15433         All uses changed.
15434
15435 2006-01-26  Simon Josefsson  <jas@extundo.com>
15436
15437         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
15438         prototype is visible on mingw32.
15439
15440         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
15441         for mingw32.
15442
15443         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
15444         mingw32).
15445
15446 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
15447
15448         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
15449         attempt to open for write; this always fails, at least on POSIX
15450         hosts.  This reinstates the 2006-01-09 change, which was
15451         inadvertently removed.
15452
15453 2006-01-26  Bruno Haible  <bruno@clisp.org>
15454
15455         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
15456         Reported by Paul Eggert.
15457
15458 2006-01-26  Bruno Haible  <bruno@clisp.org>
15459             Paul Eggert  <eggert@cs.ucla.edu>
15460
15461         * lib/stdbool_.h (_Bool)
15462         [(! (defined __cplusplus || defined __BEOS__)
15463           && !defined __GNUC__
15464           && !(defined __HP_cc || defined __xlc__
15465                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
15466                || defined __sgi))]:
15467         #define to signed char in these cases too; this simplifies
15468         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
15469         etc., separately) and makes it more conservative.
15470
15471 2006-01-25  Simon Josefsson  <jas@extundo.com>
15472
15473         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
15474         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
15475         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
15476
15477 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15478
15479         * lib/argp-namefrob.h: Bugfix. Remove stray #
15480
15481 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
15482
15483         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
15484         so that we test the test.
15485         Check for yet another HP-UX cc bug involving *bool |= bool.
15486
15487 2006-01-25  Karl Berry  <karl@gnu.org>
15488
15489         * config/srclist.txt (vasnprintf.c): sync lost.
15490
15491 2006-01-25  Jim Meyering  <jim@meyering.net>
15492
15493         Sync from the stable (b5) branch of coreutils:
15494
15495         * lib/fts.c (fts_children): Don't let close() clobber errno from
15496         failed fchdir().
15497
15498         * lib/fts.c (fts_stat): When following a symlink-to-directory,
15499         don't necessarily interpret stat-fails+lstat-succeeds as indicating
15500         a dangling symlink.  That can also happen at least for ELOOP.
15501         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
15502         FYI, this bug predates the inclusion of fts.c in coreutils.
15503
15504         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
15505         in their own block, so pre-c99 compilers don't object.
15506
15507         Avoid the double-free (first in fts_read, second in fts_close) that
15508         would occur when an `active' directory is made inaccessible (e.g.,
15509         via chmod a-x) during a traversal.
15510         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15511         before returning.  Reproduce this failure by
15512         mkdir -p a/b; cd a; chmod a-x . b
15513         Reported by Stavros Passas.
15514
15515 2006-01-25  Jim Meyering  <jim@meyering.net>
15516
15517         * lib/fileblocks.c: Remove more useless parentheses.
15518         * lib/readutmp.h: Likewise.
15519
15520 2006-01-25  Bruno Haible  <bruno@clisp.org>
15521
15522         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
15523         warnings.
15524         Reported by Paul Eggert.
15525
15526 2006-01-25  Bruno Haible  <bruno@clisp.org>
15527
15528         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
15529         rid of a trap command. For Solaris sh.
15530         Reported by Mark D. Baushke <mdb@gnu.org>.
15531
15532 2006-01-24  Simon Josefsson  <jas@extundo.com>
15533
15534         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
15535         Bruno.
15536
15537 2006-01-24  Karl Berry  <karl@gnu.org>
15538
15539         * config/srclist.txt (argp-namefrob.h): sync lost.
15540
15541 2006-01-24  Jim Meyering  <jim@meyering.net>
15542
15543         * modules/openat (Files): Add lib/intprops.h.
15544         From Mark D. Baushke.
15545
15546 2006-01-24  Jim Meyering  <jim@meyering.net>
15547
15548         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
15549         Reported by Mark D. Baushke.
15550
15551 2006-01-24  Jim Meyering  <jim@meyering.net>
15552
15553         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
15554
15555 2006-01-24  Bruno Haible  <bruno@clisp.org>
15556
15557         * modules/strnlen (Maintainer): Change from glibc to all.
15558
15559 2006-01-24  Bruno Haible  <bruno@clisp.org>
15560
15561         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
15562         Patch by Paul Eggert.
15563
15564 2006-01-24  Bruno Haible  <bruno@clisp.org>
15565
15566         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
15567         already has it.
15568         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
15569         2005-11-26.
15570
15571         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
15572         'signed char' to avoid problems with the built-in _Bool type.
15573         Reported by Paul Eggert on 2005-11-26.
15574
15575 2006-01-24  Bruno Haible  <bruno@clisp.org>
15576
15577         * gnulib-tool (func_import): Avoid constructing complicated sed
15578         expressions inside backquote.
15579         Report and solution by Mark D. Baushke <mdb@gnu.org>.
15580
15581 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
15582
15583         These changes imported from libc.
15584         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
15585         test and two separate function calls.
15586         * lib/strndup.c (__strndup): Add libc_hidden_def.
15587
15588 2006-01-23  Simon Josefsson  <jas@extundo.com>
15589
15590         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
15591         Remove the test_*_SOURCES variable: automake infers it by default.
15592         * modules/tls-tests: Likewise.
15593
15594 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15595
15596         Work around porting bugs reported by Dieter in
15597         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
15598         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
15599         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
15600         Include "getopt.h" first, to check interface.
15601         (getenv): Declare only if defined HAVE_DECL_GETENV &&
15602         !HAVE_DECL_GETENV.
15603         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
15604         (__strndup): Revert to K&R-style function dfns, the glibc style.
15605         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
15606         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
15607         Include strnlen.h first, to get prototype properly.
15608         (strnlen): Renamed from __strnlen.
15609         Remove weak alias.
15610
15611 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15612
15613         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
15614
15615 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15616
15617         * config/srclist.txt: Adjust to reflect glibc reorganization.
15618         This affects only comments.
15619
15620 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
15621
15622          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
15623          Reported by Bruce Korb <bkorb@gnu.org>.
15624
15625 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
15626
15627         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
15628         to pacify gcc -Wswitch-default.
15629
15630 2006-01-22  Bruno Haible  <bruno@clisp.org>
15631
15632         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
15633         temporary buffer for sprintf, take into account the precision also
15634         for 'd', 'i', 'u', 'o', 'x', 'X'.
15635
15636 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15637
15638         * modules/argp-tests: New module
15639         * tests/test-argp.c: New file
15640         * tests/test-argp-2.sh: New file
15641
15642 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15643
15644         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
15645         (__argp_base_name): Removed
15646         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
15647         typo.
15648         (__argp_base_name): Provide macro definition or extern declaration
15649         depending on the configuration
15650
15651 2006-01-20  Simon Josefsson  <jas@extundo.com>
15652
15653         * modules/inet_ntop (Depends-on): Depend on sys_socket.
15654
15655 2006-01-20  Simon Josefsson  <jas@extundo.com>
15656
15657         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
15658
15659 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15660
15661         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
15662         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
15663         Suggested by Bruno Haible.
15664
15665 2006-01-20  Karl Berry  <karl@gnu.org>
15666
15667         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
15668         until changes propagate, I guess.
15669
15670 2006-01-19  Simon Josefsson  <jas@extundo.com>
15671
15672         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
15673
15674 2006-01-19  Simon Josefsson  <jas@extundo.com>
15675
15676         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
15677
15678 2006-01-19  Simon Josefsson  <jas@extundo.com>
15679
15680         * gnulib-tool: Set check_PROGRAMS.
15681
15682         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15683         modules/des-tests, modules/gc-arcfour-tests,
15684         modules/gc-arctwo-tests, modules/gc-des-tests,
15685         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15686         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15687         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15688         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15689         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15690         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
15691         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
15692         test_*_SOURCES.
15693
15694 2006-01-18  Simon Josefsson  <jas@extundo.com>
15695
15696         * modules/socklen (Depends-on): Depend on sys_socket.
15697
15698 2006-01-18  Simon Josefsson  <jas@extundo.com>
15699
15700         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15701         modules/des-tests, modules/gc-arcfour-tests,
15702         modules/gc-arctwo-tests, modules/gc-des-tests,
15703         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15704         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15705         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15706         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15707         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15708         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
15709         $(EXEEXT) to automake TESTS variable, for mingw32.
15710
15711 2006-01-17  Simon Josefsson  <jas@extundo.com>
15712
15713         * modules/socklen (Include): Need sys/socket.h.
15714
15715 2006-01-17  Bruno Haible  <bruno@clisp.org>
15716
15717         * modules/ssize_t (Include): Add <sys/types.h>.
15718
15719 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
15720
15721         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
15722         it's not portable and it doesn't work with cross-compiles.
15723         Problem reported by Bruno Haible.  Fix missing-$ typo in
15724         'test "gl_cv_ignore_unused_libraries" ...' that prevented
15725         -zignore from being used with Sun's C compiler.
15726
15727 2006-01-12  Simon Josefsson  <jas@extundo.com>
15728
15729         * lib/base64.c: Fix warning, reported by Bruno Haible
15730         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
15731
15732 2006-01-12  Bruno Haible  <bruno@clisp.org>
15733
15734         * modules/ldd: New file.
15735         * build-aux/ldd.sh.in: New file.
15736         * MODULES.html.sh (Support for building libraries and executables): Add
15737         ldd.
15738
15739 2006-01-12  Bruno Haible  <bruno@clisp.org>
15740
15741         * m4/ldd.m4: New file.
15742
15743 2006-01-12  Bruno Haible  <bruno@clisp.org>
15744
15745         * gnulib-tool (func_import, func_create_testdir): Don't go into an
15746         endless loop while replacing $auxdir with build-aux.
15747
15748 2006-01-11  Simon Josefsson  <jas@extundo.com>
15749
15750         * lib/stdint_.h (SIZE_MAX): Add missing (.
15751
15752 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
15753
15754         Sync from coreutils.
15755         * lib/md5.c: Fix commentary typos.
15756         (alignof, UNALIGNED_P): No need for a GCC-specific version.
15757         * lib/md5.h (__attribute__): Remove; unused.
15758         * lib/sha1.c: Fix commentary to match md5 better.
15759         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
15760         so that we don't need to worry about alignment.  All uses changed.
15761         This merges the 2005-10-28 md5 change into sha1.
15762
15763 2006-01-11  Jim Meyering  <jim@meyering.net>
15764
15765         Sync from coreutils.
15766         * lib/md5.c (OP): Fix spacing.
15767
15768 2006-01-11  Bruno Haible  <bruno@clisp.org>
15769
15770         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15771         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
15772         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
15773
15774 2006-01-11  Bruno Haible  <bruno@clisp.org>
15775
15776         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15777         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
15778         the "early" section as well.
15779
15780 2006-01-11  Bruno Haible  <bruno@clisp.org>
15781
15782         Avoid "ar: no archive members specified" error on MacOS X.
15783         * gnulib-tool (func_modules_add_dummy): New function.
15784         (func_import, func_create_testdir): Invoke it.
15785
15786 2006-01-11  Bruno Haible  <bruno@clisp.org>
15787
15788         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
15789         with $auxdir in AC_CONFIG_FILES statements.
15790
15791 2006-01-11  Bruno Haible  <bruno@clisp.org>
15792
15793         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
15794         Initialize also noinst_HEADERS to empty.
15795
15796 2006-01-11  Bruno Haible  <bruno@clisp.org>
15797
15798         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
15799         variables.
15800         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
15801         autoreconf.
15802
15803 2006-01-11  Bruno Haible  <bruno@clisp.org>
15804
15805         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
15806         overridable by the user.
15807         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15808
15809 2006-01-10  Simon Josefsson  <jas@extundo.com>
15810
15811         * modules/sys_socket: New file.
15812
15813 2006-01-10  Simon Josefsson  <jas@extundo.com>
15814
15815         * m4/sys_socket_h.m4: New file.
15816
15817 2006-01-10  Simon Josefsson  <jas@extundo.com>
15818
15819         * lib/socket_.h: New file.
15820
15821 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15822
15823         * modules/readutmp (Maintainer): Add myself.
15824
15825 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15826
15827         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
15828         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
15829         People who are still concerned with buggy memcmp implementations
15830         can invoke gl_FUNC_MEMCMP themselves.
15831
15832 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15833
15834         * lib/regex_internal.h (BITSET_WORD_BITS):
15835         Work around a bug in 64-bit PGC (before version 6.1-2), where the
15836         preprocessor mishandles large unsigned values as if they were signed.
15837         Problem reported by Claudio Fontana in
15838         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
15839
15840 2006-01-10  Jim Meyering  <jim@meyering.net>
15841
15842         Avoid the double-free (first in fts_read, second in fts_close) that
15843         would occur when an `active' directory is made inaccessible (e.g.,
15844         via chmod a-x) during a traversal.
15845         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15846         before returning.  Reproduce this failure by
15847         mkdir -p a/b; cd a; chmod a-x . b
15848         Reported by Stavros Passas.
15849
15850         Sync from coreutils.
15851         * lib/sha1.c: Tweak grammar in a comment.
15852
15853 2006-01-10  Jim Meyering  <jim@meyering.net>
15854
15855         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
15856         Patch by Joerg Sonnenberger.
15857
15858 2006-01-10  Bruno Haible  <bruno@clisp.org>
15859
15860         * modules/readutmp: Depend on module free.
15861         * modules/strtok_r: Depend on module restrict.
15862
15863 2006-01-10  Bruno Haible  <bruno@clisp.org>
15864
15865         * modules/gettext (configure.ac): Add an invocation of
15866         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
15867
15868 2006-01-10  Bruno Haible  <bruno@clisp.org>
15869
15870         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
15871         Reported by Werner Lemberg <wl@gnu.org>.
15872
15873 2006-01-10  Bruno Haible  <bruno@clisp.org>
15874
15875         * lib/localcharset.c: Update from GNU gettext.
15876
15877 2006-01-10  Bruno Haible  <bruno@clisp.org>
15878
15879         * lib/argp.h (__const): Remove macro. Use const instead.
15880         * lib/argp-fmtstream.h (__const): Likewise.
15881         * lib/glob_.h (__const): Remove macro.
15882         * lib/glob-libc.h: Use const instead of __const.
15883
15884 2006-01-10  Bruno Haible  <bruno@clisp.org>
15885
15886         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
15887         variable.
15888         Needed to avoid an automake error regarding the 'gettext' module.
15889
15890 2006-01-09  Simon Josefsson  <jas@extundo.com>
15891
15892         * modules/inet_ntop (Depends-on): Add restrict.
15893
15894 2006-01-09  Simon Josefsson  <jas@extundo.com>
15895
15896         * modules/gc-rijndael-tests (License): Put under LGPL.
15897
15898         * modules/gc-des-tests (License): Likewise.
15899
15900         * modules/gc-arcfour-tests (License): Likewise.
15901
15902         * modules/gc-arctwo-tests (License): Likewise.
15903
15904         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
15905
15906         * modules/gc-hmac-sha1-tests (Files): Likewise.
15907
15908         * modules/gc-hmac-md5-tests (License): Likewise.
15909
15910         * modules/gc-sha1-tests (License): Likewise.
15911
15912         * modules/gc-md5-tests (License): Likewise.
15913
15914         * modules/gc-md4-tests (License): Likewise.
15915
15916         * modules/gc-md2-tests (License): Likewise.
15917
15918         * modules/gc-tests (License): Likewise.
15919
15920         * modules/des-tests (License): Likewise.
15921
15922         * modules/md4-tests (License): Likewise.
15923
15924         * modules/md2-tests (License): Likewise.
15925
15926 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15927
15928         Sync from coreutils:
15929
15930         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
15931         * modules/lib-ignore: New file.
15932         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
15933         chdir-safer.m4, lchmod.m4.
15934         * modules/openat: Add mkdirat.c, openat-priv.h.
15935
15936 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15937
15938         Sync from coreutils.
15939         * m4/lib-ignore.m4: New file.
15940         * m4/lchmod.m4: New file.
15941
15942 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15943
15944         Sync from coreutils.
15945         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
15946         for write access: POSIX says that must fail.
15947         * lib/fts.c (diropen): Likewise.
15948         * lib/save-cwd.c (save_cwd): Likewise.
15949         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
15950         well, for minor improvements on hosts that lack O_DIRECTORY.
15951         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
15952         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
15953         Fall back on chown if open failed with EACCES.
15954
15955         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
15956         Report an error at compile-time if only a 1-second nominal clock
15957         resolution is found.
15958
15959         * lib/lchmod.h: New file.
15960         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
15961         (make_dir_parents): Use lchown rather than chown, and
15962         lchmod rather than chmod.
15963
15964         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
15965         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
15966         "proc" reported by n0dalus.
15967
15968         * lib/mountlist.c: Include <limits.h>.
15969         (dev_from_mount_options)
15970         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
15971         New function.  It no longer assumes "dev=" has the System V meaning
15972         on Linux (since it doesn't).  It also parses "dev=" more carefully.
15973         (read_file_system_list)
15974         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
15975         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
15976         dev= in that case.
15977
15978         * lib/posixtm.h (PDS_PRE_2000): New macro.
15979         * lib/posixtm.c (year): Arg is now syntax_bits rather than
15980         allow_century.  All usages changed.  Reject dates outside the range
15981         1969-1999 if PDS_PRE_2000 is used.
15982
15983 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15984
15985         Sync from coreutils.
15986         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
15987         (Time of day items): Mention the possibility of leap seconds.
15988         Problem reported by Dr. David Alan Gilbert.
15989
15990 2006-01-09  Jim Meyering  <jim@meyering.net>
15991
15992         Sync from coreutils.
15993
15994         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
15995
15996         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
15997
15998         * lib/modechange.c (mode_compile): Reject an invalid mode string
15999         that starts with an octal digit.  From Andreas Gruenbacher.
16000
16001         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
16002         and dup to open_safer and dup_safer, respectively.
16003         (openat_permissive): Fix typo in comment.
16004
16005         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
16006         "gettext.h"; either no longer needed or are guaranteed by openat.h.
16007         (_): Remove; no longer needed.
16008         (openat): Renamed from rpl_openat; no need for rpl_openat
16009         since openat.h renames openat for us.
16010         Replace most of the body with a call to openat_permissive,
16011         to avoid duplicate code.
16012         Port to (probably hypothetical) environments were mode_t is
16013         wider than int.
16014         (openat_permissive): Require mode arg, so that we can check
16015         types better.  Put it just after flags.  Change cwd failure
16016         indicator from pointer-to-bool to pointer-to-errno-value.
16017         All callers changed.
16018         Invoke openat_save_fail and/or openat_restore_fail if
16019         cwd_errno is null, so that openat can call us.
16020         (openat_permissive, fdopendir, fstatat, unlinkat):
16021         Simplify errno handling to avoid some duplicate code,
16022         as it's OK to set errno on success.
16023         * lib/openat.h: Revamp code so that function macros depend on
16024         __OPENAT_PREFIX only, not also on AT_FDCWD.
16025         (openat_ro): Remove.  Caller changed to use openat_permissive.
16026         (openat_permissive): Now a macro, if not a function.
16027         (openat_restore_fail, openat_save_fail): Now always functions,
16028         since mkdirat needs them even if __OPENAT_PREFIX is defined.
16029
16030         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
16031         and openat.c.
16032         * lib/mkdirat.c: Include openat-priv.h.
16033         Remove definitions of macros defined therein.
16034         * lib/openat.c: Likewise.
16035
16036         * lib/mkdirat.c (mkdirat): New file and function.
16037         * lib/openat.h (mkdirat): Declare.
16038
16039         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
16040
16041         * lib/openat.h (openat_permissive): Declare.
16042         (openat_ro): Define.
16043
16044         * lib/openat.c (EXPECTED_ERRNO): New macro.
16045         (openat_permissive): New function -- used in remove.c rewrite.
16046         (all functions): Set errno just before returning, only if there
16047         was an actual failure.
16048         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
16049
16050         Emulate openat-family functions using Linux's procfs, if possible.
16051         Idea and some code based on Ulrich Drepper's glibc changes.
16052
16053         * lib/openat.c: (BUILD_PROC_NAME): New macro.
16054         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
16055         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
16056         before falling back on save_cwd and restore_cwd.
16057         (fdopendir, fstatat, unlinkat): Likewise.
16058
16059         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
16060         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
16061
16062         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
16063         as second argument to va_arg.  Otherwise, some versions of gcc
16064         warn that `if this code is reached, the program will abort'.
16065
16066 2006-01-09  Jim Meyering  <jim@meyering.net>
16067
16068         Sync from coreutils.
16069         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
16070         Require openat-priv.h.
16071
16072 2006-01-09  Bruno Haible  <bruno@clisp.org>
16073
16074         * modules/strnlen (Include): Use strnlen.h.
16075
16076 2006-01-09  Bruno Haible  <bruno@clisp.org>
16077
16078         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
16079
16080 2006-01-09  Bruno Haible  <bruno@clisp.org>
16081
16082         * lib/sysexit_.h (EX_OK): New macro.
16083         Suggested by Martin Lambers <marlam@marlam.de>.
16084
16085 2006-01-09  Bruno Haible  <bruno@clisp.org>
16086
16087         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
16088         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
16089
16090 2006-01-09  Bruno Haible  <bruno@clisp.org>
16091
16092         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
16093         numbers.
16094
16095 2006-01-09  Bruno Haible  <bruno@clisp.org>
16096
16097         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
16098         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
16099         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
16100         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
16101
16102 2006-01-09  Bruno Haible  <bruno@clisp.org>
16103
16104         * build-aux/javacomp.sh.in: New file, moved from lib/.
16105         * modules/javacomp-script (Files): Update.
16106         (configure.ac): Add AC_CONFIG_FILES invocation.
16107         (EXTRA_DIST): Remove variable.
16108
16109         * build-aux/javaexec.sh.in: New file, moved from lib/.
16110         * modules/javaexec (Files): Update.
16111         (configure.ac): Add AC_CONFIG_FILES invocation.
16112         (EXTRA_DIST): Remove javaexec.sh.in.
16113
16114         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
16115         * modules/csharpcomp-script (Files): Update.
16116         (configure.ac): Add AC_CONFIG_FILES invocation.
16117         (EXTRA_DIST): Remove variable.
16118
16119         * build-aux/csharpexec.sh.in: New file, moved from lib/.
16120         * modules/csharpexec (Files): Update.
16121         (configure.ac): Add AC_CONFIG_FILES invocation.
16122         (EXTRA_DIST): Remove csharpexec.sh.in.
16123
16124 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16125
16126         Sync from coreutils.
16127
16128         Add POSIX ACL support
16129         * lib/acl.h (copy_acl, set_acl): Add declarations.
16130         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
16131         systems other than Linux.
16132         (chmod_or_fchmod): New function: use fchmod when possible,
16133         and chmod otherwise.
16134         (file_has_acl): Add a POSIX ACL implementation, with a
16135         Linux-specific subcase.
16136         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
16137         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
16138         acls are unsupported.
16139         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
16140         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
16141         are unsupported.
16142
16143 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16144
16145         Sync from coreutils.
16146         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
16147
16148 2006-01-07  Bruno Haible  <bruno@clisp.org>
16149
16150         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
16151         gl_EARLY.
16152
16153 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16154
16155         * lib/strftime.c (tzname): Don't declare if it is already #defined.
16156         Problem reported for Mingw by Mark Junker.
16157
16158 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16159
16160         * README: Gnulib normally doesn't generate a tarball.
16161
16162 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
16163
16164         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
16165         long int, not int, for nanosecond counts, so that people who are
16166         used to POSIX struct timespec won't be surprised.  Reported by Jim
16167         Meyering.
16168
16169 2005-12-28  Bruno Haible  <bruno@clisp.org>
16170
16171         * build-aux/config.rpath: Update from GNU gettext.
16172
16173 2005-12-16  Jim Meyering  <jim@meyering.net>
16174
16175         * modules/fprintftime: New module.
16176         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
16177
16178 2005-12-16  Jim Meyering  <jim@meyering.net>
16179
16180         * m4/fprintftime.m4: New file.
16181
16182 2005-12-16  Jim Meyering  <jim@meyering.net>
16183
16184         * lib/fprintftime.c, lib/fprintftime.h: New files.
16185
16186 2005-12-15  Simon Josefsson  <jas@extundo.com>
16187
16188         * modules/socklen (configure.ac): Fix M4 macro name, to align with
16189         new m4/socklen.m4.
16190
16191 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16192
16193         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
16194         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
16195
16196 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16197
16198         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
16199         * lib/argp-help.c (fill_in_uparams): Check if the constructed
16200         struct uparams is valid. Fall back to the default values if it is
16201         not.
16202
16203 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16204
16205         * modules/argp (Files): Add argp-pin.c
16206         (Depends-on): dirname
16207         (lib_SOURCES): Add argp-pin.c
16208
16209 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16210
16211         * m4/argp.m4:  Check if program_invocation_name and
16212         program_invocation_short_name are declared and define appropriate
16213         macros if they are not.
16214
16215 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16216
16217         * lib/argp-help.c (__argp_base_name): New function
16218         (__argp_short_program_name): Rewrite using __argp_base_name
16219         * lib/argp-namefrob.h: Define program_invocation_name and
16220         program_invocation_short_name if requested
16221         (__argp_base_name): Add prototype
16222         * lib/argp-parse.c (argp_def): Use gettext wrappers
16223         (argp_default_parser): Use __argp_base_name
16224         * lib/argp-pin.c: New file. Defines program_invocation_name and
16225         program_invocation_short_name on systems that lack them.
16226
16227 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16228
16229         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
16230         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16231         porting problem reported by Georg Schwarz in
16232         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16233
16234 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16235
16236         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
16237         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16238         porting problem reported by Georg Schwarz in
16239         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16240
16241 2005-12-05  Bruno Haible  <bruno@clisp.org>
16242
16243         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
16244         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
16245         Reported by Mark Junker <mjscod@gmx.de>.
16246
16247 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
16248
16249         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
16250         Use implementation from Albert Chin, with some
16251         comments/corrections by Stepan Kasal and myself.
16252
16253 2005-12-02  Bruno Haible  <bruno@clisp.org>
16254
16255         * gnulib-tool (func_import): Accept GPLed build tool modules when
16256         --lgpl is given.
16257         * modules/csharpcomp-script: New file.
16258         * modules/csharpcomp: Depend on it.
16259         * modules/javacomp-script: New file.
16260         * modules/javacomp: Depend on it.
16261         Suggested by Simon Josefsson.
16262
16263 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
16264
16265         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
16266         statement, to work around an HP-UX 10.20 compiler bug reported by
16267         Peter O'Gorman.
16268
16269 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16270
16271         * modules/savedir (Depends-on): Add openat.
16272
16273 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16274
16275         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
16276         (uintmax_t) [defined uintmax_t]: Do not declare.
16277         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
16278         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
16279         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
16280         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
16281         sake of portability to weird hosts that C allows (though we don't
16282         know of any practical examples).
16283
16284         * lib/savedir.h (fdsavedir): New decl.
16285         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
16286         contains most of the former guts of savedir.
16287         (savedir): Use savedirstream.
16288         Include "openat.h".
16289
16290 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16291
16292         * modules/obstack (Files): Add m4/ulonglong.m4.
16293         Problem reported by Davide Angelocola.
16294
16295 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
16296
16297         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
16298         coreutils no longer futzes with rounding modes.
16299
16300 2005-11-14  Jim Meyering  <jim@meyering.net>
16301
16302         * lib/mkstemp-safer.c: Include <config.h>, required for possible
16303         replacement of mkstemp.
16304
16305 2005-11-10  Simon Josefsson  <jas@extundo.com>
16306
16307         * lib/readline.c: Remove EOL.
16308
16309 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16310
16311         * modules/gethrxtime (Depends-on): Add gettime.
16312
16313 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16314
16315         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
16316         or gettimeofday; no longer needed.
16317
16318 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16319
16320         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
16321         time business.
16322         (gethrxtime) [! (HAVE_NANOUPTIME
16323         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
16324         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
16325         our own approximation.
16326
16327 2005-11-08  Eric Blake  <ebb9@byu.net>
16328
16329         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16330
16331 2005-11-08  Eric Blake  <ebb9@byu.net>
16332
16333         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16334
16335 2005-11-04  Bruno Haible  <bruno@clisp.org>
16336
16337         * gnulib-tool: Implement --update mode.
16338
16339 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16340
16341         Fix porting problem reported by Theodoros V. Kalamatianos.
16342         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
16343         Don't assume that futimes failing means we must fail.
16344
16345 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16346
16347         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
16348         variables to suggest the intended function of the PATH_MAX check.
16349
16350 2005-10-30  Kean Johnston  <jkj@sco.com>
16351
16352         Trivial changes to support SCO systems.
16353         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
16354         as PATH_MAX.
16355         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
16356         where __ptr is null when no I/O is pending.
16357
16358 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16359
16360         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
16361         leave errno alone.  Problem reported by Dmitry V. Levin.
16362
16363 2005-10-28  Simon Josefsson  <jas@extundo.com>
16364
16365         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
16366         Test more.
16367
16368         * tests/test-gc-md2.c, tests/test-md2.c: New files.
16369
16370         * modules/md2, modules/md2-tests: New files.
16371
16372 2005-10-28  Simon Josefsson  <jas@extundo.com>
16373
16374         * m4/inet_ntop.m4: More tests.
16375
16376         * m4/gc-md2.m4, md2.m4: New file.
16377
16378 2005-10-28  Simon Josefsson  <jas@extundo.com>
16379
16380         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
16381         "restrict" keywords, as per POSIX.  Protect the function
16382         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
16383         Don't use K&R prototypes.  Check the sprintf return values.
16384         Re-define EAFNOSUPPORT if not present.  Indent.
16385
16386         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
16387         suggested by Bruno Haible <bruno@clisp.org>.
16388
16389         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
16390
16391         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
16392
16393         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
16394         libgcrypt).
16395
16396         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
16397
16398         * lib/md2.h, lib/md2.c: New files.
16399
16400 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
16401
16402         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
16403         errno alone.  Problem reported by Frederic Jolliton.
16404
16405 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
16406
16407         * modules/verify (License): Change from GPL to LGPL.  This is a
16408         tiny module and there are apparently near-equivalents that are
16409         under the BSD license.
16410
16411 2005-10-24  Simon Josefsson  <jas@extundo.com>
16412
16413         * modules/sha1: Relicense to LGPL.
16414
16415 2005-10-24  Simon Josefsson  <jas@extundo.com>
16416
16417         * lib/md4.h: Shrink buffer size, now that we changed the type.
16418
16419 2005-10-23  Simon Josefsson  <jas@extundo.com>
16420
16421         * gnulib-tool (func_import): Fix --tests-base.
16422
16423 2005-10-22  Simon Josefsson  <jas@extundo.com>
16424
16425         * modules/arcfour (Depends-on): Need stdint.
16426
16427 2005-10-22  Simon Josefsson  <jas@extundo.com>
16428
16429         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
16430         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
16431
16432 2005-10-22  Simon Josefsson  <jas@extundo.com>
16433
16434         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
16435         suggested by Bruno Haible <bruno@clisp.org>.
16436
16437 2005-10-22  Simon Josefsson  <jas@extundo.com>
16438
16439         * lib/crc.h: Include stddef.h, for size_t.
16440
16441 2005-10-22  Simon Josefsson  <jas@extundo.com>
16442
16443         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
16444         arcfour_context struct (simplify test vector testing in GNU
16445         Shishi).
16446
16447 2005-10-21  Simon Josefsson  <jas@extundo.com>
16448
16449         * modules/des, modules/des-tests: New files.
16450
16451         * modules/gc-des, modules/gc-des-tests: New files.
16452
16453         * tests/test-des.c, tests/test-gc-des.c: New file.
16454
16455 2005-10-21  Simon Josefsson  <jas@extundo.com>
16456
16457         * modules/arctwo, modules/arctwo-tests: New files.
16458
16459         * tests/test-arctwo.c: New file.
16460
16461         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
16462
16463         * tests/test-gc-arctwo.c: New file.
16464
16465 2005-10-21  Simon Josefsson  <jas@extundo.com>
16466
16467         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
16468         Bruno Haible <bruno@clisp.org>.
16469
16470         * m4/gc-des.m4: New file.
16471
16472 2005-10-21  Simon Josefsson  <jas@extundo.com>
16473
16474         * m4/arctwo.m4: New file.
16475
16476         * m4/gc-arctwo.m4: New file.
16477
16478 2005-10-21  Simon Josefsson  <jas@extundo.com>
16479
16480         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
16481         block.
16482
16483 2005-10-21  Simon Josefsson  <jas@extundo.com>
16484
16485         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
16486         <bruno@clisp.org>.
16487
16488         * lib/hmac-sha1.c (hmac_sha1): Likewise.
16489
16490         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
16491         Bruno Haible <bruno@clisp.org>.
16492
16493         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
16494         <bruno@clisp.org>.
16495
16496 2005-10-21  Simon Josefsson  <jas@extundo.com>
16497
16498         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
16499
16500 2005-10-21  Simon Josefsson  <jas@extundo.com>
16501
16502         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
16503
16504 2005-10-21  Simon Josefsson  <jas@extundo.com>
16505
16506         * lib/des.h, lib/des.c: New files.
16507
16508         * lib/gc-gnulib.c: Support DES.c
16509
16510 2005-10-21  Simon Josefsson  <jas@extundo.com>
16511
16512         * lib/arctwo.h, lib/arctwo.c: New files.
16513
16514         * lib/gc-gnulib.c: Support ARCTWO.
16515
16516 2005-10-21  Simon Josefsson  <jas@extundo.com>
16517
16518         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
16519         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16520
16521 2005-10-21  Simon Josefsson  <jas@extundo.com>
16522
16523         * gnulib-tool (func_import, func_create_testdir): Define automake
16524         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
16525         Makefile.am snippet),
16526         suggested by Bruno Haible <bruno@clisp.org>.
16527
16528         * modules/gc (Makefile.am): Use it.
16529
16530 2005-10-21  Bruno Haible  <bruno@clisp.org>
16531
16532         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
16533         patch.
16534
16535 2005-10-19  Simon Josefsson  <jas@extundo.com>
16536
16537         * tests/test-gc-rijndael.c: New file.
16538
16539         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
16540
16541 2005-10-19  Simon Josefsson  <jas@extundo.com>
16542
16543         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
16544         interface too.
16545
16546 2005-10-19  Simon Josefsson  <jas@extundo.com>
16547
16548         * tests/test-gc-arcfour.c: New file.
16549
16550         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
16551
16552 2005-10-19  Simon Josefsson  <jas@extundo.com>
16553
16554         * modules/gc-md4, modules/gc-md4-tests: New file.
16555
16556         * tests/test-gc-md4.c: New file.
16557
16558 2005-10-19  Simon Josefsson  <jas@extundo.com>
16559
16560         * m4/gc-md4.m4: New file.
16561
16562 2005-10-19  Simon Josefsson  <jas@extundo.com>
16563
16564         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
16565         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
16566         <kasal@ucw.cz>.
16567
16568 2005-10-19  Simon Josefsson  <jas@extundo.com>
16569
16570         * m4/gc-arcfour.m4: New file.
16571
16572         * m4/gc-rijndael.m4: New file.
16573
16574 2005-10-19  Simon Josefsson  <jas@extundo.com>
16575
16576         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
16577
16578 2005-10-19  Simon Josefsson  <jas@extundo.com>
16579
16580         * lib/gc-gnulib.c: Support ARCFOUR.
16581
16582 2005-10-19  Simon Josefsson  <jas@extundo.com>
16583
16584         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
16585         support.
16586
16587         * lib/gc.h: Add ECB enum type.
16588
16589         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
16590
16591 2005-10-18  Simon Josefsson  <jas@extundo.com>
16592
16593         * tests/test-md5.c: New file.
16594
16595         * modules/md5-tests: New file.
16596
16597 2005-10-18  Simon Josefsson  <jas@extundo.com>
16598
16599         * tests/test-md4.c: New file.
16600
16601         * modules/md4, modules/md4-tests: New files.
16602
16603 2005-10-18  Simon Josefsson  <jas@extundo.com>
16604
16605         * m4/md4.m4: New file.
16606
16607 2005-10-18  Simon Josefsson  <jas@extundo.com>
16608
16609         * lib/md4.h, lib/md4.c: New files, based on md5.?.
16610
16611 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
16612
16613         * gnulib-tool (func_create_testdir): Omit the second check whether
16614         BUILT_SOURCES in nonempty.
16615
16616 2005-10-17  Simon Josefsson  <jas@extundo.com>
16617
16618         * tests/test-rijndael.c: New file.
16619
16620 2005-10-17  Simon Josefsson  <jas@extundo.com>
16621
16622         * modules/sha1: Depend on stdint instead of md5.
16623
16624         * modules/md5: Depend on stdint, remove uint32_t.
16625
16626 2005-10-17  Simon Josefsson  <jas@extundo.com>
16627
16628         * modules/gc-sha1-tests: New file.
16629
16630         * tests/test-gc-sha1.c: New file.
16631
16632 2005-10-17  Simon Josefsson  <jas@extundo.com>
16633
16634         * m4/md5.m4: Remove call to uint32_t.m4.
16635
16636 2005-10-17  Simon Josefsson  <jas@extundo.com>
16637
16638         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
16639
16640         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
16641         md5.h.
16642
16643         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
16644
16645         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
16646
16647 2005-10-17  Simon Josefsson  <jas@extundo.com>
16648
16649         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
16650
16651 2005-10-17  Simon Josefsson  <jas@extundo.com>
16652
16653         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
16654
16655 2005-10-17  Simon Josefsson  <jas@extundo.com>
16656
16657         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
16658
16659         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
16660
16661 2005-10-17  Bruno Haible  <bruno@clisp.org>
16662
16663         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
16664         that it can also be used in a test.
16665
16666 2005-10-16  Bruno Haible  <bruno@clisp.org>
16667
16668         * gnulib-tool (func_emit_tests_Makefile_am): Also define
16669         TESTS_ENVIRONMENT, so that individual tests can augment it.
16670
16671         * gnulib-tool (func_create_testdir): Use an intermediate target for
16672         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
16673         macros, like $(ALLOCA_H), which cannot be passed through the command
16674         line.
16675
16676 2005-10-15  Simon Josefsson  <jas@extundo.com>
16677
16678         * modules/rijndael-tests: New file.
16679
16680         * modules/rijndael: New file.
16681
16682 2005-10-15  Simon Josefsson  <jas@extundo.com>
16683
16684         * m4/rijndael.m4: New file.
16685
16686 2005-10-15  Simon Josefsson  <jas@extundo.com>
16687
16688         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
16689
16690         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
16691
16692 2005-10-14  Simon Josefsson  <jas@extundo.com>
16693
16694         * tests/test-arcfour.c: New file.
16695
16696         * modules/arcfour, modules/arcfour-tests: New files.
16697
16698 2005-10-14  Simon Josefsson  <jas@extundo.com>
16699
16700         * m4/arcfour.m4: New file.
16701
16702 2005-10-14  Simon Josefsson  <jas@extundo.com>
16703
16704         * lib/arcfour.h, lib/arcfour.c: New files.
16705
16706 2005-10-14  Roland McGrath  <roland@redhat.com>
16707
16708         Import from libc.  [BZ #1331]
16709         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
16710         macro argument.
16711         Reported by Matej Vela <vela@debian.org>.
16712
16713 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16714
16715         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
16716         include <wchar.h>; no longer needed.
16717
16718 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16719
16720         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
16721
16722 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
16723         and  Ulrich Drepper  <drepper@redhat.com>
16724
16725         Import from libc.
16726         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
16727         instead of inline stream orientation test and two separate
16728         function calls.  Pay no attention to USE_IN_LIBIO.
16729
16730 2005-10-13  Simon Josefsson  <jas@extundo.com>
16731
16732         * modules/gc-hmac-md5-tests: New file.
16733
16734         * tests/test-gc-hmac-sha1.c: New file.
16735
16736         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
16737
16738         * modules/gc-hmac-md5-tests: New file.
16739
16740         * tests/test-gc-md5.c: New file.
16741
16742         * modules/gc-md5-tests: New file.
16743
16744 2005-10-13  Simon Josefsson  <jas@extundo.com>
16745
16746         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
16747         Move memory allocation outside of loop.
16748
16749 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
16750
16751         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
16752         intermediate directory is in a read-only file system.  Problem
16753         reported by Eric Blake.
16754
16755 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
16756
16757         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
16758
16759 2005-10-12  Simon Josefsson  <jas@extundo.com>
16760
16761         * tests/test-hmac-sha1.c: New file.
16762
16763         * modules/hmac-sha1-tests: New file.
16764
16765         * modules/hmac-sha1: New file.
16766
16767 2005-10-12  Simon Josefsson  <jas@extundo.com>
16768
16769         * modules/gc-sha1: New file.
16770
16771 2005-10-12  Simon Josefsson  <jas@extundo.com>
16772
16773         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
16774
16775         * tests/test-gc-pbkdf2-sha1.c: New file.
16776
16777 2005-10-12  Simon Josefsson  <jas@extundo.com>
16778
16779         * modules/gc-md5, modules/gc-hmac-md5: New files.
16780
16781         * modules/gc (Files): Remove md5, memxor and hmac files.
16782
16783 2005-10-12  Simon Josefsson  <jas@extundo.com>
16784
16785         * m4/gc-pbkdf2-sha1.m4: New file.
16786
16787         * m4/gc-hmac-sha1.m4: New file.
16788
16789         * m4/gc-sha1: New file.
16790
16791         * m4/hmac-sha1.m4: New file.
16792
16793 2005-10-12  Simon Josefsson  <jas@extundo.com>
16794
16795         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
16796
16797         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
16798
16799 2005-10-12  Simon Josefsson  <jas@extundo.com>
16800
16801         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
16802         suggested by Bruno Haible <bruno@clisp.org>.
16803
16804 2005-10-12  Simon Josefsson  <jas@extundo.com>
16805
16806         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
16807
16808 2005-10-12  Simon Josefsson  <jas@extundo.com>
16809
16810         * lib/gc-pbkdf2-sha1.c: New file.
16811
16812         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
16813
16814 2005-10-12  Simon Josefsson  <jas@extundo.com>
16815
16816         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
16817
16818         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
16819
16820 2005-10-12  Simon Josefsson  <jas@extundo.com>
16821
16822         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
16823         GC_USE_HMAC_MD5, respectively.
16824
16825         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
16826         (gc_md5): Fix typo.
16827
16828         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
16829
16830         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
16831
16832         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
16833
16834 2005-10-12  Bruno Haible  <bruno@clisp.org>
16835
16836         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
16837         Reported by Stepan Kasal <kasal@ucw.cz>.
16838
16839 2005-10-11  Simon Josefsson  <jas@extundo.com>
16840
16841         * tests/test-crc.c: New file.
16842
16843         * modules/crc, modules/crc-tests: New files.
16844
16845 2005-10-11  Simon Josefsson  <jas@extundo.com>
16846
16847         * m4/crc.m4: New file.
16848
16849 2005-10-11  Simon Josefsson  <jas@extundo.com>
16850
16851         * lib/gc.h: Add gc_hash and gc_hash_buffer.
16852
16853         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
16854
16855         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
16856
16857 2005-10-11  Simon Josefsson  <jas@extundo.com>
16858
16859         * lib/crc.h, lib/crc.c: New files.
16860
16861         * lib/gc.h (gc_hash_buffer): Add doc.
16862
16863 2005-10-11  Bruno Haible  <bruno@clisp.org>
16864
16865         * modules/c-strcasestr: New file.
16866         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
16867
16868 2005-10-11  Bruno Haible  <bruno@clisp.org>
16869
16870         * modules/c-strcase: New file.
16871         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
16872
16873 2005-10-11  Bruno Haible  <bruno@clisp.org>
16874
16875         * lib/strcasecmp.c: Include limits.h.
16876         (strcasecmp): Avoid integer overflow on exotic platforms.
16877         * lib/strncasecmp.c: Include limits.h.
16878         (strncasecmp): Avoid integer overflow on exotic platforms.
16879         Reported by Paul Eggert.
16880
16881 2005-10-11  Bruno Haible  <bruno@clisp.org>
16882
16883         * lib/c-strcasestr.h: New file, from GNU gettext.
16884         * lib/c-strcasestr.c: New file, from GNU gettext.
16885
16886 2005-10-11  Bruno Haible  <bruno@clisp.org>
16887
16888         * lib/c-strcase.h: New file, from GNU gettext.
16889         * lib/c-strcasecmp.c: New file, from GNU gettext.
16890         * lib/c-strncasecmp.c: New file, from GNU gettext.
16891
16892 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16893
16894         * modules/mempcpy (License): GPL -> LGPL.
16895         * modules/strchrnul (License): Likewise.
16896         * modules/sysexits (License): Likewise.
16897
16898 2005-10-08  Simon Josefsson  <jas@extundo.com>
16899
16900         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
16901
16902 2005-10-07  Simon Josefsson  <jas@extundo.com>
16903
16904         * m4/memxor.m4: Remove gl_C_RESTRICT call.
16905
16906 2005-10-06  Simon Josefsson  <jas@extundo.com>
16907
16908         * tests/test-hmac-md5.c: New file.
16909
16910         * modules/hmac-md5-tests: New file.
16911
16912         * modules/hmac-md5: New file.
16913
16914 2005-10-06  Simon Josefsson  <jas@extundo.com>
16915
16916         * m4/hmac-md5.m4: New file.
16917
16918         * m4/memxor.m4: Require gl_C_RESTRICT.
16919
16920 2005-10-06  Simon Josefsson  <jas@extundo.com>
16921
16922         * lib/memxor.c (memxor): Avoid casts and warnings.
16923
16924 2005-10-06  Simon Josefsson  <jas@extundo.com>
16925
16926         * lib/hmac-md5.c: New file.
16927
16928         * lib/hmac.h: New file.
16929
16930 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16931
16932         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
16933         promotes to int, not unsigned int, to catch the AIX 5.3
16934         compiler bug.
16935
16936 2005-10-05  Simon Josefsson  <jas@extundo.com>
16937
16938         * modules/memxor: New file.
16939
16940         * modules/iconv (Files): Move config.rpath to havelib, it is used
16941         there.
16942
16943         * modules/havelib (Files): Add config.rpath.
16944
16945 2005-10-05  Simon Josefsson  <jas@extundo.com>
16946
16947         * m4/memxor.m4: New file.
16948
16949 2005-10-05  Simon Josefsson  <jas@extundo.com>
16950
16951         * lib/memxor.c (memxor): Fix compiler error.
16952
16953         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
16954         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
16955
16956         * lib/memxor.h, lib/memxor.c: New files.
16957
16958         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
16959         we assume all systems have it, suggested by Jim Meyering
16960         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
16961         any systems lack sys/socket.h; mingw32 is known to lack it, but we
16962         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
16963         same reasons.
16964
16965 2005-10-05  Simon Josefsson  <jas@extundo.com>
16966
16967         * config/srclist.txt: Add glibc bug 1423 for md5.h.
16968
16969 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
16970
16971         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
16972         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
16973         needed, since the source code now assumes these .h files.
16974
16975 2005-10-05  Derek Price  <derek@ximbiot.com>
16976
16977         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
16978
16979 2005-10-05  Bruno Haible  <bruno@clisp.org>
16980
16981         * modules/stdint (License): Change to LGPL.
16982
16983 2005-10-04  Simon Josefsson  <jas@extundo.com>
16984
16985         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
16986         D. Baushke" <mdb@gnu.org>.
16987
16988 2005-10-04  Bruno Haible  <bruno@clisp.org>
16989
16990         * lib/verify.h (verify_true): Provide alternative definition for C++.
16991
16992 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
16993
16994         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
16995         (SSIZE_MAX): New macro, if not already defined.
16996         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
16997         than 2 GiB.
16998
16999 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17000
17001         Sync from coreutils.
17002         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
17003         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
17004         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
17005         ULLONG_MAX doesn't work with 2.7.2.1.
17006
17007 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17008
17009         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
17010         From Ben Pfaff.
17011
17012         * modules/exclude (Depends-on): Depend on verify.
17013         * modules/strtoimax (Depends-on): Likewise.
17014         * modules/utimecmp (Depends-on): Likewise.
17015
17016 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17017
17018         * lib/exclude.c: Include verify.h.
17019         (verify): Remove.  All callers changed to use verify.h's version.
17020         * lib/strtoimax.c: Likewise.
17021         * lib/utimecmp.c: Likewis.e
17022
17023         Sync from coreutils.
17024         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
17025         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
17026         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
17027         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
17028         bother returning ENOSYS if settimeofday or stime fails; just let
17029         them return whatever errno they want to return.
17030         * lib/utimens.c: Include unistd.h, for dup2.
17031         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
17032         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
17033
17034 2005-10-02  Jim Meyering  <jim@meyering.net>
17035
17036         Sync from coreutils.
17037         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
17038         from glibc-2.2.5 that fails for read-only files.
17039
17040 2005-10-02  Jim Meyering  <jim@meyering.net>
17041
17042         Sync from coreutils.
17043         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
17044         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
17045         `#if HAVE_CONFIG_H'.
17046         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
17047         Remove AT_FDCWD test.
17048         Do not consume the fd unless successful.
17049         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
17050         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
17051         block, so that we don't even try to compile it if settimeofday is
17052         available.  This works around a compilation failure on OSF1 V5.1,
17053         due to stime requiring a `long int*' while tv_sec is `int'.
17054
17055 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
17056
17057         Sync from coreutils.
17058         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
17059         against `yes', rather than just testing for nonempty.
17060
17061 2005-10-01  Simon Josefsson  <jas@extundo.com>
17062
17063         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
17064         and Darwin.
17065
17066         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
17067         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
17068         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
17069         freeaddrinfo and gai_strerror are declared by the POSIX headers.
17070         Check if struct addrinfo is declared.
17071
17072 2005-10-01  Simon Josefsson  <jas@extundo.com>
17073
17074         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
17075         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
17076         AI_* and EAI_* definitions.  Protect function declarations.
17077
17078 2005-10-01  Jim Meyering  <jim@meyering.net>
17079
17080         Sync from coreutils.
17081
17082         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
17083         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
17084         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
17085         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17086         in the inet and nsl libraries.  Required on Solaris 5.7.
17087
17088 2005-10-01  Jim Meyering  <jim@meyering.net>
17089
17090         Sync from coreutils.
17091         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17092         in the inet and nsl libraries.  Required on Solaris 5.7.
17093
17094 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
17095
17096         * lib/getdelim.c (getdelim): Remove unused variables.
17097
17098 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
17099
17100         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
17101         so that the code works even with ancient cpp.  Portability problem
17102         with GCC 2.7.2.1 reported by Thomas M.Ott.
17103
17104 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
17105
17106         * modules/regex (Depends-on): Add strcase.
17107
17108         * modules/gethostname (Licence): Change from GPL to LGPL, since
17109         gethostname.c is a trivial implementation of a standard library
17110         function.
17111         * modules/poll (License): Change from GPL to LGPL, since it's
17112         derived from LGPL code.
17113
17114 2005-09-27  Jim Meyering  <jim@meyering.net>
17115
17116         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
17117         HAVE_CONFIG_H.
17118
17119         * lib/intprops.h (signed_type_or_expr__): Define.
17120         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
17121         for unsigned types.
17122
17123 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
17124
17125         * lib/verify.h (verify_expr): Remove, replacing with:
17126         (verify_true): New macro that returns true instead of void.
17127         (verify_type__): Remove.
17128         (verify): Use verify_true rather than verify_type__.
17129
17130 2005-09-26  Bruno Haible  <bruno@clisp.org>
17131
17132         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
17133         is necessary.
17134         (lib_SOURCES): Remove mbchar.c.
17135         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
17136         (Files): Add m4/mbrtowc.m4.
17137         * modules/mbiter: Likewise.
17138         * modules/mbuiter: Likewise.
17139
17140 2005-09-26  Bruno Haible  <bruno@clisp.org>
17141
17142         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
17143         compile mbchar.c if they are not both present.
17144         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
17145         * m4/mbiter.m4 (gl_MBITER): Likewise.
17146         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
17147         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
17148         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
17149
17150 2005-09-25  Jim Meyering  <jim@meyering.net>
17151
17152         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
17153         also uses socklen_t.
17154
17155 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
17156
17157         * lib/utimens.c (ENOSYS): Define if not already defined.
17158         (futimens): Support having a null PATH if the file descriptor
17159         is nonnegative.
17160
17161         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
17162         Remove.
17163         (__attribute): Define to empty unless GCC 3.1 or later.
17164         This works around a core dump on OpenBSD 3.4, which has GCC
17165         2.95.3, which dumps core when given __attribute__(()).  It also
17166         simplifies other tests, since we really don't want to bother with
17167         worrying about which ancient version of GCC supported what.
17168         Original problem reported by Yoann Vandoorselaere, with part of
17169         the fix suggested by Derek Price.
17170
17171 2005-09-24  Jim Meyering  <jim@meyering.net>
17172
17173         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
17174         so we can once again use a positive bitfield width of 1 -- now we
17175         don't have to explain why we were using a bitfield width of 2.
17176
17177 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17178
17179         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
17180         and similarly for the other external symbols.  Problem reported
17181         by James Gallager.
17182
17183         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
17184         bug reported by Jim Meyering.
17185
17186         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
17187         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
17188         not needed, since socklen is a prerequisite module.
17189
17190 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17191
17192         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
17193         Problem reported by Eric Blake.
17194         (getaddrinfo): Initialize se so that it's not garbage.
17195         Redo internal storage allocation so that it doesn't make unportable
17196         assumptions about alignment.
17197         Fix a memory leak.
17198
17199         * lib/utimens.c (futimens): Use futimesat if available.
17200         Prefer it to futimes since it doesn't have the futimes bug.
17201
17202         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
17203         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
17204         Instead, declare a function that returns a pointer to an array,
17205         and use verify_type__ to declare the size of the array.
17206         Problem and germ of a solution reported by Bruno Haible.
17207         (verify_type__): Use 2, not 1, for bitfield size, to avoid
17208         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
17209
17210 2005-09-23  Jim Meyering  <jim@meyering.net>
17211
17212         Sync from coreutils.
17213         Correct build failure (socklen_t not defined) on at least
17214         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
17215         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
17216
17217 2005-09-23  Jim Meyering  <jim@meyering.net>
17218
17219         * modules/getaddrinfo (Depends-on): Add socklen.
17220
17221 2005-09-23  Bruno Haible  <bruno@clisp.org>
17222
17223         * tests/test-verify.c: New file.
17224
17225 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17226
17227         Sync from coreutils.
17228
17229         * modules/argmatch (Depends-on): Add verify.
17230         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
17231         unistd-safer.
17232         * modules/save-cwd (Depends-on): Likewise.
17233
17234         * modules/openat (Files): Add lib/openat-die.c.
17235         (Depends-on): Remove error, exitfail.
17236         Add dirname.
17237
17238         * modules/verify: New file.
17239         * MODULES.html.sh (Diagnostics <assert.h>): New section,
17240         with "verify" module.
17241
17242 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17243
17244         Sync from coreutils.
17245
17246         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
17247         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
17248         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
17249         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
17250         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
17251         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
17252         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
17253         Don't bother checking for string.h, stdlib.h, unistd.h.
17254         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
17255         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
17256         module's job.
17257         * m4/jm-macros.m4 (gl_MACROS): Likewise.
17258         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
17259
17260         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
17261         (gl_GETDATE): Use it.
17262
17263         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
17264
17265 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17266
17267         Sync from coreutils.
17268
17269         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
17270         stat-time.h.
17271         * lib/argmatch.h: Include verify.h
17272         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
17273         (ARGMATCH_ASSERT): Remove; unused.
17274         * lib/canonicalize.c: Assume STDC_HEADERS.
17275         * lib/exclude.c: Include "strcase.h".
17276         * lib/regex_internal.h [!defined _LIBC]: Likewise.
17277         * lib/getusershell.c: Include stdio--.h rather than stdio.h
17278         and stdio-safer.h.
17279         (getusershell): Call fopen, not fopen_safer.
17280         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
17281         Do not include unistd-safer.h.
17282         (save_cwd): Don't call fd_safer; no longer needed
17283         now that we include fcntl--.h.
17284
17285         * lib/getdate.y (relative_time): New type.
17286         (RELATIVE_TIME_0): New constant.
17287         (parser_control): Use relative_time instead of doing it ourselves.
17288         (%union): Add new relative_time rel member.
17289         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
17290         Now typeless.
17291         (relunit, relunit_snumber): Now of type rel.
17292         (zone, rel, relunit, get_date): Adjust to above changes.
17293
17294         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
17295         Do not include unistd-safer.h.
17296         (getloadavg): Don't call fd_safer; no longer needed
17297         now that we include fcntl--.h.
17298
17299         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
17300         (make_dir_parents): Treat ENOSYS like EEXIST.
17301
17302         Improve quality of diagnostics on restore_cwd failure.
17303         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
17304         (make_dir_parents): Last arg is now int * (for errno), not bool *.
17305         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
17306         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
17307         each time through the loop.  Do not diagnose restore_cwd failure;
17308         that is the caller's job (and perhaps the caller does not care).
17309
17310         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
17311         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
17312         If the file already exists but is not a directory, don't bother
17313         to try to make its parents.
17314         Close potential file descriptor leak if we can't chdir("/") (!).
17315         Don't always return true if chdir($PWD) fails; return true only
17316         if the requested action was done successfully (except for the
17317         chdir($PWD)).
17318         Don't log final directory unless we actually made it.
17319         Refactor to avoid duplicate code to fix up permissions.
17320         Don't attempt to fix up parent permissions if chdir($PWD) fails.
17321
17322         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
17323         to make it a bit faster and (I hope) clearer.
17324         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
17325         Fix bug in formats like %2N.
17326
17327         * lib/verify.h: New file.
17328
17329 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17330
17331         Sync from coreutils.
17332         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
17333
17334 2005-09-22  Jim Meyering  <jim@meyering.net>
17335
17336         Sync from coreutils.
17337
17338         * m4/lstat.m4 (gl_FUNC_LSTAT):
17339         Use AC_LIBSOURCES to require lstat.c and lstat.h.
17340         Remove obsolete comment.
17341         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
17342         * m4/xstrtod.m4: Likewise.
17343
17344         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
17345
17346 2005-09-22  Jim Meyering  <jim@meyering.net>
17347
17348         Sync from coreutils.
17349
17350         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
17351
17352         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
17353         the .tm_year member, since otherwise gcc-4.0 would now warn about
17354         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
17355
17356         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
17357         order to avoid an unsuppressible warning from gcc on 64-bit systems.
17358
17359         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
17360         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
17361         when run in a time zone for which daylight savings time is in effect
17362         for the starting date.
17363
17364         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
17365         stop us from restricting permissions of just-created absolute-named
17366         directories.
17367         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
17368         to restore initial working directory.
17369         * lib/mkdir-p.c (make_dir_parents): New parameter:
17370         different_working_dir, to tell caller if/when we change the working
17371         directory and are unable to return to the initial one.
17372         * lib/mkdir-p.h (make_dir_parents): Update prototype.
17373         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
17374         `return false'.  This fixes a bug introduced on 2004-07-30.
17375
17376         * lib/openat.c (fdopendir): Be sure to close the supplied
17377         file descriptor before returning.  This makes our replacement
17378         implementation a little closer to Solaris's, where fdopendir
17379         ties the file descriptor to the returned DIR* pointer.
17380         * lib/openat.c (unlinkat): New function.
17381         * lib/openat.h (unlinkat): Add prototype.
17382         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
17383         (openat_restore_fail): Rename from openat_restore_die.
17384         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
17385
17386         Provide an alternative to exiting immediately upon save_cwd or
17387         restore_cwd failure.  Now, an application can arrange e.g.,
17388         to perform a longjump in that case.
17389         * lib/openat.c: Include dirname.h.
17390         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
17391         (rpl_openat, fdopendir, fstatat): Call openat_save_die
17392         and openat_restore_die rather than calling error directly.
17393         Don't include "error.h" or "exitfail.h"; they're no longer needed.
17394
17395         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
17396         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
17397         define.
17398
17399         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
17400         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
17401                             int utc, int nanoseconds);
17402         Background:
17403         date should not have to allocate a megabyte of virtual memory to
17404         handle a format argument like +%1048575T.  When implemented with
17405         strftime, it must allocate such a buffer, use strftime to fill it
17406         in, print it, then free it.
17407         With fprintftime, it simply prints everything and exits.
17408         With no need for memory allocation, that's one fewer way to fail.
17409         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
17410         optional field width, not before, so we accept %9:z, not %:9z.
17411         (my_strftime): Be sure to use L_('x') for literals.
17412
17413         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
17414         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
17415         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
17416         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
17417         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
17418         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
17419         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
17420         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
17421         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
17422         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
17423         * lib/xgethostname.c, lib/xreadlink.c:
17424         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
17425
17426         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
17427         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
17428         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
17429         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
17430         and don't include <sys/file.h>).
17431
17432 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
17433
17434         Sync from coreutils.
17435
17436         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
17437         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
17438         [!LDAV_DONE]: Avoid unused variable warning.
17439
17440 2005-09-21  Bruno Haible  <bruno@clisp.org>
17441
17442         * lib/unicodeio.h (unicode_to_mb): New declaration.
17443
17444 2005-09-20  Derek Price  <derek@ximbiot.com>
17445
17446         * lib/getaddrinfo.c: Don't include <netdb.h> included from
17447         getaddrinfo.h.
17448
17449 2005-09-20  Bruno Haible  <bruno@clisp.org>
17450
17451         * gnulib-tool: Remove trailing slashes from the values specified for
17452         --source-base, --m4-base, --tests-base, --aux-dir.
17453         Suggested by Simon Josefsson <jas@extundo.com>.
17454
17455 2005-09-20  Bruno Haible  <bruno@clisp.org>
17456
17457         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
17458         func_modules_to_filelist, func_import, func_create_testdir): Make all
17459         sorting results locale-independent, so that gnulib-cache.m4 doesn't
17460         change when gnulib-tool is invoked in a different locale.
17461
17462 2005-09-19  Simon Josefsson  <jas@extundo.com>
17463
17464         * m4/socklen.m4: Fix typo.
17465
17466 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
17467
17468         Use a consistent style for including <config.h>.
17469         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
17470         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
17471         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
17472         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
17473         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
17474         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
17475         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
17476         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
17477         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
17478         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
17479         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
17480         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
17481         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
17482         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
17483         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
17484         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
17485         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
17486         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
17487         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
17488         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
17489         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
17490         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
17491         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
17492         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
17493         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
17494         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
17495         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
17496         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
17497         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
17498         lib/xstrtoumax.c, lib/yesno.c:
17499         Standardize inclusion of config.h.
17500         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
17501         lib/inttostr.h:  Removed inclusion of config.h from header files.
17502         * lib/inttostr.c:  Adjusted in-tree users.
17503         * lib/timespec.h: Remove superfluous warning to include config.h.
17504         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
17505         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
17506         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
17507         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
17508         config.h with HAVE_CONFIG_H.
17509
17510 2005-09-19  Jim Meyering  <jim@meyering.net>
17511
17512         * modules/pathmax (License): Change to LGPL.
17513
17514 2005-09-19  Derek Price  <derek@ximbiot.com>
17515
17516         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
17517
17518 2005-09-19  Bruno Haible  <bruno@clisp.org>
17519
17520         * gnulib-tool (import): Provide default for --tests-base.
17521
17522 2005-09-19  Bruno Haible  <bruno@clisp.org>
17523
17524         * doc/quote.texi: New file, extracted from gnulib.texi.
17525         * doc/ctime.texi: New file, extracted from gnulib.texi.
17526         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
17527         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
17528         * doc/gnulib.texi: Include them.
17529
17530 2005-09-18  Bruno Haible  <bruno@clisp.org>
17531
17532         Portability fix.
17533         * gnulib-tool (func_readlink): New function.
17534         (func_ln_if_changed): Use it.
17535
17536 2005-09-18  Bruno Haible  <bruno@clisp.org>
17537
17538         * gnulib-tool: Support --with-tests also with --import.
17539         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
17540         (func_import): Use variables $testsbase and $inctests. Emit a
17541         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
17542         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
17543         SUBDIRS += $testsdir.
17544         (func_create_testdir): Update.
17545
17546 2005-09-18  Bruno Haible  <bruno@clisp.org>
17547
17548         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
17549         instead of $dry_run.
17550         (func_cp_if_changed, func_mv_if_changed): Remove functions.
17551         (func_ln_if_changed): Don't handle dry-run here.
17552         (func_import): In dry-run mode, detect more precisely which actions
17553         would be performed, and don't use "...ing" verbs.
17554
17555 2005-09-18  Bruno Haible  <bruno@clisp.org>
17556
17557         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
17558         (func_import): Use join on two temporary files instead of three nested
17559         loops, in order to determine which files are new or old.
17560
17561 2005-09-18  Bruno Haible  <bruno@clisp.org>
17562
17563         * gnulib-tool (func_import): Comment out code that spits out the
17564         new files with --dry-run.
17565
17566 2005-09-18  Bruno Haible  <bruno@clisp.org>
17567
17568         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
17569
17570 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17571
17572         * lib/stat-time.h: New file.
17573         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
17574         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
17575         in a different way.
17576         (timespec_cmp): New function.
17577         * lib/utimecmp.c: Include stat-time.h.
17578         (SYSCALL_RESOLUTION): Depend on whether various struct stat
17579         members exist, not on the obsolescent ST_MTIM_NSEC.
17580         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
17581
17582 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17583
17584         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
17585
17586 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17587
17588         * MODULES.html.sh (File system functions): Add stat-time.
17589         * modules/stat-time: New file.
17590         * modules/timespec (Files): Remove m4/st_mtim.m4; this
17591         is now done in a different way, by the stat-time module.
17592         * modules/utimecmp (Depends-on): Add stat-time.
17593
17594 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
17595
17596         * m4/st_mtim.m4: Remove.  Superseded by...
17597         * m4/stat-time.m4: New file.
17598         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
17599         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
17600
17601 2005-09-15  Derek Price  <derek@ximbiot.com>
17602
17603         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
17604
17605 2005-09-15  Derek Price  <derek@ximbiot.com>
17606
17607         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
17608         * lib/regex_internal.c: Ditto, using this...
17609         (__GNUC_PREREQ): ...new macro.
17610         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
17611         using...
17612         (__GNUC_PREREQ): ...this new macro.
17613
17614         * lib/strstr.h: Include string.h. Define strstr as a macro here.
17615
17616 2005-09-15  Derek Price  <derek@ximbiot.com>
17617             Paul Eggert  <eggert@cs.ucla.edu>
17618
17619         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
17620         changes, consolidating in...
17621         * lib/regex_internal.h: ...this file.
17622
17623 2005-09-13  Jim Meyering  <jim@meyering.net>
17624
17625         * lib/canon-host.c: Filter through gnu indent and reword comments
17626         slightly.
17627         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
17628
17629 2005-09-13  Derek Price  <derek@ximbiot.com>
17630
17631         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
17632         failure.
17633         Reported by Jim Meyering  <jim@meyering.net>.
17634
17635 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
17636
17637         * lib/base64.c: Typo.
17638         (base64_encode): Put b64str in initialized data section.
17639
17640 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
17641
17642         Merge glibc and coreutils changes into gnulib, plus a few
17643         extra fixes.
17644         * lib/md5.c: Use #error rather than a string.
17645         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
17646         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
17647         (__attribute__): Define to empty for non recent-GCC.
17648         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
17649         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
17650         Renamed from their non-__ counterparts, with new macros replacing
17651         them if not _LIBC.  Add __THROW attribute.
17652         (rol): Remove.
17653         (struct md5_ctx): Align buffer if using GCC.
17654         * lib/sha1.h (struct sha1_ctx): Likewise.
17655         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
17656         The old name was backwards.
17657         (NOTSWAP): Remove; not used.
17658         (rol): New macro, moved here from md5.h.
17659         (sha1_process_block): Remove a FIXME that doesn't make sense.
17660
17661 2005-09-12  Derek Price  <derek@ximbiot.com>
17662
17663         Return usable errors from canon-host.
17664         * lib/canon-host.h: New file.
17665         * lib/canon-host.c (canon_host): Wrap...
17666         (canon_host_r): ...this new function, which now relies exclusively on
17667         getaddrinfo.
17668         (ch_strerror): New function.
17669         (last_cherror): New global.
17670         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
17671         interface.
17672         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
17673         void *.
17674         (freeaddrinfo): Free ai->ai_canonname when set.
17675
17676 2005-09-12  Derek Price  <derek@ximbiot.com>
17677
17678         Make canon-host require getaddrinfo.
17679         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
17680         AC_LIBSOURCE canon-host.h.  Call...
17681         (gl_PREREQ_CANON_HOST): ...this new function, which requires
17682         gl_GETADDRINFO.
17683         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
17684
17685 2005-09-12  Derek Price  <derek@ximbiot.com>
17686
17687         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
17688         LGPL.
17689         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
17690
17691 2005-09-12  Derek Price  <derek@ximbiot.com>
17692
17693         * lib/gai_strerror.c: Include config.h when available.  Include
17694         getaddrinfo.h before other headers to test interface.
17695         Reported by Larry Jones <lawrence.jones@ugs.com>.
17696
17697 2005-09-12  Derek Price  <derek@ximbiot.com>
17698             Paul Eggert  <eggert@cs.ucla.edu>
17699
17700         * modules/glob (Files): Add glob-libc.h.
17701
17702 2005-09-12  Derek Price  <derek@ximbiot.com>
17703             Paul Eggert  <eggert@cs.ucla.edu>
17704
17705         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
17706         glob_.h, glob-libc.h.
17707         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
17708
17709 2005-09-12  Derek Price  <derek@ximbiot.com>
17710             Paul Eggert  <eggert@cs.ucla.edu>
17711
17712         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
17713         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
17714         protecting things that should be done only in gnulib contexts.
17715         * lib/glob_.h: New file, containing only the glob things needed for
17716         gnulib.
17717         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
17718         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
17719         (glob, globfree, glob_pattern_p): Now defined simply in terms of
17720         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
17721         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
17722         and to respect the namespace rules better.
17723
17724 2005-09-08  Simon Josefsson  <jas@extundo.com>
17725
17726         * modules/socklen: New file.
17727
17728 2005-09-08  Simon Josefsson  <jas@extundo.com>
17729
17730         * m4/socklen.m4: New file.
17731
17732 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17733
17734         * modules/utimens (Files): Add m4/utimbuf.m4, since
17735         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
17736         Reported by Sergey Poznyakoff.
17737
17738 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17739
17740         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
17741         definitions, since that's the preferred style in glibc.
17742         Fix a minor spacing issue, and update copyright notice to match
17743         glibc's.
17744
17745 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17746
17747         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
17748
17749 2005-09-06  Simon Josefsson  <jas@extundo.com>
17750
17751         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
17752         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
17753
17754 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17755
17756         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
17757         warning.
17758
17759 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17760
17761         * config/srclist.txt: Add glibc bug 1302.
17762
17763 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
17764
17765         Change bitset word type from unsigned int to unsigned long int,
17766         as this has better performance on typical 64-bit hosts.
17767         Port bitset code to hosts with unusual word sizes.
17768         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
17769         (build_collating_symbol):
17770         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
17771         argument is a bitset.  This is merely a style issue, but it makes
17772         it clearer that an entire array is expected.
17773         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
17774         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
17775         Port to the case where bitset_word is not the same as unsigned int.
17776         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17777         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
17778         Likewise.
17779         * lib/regexec.c (check_dst_limits_calc_pos_1,
17780         check_subexp_matching_top):
17781         (build_trtable, group_nodes_into_DFAstates):
17782         Likewise.
17783         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
17784         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
17785         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
17786         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
17787         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
17788         * lib/regcomp.c (optimize_subexps, lower_subexp):
17789         Work even if bitset_word has holes in its bitwise representation.
17790         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
17791         * lib/regexec.c (check_dst_limits_calc_pos_1,
17792         check_subexp_matching_top):
17793         Likewise.
17794         * lib/regex_internal.c (re_string_reconstruct):
17795         Don't assume UCHAR_MAX == 255.
17796         * lib/regex_internal.h (bitset_set_all): Likewise.
17797         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
17798         All uses changed.
17799         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
17800         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
17801         All uses changed.
17802         (BITSET_WORD_MAX): New macro.
17803         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
17804         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
17805         (bitset_empty, bitset_copy):
17806         Prefer sizeof (bitset) to multiplying it out ourselves.
17807         (bitset_not_merge): Remove; unused.
17808         (bitset_contain): Return bool, not unsigned int with one bit on.
17809         All callers changed.
17810         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
17811         alignment than re_node_set; do this by defining a new internal
17812         type struct dests_alloc and using it to allocate memory.
17813
17814 2005-09-05  Bruno Haible  <bruno@clisp.org>
17815
17816         * gnulib-tool (func_import): Fix comparison in handling of symbolic
17817         links.
17818
17819 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
17820
17821         * modules/size_max (Makefile.am): Add size_max.h
17822
17823 2005-09-04  Derek Price  <derek@ximbiot.com>
17824
17825         * gnulib-tool (func_import): Fix reversed $symbolic logic.
17826
17827 2005-09-03  Simon Josefsson  <jas@extundo.com>
17828
17829         * gnulib-tool: Fix typo.
17830
17831 2005-09-03  Simon Josefsson  <jas@extundo.com>
17832
17833         * config/srclist.txt: Add glibc bug 1293.
17834
17835 2005-09-03  Derek Price  <derek@ximbiot.com>
17836
17837         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
17838         From Larry Jones <lawrence.jones@ugs.com>.
17839
17840 2005-09-02  Simon Josefsson  <jas@extundo.com>
17841
17842         * modules/socklen: New file.
17843
17844 2005-09-02  Simon Josefsson  <jas@extundo.com>
17845
17846         * modules/havelib: New module.
17847
17848         * modules/gettext, modules/iconv, modules/lock, modules/readline:
17849         Use havelib.
17850
17851 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17852
17853         Check for arithmetic overflow when calculating sizes, to prevent
17854         some buffer-overflow issues.  These patches are conservative, in the
17855         sense that when I couldn't determine whether an overflow was possible,
17856         I inserted a run-time check.
17857         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
17858         macros.
17859         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
17860         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
17861         (re_xnrealloc, re_x2nrealloc): New inline functions.
17862         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
17863         parse_bracket_exp):
17864         (build_equiv_class, build_charclass): Check for arithmetic overflow
17865         in size expression calculations.
17866         * lib/regex_internal.c (re_string_realloc_buffers):
17867         (build_wcs_upper_buffer, re_node_set_add_intersect):
17868         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
17869         (re_dfa_add_node, register_state): Likewise.
17870         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
17871         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
17872         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
17873         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
17874
17875 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17876
17877         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17878         m4/ulonglong.m4.  Problem reported by Martin Lambers.
17879
17880 2005-09-02  Bruno Haible  <bruno@clisp.org>
17881
17882         Support for lib vs. lib64 distinction on biarch platforms.
17883         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
17884         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
17885         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
17886
17887 2005-09-02  Bruno Haible  <bruno@clisp.org>
17888
17889         * gnulib-tool (import): In the other first-use case, provide defaults
17890         as well.
17891
17892 2005-09-02  Bruno Haible  <bruno@clisp.org>
17893
17894         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
17895         patches not yet found in the latest gettext release.
17896
17897 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17898
17899         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
17900         to avoid a collision with bits/local_lim.h in glibc.
17901         All uses changed.  Problem reported by Dmitry V. Levin in
17902         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
17903
17904         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
17905         bugs in int versus size_t comparisons.
17906         (re_string_context_at): Fix bug where the code assumed that
17907         Idx is signed.
17908
17909         Use bool where appropriate.
17910         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
17911         All callers changed.
17912         (calc_eclosure_iter): Likewise, for ROOT arg.
17913         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
17914         (build_charclass_op): Likewise, for NON_MATCH arg.
17915         * lib/regex_internal.c (re_string_allocate, re_string_construct):
17916         (re_string_construct_common): Likewise, for ICASE arg.
17917         * lib/regexec.c (re_search_2_stub, re_search_stub):
17918         Likewise, for RET_LEN arg.
17919         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
17920         (set_regs): Likewise, for FL_BACKTRACK arg.
17921         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
17922         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
17923         (calc_eclosure_iter, parse_bracket_exp):
17924         Use bool for internal variables that are booleans.
17925         * lib/regexec.c (re_search_internal, check_matching,
17926         proceed_next_node):
17927         (set_regs, build_sifted_states, sift_states_bkref):
17928         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
17929         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
17930         (find_collation_sequence_value):
17931         Likewise.
17932         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
17933         (re_node_set_compare):
17934         Return bool, not int. All callers changed.
17935         * lib/regexec.c (check_halt_node_context, check_dst_limits):
17936         (build_trtable, check_node_accept): Likewise.
17937         * lib/regex_internal.h: Include stdbool.h.
17938
17939         Fix bugs uncovered when converting to bool.
17940         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
17941         failure instead of charging ahead blindly.
17942         * lib/regex_internal.c (register_state): Likewise.
17943         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
17944         for freeing internal storage.
17945         (group_nodes_into_DFA_states): Use unsigned int, not int, for
17946         bitset pieces used as boolean, to avoid undefined behavior
17947         on hosts that do int overflow checking.
17948
17949 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17950
17951         * config/srclist.txt: Add glibc bugs 1285-1287.
17952
17953 2005-09-01  Jim Meyering  <jim@meyering.net>
17954
17955         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
17956         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
17957         Require gl_STAT_MACROS, too.
17958
17959 2005-09-01  Bruno Haible  <bruno@clisp.org>
17960
17961         * gnulib-tool (import): In the first-use case, provide defaults.
17962
17963 2005-09-01  Bruno Haible  <bruno@clisp.org>
17964
17965         * gnulib-tool (func_import): Remove the .tmp files.
17966
17967 2005-09-01  Bruno Haible  <bruno@clisp.org>
17968
17969         * gnulib-tool (func_import): Fix handling of symbolic links.
17970
17971 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17972
17973         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
17974         old glibc regex code mishandles strings longer than 2**31 bytes.
17975         This patch fixes this when the regex code is used in gnulib
17976         (i.e., outside glibc).
17977
17978         This patch should not affect the use of the regex code inside
17979         glibc.  No doubt this problem also needs to be handled for glibc
17980         as well, but the result will be an incompatible change to the
17981         glibc ABI, and the old ABI will have to be supported too.  That
17982         can be the the subject for another patch.
17983
17984         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
17985         governing whether the rest of this patch is active.  By default,
17986         the macro is disabled and the patch has no effect.
17987         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
17988         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
17989         (struct re_pattern_buffer, re_search, re_search_2, re_match):
17990         (re_match_2, re_set_registers): Use the new types.
17991         * lib/regex_internal.h (Idx, re_hashval_t): New types.
17992         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
17993         New macros.
17994         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
17995         (re_string_context_at, bin_tree_t, re_dfastate_t):
17996         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
17997         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
17998         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
17999         (re_string_char_size_at, re_string_wchar_at):
18000         (re_string_elem_size_at):
18001         Use the new types and macros to port to 64-bit hosts.
18002         Use unsigned types for internal values, so that the code
18003         mostly works even for arrays larger than SSIZE_MAX.
18004         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
18005         (search_duplicated_node, calc_eclosure_iter, fetch_number):
18006         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
18007         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
18008         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
18009         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
18010         (calc_inveclosure, parse_dup_op, build_range_exp):
18011         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
18012         (fetch_number, create_token_tree, mark_opt_subexp):
18013         Likewise.
18014         * lib/regex_internal.c (re_string_construct_common,
18015         create_ci_newstate):
18016         (create_cd_newstate, re_string_allocate, re_string_construct):
18017         (re_string_realloc_buffers, build_wcs_upper_buffer):
18018         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18019         (re_string_reconstruct, re_string_peek_byte_case):
18020         (re_string_fetch_byte_case, re_string_context_at):
18021         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18022         (re_node_set_init_copy, re_node_set_add_intersect):
18023         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18024         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18025         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18026         (re_acquire_state, re_acquire_state_context, register_state):
18027         Likewise.
18028         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
18029         search_cur_bkref_entry):
18030         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
18031         (re_search_internal, re_search_2_stub, re_search_stub)
18032         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
18033         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
18034         (update_cur_sifted_state, check_dst_limits):
18035         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18036         (check_subexp_limits, sift_states_bkref, merge_state_array):
18037         (check_subexp_matching_top, get_subexp, get_subexp_sub):
18038         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
18039         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18040         (expand_bkref_cache, check_node_accept_bytes):
18041         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
18042         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
18043         (acquire_init_state_context, check_halt_node_context):
18044         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
18045         (sift_states_backward, clean_state_log_if_needed):
18046         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
18047         (find_recover_state, transit_state_sb, transit_state_mb):
18048         (transit_state_bkref, build_trtable, match_ctx_clean):
18049         Likewise.
18050         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
18051         to work around an assumption that REG_MISSING is negative.
18052
18053         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
18054         (seek_collating_symbol_entry) [defined _LIBC]:
18055         (lookup_collation_sequence_value) [defined _LIBC]:
18056         (build_range_exp, build_collating_symbol) [defined _LIBC]:
18057         Use prototypes rather than old-style function definitions.
18058         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
18059         (transit_state_sb) [0]:
18060         (find_collation_sequence_value) [defined _LIBC]: Likewise.
18061
18062         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
18063         rm_eo.
18064
18065         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
18066         (optimize_subexps, lower_subexp):
18067         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
18068         since the signed shift might overflow.  Use 1u<<31 instead.
18069         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18070         Likewise.
18071         * lib/regexec.c (check_dst_limits_calc_pos_1,
18072         check_subexp_matching_top): Likewise.
18073
18074         * lib/regcomp.c (optimize_subexps, lower_subexp):
18075         Use CHAR_BIT rather than 8, for clarity.
18076         * lib/regexec.c (check_dst_limits_calc_pos_1):
18077         (check_subexp_matching_top): Likewise.
18078         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
18079         have to worry about portability issues when shifting it left.
18080         Remove no-longer-needed test for table_size > 0.
18081         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
18082         in a word, as the resulting behavior is undefined.
18083         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
18084         in one case, a <= should have been an <, and in another case the
18085         whole test was missing.
18086         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
18087         the standard name CHAR_BIT.
18088         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
18089         this is not true on one's complement and signed-magnitude hosts.
18090
18091         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
18092         next_last_offset.
18093         (struct re_dfa_t): Remove unused member states_alloc.
18094         * lib/regcomp.c (init_dfa): Don't initialize unused members.
18095
18096 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18097
18098         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
18099         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
18100         and large-file glibc and in 32-bit large-file Solaris.
18101
18102 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18103
18104         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
18105         lengths fit in regoff_t; this isn't true if regoff_t is the same
18106         width as size_t.
18107         * lib/regex.c (re_search_internal): 5th arg is LAST_START
18108         (= START + RANGE) instead of RANGE.  This avoids overflow
18109         problems when regoff_t is the same width as size_t.
18110         All callers changed.
18111         (re_search_2_stub): Check for overflow when adding the
18112         sizes of the two strings.
18113         (re_search_stub): Check for overflow when adding START
18114         to RANGE; if it occurs, substitute the extreme value.
18115
18116 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18117
18118         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
18119
18120 2005-08-31  Jim Meyering  <jim@meyering.net>
18121
18122         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
18123         a pointer-to-const.
18124         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
18125         (register_state): Likewise.
18126         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
18127         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18128         (group_nodes_into_DFAstates): Likewise.
18129
18130 2005-08-31  Jim Meyering  <jim@meyering.net>
18131
18132         * check-module: Add a FIXME comment.
18133
18134 2005-08-31  Eric Blake  <ebb9@byu.net>
18135
18136         * modules/unistd-safer (Files): Add unistd--.h.
18137         * modules/stdio-safer (Files): Add stdio--.h.
18138
18139 2005-08-31  Derek Price  <derek@ximbiot.com>
18140
18141         * lib/getdelim.c (getdelim): Return EOF on EOF.
18142         Reported by Larry Jones <lawrence.jones@ugs.com>.
18143
18144 2005-08-31  Bruno Haible  <bruno@clisp.org>
18145
18146         Avoid unnecessary diffs in the generated lib/Makefile.am.
18147         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
18148         the generated files.
18149         (func_import): Don't set cmd.
18150
18151 2005-08-31  Bruno Haible  <bruno@clisp.org>
18152
18153         * lib/strstr.c: Include <stddef.h>, for NULL.
18154         * lib/strcasestr.c: Likewise.
18155         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
18156
18157 2005-08-31  Bruno Haible  <bruno@clisp.org>
18158
18159         * gnulib-tool: New option --macro-prefix.
18160         (func_import): Use macro_prefix.
18161         (import): Handle option --macro-prefix.
18162
18163 2005-08-31  Bruno Haible  <bruno@clisp.org>
18164
18165         * gnulib-tool (import): Rename most ac_* variables to cached_*.
18166         Also use new variables cached_lgpl, cached_libtool.
18167
18168 2005-08-31  Bruno Haible  <bruno@clisp.org>
18169
18170         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
18171         always instantiating them.
18172
18173 2005-08-31  Bruno Haible  <bruno@clisp.org>
18174
18175         * gnulib-tool (func_import): Read the previous cached settings
18176         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
18177         earlier added by gnulib but are now dropped. Warn when a gnulib file
18178         overwrites a non-gnulib file.
18179
18180 2005-08-31  Bruno Haible  <bruno@clisp.org>
18181
18182         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
18183         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
18184         projects that don't keep autogenerated files in CVS. Put into
18185         actioncmd only the specified modules, not the transitive closure.
18186
18187 2005-08-31  Bruno Haible  <bruno@clisp.org>
18188
18189         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
18190         Create directories that shall be filled.
18191         (import): Don't look for gl_* macros in configure.ac. Recurse across
18192         all directories containing a gnulib-cache.m4 files, if meaningful.
18193
18194 2005-08-31  Bruno Haible  <bruno@clisp.org>
18195
18196         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
18197         (import): Set seen_libtool when we see gl_LIBTOOL.
18198
18199 2005-08-31  Bruno Haible  <bruno@clisp.org>
18200
18201         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
18202         declaration macro definitions from generated gnulib.m4.
18203
18204 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
18205
18206         * lib/iconvme.h: Add prototype for iconv_alloc.
18207
18208 2005-08-29  Simon Josefsson  <jas@extundo.com>
18209
18210         * lib/iconvme.c: Fix errno.
18211
18212 2005-08-29  Bruno Haible  <bruno@clisp.org>
18213
18214         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
18215         that it works when the directory contains spaces.
18216
18217 2005-08-29  Bruno Haible  <bruno@clisp.org>
18218
18219         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
18220
18221 2005-08-29  Bruno Haible  <bruno@clisp.org>
18222
18223         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
18224         Emit more advice.
18225
18226 2005-08-29  Bruno Haible  <bruno@clisp.org>
18227         and Stepan Kasal  <kasal@ucw.cz>
18228
18229         * check-module: If more parameters are given, check each of them
18230         separately; add more exceptions, as noted by Jim Meyering.
18231         (check_module): New procedure.
18232         (%exempt_header): Now contains all exceptions.
18233
18234 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
18235
18236         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
18237
18238 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18239
18240         * lib/iconvme.c: Split iconv_string into iconv_alloc.
18241
18242 2005-08-28  Bruno Haible  <bruno@clisp.org>
18243
18244         * m4/gnulib-tool.m4: New file.
18245
18246 2005-08-27  Jim Meyering  <jim@meyering.net>
18247
18248         * modules/unistd-safer (Files): Add pipe-safer.c.
18249         * modules/fcntl-safer (Files): Add creat-safer.c.
18250
18251 2005-08-27  Jim Meyering  <jim@meyering.net>
18252
18253         * m4/stdlib-safer.m4: New file.  From coreutils.
18254         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
18255         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
18256         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
18257         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
18258         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
18259
18260 2005-08-27  Jim Meyering  <jim@meyering.net>
18261
18262         * lib/fopen-safer.c: Merge minor changes from coreutils.
18263         * lib/dup-safer.c: Likewise.
18264         * lib/fd-safer.c: Likewise.
18265
18266         Merge from coreutils.
18267         * lib/stdio--.h: New file.
18268         * lib/stdlib--.h: New file.
18269         * lib/mkstemp-safer.c: New file.
18270
18271         GNU tar needs these.
18272         * lib/pipe-safer.c: New file.
18273         * lib/creat-safer.c: New file.
18274         * lib/fcntl--.h (creat): Define to creat_safer.
18275         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
18276         * lib/unistd--.h (pipe): Define to pipe_safer.
18277         * lib/unistd-safer.h: Declare pipe_safer.
18278
18279 2005-08-26  Simon Josefsson  <jas@extundo.com>
18280
18281         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
18282         Haible <bruno@clisp.org>.
18283
18284 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
18285
18286         * lib/regex_internal.h: Remove all references to
18287         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
18288         or better.
18289         (bitset_not, bitset_merge, bitset_not_merge):
18290         (bitset_mask, re_string_allocate, re_string_construct):
18291         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
18292         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
18293         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
18294         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
18295         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18296         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18297         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
18298         (re_acquire_state_context):
18299         Remove unnecessary forward decls.
18300         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
18301         Put __attribute at function definition,
18302         now that the function decl has been removed.
18303         * lib/regex_internal.c (re_string_peek_byte_case):
18304         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
18305         Likewise.
18306
18307 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
18308
18309         * m4/regex.m4: Add AC_PREREQ(2.50).
18310         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
18311
18312 2005-08-25  Simon Josefsson  <jas@extundo.com>
18313
18314         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
18315         __fsetlocking.
18316
18317 2005-08-25  Simon Josefsson  <jas@extundo.com>
18318
18319         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
18320         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
18321         GLIBC specific code.
18322
18323 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18324
18325         Make regex safe for g++.  This fixes one real bug (an "err"
18326         that should have been "*err").  g++ problem reported by
18327         Sam Steingold.
18328         * lib/regex_internal.h (re_calloc): New macro, consistent with
18329         re_malloc etc.  All callers of calloc changed to use re_calloc.
18330         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
18331         not int.  All callers changed.
18332         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
18333         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
18334         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
18335         (find_recover_state): Change "err" to "*err"; this fixes what
18336         appears to be a real bug.
18337         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
18338         versus int.
18339
18340 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18341
18342         * modules/regex (Depends-on): Add malloc, since the code
18343         assumes that !malloc(0) means failure.
18344
18345 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18346
18347         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
18348
18349         alloca modernization/simplification for regex.
18350         * lib/regex.c: Remove portability cruft for alloca.  This no longer
18351         needs to be at the start of the file, and can be moved into
18352         regex_internal.h and simplified.
18353         * lib/regex_internal.h: Include <alloca.h>.
18354         (__libc_use_alloca) [!defined _LIBC]: New macro.
18355         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
18356         now works outside glibc.
18357
18358 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18359
18360         * config/srclist.txt: Add glibc bugs 1241, 1245.
18361
18362 2005-08-25  Jim Meyering  <jim@meyering.net>
18363
18364         * lib/open-safer.c: Include <config.h>.
18365         Otherwise, we'd lose LARGEFILE support in any file using
18366         e.g. "fcntl--.h"
18367
18368 2005-08-25  Bruno Haible  <bruno@clisp.org>
18369
18370         * m4/minmax.m4: Require autoconf 2.52.
18371         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
18372         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
18373         alternatives of translit over the alphabet.
18374         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
18375
18376 2005-08-24  Simon Josefsson  <jas@extundo.com>
18377
18378         * tests/test-getpass.c: New file.
18379
18380 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18381
18382         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
18383         for GNU regex features.
18384
18385 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18386
18387         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
18388         * lib/regex.h (regerror): Likewise.
18389
18390         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
18391         requires this.  (The code never needed it.)
18392
18393         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
18394         All uses of recently-renamed identifiers changed to use the new,
18395         POSIX-compliant names.  The code will build and run just fine
18396         without these changes, but it's better to eat our own dog food
18397         and use the standard-conforming names.
18398
18399         * lib/regex.h: Fix a multitude of POSIX name space violations.
18400         These changes have an effect only for programs that define
18401         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
18402         do not change anything for programs compiled in the normal way.
18403         Also, there is no effect on the ABI.
18404
18405         (_REGEX_SOURCE): New macro.
18406         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
18407         defined and _GNU_SOURCE is not; this fixes a name space violation.
18408
18409         Rename the following macros to obey POSIX requirements.
18410         The old names are still visible as macros if _REGEX_SOURCE is defined.
18411         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
18412         RE_BACKSLASH_ESCAPE_IN_LISTS.
18413         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
18414         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
18415         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
18416         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
18417         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
18418         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
18419         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
18420         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
18421         (REG_INTERVALS): renamed from RE_INTERVALS.
18422         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
18423         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
18424         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
18425         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
18426         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
18427         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
18428         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
18429         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
18430         RE_UNMATCHED_RIGHT_PAREN_ORD.
18431         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
18432         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
18433         (REG_DEBUG): renamed from RE_DEBUG.
18434         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
18435         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
18436         unusual, since we can't clash with the POSIX REG_ICASE.
18437         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
18438         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
18439         (REG_NO_SUB): renamed from RE_NO_SUB.
18440         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
18441         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
18442         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
18443         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
18444         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
18445         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
18446         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
18447         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
18448         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
18449         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
18450         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
18451         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
18452         RE_SYNTAX_POSIX_MINIMAL_BASIC.
18453         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
18454         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
18455         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
18456         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
18457         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
18458         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
18459         (REG_FIXED): Renamed from REGS_FIXED.
18460         (REG_NREGS): Renamed from RE_NREGS.
18461
18462         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
18463         of other REG_* macros, since POSIX says the user is allowed to
18464         #undef these macros selectively.
18465
18466         (reg_errcode_t): Update comment stating what other tables need
18467         to be consistent.
18468
18469         Rename the following enum values to obey POSIX requirements.
18470         The old names are still visible as macros.
18471         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
18472         is not defined, since GNU is supposed to be a superset of POSIX as
18473         much as possible, and since we want reg_errcode_t to be a signed
18474         type for implementation consistency.
18475         (_REG_NOERROR): Renamed from REG_NOERROR.
18476         (_REG_NOMATCH): Renamed from REG_NOMATCH.
18477         (_REG_BADPAT): Renamed from REG_BADPAT.
18478         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
18479         (_REG_ECTYPE): Renamed from REG_ECTYPE.
18480         (_REG_EESCAPE): Renamed from REG_EESCAPE.
18481         (_REG_ESUBREG): Renamed from REG_ESUBREG.
18482         (_REG_EBRACK): Renamed from REG_EBRACK.
18483         (_REG_EPAREN): Renamed from REG_EPAREN.
18484         (_REG_EBRACE): Renamed from REG_EBRACE.
18485         (_REG_BADBR): Renamed from REG_BADBR.
18486         (_REG_ERANGE): Renamed from REG_ERANGE.
18487         (_REG_ESPACE): Renamed from REG_ESPACE.
18488         (_REG_BADRPT): Renamed from REG_BADRPT.
18489         (_REG_EEND): Renamed from REG_EEND.
18490         (_REG_ESIZE): Renamed from REG_ESIZE.
18491         (_REG_ERPAREN): Renamed from REG_ERPAREN.
18492         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
18493         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
18494         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
18495         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
18496
18497         (_REG_RE_NAME, _REG_RM_NAME): New macros.
18498         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
18499         changed.  But support the old name if the new one is not defined
18500         and if _REGEX_SOURCE.
18501
18502         Change the following member names in struct re_pattern_buffer.
18503         The old names are still supported if !_REGEX_SOURCE.
18504         The new names are always supported, regardless of _REGEX_SOURCE.
18505         (re_buffer): Renamed from buffer.
18506         (re_allocated): Renamed from allocated.
18507         (re_used): Renamed from used.
18508         (re_syntax): Renamed from syntax.
18509         (re_fastmap): Renamed from fastmap.
18510         (re_translate): Renamed from translate.
18511         (re_can_be_null): Renamed from can_be_null.
18512         (re_regs_allocated): Renamed from regs_allocated.
18513         (re_fastmap_accurate): Renamed from fastmap_accurate.
18514         (re_no_sub): Renamed from no_sub.
18515         (re_not_bol): Renamed from not_bol.
18516         (re_not_eol): Renamed from not_eol.
18517         (re_newline_anchor): Renamed from newline_anchor.
18518
18519         Change the following member names in struct re_registers.
18520         The old names are still supported if !_REGEX_SOURCE.
18521         The new names are always supported, regardless of _REGEX_SOURCE.
18522         (rm_num_regs): Renamed from num_regs.
18523         (rm_start): Renamed from start.
18524         (rm_end): Renamed from end.
18525
18526         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
18527         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
18528         Prepend __ to parameter names.
18529
18530         Undo yesterday's changes.
18531
18532 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18533
18534         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
18535         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
18536         lib/regex.c.
18537
18538 2005-08-24  Jim Meyering  <jim@meyering.net>
18539
18540         Sync from coreutils.
18541         * m4/fcntl-safer.m4: New file.
18542
18543         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
18544         and object files for this module.
18545
18546 2005-08-24  Jim Meyering  <jim@meyering.net>
18547
18548         Sync from coreutils.
18549         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
18550
18551 2005-08-24  Jim Meyering  <jim@meyering.net>
18552
18553         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
18554         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
18555
18556 2005-08-24  Jim Meyering  <jim@meyering.net>
18557
18558         * modules/fcntl-safer: New module.
18559         * modules/fts (Depends-on): Add fcntl-safer.
18560         * MODULES.html.sh (File descriptor based Input/Output):
18561         Add fcntl-safer.
18562
18563 2005-08-24  Bruno Haible  <bruno@clisp.org>
18564
18565         Support for unit test modules.
18566         * modules/README: Mention tests modules.
18567         * modules/TEMPLATE-TESTS: New file.
18568         * gnulib-tool: New options --extract-tests-module, --with-tests and
18569         --tests-base (unused for the moment).
18570         (testsbase, inctests): New variables.
18571         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
18572         (func_verify_module): Exclude TEMPLATE-TESTS.
18573         (func_verify_nontests_module, func_verify_tests_module): New functions.
18574         (func_get_dependencies): Add implicit dependency for tests modules.
18575         (func_get_tests_module): New function.
18576         (func_modules_transitive_closure): When --with-tests was specified,
18577         include the unit tests as well, unless explicitly avoided.
18578         (func_emit_lib_Makefile_am): Ignore the tests modules here.
18579         (func_emit_tests_Makefile_am): New function.
18580         (func_create_testdir): When --with-tests was specified, emit a
18581         tests/ directory.
18582         * MODULES.html.sh (Future developments): Update.
18583
18584 2005-08-24  Bruno Haible  <bruno@clisp.org>
18585
18586         * modules/tls-tests: New file.
18587         * tests/test-tls.c: New file, from GNU gettext.
18588
18589 2005-08-24  Bruno Haible  <bruno@clisp.org>
18590
18591         * modules/lock-tests: New file.
18592         * tests/test-lock.c: New file, from GNU gettext.
18593
18594 2005-08-24  Bruno Haible  <bruno@clisp.org>
18595
18596         * lib/lock.h: Add multiple inclusion guard.
18597         * lib/tls.h: Add multiple inclusion guard.
18598
18599 2005-08-24  Bruno Haible  <bruno@clisp.org>
18600
18601         * gnulib-tool: Add support for the --aux-dir option to
18602         --create-testdir, --create-megatestdir, --test, --megatest.
18603         (func_create_testdir, func_create_megatestdir): Optionally emit a
18604         AC_CONFIG_AUX_DIR directive.
18605         (create-testdir, create-megatestdir, test, megatest): Provide a
18606         default value for $auxdir.
18607
18608 2005-08-24  Bruno Haible  <bruno@clisp.org>
18609
18610         * gnulib-tool (import): Use compound statement instead of subshell
18611         where possible.
18612
18613 2005-08-24  Bruno Haible  <bruno@clisp.org>
18614
18615         * gnulib-tool (import): Change --aux-dir default to "build-aux".
18616
18617 2005-08-24  Bruno Haible  <bruno@clisp.org>
18618
18619         * gnulib-tool (func_version): Update.
18620
18621 2005-08-24  Bruno Haible  <bruno@clisp.org>
18622
18623         * gnulib-tool (func_import, func_create_testdir,
18624         func_create_megatestdir): Quote all autoconf macro arguments.
18625
18626 2005-08-24  Bruno Haible  <bruno@clisp.org>
18627
18628         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
18629         option --force, because --force causes the aclocal.m4 of each
18630         subdirectory to be newer than the corresponding config.h.in.
18631
18632 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18633
18634         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
18635         All contents moved to gl_REGEX.
18636         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
18637         assume that it does.
18638
18639 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18640
18641         * lib/regex.h (REG_NOSYS)
18642         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
18643         Define, since POSIX requires it as of 2001.
18644         (_REG_ENOSYS)
18645         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
18646         New private symbol, used to keep the enum signed in all cases.
18647         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
18648         Youngman in
18649         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
18650
18651         * lib/regex_internal.c (re_string_skip_chars, register_state):
18652         (calc_state_hash):
18653         Remove forward decls; no longer needed now that we use prototypes.
18654         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
18655         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
18656         (clean_state_log_if_needed): Likewise.
18657
18658 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18659
18660         * config/srclist.txt: Add glibc bugs 1231-1233.
18661
18662 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18663
18664         Fix problems reported by Sam Steingold in
18665         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
18666         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
18667         assumed that reg_errcode_t is a signed type, which is not
18668         necessarily true if _XOPEN_SOURCE is not defined.
18669         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
18670         since some compilers warn about it otherwise.
18671
18672 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18673
18674         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
18675         (init_word_char, create_initial_state, duplicate_node_closure):
18676         (fetch_token, peek_token_bracket, build_range_exp):
18677         (build_collating_symbol): Remove forward decls; no longer needed
18678         now that we use prototypes.
18679
18680         * lib/regcomp.c:
18681         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
18682         (re_compile_fastmap_iter, regcomp, regerror, regfree):
18683         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
18684         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
18685         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
18686         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
18687         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
18688         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
18689         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
18690         (build_range_exp, build_collating_symbol, parse_bracket_exp):
18691         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
18692         (build_charclass, build_charclass_op, fetch_number, create_tree):
18693         (create_token_tree, mark_opt_subexp, duplicate_tree):
18694         Use prototypes rather than old-style definitions.
18695
18696         * lib/regex_internal.c:
18697         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
18698         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
18699         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18700         (re_string_reconstruct, re_string_peek_byte_case):
18701         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
18702         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18703         (re_node_set_init_copy, re_node_set_add_intersect):
18704         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18705         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18706         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18707         (re_acquire_state, re_acquire_state_context, register_state):
18708         (create_ci_newstate, create_cd_newstate, free_state):
18709         Likewise.
18710         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
18711         re_search_2):
18712         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
18713         (re_search_internal, prune_impossible_nodes):
18714         (acquire_init_state_context, check_matching, static):
18715         (check_halt_node_context, check_halt_state_context, proceed_next_node):
18716         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
18717         (update_regs, sift_states_backward, build_sifted_states):
18718         (clean_state_log_if_needed, merge_state_array):
18719         (update_cur_sifted_state, add_epsilon_src_nodes):
18720         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
18721         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
18722         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
18723         (find_recover_state, check_subexp_matching_top, transit_state_mb):
18724         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
18725         (check_arrival, check_arrival_add_next_nodes):
18726         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18727         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18728         (check_node_accept_bytes, check_node_accept, extend_buffers):
18729         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
18730         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
18731         (sift_ctx_init):
18732         Likewise.
18733
18734         * lib/regex_internal.h:
18735         (re_string_allocate, re_string_construct, re_string_reconstruct):
18736         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
18737         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
18738         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
18739         (re_string_context_at, re_string_peek_byte_case):
18740         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
18741         is defined, since we now use prototypes always.
18742
18743         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
18744         C89 or better.  All uses removed.
18745
18746 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18747
18748         * config/srclist.txt: Add glibc bugs 1220-1227.
18749
18750 2005-08-20  Jim Meyering  <jim@meyering.net>
18751
18752         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
18753         of unused local, dfa.
18754
18755 2005-08-20  Bruno Haible  <bruno@clisp.org>
18756
18757         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
18758
18759 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18760
18761         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
18762         (re_node_set_insert_last, re_dfa_add_node):
18763         Rename local variables to avoid GCC shadowing warnings.
18764
18765 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18766
18767         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
18768         [defined lint]: Suppress bogus uninitialized-variable warnings.
18769
18770         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
18771         and let the caller return REG_ESPACE if out of space.  This
18772         removes an uninitialied-variable warning with GCC 4.0.1, and also
18773         avoids taking the address of a local variable.  All callers
18774         changed.
18775
18776 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18777
18778         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
18779         $LIBCSRC/posix/regexec.c.
18780         Add glibc bug 1217 for regcomp.c.
18781
18782 2005-08-19  Jim Meyering  <jim@meyering.net>
18783
18784         * lib/regexec.c (proceed_next_node): Redo local variables to
18785         avoid GCC shadowing warnings.
18786
18787 2005-08-18  Bruno Haible  <bruno@clisp.org>
18788
18789         * lib/strstr.c (strstr): Fix return value in multibyte case.
18790         * lib/strcasestr.c (strcasestr): Likewise.
18791
18792 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18793
18794         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
18795
18796 2005-08-17  Jim Meyering  <jim@meyering.net>
18797
18798         Make the %s format (seconds since the epoch) work for a negative
18799         number and when used with a zero-padded field width, e.g. %015s.
18800
18801         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
18802         label so that it precedes the code to set `digits'.  Otherwise,
18803         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
18804         print `00-22'.  Now, it prints `-0022', as it should.
18805
18806 2005-08-17  Bruno Haible  <bruno@clisp.org>
18807
18808         * modules/strstr (Files): Add m4/mbrtowc.m4.
18809         (Depends-on): Add mbuiter.
18810
18811 2005-08-17  Bruno Haible  <bruno@clisp.org>
18812
18813         * modules/strcasestr: New file.
18814         * MODULES.html.sh (String handling, based on ANSI C 89): Add
18815         strcasestr.
18816
18817 2005-08-17  Bruno Haible  <bruno@clisp.org>
18818
18819         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
18820
18821 2005-08-17  Bruno Haible  <bruno@clisp.org>
18822
18823         * modules/mbuiter: New file.
18824         * MODULES.html.sh (Extended multibyte and wide character utilities):
18825         Add mbuiter.
18826
18827 2005-08-17  Bruno Haible  <bruno@clisp.org>
18828
18829         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
18830         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
18831
18832 2005-08-17  Bruno Haible  <bruno@clisp.org>
18833
18834         * m4/strcasestr.m4: New file.
18835
18836 2005-08-17  Bruno Haible  <bruno@clisp.org>
18837
18838         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
18839         * lib/strstr.c: Completely rewritten, with multibyte locale support.
18840
18841 2005-08-17  Bruno Haible  <bruno@clisp.org>
18842
18843         * lib/strcasestr.h: New file.
18844         * lib/strcasestr.c: New file.
18845
18846 2005-08-17  Bruno Haible  <bruno@clisp.org>
18847
18848         * lib/strcasecmp.c: Use mbuiter.h.
18849
18850 2005-08-17  Bruno Haible  <bruno@clisp.org>
18851
18852         * lib/mbuiter.h: New file.
18853
18854 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
18855
18856         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
18857         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
18858         and gl_GETOPT are both invoked via different paths (as happens
18859         with GNU tar CVS because it uses both argp and getopt), the former
18860         wins.
18861
18862 2005-08-16  Bruno Haible  <bruno@clisp.org>
18863
18864         * modules/tls: New file.
18865         * MODULES.html.sh (Multithreading): Add tls.
18866
18867 2005-08-16  Bruno Haible  <bruno@clisp.org>
18868
18869         * modules/strnlen1: New file.
18870         * MODULES.html.sh (String handling): Add strnlen1.
18871
18872 2005-08-16  Bruno Haible  <bruno@clisp.org>
18873
18874         * modules/strcase (Files): Add m4/mbrtowc.m4.
18875         (Depends-on): Add strnlen1, mbchar.
18876
18877 2005-08-16  Bruno Haible  <bruno@clisp.org>
18878
18879         * modules/mbiter: New file.
18880         * MODULES.html.sh (Extended multibyte and wide character utilities):
18881         Add mbiter.
18882
18883 2005-08-16  Bruno Haible  <bruno@clisp.org>
18884
18885         * modules/mbfile: New file.
18886         * MODULES.html.sh (Extended multibyte and wide character utilities):
18887         Add mbfile.
18888
18889 2005-08-16  Bruno Haible  <bruno@clisp.org>
18890
18891         * modules/mbchar: New file.
18892         * MODULES.html.sh (Extended multibyte and wide character utilities):
18893         New section.
18894
18895 2005-08-16  Bruno Haible  <bruno@clisp.org>
18896
18897         * m4/tls.m4: New file, from GNU gettext.
18898
18899 2005-08-16  Bruno Haible  <bruno@clisp.org>
18900
18901         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
18902         always.
18903         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
18904
18905 2005-08-16  Bruno Haible  <bruno@clisp.org>
18906
18907         * m4/mbiter.m4: New file.
18908
18909 2005-08-16  Bruno Haible  <bruno@clisp.org>
18910
18911         * m4/mbfile.m4: New file.
18912
18913 2005-08-16  Bruno Haible  <bruno@clisp.org>
18914
18915         * m4/mbchar.m4: New file.
18916
18917 2005-08-16  Bruno Haible  <bruno@clisp.org>
18918
18919         * lib/tls.h: New file, from GNU gettext.
18920         * lib/tls.c: New file, from GNU gettext.
18921
18922 2005-08-16  Bruno Haible  <bruno@clisp.org>
18923
18924         * lib/strnlen1.h: New file.
18925         * lib/strnlen1.c: New file.
18926
18927 2005-08-16  Bruno Haible  <bruno@clisp.org>
18928
18929         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
18930         (mbi_init): Update.
18931         (mbi_avail, mbi_advance): Let the iteration end before the terminating
18932         NUL byte, not after it.
18933
18934 2005-08-16  Bruno Haible  <bruno@clisp.org>
18935
18936         * lib/strcase.h (strcasecmp): Add note in comments.
18937         * lib/strncasecmp.c: Use code from strcasecmp.c.
18938         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
18939         (strcasecmp): Work correctly in multibyte locales.
18940
18941 2005-08-16  Bruno Haible  <bruno@clisp.org>
18942
18943         * lib/mbiter.h: New file.
18944
18945 2005-08-16  Bruno Haible  <bruno@clisp.org>
18946
18947         * lib/mbfile.h: New file.
18948
18949 2005-08-16  Bruno Haible  <bruno@clisp.org>
18950
18951         * lib/mbchar.h: New file.
18952         * lib/mbchar.c: New file.
18953
18954 2005-08-16  Bruno Haible  <bruno@clisp.org>
18955
18956         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
18957         the valid ones. Makes the comparison operations transitive:
18958         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
18959         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
18960
18961 2005-08-15  Simon Josefsson  <jas@extundo.com>
18962
18963         * modules/ssize_t (License): Change to 'unlimited'.
18964
18965         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
18966
18967 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
18968
18969         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
18970         Add comments for each pending glibc patch.
18971
18972 2005-08-15  Bruno Haible  <bruno@clisp.org>
18973
18974         * lib/regex.h (__restrict_arr): Don't define to __restrict if
18975         __cplusplus is defined.
18976
18977 2005-08-14  Jim Meyering  <jim@meyering.net>
18978
18979         Sync from coreutils.
18980
18981         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
18982         Use the hash-table-based cycle-detection code not just when
18983         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
18984         Reported by James Youngman in
18985         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
18986         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
18987         FTS_TIGHT_CYCLE_CHECK.
18988         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
18989         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
18990         once again.
18991         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
18992         * lib/fts.c (fd_safer): Remove decl.
18993         Include fcntl--.h rather than unistd-safer.h
18994         (fts_safe_changedir): Don't call fd_safer; no longer needed
18995         now that we include fcntl--.h.
18996
18997 2005-08-12  Simon Josefsson  <jas@extundo.com>
18998
18999         * modules/getndelim2: Use ssize_t module.
19000         * modules/getnline: Likewise.
19001         * modules/safe-read: Likewise.
19002         * modules/xreadlink: Likewise.
19003
19004         * modules/ssize_t: New file.
19005
19006 2005-08-12  Simon Josefsson  <jas@extundo.com>
19007
19008         * m4/readline.m4: Look for termcap, curses or ncurses if required.
19009
19010 2005-08-12  Simon Josefsson  <jas@extundo.com>
19011
19012         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19013         ssize_t.
19014
19015 2005-08-12  Simon Josefsson  <jas@extundo.com>
19016
19017         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
19018         readline, getdelim and check_version.
19019         (Support for systems lacking ISO C 99: Sizes of integer types):
19020         Add size_max.
19021
19022 2005-08-12  Bruno Haible  <bruno@clisp.org>
19023
19024         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
19025
19026 2005-08-11  Simon Josefsson  <jas@extundo.com>
19027
19028         * modules/readline: New file.
19029
19030         * modules/strnlen (Files): Add strnlen.h.
19031
19032 2005-08-11  Simon Josefsson  <jas@extundo.com>
19033
19034         * m4/readline.m4: New file.
19035
19036 2005-08-11  Simon Josefsson  <jas@extundo.com>
19037
19038         * lib/readline.h, readline.c: New file.
19039
19040 2005-08-11  Simon Josefsson  <jas@extundo.com>
19041
19042         * doc/gnulib.texi (Initial import, Finishing touches): Mention
19043         gl_AVOID.
19044
19045 2005-08-11  Bruno Haible  <bruno@clisp.org>
19046
19047         * lib/strnlen.h (strnlen): Change parameter name to match comment.
19048
19049 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
19050
19051         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
19052
19053 2005-08-10  Simon Josefsson  <jas@extundo.com>
19054
19055         * tests/test-iconvme.c: New file.
19056
19057 2005-08-10  Simon Josefsson  <jas@extundo.com>
19058
19059         * m4/strnlen.m4: New file.
19060
19061         * m4/strndup.m4: Don't check for strnlen declaration, done in
19062         strnlen.m4.
19063
19064 2005-08-10  Simon Josefsson  <jas@extundo.com>
19065
19066         * lib/strndup.c: Use strnlen.h.
19067
19068         * lib/strnlen.h: New file.
19069
19070 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
19071
19072         * README: Typos.
19073
19074 2005-08-02  Simon Josefsson  <jas@extundo.com>
19075
19076         * modules/readline: New file.
19077
19078 2005-08-02  Simon Josefsson  <jas@extundo.com>
19079
19080         * modules/getdelim: New file.
19081
19082         * modules/getline: Rewrite, don't use getndelim2.
19083
19084 2005-08-02  Simon Josefsson  <jas@extundo.com>
19085
19086         * m4/getline.m4: Separate out getdelim stuff into separate module.
19087
19088         * m4/getdelim.m4: New file.
19089
19090 2005-08-02  Simon Josefsson  <jas@extundo.com>
19091
19092         * lib/getline.h, getline.c: Rewrite.
19093
19094         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
19095
19096 2005-07-31  Bruno Haible  <bruno@clisp.org>
19097
19098         * lib/lock.h (gl_lock_initializer): New macro.
19099         (gl_lock_define_initialized): Use it.
19100         (gl_rwlock_initializer): New macro.
19101         (gl_rwlock_define_initialized): Use it.
19102         (gl_recursive_lock_initializer): New macro.
19103         (gl_recursive_lock_define_initialized): Use it.
19104
19105 2005-07-30  Karl Berry  <karl@gnu.org>
19106
19107         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
19108         Report from Ben Pfaff, regarding getopt.
19109
19110 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
19111
19112         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
19113         normal way.
19114         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
19115         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
19116         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
19117         (gl_GETOPT): Use the new macros.  Most of the implementation
19118         is moved to the new macros.  This is for programs like Emacs
19119         that don't want all the functionality of gl_GETOPT.
19120
19121 2005-07-26  Bruno Haible  <bruno@clisp.org>
19122
19123         * m4/lock.m4: Update from GNU gettext.
19124
19125 2005-07-26  Bruno Haible  <bruno@clisp.org>
19126
19127         * lib/lock.h: Update from GNU gettext.
19128         * lib/lock.c: Update from GNU gettext.
19129
19130 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
19131
19132         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
19133         obsolescent AC_TRY_RUN.  Include the default includes files, for
19134         'exit'.
19135
19136 2005-07-24  Bruno Haible  <bruno@clisp.org>
19137
19138         * modules/visibility: New file.
19139         * MODULES.html.sh (Misc): Add visibility.
19140
19141 2005-07-24  Bruno Haible  <bruno@clisp.org>
19142
19143         * m4/visibility.m4: New file.
19144
19145 2005-07-24  Bruno Haible  <bruno@clisp.org>
19146
19147         * doc/visibility.texi: New file.
19148
19149 2005-07-22  Bruno Haible  <bruno@clisp.org>
19150
19151         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
19152         $(ALLOCA_H), redundant through BUILT_SOURCES.
19153         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
19154         redundant through BUILT_SOURCES.
19155         * modules/byteswap (Makefile.am): Remove explicit dependency on
19156         $(BYTESWAP_H), redundant through BUILT_SOURCES.
19157         * modules/fnmatch (Makefile.am): Remove explicit dependency on
19158         $(FNMATCH_H), redundant through BUILT_SOURCES.
19159         * modules/getopt (Makefile.am): Remove explicit dependency on
19160         $(GETOPT_H), redundant through BUILT_SOURCES.
19161         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
19162         redundant through BUILT_SOURCES.
19163         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
19164         redundant through BUILT_SOURCES.
19165         * modules/stdbool (Makefile.am): Remove explicit dependency on
19166         $(STDBOOL_H), redundant through BUILT_SOURCES.
19167         * modules/stdint (Makefile.am): Remove explicit dependency on
19168         $(STDINT_H), redundant through BUILT_SOURCES.
19169         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
19170         Remove explicit dependency on $(SYSEXITS_H).
19171         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
19172
19173 2005-07-18  Simon Josefsson  <jas@extundo.com>
19174
19175         * lib/check-version.c (check_version): Accept identical versions too.
19176
19177 2005-07-18  Bruno Haible  <bruno@clisp.org>
19178
19179         * modules/lock: New file.
19180         * MODULES.html.sh (Multithreading): New section.
19181
19182 2005-07-18  Bruno Haible  <bruno@clisp.org>
19183
19184         * m4/lock.m4: New file, from GNU gettext.
19185
19186 2005-07-18  Bruno Haible  <bruno@clisp.org>
19187
19188         * lib/lock.h: New file, from GNU gettext.
19189         * lib/lock.c: New file, from GNU gettext.
19190
19191 2005-07-18  Bruno Haible  <bruno@clisp.org>
19192
19193         * lib/lock.h (gl_once_t): New type.
19194         (gl_once_define, gl_once): New macros.
19195         * lib/lock.c (fresh_once): New variable.
19196         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
19197         functions.
19198
19199 2005-07-16  Simon Josefsson  <jas@extundo.com>
19200
19201         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
19202         workaround, suggested by Bruno.
19203
19204 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19205
19206         * modules/xalloc (Depends-on): Add xalloc-die.
19207         * modules/xvasprintf (Depends-on): Add xalloc-die.
19208
19209 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19210
19211         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
19212         with a minor change.
19213
19214 2005-07-15  Bruno Haible  <bruno@clisp.org>
19215
19216         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
19217         When using lib/poll.c, define poll as rpl_poll.
19218
19219 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
19220
19221         * modules/argp (Depends-on): Remove unlocked-io.
19222
19223 2005-07-14  Derek Price  <derek@ximbiot.com>
19224
19225         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
19226         for glob symlink bug.
19227
19228 2005-07-14  Bruno Haible  <bruno@clisp.org>
19229
19230         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
19231         Instead, test for *_unlocked function declarations directly.
19232
19233 2005-07-11  Simon Josefsson  <jas@extundo.com>
19234
19235         * modules/size_max: New file.
19236
19237         * modules/xsize: Depend on size_max module for size_max.m4.
19238
19239 2005-07-11  Simon Josefsson  <jas@extundo.com>
19240
19241         * lib/size_max.h: New file.
19242
19243 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
19244
19245         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
19246         copyright symbol and the year.
19247         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
19248         (version_etc_va): Use parameterized copyright notice.
19249         Reword to conform to the current GNU coding standards.
19250
19251 2005-07-11  Karl Berry  <karl@gnu.org>
19252
19253         * doc/gnulib.texi (Quoting): new node.
19254         (Initial import): more info, from Patrice.
19255
19256 2005-07-11  Bruno Haible  <bruno@clisp.org>
19257
19258         * gnulib-tool (func_usage): Document option --avoid.
19259         (Command line options): Handle --avoid.
19260         (func_acceptable): New function.
19261         (func_modules_transitive_closure): Use it.
19262
19263 2005-07-11  Bruno Haible  <bruno@clisp.org>
19264
19265         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
19266         Reported by Jim Meyering.
19267
19268 2005-07-10  Bruno Haible  <bruno@clisp.org>
19269
19270         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
19271         Needed when size_t is smaller than 'unsigned int'.
19272         Reported by Paul Eggert.
19273
19274 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19275
19276         * modules/argp (Depends-on): Add unlocked-io
19277
19278 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19279
19280         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
19281         block of defines.
19282
19283 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
19284
19285         * config/srclist.txt: Comment out regcomp.c, since we have a porting
19286         fix now.
19287
19288 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
19289         and Paul Eggert  <eggert@cs.ucla.edu>
19290
19291         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
19292         in wint_t, not wchar_t.  Remove now-unnecessary cast.
19293
19294 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19295
19296         * modules/regex (Files): Add lib/regex_internal.c,
19297         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
19298         (Depends-on): Add extensions.
19299         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
19300
19301 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19302
19303         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
19304         pathconf.
19305         * m4/same.m4 (gl_SAME): Likewise.
19306         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
19307
19308         * m4/regex.m4: Adjust to new libc regex implementation.
19309         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
19310         all the .c and .h parts of (the new) regex.
19311         Quote the m4 stuff better.
19312         Check for RE_ICASE bug of old gnulib.
19313         Check for REG_STARTEND of recent libc.
19314         Rename local variables from jm_* to gl_*.
19315         Quote operand of "test -f".
19316         Say "recent enough" version of libc, not "version 2".
19317         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
19318         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
19319         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
19320         Remove check for btowc, isascii.
19321         Require AM_LANGINFO_CODESET.
19322
19323 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19324
19325         * lib/regex.c, regex.h: Sync from libc.
19326         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
19327         * lib/regexec.c:
19328         New files, synced from libc, except that regex_internal.h
19329         currently has a small porting fix.
19330
19331 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19332
19333         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
19334         regex_internal.c, regexec.c.
19335         Add regex_internal.h too, but as a comment, since the libc version
19336         is currently broken in gnulib mode.
19337
19338 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
19339
19340         Support programs like Emacs that use gnulib but not gettext.
19341         * MODULES.html.sh (Internationalization functions): Add gettext-h.
19342         * modules/gettext-h: New file.
19343         * modules/gettext (Files): Remove lib/gettext.h.
19344         (Depends-on): Add gettext-h.
19345         (Makefile.am): Remove lib_SOURCES.
19346         * modules/argmatch, modules/c-stack, modules/closeout:
19347         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
19348         * modules/execute, modules/file-type, modules/getaddrinfo:
19349         * modules/getopt, modules/human, modules/javacomp:
19350         * modules/javaexec, modules/mkdir-p, modules/obstack:
19351         * modules/openat, modules/pagealign_alloc, modules/pipe:
19352         * modules/quotearg, modules/regex, modules/rpmatch:
19353         * modules/unicodeio, modules/userspec, modules/version-etc:
19354         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
19355         * modules/xsetenv:
19356         Depend on gettext-h, not gettext.
19357
19358 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
19359
19360         * gnulib-tool (func_import): Add support for 'public domain' license.
19361         * modules/alloca, modules/atexit, modules/memmove:
19362         Now public domain, not GPL.
19363         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
19364         * modules/realloc, modules/strerror, modules/strtod:
19365         Now LGPL, not GPL.
19366
19367 2005-07-05  Bruno Haible  <bruno@clisp.org>
19368
19369         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
19370         autoconf CVS. Needed for mingw.
19371
19372 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19373
19374         Remove the dependency of the strftime module on the tzset module.
19375         * modules/strftime (Depends-on): Remove dependency on tzset.
19376
19377 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19378
19379         Remove the dependency of the strftime module on the tzset module.
19380         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
19381         gl_FUNC_TZSET_CLOBBER.
19382
19383 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19384
19385         Remove the dependency of the strftime module on the tzset module.
19386         * lib/strftime.c (my_strftime)
19387         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
19388         Copy the input structure, to work around some of the bug with
19389         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
19390         Solaris releases, you should also use the tzset module, but we won't
19391         require it as a dependency any more since we don't want LGPLed code
19392         to depend on GPLed code.
19393
19394 2005-07-02  Jim Meyering  <jim@meyering.net>
19395
19396         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
19397         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
19398         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
19399         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
19400
19401 2005-07-02  Jim Meyering  <jim@meyering.net>
19402
19403         * lib/backupfile.c (backup_args): Change a `0' to NULL.
19404
19405 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
19406
19407         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
19408         declares only 'struct timespec;' (!).
19409
19410 2005-07-01  Jim Meyering  <jim@meyering.net>
19411
19412         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
19413         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
19414         * lib/save-cwd.c, tempname.c:
19415         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
19416         and don't include <sys/file.h>).
19417
19418 2005-06-29  Jim Meyering  <jim@meyering.net>
19419
19420         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
19421         type name.  Use the variable name instead.
19422         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
19423         Likewise.
19424
19425 2005-06-28  Simon Josefsson  <jas@extundo.com>
19426
19427         * modules/check-version (Files): Add check-version.m4.
19428
19429 2005-06-28  Simon Josefsson  <jas@extundo.com>
19430
19431         * m4/check-version.m4: New file, suggested by Jim Meyering
19432         <jim@meyering.net>.
19433
19434 2005-06-28  Simon Josefsson  <jas@extundo.com>
19435
19436         * lib/check-version.h, lib/check-version.c: New files.
19437
19438 2005-06-28  Simon Josefsson  <jas@extundo.com>
19439
19440         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
19441         collision with global variable.  Better indentation.  Don't
19442         increment buffer pointer beyond buffer end.  Based on comments
19443         from Paul Eggert <eggert@cs.ucla.edu>.
19444
19445         * lib/base64.h: Indent.
19446
19447 2005-06-28  Simon Josefsson  <jas@extundo.com>
19448
19449         * doc/gnulib.texi (Library version handling): New section.
19450
19451 2005-06-28  Jim Meyering  <jim@meyering.net>
19452
19453         * check-module (find_included_lib_files): Hard-code another
19454         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
19455         but modules/fts-lgpl (correctly) does not list those files.
19456
19457         * modules/canonicalize (Files): Add lib/pathmax.h.
19458
19459 2005-06-25  Simon Josefsson  <jas@extundo.com>
19460
19461         * modules/check-version: New file.
19462
19463 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
19464
19465         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
19466         initializer of struct addrinfo, as an indication that we don't
19467         care how many members the structure has.
19468
19469 2005-06-24  Derek Price  <derek@ximbiot.com>
19470         and Bruno Haible  <bruno@clisp.org>
19471
19472         Remove stat module & update lstat.
19473         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
19474         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
19475         * m4/stat.m4: Remove this 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         * lib/stat.c: Remove this file...
19482         (slash_aware_lstat): ...moving this content and its support...
19483         * lib/lstat.c (rpl_lstat): ...into here.
19484         * lib/lstat.h: New file.
19485
19486 2005-06-24  Derek Price  <derek@ximbiot.com>
19487         and Bruno Haible  <bruno@clisp.org>
19488
19489         Remove stat module & update lstat.
19490         * config/srclist.txt (libc sources): Remove stat.
19491
19492 2005-06-24  Derek Price  <derek@ximbiot.com>
19493         and Bruno Haible  <bruno@clisp.org>
19494
19495         Remove stat module & update lstat.
19496         * MODULES.html.sh (stat): Remove.
19497         * MODULES.html: Regenerated.
19498         * modules/lstat (Description): Correct function name.
19499         (Files): Add "lstat.h".
19500         (Depends-on): Remove stat, add xalloc, stat-macros.
19501         * modules/stat: Remove this file.
19502         (Include): Add "lstat.h", remove <sys/stat.h>.
19503
19504 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
19505
19506         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
19507         (ranged_convert): Don't save conversion in a temporary struct.
19508         This causes a warning with GCC 4.0.0, and anyway in the typical
19509         case it's not worth the extra 100 bytes or so of code.
19510         (ranged_convert, __mktime_internal): When calling a function via a
19511         pointer P, use P () rather than (*P) (), as we now assume C89 or
19512         better.
19513
19514 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19515
19516         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
19517         "who -r" failed to give output.  Problem reported by Tim Waugh.
19518
19519         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
19520         (xcalloc): Use it to avoid needless tests.
19521         Problem reported by Jim Meyering.
19522
19523 2005-06-20  Derek Price  <derek@ximbiot.com>
19524
19525         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
19526         unnecessary for Autoconfs > 2.59c.
19527
19528 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19529
19530         * lib/argp.h (__option_is_short): Check upper limit of
19531         __key. Isprint() requires its argument to have the value
19532         of an unsigned char or EOF.
19533
19534 2005-06-16  Jim Meyering  <jim@meyering.net>
19535
19536         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
19537         when either N or S is zero.
19538
19539 2005-06-16  Derek Price  <derek@ximbiot.com>
19540
19541         * m4/bison.m4: Declare YACC & YFLAGS precious.
19542
19543 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
19544
19545         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
19546         multibyte string or pattern, fall back on unibyte matching.
19547         Problem reported by James Youngman.
19548
19549 2005-06-08  Bruno Haible  <bruno@clisp.org>
19550
19551         * modules/csharpcomp: New file.
19552         * MODULES.html.sh (C#): Add csharpcomp.
19553
19554 2005-06-08  Bruno Haible  <bruno@clisp.org>
19555
19556         * m4/csharpcomp.m4: New file, from GNU gettext.
19557
19558 2005-06-08  Bruno Haible  <bruno@clisp.org>
19559
19560         * lib/csharpcomp.h: New file, from GNU gettext.
19561         * lib/csharpcomp.c: New file, from GNU gettext.
19562         * lib/csharpcomp.sh.in: New file, from GNU gettext.
19563
19564 2005-06-08  Bruno Haible  <bruno@clisp.org>
19565
19566         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
19567         warning on mingw.
19568
19569 2005-06-07  Derek Price  <derek@ximbiot.com>
19570
19571         Sync from CVS.
19572         * lib/glob_.h: Indent nested #ifdef.
19573
19574 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19575
19576         Sync from coreutils.
19577         Use "file name" when talking about file names, instead of "filename"
19578         or "path", as per the GNU coding standards.
19579         * lib/mkdir-p.c: Renamed from makepath.c.
19580         (make_dir_parents): Renamed from make_path.  All callers changed.
19581         * lib/mkdir-p.h: Likewise.  All includers changed.
19582         * lib/filenamecat.c: Renamed from path-concat.c.
19583         (file_name_concat): Renamed from path_concat.  All callers changed.
19584         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
19585         * lib/filenamecat.h: Likewise.  All includers changed.
19586         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
19587         in comments or local variable names.
19588         * lib/basename.c: Likewise.
19589         * lib/canonicalize.c, canonicalize.h: Likewise.
19590         * lib/dirname.c, dirname.h: Likewise.
19591         * lib/euidaccess.c: Likewise.
19592         * lib/exclude.c: Likewise
19593         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
19594         * lib/fsusage.c, fsuage.h: Likewise.
19595         * lib/fts.c, fts_.h: Likewise.
19596         * lib/getcwd.c: Likewise.
19597         * lib/getloadavg.c: Likewise.
19598         * lib/mkstemp.c: Likewise.
19599         * lib/mountlist.c, mountlist.h: Likewise.
19600         * lib/openat.c, openat.h: Likewise.
19601         * lib/readlink-stub.c: Likewise.
19602         * lib/readutmp.c, readutmp.h: Likewise.
19603         * lib/rename.c: Likewise.
19604         * lib/rmdir.c: Likewise.
19605         * lib/same.c: Likewise.
19606         * lib/savedir.c: Likewise.
19607         * lib/stripslash.c: Likewise.
19608         * lib/tempname.c: Likewise.
19609         * lib/xreadlink.c: Likewise.
19610         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
19611         All uses changed.
19612         * lib/exclude.h: Likewise.
19613
19614         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
19615         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19616         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
19617         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19618         * lib/pathmax.h: Include <limits.h> unconditionally, since other
19619         files have been getting away with it for years (MORE/BSD 4.3
19620         is extinct now).
19621         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
19622         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19623
19624         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
19625         Define to 256, not 255, as per modern POSIX.
19626
19627 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19628
19629         Sync from coreutils.
19630         Use "file name" when talking about file names, instead of "filename"
19631         or "path", as per the GNU coding standards.
19632         * MODULES.html.sh: mkdir-p renamed from makepath.
19633         filenamecat renamed from path-concat.
19634         * modules/filenamecat: Renamed from modules/path-concat.
19635         (Files): filenamecat.h and filenamecat.c renamed from
19636         path-concat.h and path-concat.c.
19637         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
19638         (Include): filenamecat.h, not path-concat.h.
19639         * modules/mkdir-p: Renamed from modules/makepath.
19640         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
19641         makepath.c.
19642         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
19643         (Include): mkdir-p.h, not makepath.h.
19644
19645 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19646
19647         Sync from coreutils.
19648         * m4/mkdir-p.m4: Renamed from makepath.m4.
19649         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
19650         Rename files from makepath.c to mkdir-p.c, and from
19651         makepath.h to mkdir-p.h.
19652         * m4/filenamecat.m4: Renamed from path-concat.m4.
19653         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
19654         Rename files from path-concat.c to filenamecat.c,
19655         and from path-concat.h to filenamecat.h.
19656         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
19657         "file name" in local variables or comments.
19658         * m4/rename.m4: Likewise.
19659
19660 2005-06-01  Bruno Haible  <bruno@clisp.org>
19661
19662         * modules/csharpexec: New file.
19663         * MODULES.html.sh (C#): New section.
19664
19665 2005-06-01  Bruno Haible  <bruno@clisp.org>
19666
19667         * m4/csharp.m4: New file, from GNU gettext.
19668         * m4/csharpexec.m4: New file, from GNU gettext.
19669
19670 2005-06-01  Bruno Haible  <bruno@clisp.org>
19671
19672         * lib/csharpexec.h: New file, from GNU gettext.
19673         * lib/csharpexec.c: New file, from GNU gettext.
19674         * lib/csharpexec.sh.in: New file, from GNU gettext.
19675
19676 2005-05-31  Derek Price  <derek@ximbiot.com>
19677             Paul Eggert  <eggert@cs.ucla.edu>
19678
19679         Sync from cvs.
19680         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19681
19682 2005-05-31  Derek Price  <derek@ximbiot.com>
19683             Paul Eggert  <eggert@cs.ucla.edu>
19684
19685         Sync from cvs.
19686         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19687
19688 2005-05-29  Derek Price  <derek@ximbiot.com>
19689
19690         * config/srclist.txt (glob_.h, glob.c): Add these files.
19691
19692 2005-05-29  Derek Price  <derek@ximbiot.com>
19693
19694         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
19695         * modules/glob: New file.
19696         * modules/getlogin_r: Add link to POSIX spec in description.
19697
19698 2005-05-29  Derek Price  <derek@ximbiot.com>
19699             Paul Eggert  <eggert@cs.ucla.edu>
19700
19701         * m4/glob.m4: New file.
19702
19703 2005-05-29  Derek Price  <derek@ximbiot.com>
19704             Paul Eggert  <eggert@cs.ucla.edu>
19705
19706         * lib/glob_.h, lib/glob.c: New files.
19707
19708 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19709
19710         * modules/fts (Files): Remove m4/inttypes-pri.m4.
19711         * modules/fts-lgpl (Depends-on): Remove gettext.
19712
19713 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19714
19715         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
19716         and don't require gt_INTTYPES_PRI.
19717
19718 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19719
19720         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
19721
19722         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
19723         the configuration hassle isn't worth it.
19724         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
19725         (LONGEST_MODIFIER, PRIuMAX): Remove.
19726
19727 2005-05-27  Bruno Haible  <bruno@clisp.org>
19728
19729         * lib/getlogin_r.h: Remove second include of <stddef.h>.
19730
19731 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
19732
19733         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
19734         _POSIX_PTHREAD_SEMANTICS for Solaris.
19735
19736 2005-05-25  Derek Price  <derek@ximbiot.com>
19737
19738         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
19739
19740 2005-05-25  Derek Price  <derek@ximbiot.com>
19741             Paul Eggert  <eggert@cs.ucla.edu>
19742
19743         * modules/getlogin_r, m4/getlogin_r.m4: New files.
19744         * lib/getlogin_r.c, getlogin_r.h: New files.
19745
19746 2005-05-25  Bruno Haible  <bruno@clisp.org>
19747             Derek Price  <derek@ximbiot.com>
19748
19749         * lib/getlogin_r.h: Simplify API documentation.
19750
19751 2005-05-23  Derek Price  <derek@ximbiot.com>
19752
19753         * modules/minmax (Files): Add m4/minmax.m4.
19754         (configure.ac): Add gl_MINMAX.
19755
19756 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
19757
19758         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
19759         so that unistd-safer.h (GPL'ed code) need not be included.
19760
19761 2005-05-22  Bruno Haible  <bruno@clisp.org>
19762
19763         * m4/minmax.m4: New file.
19764         Based on a patch by Derek Price <derek@ximbiot.com>.
19765
19766 2005-05-22  Bruno Haible  <bruno@clisp.org>
19767
19768         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
19769         (INT64_MIN): Fix definition.
19770         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
19771
19772         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
19773         NEED_SIGNED_INT_TYPES.
19774
19775         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
19776         HAVE_SYSTEM_INTTYPES.
19777
19778 2005-05-22  Bruno Haible  <bruno@clisp.org>
19779
19780         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
19781         Also include <sys/param.h> if it defines MIN, MAX.
19782         Based on a patch by Derek Price <derek@ximbiot.com>.
19783
19784 2005-05-21  Jim Meyering  <jim@meyering.net>
19785
19786         * modules/fts (Files): Add m4/inttypes-pri.m4.
19787         (Depends-on): Add lstat and remove gettext.  Alphabetize.
19788
19789 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19790
19791         New fts module.
19792         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
19793         (setup_dir, free_dir): New functions.
19794         (enter_dir, leave_dir): Define trivial
19795         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
19796         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
19797         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
19798         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
19799         Move to fts-cycle.c.
19800         (fts_open): Use setup_dir.
19801         (fts_close): Use free_dir.
19802         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
19803         This adds a label and some gotos, but the alternatives were messier.
19804         Check for memory allocation failure when entering a dir.
19805         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
19806         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
19807         (FTS): New member fts_cycle, that is a union that contains the
19808         old active_dir_ht and cycle_state.  All uses changed to mention
19809         fts_cycle.ht and fts_cycle.state.
19810         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
19811         fts.c, with the following changes:
19812         (setup_dir, free_dir): New functions.
19813         (enter_dir): Now returns bool.  Return true if successful, false
19814         if memory exhausted.  All callers changed.
19815         Do not bother partly cleaning up on
19816         memory allocation failure; that is free_dir's job.
19817         However, free ad if hash_insert fails, to avoid memory leak.
19818         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
19819         fts->fts_options to see which union member to use.
19820
19821 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19822
19823         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
19824         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
19825
19826 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19827
19828         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
19829
19830 2005-05-20  Jim Meyering  <jim@meyering.net>
19831
19832         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
19833         Now a macro, to pacify GCC.
19834
19835 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19836
19837         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
19838         of -1.
19839
19840 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19841
19842         * lib/chown.c (rpl_chown): Return -1 on failure.
19843
19844 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19845
19846         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
19847         Don't check for stddef.h.
19848         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
19849         don't use its results.
19850         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
19851         since we include them unconditionally.  Don't require
19852         AM_STDBOOL_H, since stdbool is a prerequisite.
19853         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
19854         since we assume C89 or better.
19855         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
19856         as we don't use their results.
19857         Don't check for fchdir, memmove, memset, strrchr, as we use
19858         them unconditionally.
19859         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
19860         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
19861
19862 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19863
19864         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
19865         Include <stddef.h> unconditionally, since we assume C89 now.
19866         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
19867         * lib/fts.c: Include fts_.h first, to check interface.
19868         Do not include intprops.h; no longer needed.
19869         Include cycle-check.h and hash.h, since fts_.h no longer does.
19870         Remove unnecessary casts of closedir to void.
19871         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
19872         decide whether to decrement nlinks.
19873         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
19874         (FTS): Use struct hash_table * instead of Hash_table, so that
19875         we no longer need to include hash.h here.
19876
19877 2005-05-18  Jim Meyering  <jim@meyering.net>
19878
19879         * modules/dirfd (License): Change to LGPL.  Most of the code
19880         is already in the public domain.
19881
19882 2005-05-18  Jim Meyering  <jim@meyering.net>
19883
19884         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
19885         Reported by Yoann Vandoorselaere.
19886
19887 2005-05-17  Jim Meyering  <jim@meyering.net>
19888
19889         * m4/fts.m4: New file, from coreutils.
19890
19891 2005-05-17  Jim Meyering  <jim@meyering.net>
19892
19893         * lib/fts.c, lib/fts_.h: New files, from coreutils.
19894
19895 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19896
19897         Sync from coreutils.
19898         * m4/unlinkdir.m4: New file.
19899
19900 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19901
19902         Sync from coreutils.
19903         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
19904         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
19905         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
19906         White space changes only.
19907         * lib/makepath.c (make_path): Port to hosts where leading "//" is
19908         special.
19909         * lib/yesno.c: Include getline.h, not ctype.h.
19910         (yesno): Don't remove leading white space; POSIX doesn't allow it.
19911         Use getline to remove arbitrary restriction on response length.
19912
19913 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19914
19915         * config/srclist-update: Spell out "Street" in FSF postal
19916         mail address; this is the style the FSF seems to prefer.
19917
19918         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
19919         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
19920         this updates FSF postal mail address.
19921
19922         Sync from coreutils.
19923         * modules/unlinkdir: New file.
19924         * modules/yesno (Depends-on): Add getline.
19925         * MODULES.html.sh (File system functions): Add unlinkdir.
19926
19927 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19928
19929         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
19930         lib/strsep.h:
19931         Change the initial comment to refer to GPL, not LGPL.
19932         gnulib-tool will change it to LGPL as needed.
19933
19934         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
19935         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
19936         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
19937         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
19938         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
19939         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
19940         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
19941         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
19942         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
19943         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
19944         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
19945         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
19946         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
19947         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
19948         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
19949         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
19950         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
19951         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
19952         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
19953         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
19954         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
19955         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
19956         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
19957         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
19958         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
19959         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
19960         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
19961         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
19962         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
19963         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
19964         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
19965         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
19966         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
19967         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
19968         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
19969         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
19970         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
19971         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
19972         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
19973         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
19974         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
19975         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
19976         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
19977         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
19978         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
19979         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
19980         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
19981         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
19982         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
19983         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
19984         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
19985         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
19986         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
19987         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
19988         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
19989         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
19990         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
19991         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
19992         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
19993         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
19994         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
19995         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
19996         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
19997         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
19998         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
19999         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
20000         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
20001         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
20002         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
20003         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
20004         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
20005         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
20006         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
20007         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
20008         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
20009         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
20010         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
20011         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
20012         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
20013         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
20014         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
20015         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
20016         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
20017         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
20018         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
20019         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
20020         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
20021         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
20022         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
20023         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
20024         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
20025         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
20026         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
20027         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
20028         lib/yesno.c, lib/yesno.h:
20029         Update FSF postal mail address.
20030
20031 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20032
20033         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
20034         tests/test-memmem.c, tests/test-stpncpy.c:
20035         Update FSF postal mail address.
20036
20037 2005-05-13  Bruno Haible  <bruno@clisp.org>
20038
20039         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
20040         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
20041         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
20042         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
20043         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
20044         Add support for 64-bit integers in the MSVC compiler.
20045
20046 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20047
20048         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
20049
20050 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
20051
20052         * gnulib-tool (func_import): Sort and uniquify recommended includes.
20053
20054 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
20055
20056         * doc/getdate.texi (General date syntax): Don't say that date
20057         date --iso-8601=ns generates acceptable dates; it doesn't yet.
20058         Problem reported by Nic Ferrier.
20059
20060 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20061
20062         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
20063         specified in ai_socktype. Fix invalid ai_protocol
20064         check. ai_protocol is usually set to 0 or depending on
20065         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
20066         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
20067         ai_socktype / ai_protocol in the returned addrinfo structure.
20068
20069 2005-05-10  Simon Josefsson  <jas@extundo.com>
20070
20071         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
20072         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
20073
20074 2005-05-10  Karl Berry  <karl@gnu.org>
20075
20076         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
20077         (from http://www.gnu.org/licenses).
20078         * doc/COPYING.LIB: also rename to COPYING.LESSER.
20079         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
20080         fdl.texi suffices.
20081
20082 2005-05-10  Karl Berry  <karl@gnu.org>
20083
20084         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
20085         (COPYING.DOC): remove.
20086
20087         * config/srclist-update: new FSF address.
20088
20089 2005-05-10  Derek Price  <derek@ximbiot.com>
20090
20091         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
20092         possible.
20093
20094 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20095             Bruno Haible  <bruno@clisp.org>
20096
20097         * modules/inet_ntop: New file.
20098         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20099         inet_ntop.
20100
20101 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20102             Bruno Haible  <bruno@clisp.org>
20103
20104         * m4/inet_ntop.m4: New file.
20105
20106 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20107             Bruno Haible  <bruno@clisp.org>
20108
20109         * lib/inet_ntop.h: New file.
20110         * lib/inet_ntop.c: New file, from glibc with modifications.
20111
20112 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
20113
20114         * modules/time_r (License): Change to LGPL.
20115         * modules/extensions (License): Change to LGPL.  Actually,
20116         the license is more permissive than that, but currently gnulib-tool
20117         doesn't know how to handle more-permissive licenses.
20118
20119         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
20120         Problem reported by Dave Love.
20121
20122 2005-05-08  Jim Meyering  <jim@meyering.net>
20123
20124         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
20125         blank.
20126
20127 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20128
20129         * modules/argmatch (Depends-on): Add stdbool.
20130         * modules/backupfile (Depends-on): Likewise.
20131         * modules/chdir-long (Depends-on): Likewise.
20132         * modules/closeout (Depends-on): Likewise.
20133         * modules/cycle-check (Depends-on): Likewise.
20134         * modules/dirname (Depends-on): Likewise.
20135         * modules/fnmatch (Depends-on): Likewise.
20136         * modules/fsusage (Depends-on): Likewise.
20137         * modules/fwriteerror (Depends-on): Likewise.
20138         * modules/getcwd (Depends-on): Likewise.
20139         * modules/getloadavg (Depends-on): Likewise.
20140         * modules/hard-locale (Depends-on): Likewise.
20141         * modules/makepath (Depends-on): Likewise.
20142         * modules/mountlist (Depends-on): Likewise.
20143         * modules/nanosleep (Depends-on): Likewise.
20144         * modules/posixtm (Depends-on): Likewise.
20145         * modules/quotearg (Depends-on): Likewise.
20146         * modules/readtokens (Depends-on): Likewise.
20147         * modules/readtokens0 (Depends-on): Likewise.
20148         * modules/readutmp (Depends-on): Likewise.
20149         * modules/save-cwd (Depends-on): Likewise.
20150         * modules/strftime (Depends-on): Likewise.
20151         * modules/userspec (Depends-on): Likewise.
20152         * modules/utimecmp (Depends-on): Likewise.
20153         * modules/xgetcwd (Depends-on): Likewise.
20154         * modules/xnanosleep (Depends-on): Likewise.
20155         * modules/xstrtod (Depends-on): Likewise.
20156         * modules/yesno (Depends-on): Likewise.
20157
20158 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
20159
20160         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
20161         needless checks.
20162
20163 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20164
20165         Merge from coreutils.  Among other things,
20166         add bulletproofing for cases where stdin, stdout, or stderr are closed.
20167         * lib/fd-safer.c: New file.
20168         * lib/fcntl-safer.h, open-safer.c: Remove.
20169         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
20170         * lib/dup-safer.c: Include unistd-safer.h first.
20171         Don't include errno.h.
20172         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
20173         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
20174         * lib/file-type.c: Rely on file-type.h change.
20175         * lib/getloadavg.c: Include unistd-safer.h.
20176         (getloadavg): Use safer open.
20177         * lib/getusershell.c: Include "stdio-safer.h".
20178         (getusershell): Use safer fopen.
20179         * lib/long-options.c (long_options): Use NULL rather than 0.
20180         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
20181         'free'.
20182         * lib/modechange.c: Likewise.
20183         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
20184         (MODE_DONE): New constant.
20185         (struct mode_change): Remove 'next' member.
20186         (make_node_op_equals): New function; like the old one of the
20187         same name, except it allocates an array.
20188         (mode_compile, mode_create_from_ref): Use it.
20189         (mode_compile): Allocate result as an array, not a linked list.
20190         Parse octal string ourself, so that we catch mistakes like "+0".
20191         (mode_adjust): Arg is an array, not a linked list.
20192         * lib/modechange.c: Include stat-macros.h, xalloc.h.
20193         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
20194         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
20195         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
20196         Remove.  This is now stat-macros.h's job.
20197         (talloc): Remove.  All callers replaced by xalloc, so that
20198         our invokers don't have to worry about reporting memory failures.
20199         (make_node_op_equals): Remove.
20200         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20201         New constants.
20202         (struct mode_change): Moved here from modechange.h.
20203         (mode_append_entry): Remove.
20204         (mode_compile): Remove MASKED_OPS arg, since it encouraged
20205         apps to have incorrect behavior.  Use simpler algorithm for head
20206         and tail.  Don't futz with umask; that's now the job of mode_adjust.
20207         Detect more invalid usages rather than having somewhat-random behavior.
20208         Don't insert an "a=" action, as that leads to incorrect behavior.
20209         (mode_compile, mode_create_from_ref): Return NULL on error instead
20210         of an enum, since now there's only one way to have an error.  All
20211         callers changed.
20212         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
20213         at the correct time.  Simplify calculation of "+u" and its ilk.
20214         Don't mishandle "+X".
20215         (mode_free): Remove "register" and localize decls.
20216         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20217         (struct mode_change): Move to modechange.c; callers don't
20218         need to see this stuff.
20219         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
20220         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
20221         (mode_change, mode_adjust): Reflect the new signatures noted above.
20222         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
20223         that might redefine system include files.
20224         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
20225         (my_usleep): Use NULL rather than (void *) 0.
20226         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
20227         Use siginterrupt to specify that system calls should be interrupted.
20228         (rpl_nanosleep): Move initialization of suspended closer to call of
20229         my_usleep.
20230         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
20231         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
20232         (desirable_utmp_entry): New function.
20233         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
20234         using x2nrealloc, to simplify logic.
20235         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
20236         size calculation.  Do not assume utmp file is a regular file.
20237         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
20238         (READ_UTMP_CHECK_PIDS): New constant.
20239         * lib/save-cwd.c: Include unistd-safer.h.
20240         (save_cwd): Use fd_safer.
20241         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
20242         [!_LIBC] Include "stat-macros.h" instead.
20243         * lib/unistd-safer.h (fd_safer): New decl.
20244
20245 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20246
20247         * modules/getloadavg (Depends-on): Add unistd-safer.
20248         * modules/getusershell (Depends-on): Add stdio-safer.
20249         * modules/lstat (Depends-on): Remove xalloc.
20250         * modules/mkstemp (Depends-on): Add stat-macros.
20251         * modules/modechange (Depends-on): Remove xstrtol.
20252         Add stat-macros, xalloc.
20253         * modules/save-cwd (Depends-on): Add unistd-safer.
20254         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
20255         * modules/unistd-safer (Files): Add lib/fd-safer.c
20256         (Makefile.am): Remove lib_SOURCES.
20257
20258         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
20259         Remove fcntl-safer; unistd-safer supersedes it.
20260
20261 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20262
20263         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
20264         AC_HEADER_STAT.
20265         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
20266         (gl_PREREQ_CHOWN): Remove.
20267         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
20268         it.  Don't require AC_HEADER_STAT.
20269         (gl_PREREQ_LSTAT): Remove.
20270         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
20271         Don't require AC_HEADER_STAT.
20272         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
20273         (gl_PREREQ_RMDIR): Remove.
20274         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
20275         mention stat-macros.h or AC_HEADER_STAT, since we'll make
20276         the stat-macros module a prerequisite.
20277         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
20278         * m4/filemode.m4 (gl_FILEMODE): Likewise.
20279         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
20280         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
20281         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
20282         variable names.
20283         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
20284         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
20285         variable prefixes.
20286         * m4/fcntl-safer.m4: Remove.
20287         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
20288         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
20289         Invoke gl_PREREQ_FD_SAFER.
20290         (gl_PREREQ_FD_SAFER): New macro.
20291         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
20292         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
20293         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
20294         Remove duplicate call to AC_LIBOBJ(readutmp).
20295         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
20296
20297         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
20298         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
20299
20300 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20301
20302         * MODULES.html.sh (Misc): Add byteswap.
20303
20304 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20305
20306         * modules/getcwd (Depends-on): Add extensions.
20307         * modules/openat (Depends-on): Likewise.
20308
20309 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20310
20311         * modules/byteswap: New file.
20312
20313 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20314
20315         * m4/byteswap.m4: New file.
20316
20317 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20318
20319         * lib/byteswap_.h: New file.
20320
20321 2005-04-25  Karl Berry  <karl@gnu.org>
20322
20323         * m4/gettext.m4: Update from GNU gettext 0.14.4.
20324
20325 2005-04-25  Albert Chin  <china@thewrittenword.com>
20326
20327         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
20328         Toolkit C bug.
20329
20330 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
20331
20332         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
20333         (func_ln_if_changed) Remove forcibly for no error message
20334         in case file does not exist.
20335
20336 2005-04-19  Simon Josefsson  <jas@extundo.com>
20337
20338         * gnulib-tool (Options): Make --symlink mean --symbolic.
20339
20340 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
20341
20342         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
20343
20344 2005-04-16  Simon Josefsson  <jas@extundo.com>
20345
20346         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
20347
20348 2005-04-15  Simon Josefsson  <jas@extundo.com>
20349
20350         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
20351
20352 2005-04-15  Simon Josefsson  <jas@extundo.com>
20353
20354         * gnulib-tool: Rename --symlink to --symbolic.
20355
20356 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
20357
20358         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
20359         symbolic links to files instead of copying/moving.  Add --aux-dir,
20360         specifying directory relative --dir where auxiliary build tools
20361         are placed.
20362
20363 2005-04-14  Bruno Haible  <bruno@clisp.org>
20364
20365         * modules/allocsa (License): Change to LGPL.
20366         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
20367
20368 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
20369
20370         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
20371         that "UTC +1 second" continues to work.  Problem reported
20372         by Dmitry V. Levin.
20373         (relunit_snumber): New rule.
20374         (relunit): Use it.
20375
20376 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
20377
20378         * lib/getdate.y (universal_time_zone_table): New constant.
20379         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
20380         universal_time_zone_table.
20381         (lookup_zone): Prefer universal_time_zone_table to
20382         local_time_zone_table, so that "GMT" time stamps are allowed in
20383         London during the summer.  Problem reported by Ian Abbott.
20384
20385 2005-04-12  Jim Meyering  <jim@meyering.net>
20386
20387         * lib/human.c (humblock): Set *options even when returning due to
20388         xstrtoumax conversion failure.  Thanks to a used-uninitialized
20389         warning from gcc-4.
20390
20391 2005-04-09  Jim Meyering  <jim@meyering.net>
20392
20393         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
20394         -Wuninitialized: initialize tm0.tm_year.
20395
20396 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
20397
20398         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
20399         count, since there's no maximum.  All uses changed.
20400         Add member dsts_seen.
20401         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
20402         not being INT_MAX.
20403         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
20404         Use pc_rels_seen to decide whther a date is absolute.
20405
20406         * lib/getdate.y (number): Don't overwrite year.
20407         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
20408         check.
20409
20410 2005-04-02  Simon Josefsson  <jas@extundo.com>
20411
20412         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
20413         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
20414
20415 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
20416
20417         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
20418         where no absolute path name can be longer than PATH_MAX.
20419
20420 2005-03-27  Jim Meyering  <jim@meyering.net>
20421
20422         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
20423
20424 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
20425
20426         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
20427         "one's complement" -> "ones' complement" in comment, as per Knuth.
20428         "value of type" -> "type or expression" in comment.
20429         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
20430
20431 2005-03-26  Jim Meyering  <jim@meyering.net>
20432
20433         Comment nits.
20434         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
20435         Correct typos: s/or/of/.
20436
20437 2005-03-26  Jim Meyering  <jim@meyering.net>
20438
20439         * modules/check-include-files: Move to ../ and rename to...
20440         * check-module: ...this.
20441
20442 2005-03-25  Jim Meyering  <jim@meyering.net>
20443
20444         * modules/xvasprintf (Files): Add xalloc.h.
20445
20446 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
20447
20448         * modules/gettext (Files): config/config.rpath ->
20449         build-aux/config.rpath
20450         * modules/iconv (Files): Likewise.
20451         Problem reported by Oskar Liljeblad.
20452
20453 2005-03-23  Jim Meyering  <jim@meyering.net>
20454
20455         * modules/check-include-files: New script to check for
20456         missing dependencies, multiple includes, etc.
20457
20458         * modules/c-strtold (Depends-on): Add xalloc.
20459         * modules/c-strtod (Depends-on): Add xalloc.
20460         * modules/hash (Depends-on): Add xalloc.
20461         (Files): Remove lib/xalloc.h.
20462
20463         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
20464         * modules/userspec (Files): Add lib/inttostr.h.
20465
20466 2005-03-23  Jim Meyering  <jim@meyering.net>
20467
20468         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
20469
20470 2005-03-22  Jim Meyering  <jim@meyering.net>
20471
20472         * modules/stat-macros: New module.
20473         * modules/canonicalize, modules/euidaccess, modules/file-type,
20474         * modules/filemode, modules/lchown, modules/makepath,
20475         * modules/rmdir, modules/stat: Depend on new stat-macros module
20476         rather than listing lib/stat-macros.h manually.
20477         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
20478
20479 2005-03-22  Jim Meyering  <jim@meyering.net>
20480
20481         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
20482
20483 2005-03-22  Bruno Haible  <bruno@clisp.org>
20484
20485         * config/srclist.txt: Replace target directory 'config' with
20486         'build-aux'.
20487         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
20488         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
20489         ../build-aux/.
20490
20491 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
20492
20493         * modules/chdir-long (Depends-on): Add mempcpy.
20494
20495         * modules/acl, modules/backupfile, modules/c-strtod,
20496         modules/c-strtold, modules/canon-host, modules/canonicalize,
20497         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
20498         modules/exclude, modules/exitfail, modules/file-type,
20499         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
20500         modules/getdate, modules/getline, modules/getpagesize,
20501         modules/getpass, modules/getugroups, modules/group-member,
20502         modules/hard-locale, modules/hash, modules/human, modules/idcache,
20503         modules/inttostr, modules/long-options, modules/makepath,
20504         modules/md5, modules/memcasecmp, modules/memcoll,
20505         modules/modechange, modules/mountlist, modules/path-concat,
20506         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
20507         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
20508         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
20509         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
20510         modules/strftime, modules/strndup, modules/strverscmp,
20511         modules/timespec, modules/unlocked-io, modules/userspec,
20512         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
20513         modules/yesno:
20514         Remove lib_SOURCES line from Makefile.am section, as this is now
20515         done automatically by the corresponding Autoconf macro.
20516
20517 2005-03-21  Jim Meyering  <jim@meyering.net>
20518
20519         Changes imported from coreutils.
20520
20521         * lib/cycle-check.c: Don't include xalloc.h.
20522
20523         * lib/path-concat.c: Don't include assert.h.
20524         (path_concat): Remove assertion that would have triggered
20525         for ABASE starting with more than one slash.
20526         Reported by Andreas Schwab.
20527
20528         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
20529         properly when ABASE is an absolute file name.
20530         Correct the description of this function.
20531         Include <assert.h>.
20532         Add an assertion and a test driver.
20533         This fixes a bug introduced on 2004-07-02.
20534         Andreas Schwab reported the resulting failure of cp --parents:
20535         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
20536
20537 2005-03-21  Jim Meyering  <jim@meyering.net>
20538
20539         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
20540         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
20541
20542 2005-03-21  Jim Meyering  <jim@meyering.net>
20543         and  Paul Eggert  <eggert@cs.ucla.edu>
20544
20545         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
20546         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
20547         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
20548         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
20549         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
20550         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
20551         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
20552         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
20553         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
20554         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
20555         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
20556         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
20557         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
20558         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
20559         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
20560         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
20561         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
20562         for these modules.
20563
20564 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
20565
20566         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
20567         (which shouldn't happen), generate nothing instead of returning 0
20568         immediately, so that nstrftime (NULL, ...) doesn't return 0.
20569
20570 2005-03-16  Bruno Haible  <bruno@clisp.org>
20571
20572         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
20573         HAVE_LONGLONG_64BIT.
20574
20575 2005-03-16  Bruno Haible  <bruno@clisp.org>
20576
20577         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
20578         HAVE_LONGLONG_64BIT.
20579
20580 2005-03-16  Bruno Haible  <bruno@clisp.org>
20581
20582         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
20583         HAVE_LONGLONG_64BIT.
20584
20585 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
20586
20587         * lib/strftime.c (my_strftime): Prepend space to format so that we can
20588         reliably distinguish strftime failure from empty output on POSIX
20589         hosts.
20590
20591 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
20592
20593         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
20594         (iconv_string): Don't guess a size-zero buffer, as that might cause
20595         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
20596         result would be 'too large', where 'too large' is (heuristically)
20597         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
20598         overflow concerns.  This will prevent some unwanted malloc failures
20599         when the inputs are very large.
20600
20601 2005-03-15  Karl Berry  <karl@gnu.org>
20602
20603         * config/srclist.txt (config.rpath): from gettext.
20604         * config/config.rpath: update.
20605
20606 2005-03-15  Bruno Haible  <bruno@clisp.org>
20607
20608         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
20609         to 'negate'.
20610
20611         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
20612         variable.
20613
20614         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
20615         results.
20616
20617 2005-03-14  Simon Josefsson  <jas@extundo.com>
20618
20619         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
20620         <fx@gnu.org>.
20621
20622 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
20623
20624         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
20625         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
20626         intprops.h.
20627         * lib/strtol.c: Likewise.
20628
20629 2005-03-14  Jim Meyering  <jim@meyering.net>
20630
20631         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
20632         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
20633         to be nonzero so that we (and caller) can detect the difference
20634         between a valid zero-length expansion and an error return, even
20635         when the underlying strftime fails before writing anything into
20636         that location.
20637
20638 2005-03-14  Bruno Haible  <bruno@clisp.org>
20639
20640         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
20641         Update from GNU gettext 0.14.3.
20642
20643 2005-03-10  Jim Meyering  <jim@meyering.net>
20644
20645         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
20646
20647 2005-03-10  Jim Meyering  <jim@meyering.net>
20648
20649         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
20650         so that this module works on systems without fchdir.
20651
20652 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
20653
20654         Factor int-properties macros into a single file, except for
20655         glibc-related files.
20656         * lib/intprops.h: New file.
20657         * lib/getloadavg.c: Include it instead of limits.h.
20658         (INT_STRLEN_BOUND): Remove.
20659         * lib/human.c: Include intprops.h.
20660         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
20661         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
20662         302/1000.
20663         * lib/inttostr.h: Include intprops.h instead of limits.h.
20664         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
20665         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
20666         for consistency with intprops.h.
20667         (time_t_is_integer, twos_complement_arithmetic): Use them.
20668         * lib/sig2str.h: Include <signal.h>, intprops.h.
20669         (INT_STRLEN_BOUND): Remove.
20670         * lib/strftime.c (TYPE_SIGNED): Remove.
20671         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
20672         * lib/strtol.c: Adjust comments to match intprops.h.
20673         * lib/userspec.c: Include intprops.h.
20674         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
20675         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
20676         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
20677         instead of rolling our own expressions.
20678         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
20679
20680         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
20681         instead of int.
20682         (my_strftime): Do not mishandle years close to INT_MAX, by doing
20683         the right thing even if adding 1900 would overflow.  Similarly
20684         for tm_mon + 1 and tm_yday + 1.
20685         Make %Y always equivalent to %C%y, and similarly for %G and %g.
20686         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
20687         (DO_SIGNED_NUMBER): New macro.
20688         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
20689
20690 2005-03-07  Bruno Haible  <bruno@clisp.org>
20691
20692         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
20693
20694 2005-03-07  Bruno Haible  <bruno@clisp.org>
20695
20696         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
20697
20698 2005-03-04  Derek R. Price  <derek@ximbiot.com>
20699
20700         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
20701         (func_import): Only replace files via --import when they have actually
20702         changed.
20703
20704 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20705
20706         * m4/mmap-anon.m4: New file.
20707         * m4/pagealign_alloc.m4: New file.
20708
20709 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20710             Bruno Haible  <bruno@clisp.org>
20711
20712         * modules/pagealign_alloc: New file.
20713         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
20714
20715 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20716             Bruno Haible  <bruno@clisp.org>
20717
20718         * lib/pagealign_alloc.h: New file.
20719         * lib/pagealign_alloc.c: New file.
20720
20721 2005-03-03  Bruno Haible  <bruno@clisp.org>
20722
20723         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
20724         Use an all-permissive copyright notice, recommended by RMS.
20725
20726 2005-03-02  Bruno Haible  <bruno@clisp.org>
20727
20728         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
20729         of AIX, the replacement has to be done only after <string.h> is
20730         included, therefore not in config.h. stpncpy.h does the replacement,
20731         and stpncpy.c uses it.
20732
20733 2005-03-02  Bruno Haible  <bruno@clisp.org>
20734
20735         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
20736         stpncpy.c uses it.
20737
20738 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20739
20740         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
20741         The workaround isn't strictly needed for POSIX conformance, and
20742         it's too much of a pain to configure and maintain.  We'll ask
20743         people to fix their kernels instead.
20744         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
20745         (NANOSLEEP_BUG_WORKAROUND): Remove.
20746         (xnanosleep): Remove the workaround.
20747
20748 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20749
20750         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
20751         Reported by Derek Price.
20752         (Include): Add "timespec.h".
20753
20754         * modules/xnanosleep (Depends-on): Remove gethrxtime.
20755
20756 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20757
20758         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
20759         to detect nanosleep bug.
20760
20761 2005-03-01  Bruno Haible  <bruno@clisp.org>
20762
20763         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
20764
20765 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
20766
20767         * modules/gethrxtime: New file.
20768         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
20769         (Depends-on): Add gethrxtime.
20770         (configure.ac): Add gl_XNANOSLEEP.
20771         (Makefile.am): Remove lib_SOURCES line.
20772
20773 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20774
20775         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
20776         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
20777
20778 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20779
20780         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
20781         * lib/timespec.h (gettime): Return void, since it always
20782         succeeds now.  All uses changed.
20783         * lib/gettime.c (gettime) Likewise.
20784         [HAVE_NANOTIME]: Prefer nanotime.
20785         Assume gettimeofday succeeds, as POSIX requires.
20786         Assime time () succeeds, since other code already does.
20787         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
20788         (timespec_subtract): Remove.
20789         (NANOSLEEP_BUG_WORKAROUND): New constant.
20790         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
20791         things considerably.  Use it only on GNU/Linux hosts, since the
20792         workaround shouldn't be needed elsewhere.
20793
20794 2005-02-24  Bruno Haible  <bruno@clisp.org>
20795
20796         * modules/gettext (Files): Add m4/glibc2.m4.
20797
20798 2005-02-24  Bruno Haible  <bruno@clisp.org>
20799
20800         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
20801         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
20802         * m4/progtest.m4:
20803         Update from GNU gettext 0.14.2.
20804         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
20805
20806 2005-02-24  Bruno Haible  <bruno@clisp.org>
20807
20808         * lib/localcharset.c: Update from GNU gettext 0.14.2.
20809         * lib/config.charset: Update from GNU gettext 0.14.2.
20810
20811 2005-02-24  Bruno Haible  <bruno@clisp.org>
20812
20813         * lib/gettext.h: Update from GNU gettext 0.14.2.
20814
20815 2005-02-23  Simon Josefsson  <jas@extundo.com>
20816
20817         * m4/iconvme.m4: New file.
20818
20819 2005-02-23  Jim Meyering  <jim@meyering.net>
20820
20821         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
20822         change.
20823         Thanks to Bruno Haible for catching it.
20824
20825 2005-02-22  Simon Josefsson  <jas@extundo.com>
20826
20827         * modules/iconvme: New file.
20828
20829         * MODULES.html.sh: Add iconvme.
20830
20831 2005-02-22  Simon Josefsson  <jas@extundo.com>
20832
20833         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
20834
20835 2005-02-22  Simon Josefsson  <jas@extundo.com>
20836
20837         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
20838
20839 2005-02-22  Jim Meyering  <jim@meyering.net>
20840
20841         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
20842         s/ifndef/ifdef/.
20843
20844 2005-02-20  Neil Conway  <neilc@samurai.com>
20845
20846         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
20847         returned by OSX/Darwin if the specified buffer is not large
20848         enough for the hostname.
20849
20850 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20851
20852         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
20853         pass it to _help, otherwise the latter coredumps trying to
20854         dereference state.root_argp.
20855
20856 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20857
20858         * modules/chdir-long (Depends-on): Add memrchr.
20859         * modules/memrchr (Files): Add lib/memrchr.h.
20860         (Include): "memrchr.h".
20861
20862 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20863
20864         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
20865
20866 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20867
20868         * lib/memrchr.h: New file.
20869         * lib/chdir-long.c: Include it.
20870         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
20871         Don't bother including stddef.h.
20872
20873 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
20874
20875         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
20876         inclusion.
20877         Include <sys/types.h>, for dev_t.
20878         (ME_DUMMY, ME_REMOTE): Move from here....
20879         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
20880         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
20881         Dmitry V. Levin.
20882         Include mountlist.h first, to test the interface.
20883
20884 2005-01-29  Bruno Haible  <bruno@clisp.org>
20885
20886         * lib/progname.c (program_name): Initialize.
20887         Needed when linking statically on MacOS X.
20888
20889 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20890
20891         Sync from coreutils.
20892         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
20893         (Depends-on): Add c-strtod.
20894         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
20895
20896 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20897
20898         Sync from coreutils.
20899         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
20900
20901         Remove files that are specific to coreutils.
20902         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
20903
20904 2005-01-28  Bruno Haible  <bruno@clisp.org>
20905
20906         * modules/javacomp: New file.
20907         * MODULES.html.sh (Java): Add javacomp.
20908
20909 2005-01-28  Bruno Haible  <bruno@clisp.org>
20910
20911         * m4/javacomp.m4: New file, from GNU gettext.
20912
20913 2005-01-28  Bruno Haible  <bruno@clisp.org>
20914
20915         * lib/javacomp.sh.in: New file, from GNU gettext.
20916         * lib/javacomp.h: New file, from GNU gettext.
20917         * lib/javacomp.c: New file, from GNU gettext.
20918
20919 2005-01-26  Simon Josefsson  <jas@extundo.com>
20920
20921         * lib/gai_strerror.c: Use GPL in header.
20922
20923 2005-01-26  Bruno Haible  <bruno@clisp.org>
20924
20925         * modules/javaexec: New file.
20926         * MODULES.html.sh (Java): Add javaexec.
20927
20928 2005-01-26  Bruno Haible  <bruno@clisp.org>
20929
20930         * m4/javaexec.m4: New file, from GNU gettext.
20931
20932 2005-01-26  Bruno Haible  <bruno@clisp.org>
20933
20934         * lib/javaexec.sh.in: New file, from GNU gettext.
20935         * lib/javaexec.h: New file, from GNU gettext.
20936         * lib/javaexec.c: New file, from GNU gettext.
20937
20938 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20939
20940         * modules/lchown (Depends-on): Remove lchown.h
20941
20942 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20943
20944         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
20945         must be defined if the header file was not found, in order
20946         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
20947
20948 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20949
20950         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
20951         initializers for struct pentry_state.
20952         (__argp_error): Check return value of __asprintf
20953         (__argp_failure): Translate error message
20954
20955         * lib/argp-parse.c: Removed braces around the expansion of N_()
20956
20957 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
20958
20959         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
20960         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
20961         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
20962         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
20963         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
20964         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
20965         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
20966         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
20967         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
20968         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
20969         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
20970         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
20971         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
20972         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
20973         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
20974         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
20975         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
20976         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
20977         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
20978         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
20979         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
20980         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
20981         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
20982         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
20983         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
20984         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
20985         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
20986         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
20987         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
20988         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
20989         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
20990         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
20991         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
20992         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
20993         xstrtol.m4, xstrtoumax.m4, yesno.m4:
20994         Use an all-permissive copyright notice, recommended by RMS.
20995
20996 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
20997
20998         * modules/chdir-long (Depends-on): Remove mempcpy.
20999
21000 2005-01-21  Jim Meyering  <jim@meyering.net>
21001
21002         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
21003         same value as for Solaris 9.
21004
21005         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
21006         component length.  This included changing the parameter to be
21007         of type `char *' rather than `char const *'.
21008         * lib/chdir-long.h (chdir_long): Update prototype.
21009
21010         * lib/openat.c (fdopendir, fstatat): New functions.
21011         * lib/openat.h: Include headers required for use of DIR and struct
21012         stat.
21013         [AT_SYMLINK_NOFOLLOW]: Define.
21014         (fdopendir, fstatat): Add prototypes.
21015
21016 2005-01-21  Bruno Haible  <bruno@clisp.org>
21017
21018         * modules/classpath: New file.
21019         * MODULES.html.sh (Java): Add classpath.
21020
21021 2005-01-21  Bruno Haible  <bruno@clisp.org>
21022
21023         * lib/classpath.h: New file, from GNU gettext.
21024         * lib/classpath.c: New file, from GNU gettext.
21025
21026 2005-01-20  Simon Josefsson  <jas@extundo.com>
21027
21028         * modules/version-etc-fsf: New file.
21029
21030 2005-01-20  Simon Josefsson  <jas@extundo.com>
21031
21032         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
21033         * lib/version-etc.c: Remove version_etc_copyright.
21034         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
21035         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
21036
21037 2005-01-20  Simon Josefsson  <jas@extundo.com>
21038
21039         * lib/base64.h (isbase64): Add.
21040
21041         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
21042         using a unsigned prototype, don't inline.
21043         (base64_decode): Use it.
21044
21045 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21046
21047         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
21048         it.
21049
21050 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21051
21052         * lib/save-cwd.c (save_cwd): Remove code to support the case
21053         where fchdir is missing or flaky.
21054
21055 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21056
21057         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
21058
21059 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
21060
21061         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
21062         AC_LIBSOURCES now does this.
21063         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
21064         with new ullong_max module.
21065
21066 2005-01-19  Bruno Haible  <bruno@clisp.org>
21067
21068         * modules/sh-quote: New file.
21069         * MODULES.html.sh (Executing programs): Add sh-quote.
21070
21071 2005-01-19  Bruno Haible  <bruno@clisp.org>
21072
21073         * lib/sh-quote.h: New file, from GNU gettext.
21074         * lib/sh-quote.c: New file, from GNU gettext.
21075
21076 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21077
21078         Merge from coreutils.
21079         * m4/ullong_max.m4: New file.
21080         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
21081         (gl_MACROS): Assume localeconv exists.
21082
21083 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21084
21085         Merge changes from coreutils, as described below in several
21086         changelogs dated today.
21087
21088         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
21089         (O_DIRECTORY): Remove; not needed here, since "." must be
21090         a directory.  All uses removed.
21091         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
21092         universal on Suns, and we also need to test for IRIX.
21093         Revamp code to use 'if' rather than '#if'.
21094         Avoid unnecessary comparison of cwd->desc to 0.
21095
21096         * lib/utimens.c (futimens): Robustify the previous patch, by checking
21097         for known valid error numbers rather than observed invalid ones.
21098
21099 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21100
21101         * modules/ullong_max: New file.
21102
21103         * modules/chdir-long, modules/openat: New files.
21104         * modules/save-cwd (Depends-on): Depend on chdir-long.
21105         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
21106
21107 2005-01-18  Jim Meyering  <jim@meyering.net>
21108
21109         Merge from coreutils.
21110         * m4/chdir-long.m4, m4/openat.m4: New files.
21111         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
21112         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
21113         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
21114         is sane and DOES follow symlinks.  Besides, testing 20 different
21115         systems found no broken chown implementations.
21116         Prompted by a change in rsync's copy of this macro.
21117         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
21118
21119         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
21120
21121         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
21122         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
21123         NULL-means-set-to-current-time semantics.
21124         Remove temporary file immediately, rather than waiting
21125         for configure's at-exit trap code to do it.
21126
21127 2005-01-18  Jim Meyering  <jim@meyering.net>
21128
21129         * lib/version-etc.c (version_etc_copyright): Update copyright date.
21130
21131         * lib/utimens.c (futimens): Account for the fact that futimes
21132         can also fail with errno == ENOSYS or errno == ENOENT.
21133         Patch from Dmitry V. Levin.
21134
21135         Change the name of the robust chdir function from chdir to chdir_long.
21136         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
21137         (restore_cwd): Use chdir_long, not chdir.
21138         * lib/chdir-long.c: Renamed from chdir.c.
21139         * lib/chdir-long.h: Renamed from chdir.h.
21140         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
21141         Hurd.
21142
21143 2005-01-18  Bruno Haible  <bruno@clisp.org>
21144
21145         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
21146         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
21147         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
21148         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
21149         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
21150         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
21151         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
21152         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
21153         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
21154         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
21155         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
21156         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
21157         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
21158         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
21159         Use an all-permissive copyright notice, recommended by RMS.
21160
21161 2005-01-18  Bob Proulx  <bob@proulx.com>
21162
21163         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
21164         simplify offsetof() macro construct to avoid compile failure with
21165         native HP-UX 11.0 ANSI C compiler.
21166
21167 2005-01-17  Bruno Haible  <bruno@clisp.org>
21168
21169         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
21170         redundant because stpncpy.m4 takes care of it.
21171
21172 2005-01-17  Bruno Haible  <bruno@clisp.org>
21173
21174         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
21175
21176 2005-01-17  Bruno Haible  <bruno@clisp.org>
21177
21178         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
21179         used.
21180
21181 2005-01-17  Bruno Haible  <bruno@clisp.org>
21182
21183         * lib/fwriteerror.h (fwriteerror): Change specification to include
21184         fclose.
21185         * lib/fwriteerror.c: Include <stdbool.h>.
21186         (fwriteerror): At the end, close the file stream. Record whether
21187         stdout was already closed.
21188
21189 2005-01-17  Bruno Haible  <bruno@clisp.org>
21190
21191         * lib/execute.c (environ): Declare if needed.
21192         * lib/pipe.c (environ): Likewise.
21193         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
21194
21195 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21196
21197         * modules/argp: Depend on vsnprintf
21198
21199 2005-01-10  Jim Meyering  <jim@meyering.net>
21200
21201         * modules/closeout (Depends-on): Add atexit.
21202
21203 2005-01-06  Bruno Haible  <bruno@clisp.org>
21204
21205         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
21206
21207 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
21208
21209         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
21210         definitions to be after all include files, to avoid collisions.
21211         Problem reported by Bob Proulx.
21212
21213 2005-01-04  Jim Meyering  <jim@meyering.net>
21214
21215         Changes imported from coreutils.
21216         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
21217         as the mkstemp template, use a temporary directory and an
21218         8.3-friendly template to avoid trouble on systems like DJGPP.
21219         Reported by Juan M. Guerrero via Stepan Kasal.
21220         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
21221         close. Remove the temporary directory right away, rather than waiting
21222         for configure's at-exit trap code to do it.
21223         Suggestion from Stepan Kasal.
21224
21225 2005-01-01  Simon Josefsson  <jas@extundo.com>
21226
21227         * gnulib-tool: Print #include directives when --import'ing.
21228
21229 2004-12-28  Simon Josefsson  <jas@extundo.com>
21230
21231         * tests/test-base64.c: Include required header files.  Remove
21232         unused variables.
21233
21234 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21235
21236         * modules/error (Depends-on): Remove gettext.
21237
21238 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21239
21240         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
21241         not needed.  This removes a dependency on the gettext module.
21242         [defined _LIBC]: Do not include <libintl.h>; not needed.
21243
21244 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21245
21246         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
21247         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
21248
21249 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21250
21251         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
21252         HAVE_DECL_STRTOLD.
21253
21254 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21255
21256         * modules/getdate (Depends-on): Remove alloca-opt.
21257
21258 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21259
21260         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
21261
21262 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21263
21264         * lib/argp-parse.c: Include <stddef.h>.
21265         (alignof, alignto): New macros.
21266         (parser_init): Don't assume that void * is aligned sufficiently
21267         for struct option.
21268
21269         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
21270         need to extend the stack.
21271         (YYINITDEPTH): New macro, so that the initial stack isn't overly
21272         large.
21273
21274 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21275
21276         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
21277
21278 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21279
21280         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
21281         (2004-10-24) change.  Apparently this was a false alarm.
21282
21283         * modules/getdate: Depend on alloca-opt, not alloca.
21284
21285 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21286
21287         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
21288         Remove now-obsolete comment about AIX.
21289         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
21290         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
21291         (YYMAXDEPTH): New macro.
21292
21293 2004-12-18  Simon Josefsson  <jas@extundo.com>
21294
21295         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
21296
21297 2004-12-18  Bruno Haible  <bruno@clisp.org>
21298
21299         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
21300
21301 2004-12-18  Bruno Haible  <bruno@clisp.org>
21302
21303         * lib/fatal-signal.c (fatal_signals): Make non-const.
21304         (init_fatal_signals): New function.
21305         (uninstall_handlers, install_handlers): Ignore signals that were set to
21306         SIG_IGN.
21307         (at_fatal_signal): Call init_fatal_signals.
21308         (init_fatal_signal_set): Likewise. Ignore signals that were set to
21309         SIG_IGN.
21310         Reported by Paul Eggert.
21311
21312 2004-12-18  Bruno Haible  <bruno@clisp.org>
21313
21314         * doc/alloca.texi: New file.
21315         * doc/alloca-opt.texi: New file.
21316
21317 2004-12-17  Jim Meyering  <jim@meyering.net>
21318
21319         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
21320         Otherwise, install-sh could exit with improper exit status when
21321         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
21322
21323 2004-12-16  Simon Josefsson  <jas@extundo.com>
21324
21325         * tests/test-base64.c: Add license.
21326
21327 2004-12-15  Stepan Kasal  <address@hidden>
21328
21329         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
21330
21331 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
21332
21333         * modules/getcwd (Files): Add m4/d-ino.m4.
21334         Suggested by Mark D. Baushke.
21335
21336 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21337
21338         * lib/getdate.y (textint): New member "negative".
21339         (time_zone_hhmm): New function.
21340         Expect 14 shift-reduce conflicts, not 13.
21341         (o_colon_minutes): New rule.
21342         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
21343         (yylex): Set the "negative" member of signed numbers.
21344
21345 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21346
21347         * doc/getdate.texi (Time of day items, Time zone items):
21348         Describe new formats +00:00, UTC+00:00.
21349
21350 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
21351
21352         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
21353         spurious "-l"s.  Problem reported by Stepan Kasal.
21354
21355 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
21356
21357         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
21358         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
21359
21360 2004-12-04  Simon Josefsson  <jas@extundo.com>
21361
21362         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
21363         Vandoorselaere <yoann@prelude-ids.org>.
21364
21365 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21366
21367         Changes imported from coreutils.
21368         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
21369         exist.
21370         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
21371
21372 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21373
21374         Changes imported from coreutils.
21375         * lib/hard-locale.c: Assume <locale.h> exists.
21376         Include "strdup.h".
21377         (GLIBC_VERSION): New macro.
21378         (hard_locale): Assume setlocale exists.
21379         Rewrite to avoid #ifdef.
21380         Use strdup rather than malloc + strcpy.
21381         * lib/human.c: Assume <locale.h> exists.
21382         (human_readable): Assume localeconv exists.
21383
21384 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21385
21386         * modules/hard-locale (Depends-on): Add strdup.
21387
21388 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
21389
21390         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
21391         convert T2, not T.  (Imported from libc.)
21392
21393 2004-11-30  Simon Josefsson  <jas@extundo.com>
21394
21395         * modules/restrict (License): Change to LGPL.
21396
21397 2004-11-30  Simon Josefsson  <jas@extundo.com>
21398
21399         * m4/restrict.m4: Add copyright and copying conditions.
21400
21401 2004-11-30  Simon Josefsson  <jas@extundo.com>
21402
21403         * m4/base64.m4: New file.
21404
21405 2004-11-30  Simon Josefsson  <jas@extundo.com>
21406
21407         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
21408         base64.
21409
21410         * tests/test-base64.c: New file.
21411
21412         * modules/base64: New file.
21413
21414 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21415
21416         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
21417         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
21418
21419         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
21420
21421 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21422
21423         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
21424         (__getcwd.c): Don't restore errno; glibc doesn't.
21425         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
21426         first, falling back to our code only if its results look suspicious.
21427         Ensure that the resulting buffer is only as large as necessary.
21428
21429         * lib/readutmp.c: Include readutmp.h first.
21430         Include <errno.h>, since readutmp.h no longer does that.
21431         * lib/readutmp.h: Don't include <errno.h>,
21432         <sys/param.h>, <time.h>; not needed to establish interface.
21433         (errno): Remove decl.
21434         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
21435         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
21436         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
21437
21438 2004-11-28  Simon Josefsson  <jas@extundo.com>
21439
21440         * lib/base64.h, base64.c: New file.
21441
21442 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
21443
21444         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
21445
21446 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
21447
21448         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
21449         (Depends-on): Remove pathmax, same.  Add mempcpy.
21450         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
21451         (Makefile.am): Append getcwd.h to lib_SOURCES.
21452         (Include): Add getcwd.h.
21453         (Maintainer): Change from Jim Meyering to "all, glibc",
21454         since getdate now uses intended-for-glibc code.
21455         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
21456         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
21457
21458 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21459
21460         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
21461         HP's ANSI C compiler.
21462         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
21463         Declaring int functions causes warnings on some modern systems and
21464         shouldn't be needed to compile on ancient ones.
21465         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
21466         defined.
21467
21468         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
21469         with the following changes.
21470         (__set_errno): Parenthesize properly.
21471         Include <stdbool.h>.
21472         (MIN, MAX, MATCHING_INO): New macros.
21473         (__getcwd): Define with prototype, not K&R form.
21474         Use heuristics to allocate default buffer on stack if possible.
21475         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
21476         behavior, and to avoid the PATH_MAX limit when computing
21477         ../../../../...
21478         Use MATCHING_INO to compare inode number to file.
21479         Check for arithmetic overflow in size calculations.
21480         Fix bug in reallocation of dot array that caused getcwd to fail
21481         on directories nested deeper than 75.
21482         Be more careful about saving errno on error.
21483         Do not use realloc; use only free+malloc, as this is a bit
21484         more flexible and avoids a needless copy operation.
21485         Do not inspect st_dev and st_ino for symbolic links; POSIX
21486         doesn't specify the latter.
21487         Check for closedir errors.
21488         Avoid needless casts.
21489         Use "#ifdef weak_alias" around weak_alias, to be like other
21490         glibc code.
21491         The following changes to getcwd.c have effect only when used in
21492         gnulib; they have no effect inside glibc proper.
21493         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
21494         as alloca isn't used.
21495         (alloca, __alloca): Likewise.
21496         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
21497         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21498         unconditionally, as gnulib assumes C89 or better.
21499         Do not include <sys/param.h>.
21500         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
21501         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
21502         better.
21503         (NULL) [!defined NULL]: Remove; we assume C89 or better.
21504         Include <dirent.h> in a way that is compatible with modern Autoconf.
21505         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
21506         New macros, if not already defined.
21507         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
21508         Use "_LIBC", not "defined _LIBC", for consistency.
21509         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
21510         a mempcpy module.
21511         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
21512         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
21513         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
21514         credit only to Jim Meyering and adjust the copyright dates.
21515         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
21516         <stdlib.h>, <unistd.h>, "pathmax.h".
21517         Instead, include "xgetcwd.h" (first) and "getcwd.h".
21518         (INITIAL_BUFFER_SIZE): Remove.
21519         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
21520
21521 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21522
21523         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
21524         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
21525         Use the _ONCE methods, for efficiency.
21526         Check for fcntl.h.  In test program, include <errno.h>
21527         and <fcntl.h> if available.  Remove old K&R cruft from
21528         test program.  Check for common errors in GNU/Linux,
21529         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
21530         don't do AC_LIBOBJ, as that's getcwd.m4's job.
21531         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
21532         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
21533         name accordingly.
21534         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
21535         accommodate new getcwd.c.
21536         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
21537         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
21538         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
21539         that's all we need now.
21540
21541 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21542
21543         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
21544         argp-parse.c depends on getopt internals, that means we should
21545         always use our getopt, to be on the safe side.
21546         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
21547         order not to spoil the result of an eventual previous invocation
21548         of gl_GETOPT_SUBSTITUTE.
21549
21550 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21551
21552         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
21553         redefinition warnings. To avoid them, include the defines
21554         in `#if !defined __need_getopt ... #endif'. The only place
21555         where __getopt_argv_const is used is in definitions
21556         of getopt_long and getopt_long_only below, which are as well
21557         protected by `#ifndef __need_getopt'.
21558         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
21559         __need_getopt after including <stdio.h> and <unistd.h> These
21560         headers might have defined it.
21561
21562 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
21563
21564         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
21565
21566 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
21567
21568         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
21569         (futimens): New function, which uses futimes if available.
21570         (futimens, utimens): Support timespec==NULL, with same semantics
21571         as utime and utimens.
21572         * lib/utimens.h (futimens): New decl.
21573
21574 2004-11-23  Jim Meyering  <jim@meyering.net>
21575
21576         * lib/getopt_.h: Remove trailing blanks.
21577
21578 2004-11-23  Jim Meyering  <jim@meyering.net>
21579
21580         * lib/__fpending.c: Add comment.
21581
21582 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
21583
21584         * modules/canonicalize (Depends-on): Add xreadlink.
21585         Problem reported by James Youngman.
21586
21587 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
21588
21589         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
21590         New macros.
21591         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
21592         optopt): Use them instead of invoking ## directly; otherwise, the
21593         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
21594
21595 2004-11-19  Bruno Haible  <bruno@clisp.org>
21596
21597         * lib/strtok_r.c: Move comments from here...
21598         * lib/strtok_r.h: ... to here.
21599
21600 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
21601
21602         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
21603         implementations that mishandle size_t overflow.
21604
21605 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
21606
21607         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
21608         might fail.  Problem reported by Yoann Vandoorselaere.
21609         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
21610         implementations that mishandle size_t overflow.
21611
21612 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21613
21614         * modules/canon-host (Depends-on): Add strdup.
21615
21616 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21617
21618         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
21619
21620 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21621
21622         * lib/canon-host.c: Include "strdup.h".
21623         (canon_host): Use getaddrinfo if available, so that IPv6 works.
21624         Use strdup instead of malloc/strcpy to duplicate strings.
21625
21626         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
21627         (human_space_before_unit): New constant.
21628         * lib/human.c (human_readable): Support it.
21629
21630         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
21631         (xgetcwd): Set errno correctly when failing.
21632         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
21633         the failure is actually due to a PATH_MAX problem.
21634
21635         Further getopt changes to make it more likely that glibc will
21636         buy the changes back.
21637         * lib/getopt.c (POSIXLY_CORRECT): New constant.
21638         (getopt): Use it, so to preserve glibc semantic
21639         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
21640         when compiling for libc.
21641         * lib/getopt_.h (__getopt_argv_const): Bring it back.
21642         (getopt_long, getopt_long_only): Use it.
21643
21644         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21645         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
21646         (getopt): Argv is now char * const *, as per standard.
21647         (_getopt_internal_r, _getopt_internal): Argv is now char **,
21648         not char *__getopt_argv_const *.
21649         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21650         _getopt_long_only_r): Likewise.
21651         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
21652         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21653         _getopt_long_r, _getopt_long_only_r): Likewise.
21654         * lib/getopt_.h (__getopt_argv_const): Remove.
21655         (getopt): Argv is now char * const *, as per standard.
21656
21657         * lib/getdate.y (tORDINAL): New token.
21658         (day, relunit): Allow it for relative times.
21659         (relative_time_table): Use tORDINAL for ordinals.
21660
21661 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21662
21663         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
21664         Document that "second" isn't allowed as an ordinal number.
21665
21666 2004-11-16  Jim Meyering  <jim@meyering.net>
21667
21668         * modules/closeout (Depends-on): Add fpending.
21669
21670 2004-11-15  Jim Meyering  <jim@meyering.net>
21671
21672         * lib/closeout.c: Include "__fpending.h" once again.
21673         Include <stdbool.h>.
21674         (close_stdout): Don't fail just because stdout was closed initially,
21675         since some programs don't write to stdout in the normal course of
21676         operation (other than --version and --help), and we don't want this
21677         function to make e.g. `touch file >&-' fail.
21678         But do fail if it was closed and someone has tried to write to it.
21679         E.g., `printf foo >&-' must fail.
21680
21681 2004-11-13  Jim Meyering  <jim@meyering.net>
21682
21683         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
21684
21685 2004-11-12  Simon Josefsson  <jas@extundo.com>
21686
21687         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
21688         small doc fix is still pending.
21689
21690 2004-11-11  Simon Josefsson  <jas@extundo.com>
21691
21692         * modules/strtok_r: New file.
21693
21694         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21695         strtok_r.
21696
21697 2004-11-11  Simon Josefsson  <jas@extundo.com>
21698
21699         * m4/strtok_r.m4: New file.
21700
21701         * m4/getopt.m4: Replace opterr.
21702
21703 2004-11-11  Simon Josefsson  <jas@extundo.com>
21704
21705         * lib/strtok_r.h, strtok_r.c: New file.
21706
21707 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21708
21709         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
21710         of replacing opterr, getopt, etc.  This should handle the
21711         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
21712
21713 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21714
21715         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
21716         we can stop lying to compilers about the constness of argv when we
21717         are compiled outside glibc.
21718         (getopt, getopt_long, getopt_long_only): Use it.
21719         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21720         _getopt_internal, getopt): Likewise.
21721         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21722         _getopt_long_only_r): Likewise.
21723         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21724         _getopt_long_r, _getopt_long_only_r): Likewise.
21725
21726         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
21727         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
21728         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
21729         the other external symbols.
21730         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
21731         declaration, since the above renaming now works around collisions.
21732
21733 2004-11-11  Jim Meyering  <jim@meyering.net>
21734
21735         * lib/linebreak.c: Remove trailing blanks.
21736         * lib/alloca_.h: Likewise.
21737         * lib/acosl.c: Likewise.
21738         * lib/euidaccess.c: Likewise.
21739         * lib/allocsa.h: Likewise.
21740
21741 2004-11-10  Simon Josefsson  <jas@extundo.com>
21742
21743         * m4/getaddrinfo.m4: New file.
21744
21745 2004-11-10  Simon Josefsson  <jas@extundo.com>
21746
21747         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
21748
21749 2004-11-10  Simon Josefsson  <jas@extundo.com>
21750
21751         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21752         getaddrinfo.
21753
21754         * modules/getaddrinfo: New file.
21755
21756 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21757
21758         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
21759
21760 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21761
21762         * lib/mktime.c (SHR): New macro, which is a portable
21763         substitute for >> that should work even on Crays.
21764         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
21765         Problem reported by Mark D. Baushke in
21766         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
21767         * lib/getdate.y (SHR): Likewise.
21768         (tm_diff): Use it.
21769         * lib/strftime.c (SHR): Likewise.
21770         (tm_diff): Use it.
21771         * lib/quotearg.c (struct quoting_options): Use unsigned int for
21772         quote_these_too, so that right shifts are well defined.  All uses
21773         changed.
21774
21775 2004-11-10  Jim Meyering  <jim@meyering.net>
21776
21777         Ensure that no close failure goes unreported.
21778         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
21779         return early when it seems there's nothing to flush.
21780         Don't include __fpending.h.
21781
21782 2004-11-10  Jim Meyering  <jim@meyering.net>
21783
21784         * modules/closeout (Depends-on): Remove fpending.
21785
21786 2004-11-10  Jim Meyering  <jim@meyering.net>
21787
21788         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
21789
21790 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21791
21792         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
21793         gl_FUNC_STRFTIME.
21794         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
21795         and AC_REQUIRE when possible, to avoid duplicate checks.
21796         Check for <wchar.h>.
21797
21798 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21799
21800         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
21801
21802 2004-11-09  Bruno Haible  <bruno@clisp.org>
21803
21804         * m4/sockpfaf.m4: New file.
21805
21806 2004-11-05  Bruno Haible  <bruno@clisp.org>
21807
21808         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
21809         Reported by Mark D. Baushke <mdb@cvshome.org>.
21810
21811 2004-11-04  Bruno Haible  <bruno@clisp.org>
21812
21813         2004-09-11  Bruno Haible  <bruno@clisp.org>
21814                 * allocsa.valgrind: New file.
21815         2004-02-06  Bruno Haible  <bruno@clisp.org>
21816                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
21817                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
21818                 Reported by Christopher Seip <chris.seip@hp.com>.
21819
21820 2004-11-04  Bruno Haible  <bruno@clisp.org>
21821
21822         * modules/allocsa (Files): Add lib/allocsa.valgrind.
21823         (Makefile.am): Distribute it.
21824
21825 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
21826
21827         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
21828         with errno == ERANGE if the buffer is too small.
21829         Problem reported by Mark D. Baushke.
21830
21831 2004-11-03  Albert Chin  <china@thewrittenword.com>
21832             Paul Eggert  <eggert@cs.ucla.edu>
21833
21834         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
21835         equivalent, substitute $ac_type for equivalent type rather than
21836         blindly using uint32_t *always* which won't work if uint32_t is not
21837         available.  Define _UINT32_T to work around typedef of uint32_t if
21838         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
21839         2.5.1.
21840
21841 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21842
21843         * m4/jm-macros.m4: Sync from coreutils.
21844         (gl_MACROS): Check for mbrlen, for pathchk.
21845         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
21846
21847 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21848
21849         * lib/xreadlink.c (MAXSIZE): New macro.
21850         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
21851         size does not exceed MAXSIZE.  Avoid cast.
21852         As suggested by Mark D. Baushke in
21853         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
21854         if readlink fails with buffer size just under MAXSIZE, try again
21855         with MAXSIZE.
21856
21857 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21858
21859         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
21860
21861 2004-11-02  Derek R. Price  <derek@ximbiot.com>
21862         and  Paul Eggert  <eggert@cs.ucla.edu>
21863
21864         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
21865         (get_date): Overparenthesize to avoid GCC warning.
21866
21867 2004-11-02  Bruno Haible  <bruno@clisp.org>
21868
21869         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
21870         returns void.
21871
21872 2004-11-02  Bruno Haible  <bruno@clisp.org>
21873
21874         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
21875         function returns void.
21876
21877 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21878
21879         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
21880         fflush_unlocked, flockfile, funlockfile, funlockfile,
21881         fputs_unlocked, putc_unlocked.
21882
21883 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21884
21885         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21886         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
21887         already declared.
21888
21889 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21890
21891         * modules/getdate (Files): Add doc/getdate.texi.
21892         (Depends-on): Add setenv, xalloc.
21893
21894 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21895
21896         * lib/getdate.y: Add support for TZ="foo" within a date string.
21897         Fix some bugs near time_t boundaries.  Reject dates with
21898         out-of-range components, e.g., "Sept 31".
21899         Include <stdlib.h>, "setenv.h", "xalloc.h".
21900         (ISDIGIT_LOCALE): Remove; unused.
21901         Note that the TZ and time functions used here are not reentrant.
21902         (mktime_ok, get_tz): New functions.
21903         (TZBUFSIZE): New constant.
21904         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
21905         This requires that we sometimes generate our own TZ="XXX..." setting.
21906
21907 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21908
21909         * doc/getdate.texi: New file, from coreutils with modifications for
21910         the new TZ parsing.
21911
21912 2004-10-27  Derek R. Price  <derek@ximbiot.com>
21913
21914         * lib/mktime.c (not_equal_tm): Remove redundant check.
21915
21916 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21917
21918         * modules/regex (lib_SOURCES): Add regex.c.
21919         Reported by James Youngman in
21920         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
21921
21922 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21923
21924         * lib/getdate.y: Use Bison 1.875 features, and some minor
21925         code cleanups.  This change does not affect semantics.
21926         Don't include <stdlib.h>; no longer needed.
21927         Don't include unlocked-io.h; only the "#if TEST" code uses
21928         stdio, and performance isn't crucial there.
21929         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
21930         Bison 1.875 features as described below.
21931         All uses of "PC." replaced by "pc->".
21932         (YYSTYPE): Add a forward declaration.
21933         (yylex, yyerror): Use full prototypes in forward decls.
21934         Use "%pure-parser" rather than obsolescent "%pure_parser".
21935         Use %parse-param and %lex-param instead of obsolescent
21936         YYPARSE_PARAM and YYLEX_PARAM.
21937         (meridian_table, month_and_day_table, time_units_table,
21938         relative_time_table, time_zone_table, military_table,
21939         lookup_zone, lookup_word, get_date):
21940         Use NULL instead of 0 where appropriate.
21941         (to_hour): Avoid abort (), to avoid a dependency on
21942         stdlib.h.
21943         (yyerror, yylex): Now accepts parser_control * arg.
21944         (main) [TEST]: Use '\0' rather than 0 for char.
21945
21946 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21947
21948         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
21949
21950 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21951
21952         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
21953         It's now the caller's responsibility to handle the case where
21954         !HAVE_GETPAGESIZE && !defined getpagesize.
21955
21956         * lib/mktime.c (leapyear): Arg is long int, not int.
21957
21958 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
21959
21960         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
21961
21962 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
21963
21964         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
21965         missing.  Problem reported by James Youngman.
21966
21967 2004-10-16  Simon Josefsson  <jas@extundo.com>
21968
21969         * gnulib-tool: Fix comments.  Fix parse problem.
21970         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
21971
21972 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
21973
21974         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
21975         implementation of getopt_long.  Problem reported by Alexander Taler in:
21976         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
21977
21978 2004-10-15  Bruno Haible  <bruno@clisp.org>
21979
21980         * gnulib-tool: Untabify. Initialize supplied_libname.
21981         (func_usage): More homogenous output.
21982         (func_modules_transitive_closure, func_modules_to_filelist,
21983         func_emit_lib_Makefile_am): New functions.
21984         (func_import): New function, extracted from big case statement. Use
21985         func_get_license, func_modules_transitive_closure,
21986         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
21987         opt_lgpl. Don't use test -a, as it's not portable.
21988         (func_create_testdir): Use func_modules_transitive_closure,
21989         func_modules_to_filelist, func_emit_lib_Makefile_am.
21990
21991 2004-10-15  Bruno Haible  <bruno@clisp.org>
21992
21993         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
21994
21995 2004-10-15  Bruno Haible  <bruno@clisp.org>
21996
21997         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
21998         the portions belonging to each module.
21999         Suggested by Derek Robert Price <derek@ximbiot.com>.
22000
22001 2004-10-12  Simon Josefsson  <jas@extundo.com>
22002
22003         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22004         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
22005         to real functions.
22006
22007 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22008
22009         * modules/vsnprintf: New file.
22010
22011 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22012
22013         * m4/vsnprintf.m4: New file.
22014
22015 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22016
22017         * lib/vsnprintf.h: New file.
22018         * lib/vsnprintf.c: New file.
22019
22020 2004-10-11  Bruno Haible  <bruno@clisp.org>
22021
22022         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
22023         vsnprintf.
22024
22025 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
22026
22027         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
22028
22029 2004-10-07  Bruno Haible  <bruno@clisp.org>
22030
22031         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
22032         fits into the provided buffer.
22033
22034 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
22035
22036         * lib/diacrit.c, diacrit.h: Add GPL notice.
22037
22038         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
22039         notice.
22040         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
22041         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
22042         This avoids a potential constant-folding bug.
22043
22044 2004-10-05  Bruno Haible  <bruno@clisp.org>
22045
22046         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
22047         for the declaration of strsep.
22048
22049 2004-10-05  Bruno Haible  <bruno@clisp.org>
22050
22051         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
22052
22053 2004-10-04  Simon Josefsson  <jas@extundo.com>
22054
22055         * modules/memmem: New file.
22056         * tests/test-memmem.c: New file.
22057         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
22058
22059 2004-10-04  Simon Josefsson  <jas@extundo.com>
22060
22061         * m4/memmem.m4: New file.
22062
22063 2004-10-04  Simon Josefsson  <jas@extundo.com>
22064
22065         * lib/memmem.h: New file.
22066         * lib/memmem.c: New file, taken from glibc.
22067
22068 2004-10-04  Simon Josefsson  <jas@extundo.com>
22069
22070         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
22071         '#ifdef USE_UNLOCKED_IO'.
22072
22073 2004-10-04  Simon Josefsson  <jas@extundo.com>
22074
22075         * config/srclist.txt: Add memmem from glibc.
22076
22077 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22078
22079         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
22080
22081         * modules/argmatch, modules/argp, modules/closeout, modules/error,
22082         modules/exclude, modules/getdate, modules/getline,
22083         modules/getndelim2, modules/getpass, modules/getpass-gnu,
22084         modules/getusershell, modules/linebuffer, modules/md5,
22085         modules/mountlist, modules/posixtm, modules/readtokens,
22086         modules/readutmp, modules/regex, modules/sha1,
22087         modules/version-etc, modules/yesno:
22088         Remove dependency on unlocked-io.
22089
22090 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22091
22092         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
22093
22094         * m4/unlocked-io.m4: Add copyright notice.
22095         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
22096
22097 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22098
22099         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
22100         * lib/xmalloc.c (xmemdup): Likewise.
22101         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
22102         XFREE): Remove these long-obsolescent macros.
22103         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
22104         * lib/xstrdup.c: Remove.
22105
22106         * lib/regex.c (re_comp): Cast gettext return value to char *,
22107         Problem reported by Martin Neitzel via Mark D. Baushke.
22108
22109 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22110
22111         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
22112         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
22113         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
22114         regex.c, sha1.c, version-etc.c, yesno.c:
22115         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
22116         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
22117         the includer's responsibility.
22118
22119         Sync from coreutils.
22120
22121         * lib/modechange.c (mode_compile): Don't decrement a pointer that
22122         points to the start of a string, as the C Standard says the
22123         resulting behavior is undefined.
22124
22125         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
22126         simple -> simple_backups, numbered_existing ->
22127         numbered_existing_backups, numbered -> numbered_backups
22128         to avoid shadowing problems.  All uses changed.
22129         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
22130         * lib/backupfile.c (check_extension, numbered_backup):
22131         Rename locals to avoid shadowing 'basename'.
22132         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
22133         once.
22134
22135         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
22136         * lib/.cvsignore: Add getopt.h.
22137
22138 2004-10-04  Bruno Haible  <bruno@clisp.org>
22139
22140         * modules/README: New file.
22141         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
22142         not a module.
22143
22144 2004-10-02  Jim Meyering  <jim@meyering.net>
22145
22146         * lib/dirfd.h, getpagesize.h: Add copyright notice.
22147
22148 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22149
22150         * modules/strsep: New file.
22151
22152 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22153
22154         * m4/strsep.m4: New file.
22155
22156 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22157
22158         * lib/strsep.h: New file.
22159         * lib/strsep.c: New file.
22160
22161 2004-10-01  Simon Josefsson  <jas@extundo.com>
22162
22163         * lib/snprintf.c (snprintf): Handle size==0.
22164
22165 2004-10-01  Simon Josefsson  <jas@extundo.com>
22166             Bruno Haible  <bruno@clisp.org>
22167
22168         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
22169         (snprintf): Declare 'args'.
22170
22171 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
22172
22173         * lib/snprintf.c: Remove comments as to why each header is needed.
22174
22175 2004-10-01  Bruno Haible  <bruno@clisp.org>
22176
22177         * MODULES.html.sh: Add strsep.
22178
22179 2004-09-30  Simon Josefsson  <jas@extundo.com>
22180
22181         * modules/snprintf: New file.
22182
22183 2004-09-30  Simon Josefsson  <jas@extundo.com>
22184
22185         * m4/snprintf.m4: New file.
22186
22187 2004-09-30  Simon Josefsson  <jas@extundo.com>
22188
22189         * lib/snprintf.h, lib/snprintf.c: New files.
22190
22191 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22192
22193         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
22194         (hol_entry_help): Never translate an empty string.
22195         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
22196         * lib/argp.h (OPTION_NO_TRANS): New option.
22197
22198 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22199
22200         * modules/argp (Maintainer): Replace Simon Josefsson
22201         by Sergey Poznyakoff.
22202
22203 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22204
22205         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
22206         changes merged back into glibc.
22207
22208 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22209
22210         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
22211
22212 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
22213
22214         * lib/xvasprintf.c: Include xalloc.h.
22215         (xvasprintf): Use xalloc_die, not xmalloc_die.
22216
22217 2004-09-29  Bruno Haible  <bruno@clisp.org>
22218
22219         * modules/alloca-opt: New file, derived from modules/alloca.
22220         * modules/allocsa: Depend on alloca-opt instead of alloca.
22221         * modules/setenv: Likewise.
22222         * modules/vasnprintf: Likewise.
22223         * MODULES.html.sh: Add alloca-opt.
22224
22225 2004-09-28  Simon Josefsson  <jas@extundo.com>
22226
22227         * gnulib-tool: New parameter --lgpl, to asseert that modules are
22228         LGPL, and to replace license template from GPL to LGPL.
22229
22230 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22231
22232         * modules/dummy: Change license to LGPL.
22233
22234 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22235
22236         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
22237
22238 2004-09-24  Simon Josefsson  <jas@extundo.com>
22239
22240         * modules/minmax (License): Change from GPL to LGPL.
22241
22242 2004-09-23  Simon Josefsson  <jas@extundo.com>
22243
22244         * gnulib-tool (--import): Typo.
22245
22246 2004-09-23  Simon Josefsson  <jas@extundo.com>
22247
22248         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
22249
22250 2004-09-22  Bruno Haible  <bruno@clisp.org>
22251
22252         * modules/*: Add 'License' field.
22253         * gnulib-tool: Accept --extract-license option.
22254         (func_get_license): New function.
22255
22256 2004-09-21  Bruno Haible  <bruno@clisp.org>
22257
22258         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
22259         Reported by Simon Josefsson.
22260
22261 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22262
22263         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
22264         gl_AC_TYPE_LONG_LONG.
22265
22266 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22267
22268         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
22269
22270 2004-09-18  Simon Josefsson  <jas@extundo.com>
22271         and  Paul Eggert  <eggert@cs.ucla.edu>
22272
22273         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
22274         calls with autoreconf.  Define GL_LIB.
22275
22276 2004-09-14  Karl Berry  <karl@gnu.org>
22277
22278         * config/srclist.txt: unsync setenv.c, sigh.
22279
22280 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22281
22282         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
22283         Problem reported by Bruno Haible in:
22284         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
22285
22286 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22287
22288         * config/srclist.txt: Comment out argp-pvh.c.
22289
22290 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
22291
22292         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
22293         in case some system header has #define'd it.  Problem reported by
22294         Soeren D. Schulze in
22295         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
22296
22297 2004-09-09  Karl Berry  <karl@gnu.org>
22298
22299         * regex.[ch]: delete from the root.  These were supposed to be
22300                 synced with emacs cvs, but this has not happened for about
22301                 a year, and anyway nothing else uses emacs regex.[ch].
22302                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
22303                 lib/regex[.ch] is untouched.
22304
22305 2004-09-09  Bruno Haible  <bruno@clisp.org>
22306
22307         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
22308
22309 2004-09-09  Bruno Haible  <bruno@clisp.org>
22310
22311         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
22312         modifications.
22313         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
22314
22315 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22316
22317         * modules/xvasprintf: New file.
22318         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
22319
22320 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22321
22322         * lib/xvasprintf.h: New file.
22323         * lib/xvasprintf.c: New file.
22324         * lib/xasprintf.c: New file.
22325
22326 2004-09-08  Bruno Haible  <bruno@clisp.org>
22327
22328         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
22329
22330 2004-09-08  Bruno Haible  <bruno@clisp.org>
22331
22332         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
22333         length is > INT_MAX.
22334         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
22335         more.
22336
22337 2004-09-08  Bruno Haible  <bruno@clisp.org>
22338
22339         * lib/stdint_.h: New file, taken from GNU clisp.
22340
22341 2004-09-08  Bruno Haible  <bruno@clisp.org>
22342             Oskar Liljeblad  <oskar@osk.mine.nu>
22343
22344         * modules/stdint: New file.
22345         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
22346
22347 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22348
22349         Import from coreutils.
22350         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
22351         strings on unbounded length.  alloca's performance benefits aren't
22352         that important here.
22353         (V_STRDUP): Remove.
22354         (parse_with_separator): New function, with most of the internals
22355         of the old parse_user_spec.  Allow user to omit both user and group,
22356         for compatibility with FreeBSD.
22357         Clone only the user name, not the entire spec.
22358         Do not set *uid, *gid unless entirely successful.
22359         Avoid memory leak in some failing cases.
22360         Fix regression for USER.GROUP reported by Dmitry V. Levin in
22361         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
22362         (parse_user_spec): Rewrite to use parse_with_separator.
22363
22364 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22365
22366         * modules/userspec: Don't depend on alloca.
22367
22368 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22369
22370         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
22371
22372 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
22373
22374         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
22375         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
22376         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
22377
22378 2004-08-16  Simon Josefsson  <jas@extundo.com>
22379
22380         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
22381         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
22382         Add --dry-run for --import.
22383         Let user provided command line parameters override configure.ac
22384         settings.
22385
22386 2004-08-12  Simon Josefsson  <jas@extundo.com>
22387
22388         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
22389         as discussed with Paul Eggert in threads rooted at
22390         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
22391         and
22392         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
22393         Before, the test was empty, and relied on ELIDE_CODE in source
22394         code.)
22395         (gl_PREREQ_GETOPT): New macro.
22396         (gl_GETOPT): Use them.
22397
22398 2004-08-12  Simon Josefsson  <jas@extundo.com>
22399
22400         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
22401         * lib/getopt_.h: Renamed from getopt.h.
22402
22403 2004-08-12  Simon Josefsson  <jas@extundo.com>
22404
22405         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
22406         Change default library name from libfoo to libgnu.
22407         Now, if you have a configure.ac that says:
22408                 gl_SOURCE_BASE(gl)
22409                 gl_M4_BASE(gl/m4)
22410                 gl_MODULES(error getopt etcetera)
22411                 gl_INIT
22412         you can import all you need by running:
22413                 ../gnulib/gnulib-tool --import
22414
22415         * modules/getopt (Files): Rename getopt.h to getopt_.h.
22416         (Makefile.am): Rewrite, use logic from argz.
22417         (Include): Use <getopt.h> instead of "getopt.h".
22418
22419 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22420
22421         * modules/argp (Files): Add m4/unlocked-io.m4.
22422         (Depends-on): Add extensions.
22423
22424 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22425
22426         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
22427         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
22428         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
22429         Check for program_invocation_name, program_invocation_short_name,
22430         flockfile, funlockfile, features.h, _getopt_long_only_r.
22431
22432 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22433
22434         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
22435         its complicated substitute.
22436         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
22437         and program_invocation_name.
22438         (__argp_basename) [!_LIBC]: Remove; the only use was
22439         replaced by its body.
22440         (__argp_short_program_name): Change condition from
22441         !defined __argp_short_program_name to
22442         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
22443         to match argp-namefrob.h.
22444         (__argp_failure): Don't assume strerror_r returns char *.
22445         * lib/argp-parse.c (N_): Define unconditionally.
22446         (argp_default_options): Fill out initializers with 0 to avoid
22447         gcc warnings.
22448
22449 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22450
22451         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
22452         getopt1.c.
22453
22454 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22455
22456         Merge from coreutils.
22457
22458         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
22459
22460         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
22461         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
22462
22463 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22464
22465         Merge from coreutils.
22466
22467         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
22468         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
22469         for Reliant Unix 5.43.
22470
22471         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
22472         (union fooround): Use uintmax_t, not long int.
22473         The rest is a merge from libc:
22474         [defined _LIBC]: Include <shlib-compat.h>.
22475         (_obstack) [defined _LIBC]: Remove after 2.3.4.
22476
22477         * lib/settime.c (settime): Recode to avoid warning with
22478         Sun Forte C 6U2.
22479
22480         * lib/strverscmp.c: Convert to UTF-8.
22481
22482 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22483
22484         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
22485         m4/uintmax_t.m4.
22486
22487 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22488
22489         * modules/xalloc-die: New file.
22490         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
22491
22492         * modules/md5 (Files): Add m4/uint32_t.m4.
22493         * modules/sha1: Renamed from modules/sha.
22494         (Files):
22495         Rename lib/sha.h to lib/sha1.h.
22496         Rename lib/sha.c to lib/sha1.c.
22497         Rename m4/sha.m4 to m4/sha1.m4.
22498         (lib_SOURCES): Likewise.
22499         (configure.ac): Rename gl_SHA to gl_SHA1.
22500         (Include): sha.h -> sha1.h.
22501
22502 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22503
22504         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
22505         * m4/sha1.m4: Renamed from sha.m4.
22506         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
22507
22508 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22509
22510         * lib/obstack.h (obstack_empty_p):
22511         Don't assume that chunk->contents is suitably aligned.
22512         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
22513         Likewise. Problem reported by Benno in
22514         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
22515
22516         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
22517         readable.  This could be improved further but it'd take some work.
22518
22519 2004-08-08  Simon Josefsson  <jas@extundo.com>
22520
22521         * modules/xgethostname (Depends-on): Remove exit and error (not
22522         used).
22523
22524         * modules/getpass-gnu: Add getpass.h.
22525         (Depends-on): Add stdbool.
22526         * modules/getpass: Add getpass.h.
22527
22528 2004-08-08  Simon Josefsson  <jas@extundo.com>
22529
22530         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
22531         Check getpass declaration.
22532
22533 2004-08-08  Simon Josefsson  <jas@extundo.com>
22534
22535         * lib/xgethostname.c: Don't include error.h (not used).
22536
22537         * lib/getpass.h: Add.
22538         * lib/getpass.c: Include getpass.h first.
22539
22540 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
22541
22542         * lib/xalloc-die.c: New file.
22543         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
22544         All uses removed.
22545         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
22546         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
22547         xalloc-die.c.
22548         (_, N_, xalloc_die): Move to xalloc-die.c.
22549         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
22550         so that we needn't mess with xalloc_msg_memory_exhausted.
22551
22552         * lib/sha1.h: Renamed from sha.h.
22553         (SHA1_H): Renamed from _SHA_H.
22554         (sha1_ctx): Renamed from sha_ctx.
22555         (sha1_init_ctx): Renamed from sha_init_ctx.
22556         (sha1_process_block): Renamed from sha_process_block.
22557         (sha1_process_bytes): Renamed from sha_process_bytes.
22558         (sha1_finish_ctx): Renamed from sha_finish_ctx.
22559         (sha1_read_ctx): Renamed from sha_read_ctx.
22560         (sha1_stream): Renamed from sha_stream.
22561         (sha1_buffer): Renamed from sha_buffer.
22562         * lib/sha1.c: Likewise; renamed from sha.c.
22563         Do not include <sys/types.h>.
22564         Include <stddef.h> rather than <stdlib.h>.
22565
22566 2004-08-08  Bruno Haible  <bruno@clisp.org>
22567
22568         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
22569         FILESYSTEM_PREFIX_LEN.
22570         * lib/progreloc.c: Likewise.
22571         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
22572
22573 2004-08-06  Simon Josefsson  <jas@extundo.com>
22574
22575         * modules/progname (Depends-on): Don't depend on stdbool.
22576
22577 2004-08-06  Simon Josefsson  <jas@extundo.com>
22578
22579         * modules/getsubopt: New file.
22580         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22581         getsubopt.
22582
22583 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22584
22585         More merge from coreutils.
22586
22587         * m4/utimens.m4, m4/utimecmp.m4: New files.
22588         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
22589         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
22590         prereq.m4, sha.m4: Import changes from coreutils.
22591
22592 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22593
22594         More merge from coreutils.
22595         * modules/raise, modules/readtokens0, modules/utimens:
22596         * modules/utimecmp, module/xnanosleep: New files.
22597         * modules/strftime: Add lib/strftime.h.
22598         Change include from <time.h> to "strftime.h".
22599         * modules/yesno: Add lib/yesno.h.
22600         * modules/backupfile: Remove lib/addext.c.
22601         * modules/euidaccess: Add stat-macros.h.
22602         * modules/canonicalize, modules/euidaccess,
22603         modules/filemode, modules/lchown, modules/makepath,
22604         modules/rmdir, modules/stat: Likewise.
22605
22606 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22607
22608         Merge from tar.
22609         * lib/argp-help.c (make_hol, hol_append): Don't assume that
22610         SIZE_MAX is a valid preprocessor constant.
22611         (__argp_basename): Change from "#ifndef _LIBC"
22612         to "#ifndef __argp_short_program_name", so that
22613         we don't compile these functions for tar.
22614
22615         More merges from coreutils.
22616         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
22617         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
22618         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
22619         * lib/addext.c: Remove; no longer needed.
22620         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
22621         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
22622         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
22623         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
22624         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
22625         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
22626         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
22627         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
22628         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
22629         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
22630         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
22631         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
22632         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
22633         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
22634         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
22635         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
22636         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
22637         Import changes from coreutils.
22638
22639 2004-08-05  Simon Josefsson  <jas@extundo.com>
22640
22641         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
22642
22643 2004-08-05  Simon Josefsson  <jas@extundo.com>
22644
22645         * m4/getsubopt.m4: New file.
22646
22647 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22648
22649         Merge from coreutils.
22650
22651         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
22652         * m4/getcwd-path-max.m4: New files.
22653
22654         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
22655         FILESYSTEM_PREFIX_LEN ->
22656         FILE_SYSTEM_PREFIX_LEN.
22657         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
22658         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
22659         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
22660         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
22661
22662         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
22663         prerequisite modules now handle the DOS stuff.
22664         Don't check for unistd.h.
22665
22666 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22667
22668         Merge from coreutils.
22669
22670         * lib/.gdb-history: Remove; this doesn't belong here.
22671
22672         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
22673         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
22674         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
22675         * lib/getcwd.c: New files.
22676
22677         * lib/dirname.h: Include <stdbool.h>.
22678         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
22679         for consistency with POSIX terminology.  All uses changed.
22680         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
22681         (strip_trailing_slashes): Use bool for booleans.
22682         * lib/stripslash.c (strip_trailing_slashes): Likewise.
22683
22684         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
22685         sometimes returns a positive errno value even when it succeeds.
22686         (print_errno_message) [!LIBC]: Fall back on strerror if
22687         __strerror_r fails.
22688
22689         * lib/path-concat.c (mempcpy): Don't define if a system header defines
22690         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
22691         (longest_relative_suffix): New function.
22692         (path_concat): Use it.  Assume first argument is not NULL.
22693         Port to DOS.  Omit redundant separators.
22694         Report an error instead of returning NULL.
22695         Use mempcpy instead of memcpy.
22696         (xpath_concat): Remove: not declared or used.
22697
22698         * lib/same.h: Include <stdbool.h>
22699         (same_name): Return bool, not int.
22700         * lib/same.c (same_name): Likewise.
22701         (errno): Don't declare; we assume C89 or better now.
22702
22703         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
22704         if not already defined.
22705
22706         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
22707         * lib/dup-safer.c (errno): Likewise.
22708
22709 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22710
22711         Merge from coreutils.
22712         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
22713         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
22714         * modules/path-concat: Don't depend on strdup.
22715
22716 2004-08-03  Simon Josefsson  <jas@extundo.com>
22717
22718         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
22719         * lib/progname.h: Don't include stdbool.h.
22720
22721 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22722
22723         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
22724         * MODULES.html.sh (func_all_modules): Remove fatal.
22725
22726 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22727
22728         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
22729
22730 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22731
22732         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
22733         working.
22734
22735 2004-08-02  Simon Josefsson  <jas@extundo.com>
22736
22737         * lib/getsubopt.h: New file, with comments from Bruno Haible.
22738         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
22739         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
22740
22741 2004-08-01  Simon Josefsson  <jas@extundo.com>
22742
22743         * lib/xgetdomainname.c: Include stdlib.h, for free().
22744
22745 2004-07-19  Bruno Haible  <bruno@clisp.org>
22746
22747         * MODULES.html.sh (func_all_modules): Add dummy.
22748
22749 2004-07-16  Simon Josefsson  <jas@extundo.com>
22750
22751         * modules/dummy: New file.
22752
22753 2004-07-16  Simon Josefsson  <jas@extundo.com>
22754
22755         * lib/dummy.c: New file.
22756
22757 2004-07-16  Bruno Haible  <bruno@clisp.org>
22758
22759         * lib/backupfile.h: Add extern "C" for C++.
22760         * lib/closeout.h: Likewise.
22761         * lib/copy-file.h: Likewise.
22762         * lib/findprog.h: Likewise.
22763         * lib/full-write.h: Likewise.
22764         * lib/pathname.h: Likewise.
22765         * lib/progname.h: Likewise.
22766         * lib/stpcpy.h: Likewise.
22767         * lib/stpncpy.h: Likewise.
22768         * lib/strcase.h: Likewise.
22769         * lib/strstr.h: Likewise.
22770         * lib/xalloc.h: Likewise.
22771
22772         * lib/mbswidth.h: Add extern "C" for C++.
22773         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
22774
22775 2004-07-13  Robert Millan  <robertmh@gnu.org>
22776
22777         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
22778
22779 2004-07-09  Simon Josefsson  <jas@extundo.com>
22780
22781         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
22782         failed without this.)
22783
22784 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22785
22786         * modules/chown (Files): Add lib/fchown-stub.c, since
22787         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
22788
22789 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22790
22791         * lib/fchown-stub.c: New file.
22792
22793 2004-06-24  Jim Meyering  <jim@meyering.net>
22794
22795         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
22796
22797 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22798
22799         * modules/argz: Omit "#include".
22800
22801         * MODULES.html.sh (func_all_modules): Add calloc, to match
22802         2004-06-01 addition of calloc module.
22803
22804 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22805
22806         * m4/argz.m4: New file, which is autoupdated from libtool.
22807
22808 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22809
22810         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
22811         libtool.
22812
22813 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22814
22815         * config/srclist-update: Don't insist on "USA." before the
22816         close-comment, as libtool omits the period and puts the */ on a
22817         separate line.
22818         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
22819         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
22820
22821 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
22822
22823         * modules/argz: New file.
22824         * MODULES.html.sh (func_all_modules): Add argz.
22825
22826 2004-06-12  Jim Meyering  <jim@meyering.net>
22827         and  Paul Eggert  <eggert@cs.ucla.edu>
22828
22829         * modules/hash (Files): Add lib/xalloc.h.
22830         * modules/pipe (Depends-on): Add wait-process.
22831         * modules/stat (Depends-on): Add xalloc.
22832         * modules/userspec (Files): Add lib/userspec.h.
22833         * modules/xstrto
22834
22835         Upgrade from gettext-0.13.
22836         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
22837         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
22838         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
22839
22840 2004-06-10  Jim Meyering  <jim@meyering.net>
22841
22842         * lib/calloc.c: New file.
22843
22844 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
22845
22846         * lib/getdate.y (yylex): Allow space between sign and number.
22847         Problem reported by Dan Jacobson.
22848
22849 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22850
22851         Merge from coreutils CVS.
22852
22853         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
22854         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
22855         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
22856         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
22857         xstrtol.m4: Fix copyright date and/or serial number.
22858
22859         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
22860         See if we need an fchown replacement.
22861         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
22862         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
22863         and use the replacement function if we detect either defect.
22864
22865         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
22866         gl_UTIMECMP.
22867
22868 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22869         and  Jim Meyering  <jim@meyering.net>
22870
22871         Merge from coreutils CVS.
22872
22873         * lib/stat-macros.h: New file, with contents from file-type.h
22874         and coreutils' system.h.
22875         * lib/file-type.c: Include "stat-macros.h".
22876         * lib/file-type.h (file_type): Move all macro definitions to new file,
22877         stat-macros.h.
22878
22879         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
22880         Wrap old code with this conditional.
22881         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
22882         function that does not dereference symlinks.
22883         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
22884
22885         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
22886         dependency problems.
22887         (xreadlink): Accept new arg SIZE, for efficiency.
22888         All decls and uses changed.
22889         * lib/xreadlink.h: Include <stddef.h>, for size_t.
22890
22891         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
22892         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
22893
22894         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
22895         sysexits.h.
22896
22897 2004-06-01  Jim Meyering  <jim@meyering.net>
22898
22899         * m4/calloc.m4: New file.
22900
22901 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
22902
22903         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
22904         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
22905         Also, fix a typo in a diagnostic.
22906
22907 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22908
22909         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
22910         or AC_FUNC_REALLOC.
22911
22912 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22913
22914         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
22915         macros to be defined.
22916         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
22917         the allocator returns NULL because the requested size is zero.
22918
22919 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
22920
22921         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
22922         var.  Add comment explaining why libc still defines it.  This
22923         merges the following patch from glibc:
22924         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
22925
22926 2004-05-20  Andreas Schwab  <schwab@suse.de>
22927
22928         * m4/free.m4: Replace free if it not known to work, not the other
22929         way round.
22930
22931 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
22932
22933         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
22934         present in glibc since revision 1.1 of this file.
22935         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
22936         obstack_alignment_mask, obstack_alloc, obstack_base,
22937         obstack_blank, obstack_blank_fast, obstack_chunk_size,
22938         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
22939         obstack_grow0, obstack_init, obstack_int_grow,
22940         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
22941         obstack_next_free, obstack_object_size, obstack_ptr_grow,
22942         obstack_ptr_grow_fast, obstack_room): Remove declarations of
22943         nonexistent functions.
22944
22945 2004-05-18  Karl Berry  <karl@gnu.org>
22946
22947         * config/srclist.txt: break link for vasnprintf.c.
22948
22949 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22950
22951         Port obstack to the AS/400, where pointers are 16 bytes wide and
22952         you cannot cast an integer to a valid pointer.  This patch is
22953         currently waiting to be integrated into glibc; see
22954         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
22955
22956         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
22957         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
22958         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
22959         (struct obstack): temp member is now a union of a pointer and
22960         an integer, instead of an integer.  All integer uses changed.
22961         This does not affect the physical layout of struct obstack,
22962         except on hosts (like the AS/400) where the size or alignment of
22963         void * is greater than that of ptrdiff_t.
22964         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
22965         __STDC__)]: Store temporary in pointer member of union, not
22966         integer member.
22967         * lib/obstack.c: Include <stddef.h>, for offsetof.
22968         (struct fooalign): Remove; it doesn't need a name.
22969         (union fooround): Change double to long double, and add void *.
22970         (DEFAULT_ALIGNMENT): Use offsetof to compute.
22971         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
22972         not a macro.  Hence the values are always int; so remove all
22973         casts-to-int in uses.
22974
22975 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22976
22977         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
22978         we can get this patch merged into glibc.
22979
22980 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22981             Paul Eggert  <eggert@cs.ucla.edu>
22982
22983         * m4/argp: Depend on alloca.
22984
22985 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22986             Paul Eggert  <eggert@cs.ucla.edu>
22987
22988         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
22989         freecoding.
22990
22991 2004-05-17  Bruno Haible  <bruno@clisp.org>
22992
22993         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
22994         precision that consists of a '.' followed by an empty digit string.
22995         Patch by Tor Lillqvist <tml@iki.fi>.
22996
22997 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22998
22999         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
23000         for backward compatibility with older code.  We need our own
23001         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
23002         it under some other name, and our alloca.h will define it.
23003
23004 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23005             Derek Price  <derek@ximbiot.com>
23006
23007         * lib/alloca.c: Include <alloca.h>, to get our interface.
23008         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
23009         include <alloca.h> first.  Use C89 prototype for alloca; this
23010         requires including <stddef.h> for size_t.  Use extern "C" if C++.
23011         Use #elif for simplicity, since we can assume C89 now.
23012         Don't try to source the system alloca.h since it will not be found
23013         and to prevent recursively including its replacement.
23014         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
23015         * lib/regex.c: Likewise.
23016
23017 2004-05-16  Derek Price  <derek@ximbiot.com>
23018             Paul Eggert  <eggert@cs.ucla.edu>
23019
23020         getline cleanup.  This changes the getndelim2 API: both order of
23021         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
23022         no delimiter).
23023
23024         * lib/getline.c: Don't include stddef.h or stdio.h, since our
23025         interface does that.
23026         (getline): Always use getdelim, so that we don't have two
23027         copies of this code.
23028         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
23029         if available.
23030         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
23031         (GETNDELIM2_MAXIMUM): New macro.
23032         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
23033         instead of the old practice of delim2==0.  All callers changed.
23034         Return -1 on overflow, instead of returning junk.
23035         Do not set *linesize unless allocation succeeds.
23036         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
23037         that we include sys/types.h.
23038         * lib/getnline.h: Likewise.
23039         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
23040         (getndelim2): Reorder arguments.
23041         * lib/getnline.c (getnline, getndelim):
23042         Don't discard the NMAX argument.
23043         (getnline): Invoke getndelim, to avoid code duplication.
23044         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
23045         of (size_t) -1 by callers of the getnline family.
23046
23047 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23048
23049         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
23050         Check for gettimeofday.
23051         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
23052         Check for settimeofday, stime.
23053
23054 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23055
23056         * lib/nanosleep.c (suspended): Change its type from int to
23057         sig_atomic_t volatile.
23058         (first_call): Make it private to rpl_nanosleep, and have it
23059         be zero initially as that's a bit faster.
23060         (my_usleep): Round up fractional times instead of truncating them,
23061         as this is the usual meaning for 'sleep'.
23062
23063         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
23064         doesn't work.
23065         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
23066         (ENOSYS): Define if not defined.
23067         (settime): Fall back on stime if it exists and settimeofday fails.
23068         But don't bother with fallbacks if a method fails with errno == EPERM.
23069
23070 2004-05-11  Jim Meyering  <jim@meyering.net>
23071
23072         Prior to this change, the save_cwd caller required read access to the
23073         current directory on most systems (ones with the fchdir function).
23074
23075         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
23076         fails, try write-only, and finally, resort to using xgetcwd.
23077
23078 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
23079
23080         * lib/obstack.c, obstack.h: Import changes from libc.
23081
23082 2004-04-28  Bruno Haible  <bruno@clisp.org>
23083
23084         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
23085         also implicitly appends .exe to executables.
23086         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
23087         accepts Windows pathnames.
23088         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23089         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23090         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23091         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23092         Reported by Derek Robert Price <derek@ximbiot.com>.
23093
23094 2004-04-21  Karl Berry  <karl@gnu.org>
23095
23096         * config/srclist.txt (localcharset.c): break sync.
23097
23098 2004-04-20  Paul Eggert  <eggert@twinsun.com>
23099
23100         * m4/host-os.m4: Add a copyright notice.
23101
23102 2004-04-20  Jim Meyering  <jim@meyering.net>
23103
23104         Change UTILS_ to gl_ in AC_DEFINE'd names.
23105         Change utils_- and jm_-prefixed variables, too.
23106         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
23107         UTILS_FUNC_MKDIR_TRAILING_SLASH.
23108         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
23109
23110         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
23111         Don't emit trailing blanks.
23112         Also rename jm_-prefixed variables to have gl_ prefix.
23113
23114         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
23115         Also rename jm_-prefixed variables to have gl_ prefix.
23116
23117         * m4/jm-macros.m4: Reflect the renamings.
23118         * m4/prereq.m4: Likewise.
23119
23120 2004-04-20  Jim Meyering  <jim@meyering.net>
23121
23122         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
23123         memory.
23124
23125 2004-04-20  Jim Meyering  <jim@meyering.net>
23126             Bruno Haible  <bruno@clisp.org>
23127
23128         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
23129         memory when realloc fails.
23130
23131 2004-04-19  Jim Meyering  <jim@meyering.net>
23132
23133         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
23134         now that readutmp.c may call `free (0)'.
23135
23136 2004-04-19  Bruno Haible  <bruno@clisp.org>
23137
23138         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
23139         * m4/inttypes_h.m4: Likewise.
23140         * m4/stdint_h.m4: Likewise.
23141         * m4/intmax_t.m4: Likewise.
23142         * m4/uintmax_t.m4: Likewise.
23143
23144 2004-04-18  Jim Meyering  <jim@meyering.net>
23145
23146         * m4/prereq.m4: Don't forbid jm_ prefix.
23147
23148         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
23149         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
23150         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
23151         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
23152         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
23153         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
23154         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
23155         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
23156         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
23157         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
23158         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
23159         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
23160         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
23161         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
23162         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
23163         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
23164         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
23165         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
23166         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
23167
23168 2004-04-18  Jim Meyering  <jim@meyering.net>
23169
23170         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
23171         failure, don't leak memory and do call END_UTMP_ENT.
23172
23173 2004-04-16  Jim Meyering  <jim@meyering.net>
23174
23175         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
23176         coreutils' stat program.
23177         (gl_PREREQ): Don't require jm_PREREQ_STAT.
23178
23179 2004-04-11  Paul Eggert  <eggert@twinsun.com>
23180
23181         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
23182         C89.
23183         (CHAR_BIT): Remove, since we assume C89.
23184         Include <stdint.h> if available, as per current Autoconf CVS advice.
23185
23186 2004-03-31  Jim Meyering  <jim@meyering.net>
23187
23188         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
23189         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
23190         * m4/xalloc.m4: Likewise.
23191
23192 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23193
23194         Merge from coreutils.
23195
23196         * m4/inttostr.m4: New file.
23197         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
23198         Require AM_STDBOOL_H and gl_TIMESPEC instead.
23199         Require gl_CLOCK_TIME.
23200         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
23201
23202 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23203
23204         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
23205         not bool, to be more consistent with Unix conventions.
23206         Suggested by Bruno Haible.
23207
23208         Merge from coreutils.
23209
23210         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
23211         * lib/umaxtostr.c: New files.
23212
23213         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
23214         the usual <time.h> dance.
23215         (get_date): Change signature to support fractional time stamps.
23216         All callers changed.
23217         * lib/getdate.y: Include "getdate.h" first, as we can now
23218         assume C89 and don't need to worry about 'const'.
23219         Similarly, include "unlocked-io.h" near start, not in middle.
23220         Include <limits.h>.
23221         (textint.value): Use long int rather than int.
23222         (textint.digits): Use size_t rather than int.
23223         (BILLION, LOG10_BILLION): New constants.
23224         (parser_control): New member rel_ns.  Members day_ordinal,
23225         time_zone, month, day, hour, minutes, rel_year, rel_month,
23226         rel_day, rel_hour, rel_minutes, rel_seconds
23227         are now long int, not int.  Member seconds is now struct timespec,
23228         not int.  New member timespec_seen.  Members dates_seen, days_seen,
23229         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
23230         not int.
23231         (%union.intval): Now long int, not int.
23232         New member timespec.
23233         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
23234         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
23235         (spec): Now is a timespec or an item list.
23236         (timespec, items): New nonterminals.
23237         (time, rel, relunit, number, get_date):
23238         Add support for fractional seconds.
23239         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
23240         (gmtime, localtime, mktime): Remove decls; not needed with C89.
23241         (to_hour): First arg is now long int, not int.
23242         (to_year): Returns long int, not int.
23243         Don't treat year -70 like 70.
23244         (tm_diff): Returns long int, not int.
23245         (lookup_word): Use bool instead of int when appropriate.
23246         (yylex): Use size_t for count, not int.
23247         Detect overflow when parsing large integer constants.
23248         Add support for fractions.
23249         (get_date): Make pointers 'const' if possible.
23250         Use more-portable code to detect integer overflow.
23251         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
23252         Don't use ctime; it's not reliable if the year has >4 digits.
23253
23254         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
23255         This is for compatibility with BSD.
23256
23257         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
23258         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
23259         From coreutils' system.h.
23260
23261         * lib/userspec.c: Don't include "posixver.h".
23262         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
23263         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
23264         compatible extension.  Simplify code by removing a boolean int
23265         that was always nonzero if a string was nonnull.
23266
23267 2004-03-30  Jim Meyering  <jim@meyering.net>
23268
23269         Merge from coreutils.
23270
23271         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
23272         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
23273         on some systems one must include <grp.h> before it.
23274         Reported by Christian Krackowizer.
23275
23276 2004-03-30  Jim Meyering  <jim@meyering.net>
23277
23278         Merge from coreutils.
23279
23280         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
23281
23282         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
23283         an empty input stream.
23284
23285         * lib/readtokens.c: Include <stdbool.h>.
23286         (readtoken): Use `size_t' rather than int/long.
23287         All callers adjusted.
23288         Use `bool' rather than `int' where appropriate.
23289         Use memset rather than an explicit loop.
23290         Use x2nrealloc rather than xrealloc.
23291         Allow the use of `\0' as a delimiter.
23292         (readtokens): Likewise.
23293         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
23294
23295 2004-03-30  Jim Meyering  <jim@meyering.net>
23296
23297         * m4/realloc.m4: Remove file, since now it does no more than
23298         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
23299         the `configure.ac' section of module/realloc.
23300         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
23301
23302 2004-03-30  Bruno Haible  <bruno@clisp.org>
23303
23304         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
23305         nonnull.
23306
23307 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23308
23309         Merge changes to getloadavg.c from coreutils and Emacs.
23310
23311         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
23312         Define to an expression, not to the empty string.
23313         Include cloexec.h and xalloc.h.
23314         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
23315         Use set_cloexec_flag rather than rolling our own.
23316         * lib/cloexec.c, lib/cloexec.h: New files.
23317
23318 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23319
23320         * m4/cloexec.m4: New file.
23321
23322 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23323
23324         * lib/getopt.h: Sync with libc CVS.
23325
23326 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23327             Bruno Haible  <bruno@clisp.org>
23328
23329         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
23330         mbswidth.
23331
23332 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23333             Bruno Haible  <bruno@clisp.org>
23334
23335         * lib/mbswidth.h: Include <wchar.h> only if
23336         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
23337         <wchar.h>.
23338         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
23339
23340 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23341
23342         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
23343         Sync with libc CVS.
23344         * lib/getopt_int.h: New file, also synced from libc.
23345
23346 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23347
23348         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
23349         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
23350         Bring back getopt.c, getopt.h, getopt1.c.
23351
23352 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23353
23354         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
23355         All uses changed.  Check for sa_sigaction member; this fixes
23356         a bug first reported by Jason Andrade in
23357         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23358
23359 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23360
23361         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
23362         '#if' expressions.  Unlike the code it replaces, it does not
23363         depend on (defined _SC_PAGESIZE).  However, it does depend on
23364         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
23365         first reported by Jason Andrade in
23366         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23367
23368 2004-02-25  Simon Josefsson  <jas@extundo.com>
23369
23370         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
23371
23372 2004-02-25  Simon Josefsson  <jas@extundo.com>
23373
23374         * lib/strdup.h: New file.
23375         * lib/strdup.c: Include it.
23376         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
23377         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
23378
23379 2004-02-23  Karl Berry  <karl@gnu.org>
23380
23381         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
23382         (from fencepost.gnu.org:/gd/gnuorg).
23383
23384 2004-02-23  Karl Berry  <karl@gnu.org>
23385
23386         * config/srclistvars.sh (GNUORG) [karl]: redefine.
23387         * config/srclist.txt: add maintain/standards documents.
23388
23389 2004-02-18  Bruno Haible  <bruno@clisp.org>
23390
23391         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
23392         Reported by Derek Robert Price <derek@ximbiot.com>.
23393
23394 2004-02-16  Karl Berry  <karl@gnu.org>
23395
23396         * config/mkinstalldirs, install-sh: update from automake.
23397
23398 2004-02-06  Karl Berry  <karl@gnu.org>
23399
23400         * m4/po.m4: update from gettext 0.14.1.
23401
23402 2004-02-06  Karl Berry  <karl@gnu.org>
23403
23404         * lib/config.charset: update from gettext 0.14.1.
23405
23406 2004-02-05  Paul Eggert  <eggert@twinsun.com>
23407
23408         Add comments and code, prompted by suggestions from Bruno Haible
23409         for sh-quote.
23410         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
23411         describing the enum quoting_style values.
23412         * lib/quotearg.c (quotearg_alloc): New function.
23413         (quotearg_buffer_restyled): Treat lone { and } as special.
23414         Treat = as special.  Work around bug with older shells
23415         that "see" a '\' that is really the 2nd byte of a multibyte char.
23416         Quote empty string with shell_quoting_style.
23417
23418 2004-02-03  Bruno Haible  <bruno@clisp.org>
23419
23420         * m4/pipe.m4: New file, from GNU gettext.
23421
23422 2004-02-03  Bruno Haible  <bruno@clisp.org>
23423
23424         * lib/pipe.h: New file, from GNU gettext.
23425         * lib/pipe.c: New file, from GNU gettext.
23426
23427 2004-01-27  Bruno Haible  <bruno@clisp.org>
23428
23429         * m4/execute.m4: New file, from GNU gettext.
23430
23431 2004-01-27  Bruno Haible  <bruno@clisp.org>
23432
23433         * lib/execute.h: New file, from GNU gettext.
23434         * lib/execute.c: New file, from GNU gettext.
23435         * lib/w32spawn.h: New file, from GNU gettext.
23436
23437 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23438
23439         Merge from diffutils.
23440
23441         * lib/file-type.c (file_type): Add typed memory objects.
23442         * lib/file-type.h (S_TYPEISTMO): New macro.
23443
23444         * lib/c-stack.h (c_stack_action): Remove argv argument.
23445         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
23446         (die): Don't calculate message unless segv_action returns.
23447         (get_stack_location, min_address_from_argv, max_address_from_argv,
23448         volatile stack_base, volatile_stack_size): Remove.
23449         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
23450         that every segmentation violation is a stack overflow.  (Ouch!)
23451         See Debian bug 136249 (still outstanding) for more info about why
23452         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
23453
23454 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23455
23456         Exit-status fix from coreutils.
23457
23458         Use exit_failure consistently in place of EXIT_FAILURE,
23459         so that program exit statuses are consistent on failure.
23460
23461         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
23462         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
23463         * lib/argmatch.h: Comment fix to match the above.
23464         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
23465         Now a macro referring to exit_failure, instead of a separate
23466         variable.  Include "exitfail.h" to get it.
23467         * lib/xstrtol.h: Include "exitfail.h".
23468         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
23469
23470         * lib/long-options.c (parse_long_options): Use prototype
23471         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
23472         for clarity.
23473
23474 2004-01-21  Jim Meyering  <jim@meyering.net>
23475
23476         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
23477         so as not to conflict with a different-sized __mktime_internal
23478         function in GNU libc.
23479         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
23480         Problem building statically-linked `ls' reported by Michael Brunnbauer.
23481
23482 2004-01-20  Karl Berry  <karl@gnu.org>
23483
23484         * config/config.guess: update from config.
23485
23486         * config/srclistvars.sh: GNUWWWLICENSES for karl.
23487
23488 2004-01-20  Bruno Haible  <bruno@clisp.org>
23489
23490         Safer stack allocation.
23491         * lib/setenv.c: Include allocsa.h.
23492         (alloca): Remove fallback definition.
23493         (freea): Remove macro.
23494         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
23495         instead of freea.
23496
23497 2004-01-20  Bruno Haible  <bruno@clisp.org>
23498
23499         * m4/eealloc.m4: New file, from GNU gettext.
23500
23501 2004-01-20  Bruno Haible  <bruno@clisp.org>
23502
23503         * m4/allocsa.m4: New file, from GNU gettext.
23504
23505 2004-01-20  Bruno Haible  <bruno@clisp.org>
23506
23507         * lib/xallocsa.h: New file, from GNU gettext.
23508         * lib/xallocsa.c: New file, from GNU gettext.
23509
23510 2004-01-20  Bruno Haible  <bruno@clisp.org>
23511
23512         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
23513
23514 2004-01-20  Bruno Haible  <bruno@clisp.org>
23515
23516         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
23517         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
23518         specially.
23519
23520 2004-01-20  Bruno Haible  <bruno@clisp.org>
23521
23522         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
23523         patch.
23524
23525 2004-01-20  Bruno Haible  <bruno@clisp.org>
23526
23527         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
23528
23529 2004-01-20  Bruno Haible  <bruno@clisp.org>
23530
23531         * lib/eealloc.h: New file.
23532
23533 2004-01-20  Bruno Haible  <bruno@clisp.org>
23534
23535         * lib/binary-io.h: Avoid warnings on Cygwin.
23536
23537 2004-01-20  Bruno Haible  <bruno@clisp.org>
23538
23539         * lib/allocsa.h: New file, from GNU gettext.
23540         * lib/allocsa.c: New file, from GNU gettext.
23541
23542 2004-01-18  Karl Berry  <karl@gnu.org>
23543
23544         * doc/gpl.texi, doc/lgpl.texi: new files.
23545
23546 2004-01-18  Karl Berry  <karl@gnu.org>
23547
23548         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
23549         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
23550
23551 2004-01-15  Paul Eggert  <eggert@twinsun.com>
23552
23553         Merge from coreutils.
23554
23555         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
23556         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
23557         (gl_DEFAULT_POSIX2_VERSION): Move
23558         the documentation from 'configure' into 'config.hin',
23559         so that 'configure --help' isn't burdened by it and
23560         we don't have to worry about its formatting there.
23561         Reword the documentation so that it's more succinct
23562         and can be run together into a single paragraph.
23563         * m4/same.m4 (gl_SAME): Check for pathconf.
23564
23565 2004-01-15  Paul Eggert  <eggert@twinsun.com>
23566
23567         Merge from coreutils.
23568
23569         * lib/posixver.c: Include posixver.h.
23570
23571         * lib/same.c: Include <stdbool.h>, <limits.h>.
23572         (_POSIX_NAME_MAX): Define if not defined.
23573         (MIN): New macro.
23574         (same_name): If file names are silently truncated, report
23575         that the file names are the same if they are the same after
23576         the silent truncation.
23577
23578         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
23579         conversion function.
23580         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
23581         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
23582         longer needed.
23583
23584 2004-01-15  Jim Meyering  <jim@meyering.net>
23585
23586         Merge from coreutils.
23587
23588         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
23589         if no library is required.
23590         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
23591         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
23592         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
23593         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
23594         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
23595         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
23596         value, $ac_cv_search_crypt, if it's "none required".
23597         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
23598         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
23599         not gl_FUNC_GETLOADAVG.
23600         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
23601         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
23602
23603 2004-01-15  Jim Meyering  <jim@meyering.net>
23604
23605         Merge from coreutils.
23606
23607         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
23608         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
23609         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
23610
23611         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
23612         optional configure-time default.
23613
23614         * lib/version-etc.c (version_etc_copyright): Update copyright date.
23615
23616         * lib/xreadlink.c (xreadlink): Correct outdated comment.
23617
23618 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
23619
23620         Merge from coreutils.
23621
23622         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
23623         value, $ac_cv_search_nanosleep, if it's "none required".
23624
23625 2004-01-14  Paul Eggert  <eggert@twinsun.com>
23626
23627         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
23628         with like-named macro in fnmatch.c.
23629         (EXT): Use an internal constant instead.
23630
23631         Merge fnmatch patches from glibc.
23632         * lib/fnmatch.c (mbsinit): Remove define.
23633         Add libc_hidden_ver (__fnmatch, fnmatch).
23634         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
23635         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
23636
23637 2004-01-14  Karl Berry  <karl@gnu.org>
23638
23639         * config/install-sh: update from automake.
23640
23641 2004-01-13  Karl Berry  <karl@gnu.org>
23642
23643         * config/install-sh: update from automake.
23644
23645 2004-01-09  Karl Berry  <karl@gnu.org>
23646
23647         * config/install-sh: update from automake.
23648
23649 2004-01-05  Karl Berry  <karl@gnu.org>
23650
23651         * config/config.{sub,guess}: update from config.
23652
23653 2003-12-31  Karl Berry  <karl@gnu.org>
23654
23655         * config/depcomp: update from automake.
23656
23657 2003-12-14  Karl Berry  <karl@gnu.org>
23658
23659         * lib/config.charset: update from gettext-runtime.
23660
23661 2003-12-03  Paul Eggert  <eggert@twinsun.com>
23662
23663         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
23664         Bug reported by Alfred M. Szmidt.
23665
23666 2003-12-03  Bruno Haible  <bruno@clisp.org>
23667
23668         * m4/gettext.m4: Upgrade from gettext-0.13.
23669         * m4/po.m4: Upgrade from gettext-0.13.
23670         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
23671         * m4/intmax.m4: New file, from gettext-0.13.
23672         * m4/printf-posix.m4: New file, from gettext-0.13.
23673
23674 2003-11-29  Karl Berry  <karl@gnu.org>
23675
23676         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
23677
23678 2003-11-25  Paul Eggert  <eggert@twinsun.com>
23679             Bruno Haible  <bruno@clisp.org>
23680
23681         * lib/printf-parse.h: Don't include sys/types.h.
23682         (ARG_NONE): New macro.
23683         (char_directive): Change type of *arg_index fields to size_t.
23684         * lib/printf-parse.c: Don't include sys/types.h.
23685         (SSIZE_MAX): Remove macro.
23686         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
23687         Remove unnecessary overflow check.
23688         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
23689         fields.
23690
23691 2003-11-25  Bruno Haible  <bruno@clisp.org>
23692
23693         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
23694
23695 2003-11-25  Bruno Haible  <bruno@clisp.org>
23696
23697         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
23698         gt_TYPE_SSIZE_T.
23699
23700 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23701
23702         * modules/alloca: Remove dependency on xalloc.
23703
23704 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23705
23706         * lib/alloca.c: Remove dependency on xalloc module.
23707         (xalloc_die): Remove.
23708         (memory_full) [!defined emacs]: New macro.
23709         [!defined emacs]: Don't include xalloc.h.
23710         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
23711         address arithmetic overflows.  Change datatypes a bit to avoid
23712         unnecessary casts.
23713
23714 2003-11-22  Jim Meyering  <jim@meyering.net>
23715
23716         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
23717         s/size/size_t/.
23718
23719 2003-11-21  Karl Berry  <karl@gnu.org>
23720
23721         * config/config.{sub,guess}: update from config.
23722
23723 2003-11-18  Karl Berry  <karl@gnu.org>
23724
23725         * config/config.{sub,guess}: update from config.
23726
23727         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
23728
23729 2003-11-17  Paul Eggert  <eggert@twinsun.com>
23730
23731         * README: Mention that S+T cannot overflow if S is the size of
23732         an existing object and T is sufficiently small.
23733
23734 2003-11-17  Jim Meyering  <jim@meyering.net>
23735
23736         On systems without utime and without a utimes function capable of
23737         dealing with a NULL struct utimbuf* argument, this utime replacement
23738         could -- in unusual circumstances -- leak a file descriptor.
23739         * lib/utime.c: Include <unistd.h> and <errno.h>.
23740         (utime_null): Be sure to close `fd' and to preserve errno.
23741         Reported by Geoff Collyer via Arnold Robbins.
23742
23743 2003-11-17  Bruno Haible  <bruno@clisp.org>
23744
23745         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
23746         (Depends-on): Add xsize.
23747
23748 2003-11-17  Bruno Haible  <bruno@clisp.org>
23749
23750         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
23751
23752 2003-11-17  Bruno Haible  <bruno@clisp.org>
23753
23754         * lib/vasnprintf.c (alloca): Remove fallback definition.
23755         (freea): Remove definition.
23756         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
23757         Reported by Paul Eggert.
23758
23759 2003-11-16  Paul Eggert  <eggert@twinsun.com>
23760             Bruno Haible  <bruno@clisp.org>
23761
23762         Protect against address arithmetic overflow.
23763         * lib/printf-args.h: Include stddef.h.
23764         (arguments): Change type of field 'count' to size_t.
23765         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
23766         'unsigned int' where appropriate.
23767         * lib/printf-parse.h: Include sys/types.h.
23768         (char_directive): Change type of *arg_index fields to ssize_t.
23769         (char_directives): Change type of fields 'count', max_*_length to
23770         size_t.
23771         * lib/printf-parse.c: Include sys/types.h and xsize.h.
23772         (SSIZE_MAX): Define fallback value.
23773         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
23774         instead of 'int' where appropriate. Check a_allocated, d_allocated
23775         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
23776         * lib/vasnprintf.c: Include xsize.h.
23777         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
23778         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
23779         overflow. Avoid wraparound when converting a width or precision from
23780         decimal to binary.
23781
23782 2003-11-16  Bruno Haible  <bruno@clisp.org>
23783
23784         Update from GNU gettext.
23785         * lib/printf-parse.c: Generalize to it can be compiled for wide
23786         strings.
23787         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
23788         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
23789         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
23790         SNPRINTF): New macros.
23791         Don't include <alloca.h> if the file is used inside libintl.
23792         (local_wcslen): New function, for Solaris 2.5.1.
23793         (VASNPRINTF): Use it instead of wcslen.
23794
23795 2003-11-16  Bruno Haible  <bruno@clisp.org>
23796
23797         * lib/xsize.h (xmax): New function.
23798         (xsum, xsum3, xsum4): Declare as "pure" functions.
23799
23800 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23801
23802         * modules/xalloc (Files): Undo latest change, since xalloc.h
23803         no longer needs SIZE_MAX or PTRDIFF_MAX.
23804
23805 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23806
23807         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
23808         gl_PTRDIFF_MAX.
23809
23810 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23811
23812         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
23813         "return", to pacify some unknown compiler.  Problem reported
23814         by Joerg Schilling.
23815
23816 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23817
23818         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
23819         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
23820         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
23821         heuristic is just as accurate as far as we know, and it removes a
23822         dependency on size_max.m4 and ptrdiff_max.m4.
23823
23824 2003-11-11  Bruno Haible  <bruno@clisp.org>
23825
23826         * modules/xsize (Files): Add m4/size_max.m4.
23827         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
23828
23829 2003-11-11  Bruno Haible  <bruno@clisp.org>
23830
23831         * m4/size_max.m4: New file.
23832         * m4/ptrdiff_max.m4: New file.
23833         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
23834         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
23835         (gl_XALLOC): Invoke it.
23836
23837 2003-11-11  Bruno Haible  <bruno@clisp.org>
23838
23839         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
23840         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
23841         defined.
23842
23843 2003-11-10  Paul Eggert  <eggert@twinsun.com>
23844
23845         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
23846         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
23847         rejected some allocations of exactly SIZE_MAX - 2 bytes.
23848         From Bruno Haible.
23849         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
23850         not (size_t) -1, since it's defined here.
23851
23852 2003-11-09  Karl Berry  <karl@gnu.org>
23853
23854         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
23855
23856 2003-11-06  Paul Eggert  <eggert@twinsun.com>
23857
23858         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
23859         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
23860         Reject sizes of exactly SIZE_MAX bytes.
23861         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
23862         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
23863
23864 2003-11-05  Bruno Haible  <bruno@clisp.org>
23865
23866         * lib/xsize.h: Include limits.h, to avoid a possible collision with
23867         SIZE_MAX defined in <limits.h> on Solaris.
23868
23869 2003-11-04  Jim Meyering  <jim@meyering.net>
23870
23871         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
23872         variable names, rather than @VAR@.
23873         * modules/poll: Likewise.
23874
23875 2003-11-04  Bruno Haible  <bruno@clisp.org>
23876
23877         * modules/xsize: New file.
23878         * modules/linebreak: Depend on xsize.
23879         * MODULES.html.sh (func_all_modules): Add xsize.
23880
23881 2003-11-04  Bruno Haible  <bruno@clisp.org>
23882
23883         * m4/xsize.m4: New file.
23884
23885 2003-11-04  Bruno Haible  <bruno@clisp.org>
23886
23887         * lib/xsize.h: New file.
23888         * lib/linebreak.c: Include xsize.h.
23889         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
23890         argument for overflow.
23891         Suggested by Paul Eggert.
23892
23893 2003-11-03  Karl Berry  <karl@gnu.org>
23894
23895         * config/config.{guess,sub}: update from config.
23896
23897 2003-11-03  Jim Meyering  <jim@meyering.net>
23898
23899         * modules/userspec (lib_SOURCES): Add userspec.h.
23900         (Include): Add "userspec.h".
23901         Improve description.
23902
23903 2003-11-03  Jim Meyering  <jim@meyering.net>
23904
23905         * lib/userspec.c: Include "userspec.h".
23906         * lib/userspec.h: New file.
23907
23908 2003-11-03  Bruno Haible  <bruno@clisp.org>
23909
23910         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
23911
23912 2003-11-03  Bruno Haible  <bruno@clisp.org>
23913
23914         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
23915         available, to avoid (extremely rare) race condition.
23916         Suggested by Paul Eggert.
23917
23918 2003-11-02  Karl Berry  <karl@gnu.org>
23919
23920         * config/srclist.txt (vasprintf.c): sync broken, sigh.
23921
23922 2003-10-31  Paul Eggert  <eggert@twinsun.com>
23923
23924         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
23925         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
23926         (read_filesystem_list): Set and use me_type_malloced.
23927         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
23928         whatever the type happens to be), for brevity and consistency.
23929         Check for size calculation overflow on Alphas running OSF/1.
23930
23931 2003-10-31  Jim Meyering  <jim@meyering.net>
23932
23933         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
23934
23935         * lib/linebuffer.c: Include <string.h> for declaration of memset.
23936
23937 2003-10-30  Paul Eggert  <eggert@twinsun.com>
23938             Bruno Haible  <bruno@clisp.org>
23939
23940         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
23941         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
23942
23943 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
23944
23945         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
23946         netbsd*-gnu*.  Suggested by Robert Millan.
23947
23948 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23949
23950         * modules/group-member: Depend on stdbool.
23951
23952 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23953
23954         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
23955
23956 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23957
23958         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
23959         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
23960         after the 'gnu' in these cases.  This fixes some bugs in the
23961         previous change, and is based on suggestions by Robert Millan.
23962
23963 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23964
23965         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
23966         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
23967         no longer needed.
23968         * lib/quotearg.c (quotearg_n_options): Use it.
23969         * lib/group-member.c: Include <stdbool.h>.
23970         (free_group_info): Arg is now const *; don't free arg.
23971         (get_group_info): Now returns bool and accepts struct group_info *,
23972         rather than returning a malloc'ed struct group_info *.
23973         All uses changed.  Check for overflow in internal size calculation.
23974
23975         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
23976         rather than xmalloc/xrealloc.
23977         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
23978         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
23979         conformance bug: the old code used a pointer after freeing the
23980         storage that it addressed.
23981         * lib/hash.c (hash_initialize): Simplify the code by using
23982         xalloc_oversized rather than doing it by hand.
23983         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
23984         the buffer preserved.  Use free and xmalloc instead.
23985         * lib/quotearg.c (quotearg_n_options): Likewise.
23986         Use a simpler test for size overflow.  Don't use xalloc_oversized
23987         because unsigned int might be wider than size_t (!); this suggests
23988         that we should switch from unsigned int to size_t for slot numbers.
23989
23990 2003-10-28  Paul Eggert  <eggert@twinsun.com>
23991
23992         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
23993         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
23994         NetBSD kernels.  Requested by Richard Stallman.
23995
23996 2003-10-27  Paul Eggert  <eggert@twinsun.com>
23997
23998         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
23999         to allocate the returned structure.  Do not allocate a subarray,
24000         as x2nrealloc will do that.
24001         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
24002         instead of xnrealloc.
24003         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
24004
24005 2003-10-27  Bruno Haible  <bruno@clisp.org>
24006
24007         * lib/stdbool_.h: Better support for BeOS.
24008
24009 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24010
24011         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
24012         now uses inline.
24013
24014 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24015
24016         * lib/xalloc.h (xalloc_oversized): New static inline function, for
24017         callers that want to do their own size-overflow checking.  Include
24018         <stdbool.h>, since xalloc_oversized returns bool.
24019         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
24020         to use xalloc_oversized.
24021
24022         Add two functions x2realloc, x2nrealloc, for programs that grow
24023         arrays dynamically by doubling their sizes.
24024         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
24025         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
24026         New functions.
24027
24028         Port to C99 semantics for 'inline' of external functions.
24029         Bug reported by Bruno Haible.
24030         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
24031         with the old contents of xnmalloc.
24032         (xnmalloc, xmalloc): Use it.
24033         (xnrealloc_inline): New static inline function,
24034         with the old contents of xnrealloc.
24035         (xnrealloc, xrealloc): Use it.
24036
24037         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
24038         that.
24039
24040 2003-10-26  Karl Berry  <karl@gnu.org>
24041
24042         * config/srclist.txt (COPYING.DOC): no longer available from
24043         /gd/gnuorg; don't know where the ultimate source is.
24044
24045 2003-10-25  Paul Eggert  <eggert@twinsun.com>
24046
24047         Fix several address-calculation bugs in the hash modules,
24048         plus some minor code cleanup.
24049
24050         * lib/hash.h: Include <stdbool.h>, for bool.
24051         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
24052         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
24053         hash_get_n_entries, hash_get_max_bucket_length,
24054         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
24055         hash_rehash): Use size_t rather than unsigned.
24056         * lib/hash.c (struct hash_table, hash_get_n_buckets,
24057         hash_get_n_buckets_used, hash_get_n_entries,
24058         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
24059         hash_get_entries, hash_do_for_each, hash_string, is_prime,
24060         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
24061         Likewise.
24062         (SIZE_MAX): Define if not defined.
24063         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
24064         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
24065         hash_print):
24066         Use const * when possible.
24067         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
24068         (check_tuning): Fix bug: if tuning parameters were very close to
24069         0 or 1, rounding errors could have caused subscript violations.
24070         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
24071         (hash_initialize): Add 'fail:' label
24072         to free table and return NULL, and use it to simplify code.
24073         Use calloc rather than clearing the storage ourself.
24074         (hash_initialize, hash_rehash): Check for arithmetic overflow in
24075         buffer size calculations.
24076         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
24077         Include <stddef.h>, for size_t.
24078         * lib/hash-pjw.c (hash_pjw): Likewise.
24079         Switch to method described by Bruno Haible.
24080         Include <limits.h>, for CHAR_BIT.
24081         (SIZE_BITS): New macro.
24082
24083 2003-10-23  Paul Eggert  <eggert@twinsun.com>
24084
24085         * m4/getline.m4 (AM_FUNC_GETLINE):
24086         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
24087         hosts.  Problem reported by Derek Robert Price in
24088         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
24089         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
24090         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
24091
24092 2003-10-21  Paul Eggert  <eggert@twinsun.com>
24093
24094         * lib/getndelim2.c (getndelim2): When size calculation overflows,
24095         ceiling the allocation at NMAX bytes rather than silently
24096         discarding input bytes before NMAX is reached.  This makes
24097         a difference only if NMAX exceeds SIZE_MAX / 2.
24098
24099         * lib/obstack.c: Merge from glibc.
24100         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
24101         Add libc_hidden_def (_obstack_newchunk).
24102         (_obstack_free) [! defined _LIBC]: Remove.
24103         [defined _LIBC]: Make a strong alias from obstack_free, rather than
24104         a clone of the function body.
24105         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
24106         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
24107
24108         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
24109         glibc.
24110         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
24111         arg to memcpy.
24112
24113         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
24114         (obstack_ptr_grow_fast, obstack_int_grow_fast):
24115         Don't use lvalue casts, as GCC plans to remove support for them
24116         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
24117         was also present in the non-GCC version, indicating that this
24118         code had always been buggy and had never been widely used.
24119         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
24120         Use the fast variant of each macro, rather than copying the
24121         definiens of the fast variant; that way, we'll be more likely to
24122         catch future bugs in the fast variants.
24123
24124 2003-10-20  Bruno Haible  <bruno@clisp.org>
24125
24126         * modules/wait-process: New file.
24127         * MODULES.html.sh (func_all_modules): Add wait-process.
24128
24129 2003-10-20  Bruno Haible  <bruno@clisp.org>
24130
24131         * m4/wait-process.m4: New file.
24132
24133 2003-10-20  Bruno Haible  <bruno@clisp.org>
24134
24135         * lib/wait-process.h: New file, from GNU gettext.
24136         * lib/wait-process.c: New file, from GNU gettext.
24137
24138 2003-10-19  Jim Meyering  <jim@meyering.net>
24139
24140         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
24141         HPUX 10.20.
24142
24143 2003-10-18  Karl Berry  <karl@gnu.org>
24144
24145         * config/config.guess: update from config.
24146
24147 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24148
24149         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
24150         (getgroups): First arg is int, not size_t.
24151         Don't let 'free' mangle errno.
24152
24153 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24154
24155         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
24156
24157 2003-10-16  Karl Berry  <karl@gnu.org>
24158
24159         * config/config.{guess,sub}: update from config.
24160
24161 2003-10-16  Jim Meyering  <jim@meyering.net>
24162
24163         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
24164         memcpy.
24165
24166 2003-10-15  Paul Eggert  <eggert@twinsun.com>
24167
24168         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
24169         (SIZE_MAX): Remove.
24170         (new_exclude, add_exclude_file): Initial size no longer needs to
24171         be a power of 2.
24172         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
24173         our own address arithmetic overflow checking.
24174
24175         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
24176         (fnmatch): Do not alloca more than 2000 wide characters;
24177         instead, use malloc for large buffers.
24178         Check for address arithmetic overflow, and return -1
24179         with errno set to ENOMEM in that case.
24180         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
24181         (NEW_PATTERN): Do not alloca more than 8000 bytes;
24182         instead, return -1.  Check for address arithmetic overflow.
24183
24184 2003-10-14  Paul Eggert  <eggert@twinsun.com>
24185
24186         Handle invalid suffixes and overflow independently, so that
24187         callers can treat them independently as needed.  Fix some bugs in
24188         suffix handling, e.g., "100k@" was not diagnosed as an invalid
24189         suffix for a human-readable blocksize.  The major caller-visible
24190         change is the addition of a new
24191         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
24192         that both overflow and suffix chars were found.
24193
24194         * lib/human.c (humblock): Don't check separately for invalid suffix
24195         char; that is xstrtoumax's job (now that its bug is fixed).
24196         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
24197         INTMAX_MAX]: New macros.
24198         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
24199         TYPE_MAXIMUM): New macros.
24200         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
24201         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
24202         if overflow occurs, as it's what __strtol does and it's more useful
24203         in practice.
24204         (__xstrtol): If __strtol reports some error other than ERANGE,
24205         reflect it to the caller as LONGINT_INVALID.  If it reports
24206         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
24207         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
24208         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
24209         value.
24210         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
24211         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
24212         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
24213         [defined UINTMAX_MAX]: New macros.
24214
24215 2003-10-14  Bruno Haible  <bruno@clisp.org>
24216
24217         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
24218
24219 2003-10-14  Bruno Haible  <bruno@clisp.org>
24220
24221         * m4/sig_atomic_t: New file, from GNU gettext.
24222         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
24223
24224 2003-10-14  Bruno Haible  <bruno@clisp.org>
24225
24226         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
24227         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
24228         Also use volatile where needed.
24229
24230 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24231
24232         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
24233         Change maintainer from Bruno Haible to 'all'.
24234
24235 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24236
24237         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
24238
24239 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24240
24241         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
24242         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
24243         and define in terms of the other primitives.
24244         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
24245         (SIZE_MAX): Define if not already defined.
24246         (array_size_overflow): New function.
24247         (xalloc_die): Abort instead of exiting if 'error' returns.
24248         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
24249         (xmalloc, xrealloc): Use them.
24250         (xcalloc): Check for address arithmetic overflow.
24251         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
24252         a bit faster than strcpy.
24253
24254 2003-10-10  Simon Josefsson  <jas@extundo.com>
24255
24256         * modules/argp (Depends-on): Add restrict and strcase.
24257
24258 2003-10-10  Simon Josefsson  <jas@extundo.com>
24259
24260         * m4/argp.m4: Add AC_C_INLINE.
24261
24262 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24263
24264         Merge getpass from libc, plus a few fixes.
24265
24266         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
24267         Include <stdbool.h>.
24268         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
24269         __fsetlocking to empty.
24270         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
24271         do include <bits/libc-lock.h>.
24272         Do not include <fcntl.h>; not needed.
24273         [_LIBC]: Include <wchar.h>.
24274         (NOTCANCEL_MODE): New macro.
24275         (flockfile, funlockfile) [_LIBC]: New macros.
24276         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
24277         [!_LIBC]: New macros.
24278         (call_fclose): New function.
24279         (getpass): Use it.  Save tty stream separately; this simplifies the
24280         code and makes it more reliable if stdin happens to equal stdout.
24281         Invoke __fsetlocking on tty.
24282         Handle thread cancellation if needed.
24283         Namespace cleanup (use __tcgetattr, __getline).
24284         Use bool for Booleans.
24285         [USE_IN_LIBIO]: Handle wide streams.
24286         [!_LIBC]: Unconditionally do the fseek, since we don't know what
24287         stream might go where.
24288
24289         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
24290         doesn't have to include <stdio.h> before us.
24291         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
24292         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
24293         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
24294         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
24295         if not declared, so that we can use getpass.c code from libc without
24296         rewriting it.
24297         (flockfile, ftrylockfile, funlockfile): New macros.
24298
24299 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24300
24301         * modules/getpass: Depend on stdbool.
24302
24303 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24304
24305         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
24306
24307 2003-10-07  Karl Berry  <karl@gnu.org>
24308
24309         * config/config.{guess,sub}: update from config.
24310
24311 2003-10-06  Jim Meyering  <jim@meyering.net>
24312             Bruno Haible  <bruno@clisp.org>
24313
24314         This lets translators provide better translations for the
24315         "Written by ..." part of --version output.
24316         * lib/version-etc.h: Include stdarg.h.
24317         (version_etc_copyright): Declare as readonly.
24318         (version_etc): Make this function variadic with a NULL-terminated list
24319         of author name strings.
24320         (version_etc_va): New declaration.
24321         * lib/version-etc.c: Include stdarg.h, stdlib.h.
24322         (version_etc_copyright): Declare as readonly.
24323         (version_etc_va): New function. Provide a different translatable string
24324         for each possible number of authors < 10. Abbreviate when there are 10
24325         authors or more.
24326         (version_etc): Make this function variadic. Call version_etc_va.
24327         Suggestion from Gary V. Vaughan.
24328
24329         * lib/long-options.h (parse_long_options): Change prototype: the
24330         authors string is moved to the end and becomes variadic.
24331         * lib/long-options.c: Include stdarg.h.
24332         (parse_long_options): Make this function variadic, too.
24333         Call version_etc_va, not version_etc.
24334
24335 2003-10-06  Bruno Haible  <bruno@clisp.org>
24336
24337         * modules/version-etc-2: Remove file.
24338         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
24339
24340 2003-10-06  Bruno Haible  <bruno@clisp.org>
24341
24342         * modules/fatal-signal: New file.
24343         * MODULES.html.sh (func_all_modules): Add fatal-signal.
24344
24345 2003-10-06  Bruno Haible  <bruno@clisp.org>
24346
24347         * m4/fatal-signal.m4: New file.
24348         * m4/signalblocking.m4: New file, from GNU gettext.
24349
24350 2003-10-06  Bruno Haible  <bruno@clisp.org>
24351
24352         * lib/version-etc-2.h: Remove file.
24353         * lib/version-etc-2.c: Remove file.
24354
24355 2003-10-06  Bruno Haible  <bruno@clisp.org>
24356
24357         * lib/fatal-signal.h: New file, from GNU gettext.
24358         * lib/fatal-signal.c: New file, from GNU gettext.
24359
24360 2003-10-05  Paul Eggert  <eggert@twinsun.com>
24361
24362         * README: Rework advice for preventing empty .o files.
24363         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
24364         not <sys/types.h>.
24365
24366 2003-10-04  Karl Berry  <karl@gnu.org>
24367
24368         * lib/argp*: update from libc.
24369
24370 2003-10-04  Karl Berry  <karl@gnu.org>
24371
24372         * config/config.{guess,sub}: update from config.
24373
24374 2003-10-02  Bruno Haible  <bruno@clisp.org>
24375
24376         * modules/lchown (Include): Add lchown.h.
24377         * modules/time_r (Include): Use "..." syntax.
24378         * modules/xgetdomainname (Include): Add xgetdomainname.h.
24379
24380 2003-10-01  Simon Josefsson  <jas@extundo.com>
24381
24382         * MODULES.html.sh (func_all_modules): Move gethostname from section
24383         'based on' to section 'lacking' POSIX:2001.
24384
24385 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
24386
24387         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
24388         to output mode on the same stream.
24389
24390 2003-09-29  Paul Eggert  <eggert@twinsun.com>
24391
24392         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
24393         Fix arg typo in previous patch.
24394
24395 2003-09-28  Jim Meyering  <jim@meyering.net>
24396
24397         * lib/error.c: Correct cpp indentation.
24398
24399 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24400
24401         * modules/free: New file.
24402
24403 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24404
24405         * m4/free.m4: New file.
24406
24407 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24408
24409         * lib/minmax.h (MIN, MAX)
24410         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
24411         Omit the special code that used __typeof__, since we worry that
24412         it could be more trouble than it's worth.  See:
24413         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
24414         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
24415
24416         * lib/free.c: New file.
24417
24418 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
24419
24420         Trivial fixes to Makefile.am parts of module listings.
24421         * modules/strstr: Append strstr.h to lib_SOURCES.
24422         * modules/strcase: Likewise, for strcase.h.
24423
24424 2003-09-27  Karl Berry  <karl@gnu.org>
24425
24426         * config/mkinstalldirs: update from automake.
24427
24428 2003-09-26  Paul Eggert  <eggert@twinsun.com>
24429
24430         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
24431         (error_tail): Do not loop, reallocating temporary buffer, since
24432         the output cannot contain more wide characters than the input
24433         contains bytes, the size must be big enough already.  This avoids
24434         one potential size overflow calculation.  Check for size overflow
24435         when calculating temporary buffer size.  Free temporary buffer
24436         when done, if it was allocated with malloc; this plugs a memory
24437         leak.  Remove casts from void * to pointers, that are no longer
24438         needed now that we're assuming C89 or better.
24439
24440         Merge error changes from glibc.
24441
24442         * lib/error.c, error.h: Update copyright notice header to match glibc.
24443         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
24444         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
24445         Disable cancellation while printing error.
24446         * lib/error.h: Prepend __ to parameter names.
24447
24448 2003-09-26  Jim Meyering  <jim@meyering.net>
24449
24450         * lib/error.c (error_tail): Move some declarations
24451         into inner scope where the local variables are used.
24452
24453 2003-09-26  Bruno Haible  <bruno@clisp.org>
24454
24455         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
24456         stpncpy().
24457         Don't define stpncpy through config.h; it's now done through stpncpy.h.
24458
24459 2003-09-26  Bruno Haible  <bruno@clisp.org>
24460
24461         * lib/stpncpy.h (gnu_stpncpy): New declaration.
24462         (stpncpy): Define as alias for gnu_stpncpy.
24463         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
24464
24465 2003-09-25  Simon Josefsson  <jas@extundo.com>
24466
24467         * lib/xgetdomainname.h: New file.
24468         * lib/xgetdomainname.c: New file.
24469
24470 2003-09-25  Simon Josefsson  <jas@extundo.com>
24471             Bruno Haible  <bruno@clisp.org>
24472
24473         * modules/getdomainname: New file.
24474         * modules/xgetdomainname: New file.
24475         * MODULES.html.sh (func_all_modules): Add getdomainname,
24476         xgetdomainname.
24477
24478 2003-09-25  Simon Josefsson  <jas@extundo.com>
24479             Bruno Haible  <bruno@clisp.org>
24480
24481         * m4/getdomainname.m4: New file.
24482
24483 2003-09-25  Simon Josefsson  <jas@extundo.com>
24484             Bruno Haible  <bruno@clisp.org>
24485
24486         * lib/getdomainname.h: New file.
24487         * lib/getdomainname.c: New file.
24488
24489 2003-09-25  Karl Berry  <karl@gnu.org>
24490
24491         * lib/argp-fmtstream.c, argp-help.c: update from libc.
24492
24493 2003-09-25  Karl Berry  <karl@gnu.org>
24494
24495         * config/install-sh: update from automake.
24496
24497 2003-09-25  Bruno Haible  <bruno@clisp.org>
24498
24499         * modules/version-etc-2: New file, from modules/version-etc with
24500         modifications.
24501         * MODULES.html.sh (func_all_modules): Add version-etc-2.
24502
24503 2003-09-25  Bruno Haible  <bruno@clisp.org>
24504
24505         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
24506         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
24507
24508 2003-09-24  Simon Josefsson  <jas@extundo.com>
24509
24510         * modules/xgethostname: Add xgethostname.h.
24511
24512 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24513
24514         * lib/linebuffer.c (freebuffer): Don't free the argument, just
24515         the buffer associated with the argument.  Bug reported by
24516         Simon Josefsson.
24517
24518 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24519
24520         * README: Document assumptions that 'int' is at least 32 bits
24521         wide, that integer arithmetic is 2's complement without overflow,
24522         that there are no holes in integer values, that adding sizes of
24523         two nonoverlapping objects can't overflow, and that all-bits-zero
24524         yields scalar zero.  Fix spelling and capitalization typos.
24525
24526 2003-09-19  Karl Berry  <karl@gnu.org>
24527
24528         * lib/argp.h: update from libc.
24529
24530 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24531
24532         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
24533         to avoid spurious warnings like "AC_RUN_IFELSE was called before
24534         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
24535
24536 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24537
24538         * gnulib-tool: Use "test -h", not "test -L", for portability
24539         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
24540         (tags_regexp): Remove, since \| doesn't conform to POSIX.
24541         (sed_extract_prog): Issue s commands one-by-one, rather than
24542         using \| in one s command.
24543
24544 2003-09-16  Paul Eggert  <eggert@twinsun.com>
24545
24546         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
24547         input error, instead of returning NULL the next time we are called
24548         (and therefore losing track of errno).
24549
24550 2003-09-16  Bruno Haible  <bruno@clisp.org>
24551
24552         * gnulib-tool (func_create_testdir): Warn about duplicated
24553         dependencies.
24554
24555 2003-09-15  Paul Eggert  <eggert@twinsun.com>
24556
24557         * modules/argmatch, modules/fatal, modules/obstack,
24558         modules/xalloc, modules/xgethostname: Sort dependencies by
24559         importance, not alphabetically.
24560
24561 2003-09-15  Paul Eggert  <eggert@twinsun.com>
24562
24563         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
24564         fails, so that the caller gets the proper errno.
24565
24566         * lib/readutmp.c (read_utmp): Likewise.
24567         Check for fstat error.  Close stream and free storage
24568         when failing.
24569
24570 2003-09-14  Karl Berry  <karl@gnu.org>
24571
24572         * config/srclist.txt (strdup.c): disable for c89 changes.
24573
24574 2003-09-14  Jim Meyering  <jim@meyering.net>
24575
24576         * lib/getloadavg.c: Correct cpp indentation.
24577         * lib/strdup.c: Likewise.
24578         * lib/vasnprintf.c: Likewise.
24579
24580 2003-09-14  Bruno Haible  <bruno@clisp.org>
24581
24582         * modules/fwriteerror: New file.
24583         * MODULES.html.sh (func_all_modules): Add fwriteerror.
24584
24585 2003-09-14  Bruno Haible  <bruno@clisp.org>
24586
24587         * lib/fwriteerror.h: New file.
24588         * lib/fwriteerror.c: New file.
24589
24590 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24591
24592         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
24593         modules/xgethostname, modules/xalloc: Depend on exit.
24594
24595 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24596
24597         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
24598
24599         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
24600         and AC_MINIX, too, so that their extensions are available.
24601
24602         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
24603         This macro has been superseded by gl_BACKUPFILE.
24604
24605         More patches to assume C89 or better.
24606
24607         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
24608
24609         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
24610         unconditionally.
24611         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
24612         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
24613         Include <string.h>, <stdlib.h> unconditionally.
24614         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
24615         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
24616         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
24617         headers or for string.h.
24618         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
24619         or strtoul.
24620
24621         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
24622         headers.
24623         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
24624         * m4/userspec.m4 (gl_USERSPEC): Likewise.
24625         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
24626         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
24627         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
24628         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
24629         memcpy, memset.
24630         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
24631         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
24632         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
24633         strtol.
24634         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
24635         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
24636         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
24637         strtoul.
24638
24639 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24640
24641         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
24642         * lib/obstack.c [!defined _LIBC]: Likewise.
24643         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
24644         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
24645         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
24646
24647         More changes to assume C89 or better.
24648
24649         * lib/error.c (error_tail): Assume vprintf.
24650
24651         * lib/argmatch.c (getenv): Remove decl.
24652         * lib/progreloc.c (get_full_program_name): Define via prototype.
24653         * lib/setenv.c (clearenv): Likewise.
24654         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
24655         needed.
24656         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
24657         (malloc, memcpy): Remove decls.
24658         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
24659         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
24660         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24661         (memcpy): Remove macro.
24662         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
24663         (__P): Remove.  All uses removed.
24664         (PTR): Remove.  All uses changed to void *.
24665         (CHAR_BIT, NULL): Remove.
24666         (spaces, zeros, memset_space, memset_zero)
24667         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
24668         Remove.
24669         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
24670         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
24671         Define with prototype.
24672         Remove now-unnecessary prototype decl.
24673         (extra_args_spec): Assume ANSI C.  All uses changed.
24674         (extra_args_spec_iso): Remove.
24675         (my_strftime, emacs_strftimeu): Define via prototype.
24676         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
24677         unconditionally.
24678         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
24679         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
24680         (strtoul, strtol): Remove decls.
24681         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
24682         LONG_MAX): Remove.
24683         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24684         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
24685         (LOCALE_PARAM_PROTO): New macro.
24686         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
24687         (INTERNAL (strtol), strtol): Define with a prototype.
24688         (PARAMS): Remove.  All uses removed.
24689         * lib/tempname.c: Include <string.h> unconditionally.
24690         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
24691         * lib/xgethostname.c (main): Define with a prototype.
24692         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
24693         Include <stdlib.h> unconditionally.
24694         (calloc, malloc, realloc, free): Remove decls.
24695         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
24696         Include <stdlib.h> unconditionally.  Sort include file names.
24697         (strtod): Remove.
24698         (xstrtod): Define with a prototype.
24699         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
24700         (strtol, strtoul): Remove decls.
24701
24702 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24703
24704         More patches to assume C89 or better.
24705         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
24706         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
24707         string.h, memchr, STDC_HEADERS.
24708
24709 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24710
24711         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
24712         Include <stdlib.h>, <string.h> unconditionally.
24713         Remove now-unnecessary cast to char *.
24714         * lib/strnlen.c: Include <string.h> unconditionally.
24715         * lib/yesno.c (yesno): Define with a prototype.
24716
24717 2003-09-11  Bruno Haible  <bruno@clisp.org>
24718
24719         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
24720
24721 2003-09-10  Jim Meyering  <jim@meyering.net>
24722
24723         * lib/error.c: Correct indentation of cpp directives.
24724
24725 2003-09-10  Bruno Haible  <bruno@clisp.org>
24726
24727         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
24728         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
24729         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
24730         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
24731         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
24732         <stdlib.h> and <string.h> checks.
24733         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
24734         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
24735
24736 2003-09-10  Bruno Haible  <bruno@clisp.org>
24737
24738         * lib/strcspn.c: Include <string.h> unconditionally.
24739         * lib/strpbrk.c: Include <string.h> unconditionally.
24740         * lib/strstr.c: Include <string.h> unconditionally.
24741         * lib/unicodeio.c: Include <string.h> unconditionally.
24742         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
24743         * lib/unsetenv.c: Likewise.
24744         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
24745         * lib/yesno.c: Include <stdlib.h> unconditionally.
24746         (rpmatch): Add prototype.
24747
24748 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24749
24750         More patches to assume C89 or better.
24751         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
24752         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
24753         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
24754         or for string.h.
24755         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
24756         stdlib.h.
24757         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
24758         C headers.
24759         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
24760         string.h.
24761         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
24762         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
24763         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
24764         or for string.h.
24765         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
24766         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
24767         C headers.
24768         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
24769         memcpy.
24770         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
24771         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
24772         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
24773         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
24774         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
24775         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
24776         string.h, free.
24777         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
24778         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
24779         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
24780         C headers, or for string.h.
24781         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
24782         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
24783         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
24784         headers, memory.h, stdlib.h, string.h, strings.h.
24785         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
24786         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
24787         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
24788         strchr.
24789         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
24790         headers, memory.h, string.h.
24791         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
24792         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
24793         free.
24794         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
24795         headers.
24796         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
24797         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
24798         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
24799         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
24800         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
24801
24802 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24803
24804         More K&R removal.
24805
24806         * lib/acosl.c (main): Use a prototype.
24807         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
24808         tanl.c: Likewise.
24809
24810         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
24811
24812         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
24813         (getopt, etopt_long, getopt_long_only, _getopt_internal)
24814         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
24815         with a prototype.
24816         * lib/getopt.c (const): Remove macro.
24817         Include <string.h> unconditionally.
24818         (my_index): Remove; all uses changed to strchr.
24819         (strlen): Remove decl.
24820         (exchange): Remove forward decl; no longer needed.
24821         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
24822         Define with prototype.
24823         * lib/getopt1.c (const): Remove macro.
24824         (getopt_long, getopt_long_only, main): Define with prototype.
24825
24826         * lib/getugroups.c: Include <string.h> unconditionally.
24827
24828         * lib/getusershell.c: Include <stdlib.h> unconditionally.
24829         (getusershell, setusershell, endusershell, readname, main):
24830         Define with prototypes.
24831
24832         * lib/group-member.c: Include group-member.h first.
24833         Include <stdlib.h> unconditionally.
24834
24835         * lib/hard-locale.c: Include hard-locale.h first.
24836         Include <stdlib.h>, <string.h> unconditionally.
24837
24838         * lib/hash.c (free, malloc): Remove decls.
24839         Include <stdlib.h> unconditionally.
24840
24841         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
24842         (getenv): Do not declare.
24843
24844         * lib/idcache.c: Include <string.h> unconditionally.
24845
24846         * lib/long-options.c: Include long-options.h first, to test interface.
24847         Include <stdlib.h> unconditionally.
24848
24849         * lib/makepath.c: Include makepath.h first, to test interface.
24850         Include <stdlib.h> and <string.h> unconditionally.
24851
24852         * lib/linebuffer.c: Include <stdlib.h>.
24853         (free): Remove decl.
24854
24855         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
24856         stddef.h. rpl_malloc returns void *, not char *.
24857         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
24858         prototype.
24859
24860         * lib/md5.h: Include <limits.h> unconditionally.
24861         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
24862         (__P): Remove; all uses removed.
24863         * lib/md5.c: Include "md5.h" first.
24864         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
24865         md5_buffer, md5_process_bytes, md5_process_block):
24866         Define with prototypes.
24867         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
24868         * lib/sha.c: Include "sha.h" first.
24869         Include <stdlib.h>, <string.h> unconditionally.
24870
24871         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
24872         * lib/memcmp.c (__ptr_t): Likewise.
24873         * lib/memrchr.c (__ptr_t): Likewise.
24874         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
24875         Include <string.h> unconditionally.
24876         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
24877         * lib/memchr.c: Include <stdlib.h> unconditionally.
24878         * lib/memchr.c (LONG_MAX): Remove.
24879         * lib/memrchr.c (LONG_MAX): Likewise.
24880         * lib/memchr.c (__memchr): Define via a prototype.
24881         * lib/memrchr.c (__memrchr): Likewise.
24882         * lib/memcmp.c (__P): Remove, and remove all uses.
24883         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
24884         Remove forward decls; no longer needed.
24885         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
24886         Use types required by C89 in prototype.
24887
24888         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
24889         * lib/savedir.c: Likewise.
24890         * lib/mkdir.c (free): Remove decl.
24891         * lib/rmdir.c (rmdir): Define with a prototype.
24892         * lib/savedir.c: Include savedir.h first, to test interface.
24893
24894         * lib/mktime.c (STDC_HEADERS): Remove.
24895         Include <stdlib.h>, <string.h> unconditionally.
24896
24897         * lib/modechange.c: Include <stdlib.h> unconditionally.
24898         (malloc): Remove decl.
24899
24900         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
24901         (free): Remove decl.
24902
24903         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
24904         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
24905         (This type really should be intptr_t, but that's a C99ism.)
24906         (_obstack_memcpy): Remove: all uses changed to memcpy.
24907         Include <string.h> unconditionally.
24908         (struct obstack): Assume __STDC__ for types of members
24909         chunkfun, freefun, extra_arg.
24910         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
24911         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
24912         obstack_begin, obstack_specify_allocation,
24913         obstack_specify_allocation_with_arg, obstack_chunkfun,
24914         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
24915         Remove unprototyped decls and the macros that use them.
24916         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
24917         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
24918         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
24919         (defined __STDC__ && __STDC__)]:
24920         Remove nonprototyped code.
24921         Include <stdlib.h> unconditionally.
24922         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
24923         _obstack_allocated_p, _obstack_free, obstack_free,
24924         _obstack_memory_used, print_and_abort):
24925         Define using prototypes.
24926         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
24927         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
24928         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
24929         obstack_next_free, obstack_object_size, obstack_room) [0]:
24930         Remove unused, unprototyped code.
24931
24932         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
24933
24934         * lib/physmem.c (physmem_total, physmem_available, main): Define
24935         with prototypes.
24936
24937         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
24938         (main): Define with a prototype.
24939
24940         * lib/posixver.c (getenv): Remove decl.
24941
24942         * lib/putenv.c (malloc): Returns void *, not char *.
24943         Include <string.h> unconditionally.
24944         (strchr, memcpy, NULL): Do not define.
24945
24946         * lib/readtokens.c: Include readtokens.h first, to test interface.
24947         Include <stdlib.h>, <string.h> unconditionally.
24948         (init_tokenbuffer): Define with a prototype.
24949
24950         * lib/regex.c (PARAMS): Remove.  All uses removed.
24951         All uses of _RE_ARGS removed, too.
24952         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
24953         unconditionally.
24954         (bzero): Assume memset exists.
24955         (memcmp, memcpy, NULL): Remove.
24956         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
24957         char, or assignments to local vars of type signed char.
24958         (init_syntax_once, PREFIX(extract_number_and_incr),
24959         PREFIX(print_partial_compiled_pattern),
24960         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
24961         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
24962         PREFIX(regex_grow_registers), PREFIX(regex_compile),
24963         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
24964         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
24965         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
24966         wcs_compile_range, byte_compile_range, truncate_wchar,
24967         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
24968         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
24969         count_mbs_length, wcs_re_match_2_internal,
24970         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
24971         PREFIX(alt_match_null_string_p),
24972         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
24973         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
24974         regfree, PREFIX(extract_number)): Define with prototype.  Remove
24975         now-unnecessary declaration, if any.
24976         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
24977         regcomp, regexec):
24978         Remove now-unnecessary casts among pointer types.
24979         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
24980
24981         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
24982         (free): Remove decl.
24983
24984         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
24985
24986         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
24987         (free): Remove decl.
24988
24989         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
24990         * lib/xgetcwd.c: Likewise.
24991
24992         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
24993         (free): Remove decl.
24994
24995         * lib/strchrnul.c (strchrnul): Define with a prototype.
24996         Fix bug: c_in was not converted to char before searching.
24997
24998         The following changes are not K&R related:
24999
25000         * lib/group-member.h: Include <sys/types.h>, so that this file is
25001         self-contained.
25002         * lib/makepath.h: Likewise.
25003
25004         * lib/getusershell.c (readname, default_index, line_size, readname):
25005         Use size_t, not int, for sizes.
25006         (readname): If the size overflows, report an error instead of
25007         looping forever.
25008
25009 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25010
25011         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
25012         libc.
25013
25014 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25015
25016         * README: New section: portability guidelines.
25017
25018 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25019
25020         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
25021         C89 spec.
25022
25023 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25024
25025         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
25026
25027 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25028
25029         Assume C89 or better; remove K&R cruft.
25030         A few of these changes were first proposed by Derek Robert Price
25031         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
25032
25033         * lib/addext.c: Include <string.h> unconditionally.
25034         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
25035         Don't declare getenv or malloc.
25036
25037         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
25038         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
25039         (NULL): Remove.
25040         (find_stack_direction, alloca): Use prototypes.
25041
25042         * lib/atexit.c (atexit): Define using a prototype.
25043
25044         * lib/basename.c, dirname.c, stripslash.c:
25045         Include <string.h> unconditionally.
25046
25047         * lib/bcopy.c: Include <stddef.h>.
25048         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
25049
25050         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
25051
25052         * lib/error.h (error, error_at_line, error_print_progname)
25053         [! (defined (__STDC__) && __STDC__)]: Remove decls.
25054         * lib/error.c: Include error.h first, to check interface.
25055         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25056         (VA_START): Remove; all uses changeed to va_start.
25057         (exit, strerror): Remove decls.
25058         (error_print_progname): Prototype uncondionally.
25059         Don't include <errno.h>; no longer needed.
25060         (private_strerror): Remove.
25061         (error_tail): Always define.
25062         (error, error_at_line): Assume C89 or better; always use prototypes.
25063         * lib/fatal.c: Include "fatal.h" first, to test interface.
25064         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25065         (VA_START): Remove; all uses changed to va_start.
25066         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
25067         this case.
25068         (exit): Remove decl.
25069         (fatal): Prototype unconditionally.  Assume va_start works.
25070         Abort at end, to pacify gcc.
25071
25072         * lib/euidaccess.c (main): Define with a prototype.
25073
25074         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
25075
25076         * lib/exitfail.c: Include <stdlib.h> unconditionally.
25077
25078         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
25079         prototypes.
25080         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
25081         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
25082         (getenv): Remove decl.
25083         (fnmatch): Define using a prototype.
25084         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
25085         (FCT): Define using a prototype.
25086
25087         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
25088
25089         * lib/gethostname.c: Include <stddef.h>.
25090         (gethostname): Define with prototype.  Length is size_t, not int.
25091
25092 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25093
25094         Assume C89 or better; remove K&R cruft.
25095         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
25096         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
25097         string.h, getenv, malloc.
25098         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
25099         headers.
25100         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
25101         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
25102         do not check for strerror.
25103         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
25104         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
25105         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
25106         do not check for doprnt or vprintf.
25107         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
25108         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
25109
25110 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25111
25112         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
25113         getversion.c should have been removed then, but was accidentally
25114         preserved.
25115
25116         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
25117         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
25118
25119 2003-09-08  Karl Berry  <karl@gnu.org>
25120
25121         * config/config.sub, config.guess, srclistvars.sh: update from savannah
25122                 config, forget about prep.
25123
25124         * config/depcomp, missing: update from automake.
25125
25126 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25127
25128         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
25129         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25130
25131 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25132
25133         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
25134         copy_tm_result.  Bug reported by Simon Josefsson in
25135         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25136
25137 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25138
25139         * m4/time_r.m4: New file.
25140         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
25141         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
25142         is. Check for timegm declaration.
25143         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
25144         Do not check for gmtime_r.
25145         Replace mktime if __mktime_internal does not exist and if mktime
25146         hasn't been replaced already.
25147
25148 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25149
25150         * lib/time_r.c, lib/time_r.h: New files.
25151
25152         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
25153         __localtime_r.
25154         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
25155         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
25156
25157         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
25158         __gmtime_r.
25159         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
25160         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
25161         Include <time_r.h>.
25162
25163         * lib/timegm.c: Switch to glibc implementation, with the following
25164         changes:
25165         [defined HAVE_CONFIG_H]: Include <config.h>.
25166         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
25167         (__mktime_internal) [!defined _LIBC]: New decl.
25168         (__gmtime_r) [!defined _LIBC]: New macro and function.
25169         (timegm): Use a prototype, since gnulib assumes C89.
25170         Do not bother declaring tmp to be const, as it's not really usefu.
25171         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
25172         (timegm): Declare only if HAVE_DECL_TIMEGM.
25173
25174 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25175
25176         * MODULES.html.sh (func_all_modules): Add time_r.
25177         * modules/time_r: New file.
25178         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
25179         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
25180
25181 2003-09-03  Paul Eggert  <eggert@twinsun.com>
25182
25183         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
25184         Bug reported by Lute Kamstra in
25185         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
25186
25187         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
25188         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
25189         course with correspondingly smaller numbers for tomorrow and
25190         yesterday.  From Tadayoshi Funaba.  Originally installed into
25191         sh-utils on 1999-08-07, but the patch got lost (I guess during the
25192         coreutils merge?).
25193
25194 2003-08-31  Simon Josefsson  <jas@extundo.com>
25195
25196         * modules/timegm: New file.
25197         * MODULES.html.sh (func_all_modules): Add timegm.
25198
25199 2003-08-31  Simon Josefsson  <jas@extundo.com>
25200
25201         * m4/timegm.m4: New file.
25202
25203 2003-08-31  Simon Josefsson  <jas@extundo.com>
25204
25205         * lib/timegm.h: New file.
25206         * lib/timegm.c: New file.  Based on
25207         wget-1.8.2/src/http.c:mktime_from_utc.
25208
25209 2003-08-31  Karl Berry  <karl@gnu.org>
25210
25211         * lib/argp.h: update from libc.
25212
25213 2003-08-28  Bruno Haible  <bruno@clisp.org>
25214
25215         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
25216         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
25217         followed by '#define fnmatch fnmatch_posix' gives an error.
25218
25219 2003-08-28  Bruno Haible  <bruno@clisp.org>
25220
25221         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
25222         warning on QNX, which defines O_BINARY to 000000.
25223
25224 2003-08-27  Jim Meyering  <jim@meyering.net>
25225
25226         * m4/mkstemp.m4: Require that the system mkstemp be able to create
25227         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
25228         would fail after 32.  Reported by Danny Levinson.  Details here:
25229         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
25230
25231 2003-08-24  Bruno Haible  <bruno@clisp.org>
25232
25233         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
25234         MSVC7 <stdio.h> is included later.
25235
25236 2003-08-22  Simon Josefsson  <jas@extundo.com>
25237
25238         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
25239
25240 2003-08-20  Karl Berry  <karl@gnu.org>
25241
25242         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
25243
25244 2003-08-20  Bruno Haible  <bruno@clisp.org>
25245
25246         * modules/progname: New file.
25247         * MODULES.html.sh (func_all_modules): Add progname.
25248
25249 2003-08-20  Bruno Haible  <bruno@clisp.org>
25250
25251         * lib/progname.h: New file, from GNU gettext.
25252         * lib/progname.c: New file, from GNU gettext.
25253         * lib/progreloc.c: New file, from GNU gettext.
25254
25255 2003-08-19  Jim Meyering  <jim@meyering.net>
25256
25257         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
25258         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
25259
25260 2003-08-19  Bruno Haible  <bruno@clisp.org>
25261
25262         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
25263         more.
25264
25265 2003-08-19  Bruno Haible  <bruno@clisp.org>
25266
25267         * lib/xstrdup.c: Assume <string.h> exists.
25268
25269 2003-08-18  Paul Eggert  <eggert@twinsun.com>
25270
25271         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
25272         in makefile rules.
25273
25274 2003-08-18  Jim Meyering  <jim@meyering.net>
25275
25276         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
25277         * m4/lib-ld.m4: Likewise.
25278
25279 2003-08-18  Jim Meyering  <jim@meyering.net>
25280
25281         * lib/setenv.h: Indent nested cpp directive.
25282         * lib/vasnprintf.c: Remove trailing blanks.
25283
25284 2003-08-17  Simon Josefsson  <jas@extundo.com>
25285
25286         * modules/xstrndup: New file.
25287         * MODULES.html.sh (func_all_modules): Add xstrndup.
25288
25289 2003-08-17  Simon Josefsson  <jas@extundo.com>
25290
25291         * modules/argp: Fix autoconf macro name. Add more dependencies.
25292
25293 2003-08-17  Simon Josefsson  <jas@extundo.com>
25294
25295         * m4/xstrndup.m4: New file.
25296
25297 2003-08-17  Simon Josefsson  <jas@extundo.com>
25298
25299         * m4/argp.m4: New file.
25300
25301 2003-08-17  Simon Josefsson  <jas@extundo.com>
25302             Bruno Haible  <bruno@clisp.org>
25303
25304         * lib/xstrndup.h: New file.
25305         * lib/xstrndup.c: New file.
25306
25307 2003-08-17  Bruno Haible  <bruno@clisp.org>
25308
25309         * modules/strndup (Files, Include): Add lib/strndup.h.
25310
25311 2003-08-17  Bruno Haible  <bruno@clisp.org>
25312
25313         * modules/euidaccess (Files): Add lib/euidaccess.h.
25314
25315 2003-08-17  Bruno Haible  <bruno@clisp.org>
25316
25317         * lib/strndup.h: New file.
25318
25319 2003-08-17  Bruno Haible  <bruno@clisp.org>
25320
25321         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
25322         like AC_GNU_SOURCE.
25323         * modules/extensions (configure.ac): Comment out the invocation of
25324         gl_USE_SYSTEM_EXTENSIONS.
25325
25326 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25327
25328         Merges from coreutils, etc.
25329         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
25330         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
25331         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
25332         fixing a typo.
25333         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
25334         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
25335
25336 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25337
25338         Document merge from coreutils.
25339         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
25340         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
25341         * modules/utime: Add m4/utimes-null.m4.
25342
25343 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25344
25345         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
25346         space, undoing this 2003-08-12 change:
25347         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25348
25349 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25350
25351         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
25352         strtoul.c from libc, undoing this 2003-08-12 change:
25353         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25354
25355 2003-08-16  Jim Meyering  <jim@meyering.net>
25356
25357         Merges from coreutils.
25358         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
25359         prefix.  Adjust cache variables similarly.  Create 500 rather than
25360         just 300 files, to exercise bug on Darwin6.5, too.
25361         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
25362         $missing_dir.
25363         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
25364         AM_SYS_POSIX_TERMIOS.
25365         Reported by mkc@mathdogs.com.
25366         Also change use of $am_cv_sys_posix_termios
25367         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
25368         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
25369         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
25370         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
25371         in /proc/mounts until it finds one with matching device number.  This
25372         is unnecessary when the FILE argument *is* a mount point.  No stat call
25373         is necessary in that case.  So, disable the statvfs-testing code on
25374         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
25375         as RedHat bug# 84846.
25376         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25377         to 1MB, so as not to render systems with no stack size limit (e.g.,
25378         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25379         Include <unistd.h>.  On some systems,
25380         it is required for the definition of _SC_PAGESIZE.
25381
25382 2003-08-16  Jim Meyering  <jim@meyering.net>
25383
25384         Merge from coreutils.
25385         * lib/xstrtoimax.c: #else #if -> #elif.
25386         * lib/xstrtoumax.c: Likewise.
25387
25388 2003-08-16  Jim Meyering  <jim@meyering.net>
25389
25390         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
25391         * m4/utimes.m4: Removed.
25392         * m4/utimes-null.m4: Renamed from utimes.m4.
25393
25394         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25395         to 1MB, so as not to render systems with no stack size limit (e.g.,
25396         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25397         Include <unistd.h>.  On some systems,
25398         it is required for the definition of _SC_PAGESIZE.
25399
25400 2003-08-16  Jim Meyering  <jim@meyering.net>
25401         and Paul Eggert  <eggert@cs.ucla.edu>
25402
25403         Merges from coreutils, etc.
25404
25405         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
25406         using the latest version from cvs.  This avoids problems with #line
25407         directives using a vendor (Sun) compiler.
25408         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
25409         Don't set GETGROUPS_LIB here; now it's
25410         done via getgroups.m4's wrapper function.
25411         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
25412         rather than just in sh-util/configure.in, so that the
25413         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
25414         same.
25415         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
25416         AC_FUNC_GETLOADAVG where to find getloadavg.c.
25417         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
25418         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
25419         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
25420         Remove code that is now done by the newly-required macros.
25421         Append $(EXEEXT) to DF_PROG.
25422         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
25423         Do not invoke or require the following here,
25424         since prereq.m4 or some gnulib .m4 now does this for us:
25425         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
25426         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
25427         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
25428         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
25429         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
25430         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
25431         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
25432         AC_FUNC_OBSTACK.
25433         Do not replace the following functions, as this is now the job
25434         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
25435         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
25436         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
25437         atexit getpass, strdup, getpagesize.
25438         Replace 'raise'.
25439         Do not check for the following functions, as this is now the job
25440         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
25441         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
25442         setregid.
25443         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
25444         Check for sys/sysctl.h.
25445         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
25446         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
25447         of checking for ssize_t ourselves.
25448
25449         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
25450         Require every macro that gnulib/modules/* suggests for us.
25451         (jm_PREREQ_ADDEXT): New macro.
25452         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
25453         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
25454
25455         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
25456         (gl_PHYSMEM): Use it.
25457         Also check for `table' function.
25458         Check for new headers and functions.
25459         Add check for sys/sysmp.h.
25460         With suggestions from Kaveh Ghazi.
25461         Ignore headers that are present but cannot be compiled.  This
25462         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
25463         C 5.4.
25464
25465 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25466
25467         Document merge from coreutils.
25468         * modules/userspec: Depend on posixver.
25469         * modules/strftime: Depend on tzset.
25470
25471 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25472
25473         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
25474         rather than tab, after '#' in shell-script copyright notices.
25475         Suggested by Bruno Haible.
25476
25477 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25478
25479         * config/srclist-update: Use three spaces, rather than tab, after '#'
25480         in shell-script copyright notices.  Suggested by Bruno Haible.
25481         Remove unnecessary parenthesization in regular expression.
25482
25483 2003-08-15  Jim Meyering  <jim@meyering.net>
25484
25485         Merge from coreutils.
25486         * lib/xgethostname.c: Include <stdlib.h>.
25487         (xghostname): Don't exit for anything other than memory-related
25488         failure; just return NULL.
25489         * lib/userspec.c: Include "posixver.h".
25490         (parse_user_spec): Accept `.' as a separator only
25491         in pre-POSIX-200112 mode.
25492         * lib/strtoimax.c: Use #elif rather than #else #if.
25493         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
25494         Remove function, now that we can rely on a working tzset function.
25495         [!_LIBC]: Ensure that the required autoconf test has been run.
25496         [!defined _NL_CURRENT && HAVE_STRFTIME]:
25497         Use underlying_strftime for %r.
25498         * lib/sha.c: Merge in some clean-up and optimization changes from
25499         glibc.
25500         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
25501         Ensure that it is a multiple of 64.
25502         Rearrange loop exit tests so as to avoid performing an
25503         additional fread after encountering an error or EOF.
25504         * lib/realloc.c: Update copyright date.
25505
25506 2003-08-15  Jim Meyering  <jim@meyering.net>
25507         and Paul Eggert  <eggert@twinsun.com>
25508
25509         Merge from coreutils.
25510         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
25511         member but strut utmpx does not.  Needed for AIX 4.3.3.
25512         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
25513
25514 2003-08-15  Jim Meyering  <jim@meyering.net>
25515         and Paul Eggert  <eggert@cs.ucla.edu>
25516
25517         Merges from coreutils, etc.
25518         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
25519         Require gl_FUNC_TZSET_CLOBBER.
25520         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
25521         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
25522         members.
25523
25524 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25525
25526         Help the merge from coreutils.
25527         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
25528         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
25529         * m4/tzset.m4: Use it too.
25530
25531 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25532
25533         * modules/tzset: New file.
25534
25535 2003-08-14  Jim Meyering  <jim@meyering.net>
25536
25537         Merges from coreutils.
25538         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
25539         variable names, rather than @FNMATCH_H@.
25540         * modules/alloca: Likewise for $(ALLOCA_H).
25541
25542         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
25543         the three copies of the literal target, `fnmatch.h'.
25544         * modules/alloca (alloca.h): Likewise.
25545
25546 2003-08-14  Jim Meyering  <jim@meyering.net>
25547
25548         Merge from coreutils.
25549         * m4/tzset.m4: New file.
25550         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
25551         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
25552         otherwise, AIX 5.1 systems would end up using the latter.
25553         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
25554         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
25555         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
25556         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
25557
25558 2003-08-14  Jim Meyering  <jim@meyering.net>
25559
25560         Merge from coreutils.
25561         * lib/obstack.h: Whitespace changes.
25562         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
25563         and xcalloc return values.
25564         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
25565         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
25566         hang on OSF/1 5.1 for DIR on both local and remote file systems.
25567         Reported by (and fix confirmed by) Nelson H. F. Beebe.
25568         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
25569         error from mntctl.
25570         Use mntctl's return value to drive the entry-processing loop, since
25571         we can't rely on the value of the vmt_length member in the last
25572         entry.  On some systems doing so could result in exhausting
25573         virtual memory.  Based in part on a patch from Mike Jetzer.
25574
25575 2003-08-14  Jim Meyering  <jim@meyering.net>
25576         and Paul Eggert  <eggert@twinsun.com>
25577
25578         Merges from coreutils, plus other fixes.
25579         * lib/physmem.c: Merge in portability changes from gcc/libiberty
25580         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
25581         for credits and details.  Thanks to Kaveh Ghazi for helping
25582         to keep these files in sync.
25583         (ARRAY_SIZE): Define it.
25584         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
25585         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
25586         (memcasecmp): Don't assume size_t fits in unsigned int.
25587         Remove casts and duplicate code.
25588         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
25589         (memcpy): Remove definition.
25590         Merge in some clean-up and optimization changes from glibc.
25591         [BLOCKSIZE]: Move definition to top of file.
25592         Ensure that it is a multiple of 64.
25593         Rearrange loop exit tests so as to avoid performing an
25594         additional fread after encountering an error or EOF.
25595         * lib/md5.h (md5_uintptr): Define.
25596         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
25597         return to the initial working directory.  Preserve errno
25598         for caller.
25599         * lib/idcache.c: Include "xalloc.h".
25600         (xmalloc, xrealloc): Remove decls.
25601         (getuser): Remove casts no longer required in C89.
25602         * lib/human.c: Include stdio.h, for sprintf.
25603         * lib/group-member.c: Include "xalloc.h".
25604         (xmalloc, xrealloc): Remove decls.
25605         (get_group_info): Remove casts no longer required in C89.
25606         * lib/getusershell.c (readname): Remove casts no longer required in
25607         C89.
25608         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
25609         * lib/getline.c: Whitespace fix, from coreutils.
25610
25611 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25612
25613         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
25614         Check for isascii.
25615
25616         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
25617         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
25618         Undo previous (whitespace-only) change.
25619
25620 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25621
25622         * lib/exclude.c: Include <ctype.h>
25623         (IN_CTYPE_DOMAIN): New macro.
25624         (is_space): New fn.
25625         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
25626         and empty lines.
25627
25628         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
25629         Undo previous (whitespace-only) change.
25630
25631 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25632
25633         * config/srclist-update: Change update back to the old behavior,
25634         leaving whitespace alone.  Use one 'sed' command rather than a
25635         pipeline.
25636         (fixlicense): Now a variable, not a function.
25637         (remove_trailing_blanks): Remove.
25638         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
25639         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
25640         Undo previous (whitespace-only) change.
25641
25642 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25643
25644         Merge from coreutils.
25645         * modules/euidaccess: Add lib_SOURCES, include for new
25646         file euidaccess.h
25647
25648 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25649
25650         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
25651         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
25652         Normalize leading white space and remove trailing white space.
25653
25654         Merge from coreutils
25655         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
25656
25657         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
25658         0.12.1.  These files are now being upgraded automatically by
25659         ../config/srclist-update.
25660
25661 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25662
25663         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
25664         Normalize leading white space and remove trailing white space.
25665         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
25666         notice, as per ../config/srclist-update.
25667
25668         Merge from coreutils.
25669         * lib/euidaccess.h: New file.
25670         * lib/euidaccess.c: Include it.
25671         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
25672         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
25673         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
25674
25675 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25676
25677         * config/srclist-update: Add copyright notice.
25678         (remove_id_lines, remove_trailing_blanks): New constants.
25679         (fixfile): Use them to normalize spacing a bit in copied files.
25680         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
25681         Normalize leading white space and remove trailing white space.
25682
25683         * config/texinfo.tex: Sync with texinfo.
25684
25685         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
25686         strtoul.c from libc, to merge coreutils whitespace changes.
25687
25688         * config/srclist.txt: Get the following m4 files from gettext:
25689         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
25690         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
25691         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
25692         wint_t.m4.
25693
25694 2003-08-12  Karl Berry  <karl@gnu.org>
25695
25696         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
25697         been made.
25698
25699 2003-08-11  Paul Eggert  <eggert@twinsun.com>
25700
25701         * modules/gnu-source, m4/gnu-source.m4:
25702         Remove; we're assuming Autoconf 2.54 or later now.
25703         Suggested by Bruno Haible.
25704         * MODULES.html.sh (func_all_modules): Remove gnu-source.
25705
25706 2003-08-11  Bruno Haible  <bruno@clisp.org>
25707
25708         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
25709
25710 2003-08-11  Bruno Haible  <bruno@clisp.org>
25711
25712         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
25713         (vasnprintf): Use it instead of wcslen.
25714
25715 2003-08-11  Bruno Haible  <bruno@clisp.org>
25716
25717         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
25718         value to ensure that _Bool promotes to int. Use #define for _Bool when
25719         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
25720
25721 2003-08-10  Karl Berry  <karl@gnu.org>
25722
25723         * lib/regex.h: update from libc (whitespace fix).
25724
25725 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25726
25727         Merge some files from coreutils.  These changes were
25728         originally made by Jim Meyering.
25729         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
25730         many older Unixes require this.
25731         * lib/alloca.c (alloca): Remove cast to argument of free;
25732         no longer needed in C89.
25733         * lib/alloca_.h, regex.h: Fix white space to match
25734         what GNU indent does.
25735
25736 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25737
25738         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
25739         apparently Emacs's Unicode mode got confused before my 2003-08-05
25740         checkin.
25741
25742 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25743
25744         * m4/extensions.m4: New file.
25745         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
25746         Require gl_USE_SYSTEM_EXTENSIONS.
25747         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
25748         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
25749
25750 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25751
25752         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
25753         * modules/extensions, modules/gnu-source: New files.
25754         * modules/timespec, modules/unlocked-io: Depend on extensions.
25755
25756 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25757
25758         * modules/restrict: New file.
25759         * MODULES.html.sh (func_all_modules): Add restrict.
25760         * modules/regex: Depend on restrict.
25761
25762 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25763
25764         * m4/restrict.m4: New file.
25765         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
25766
25767 2003-08-07  Bruno Haible  <bruno@clisp.org>
25768
25769         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
25770         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
25771
25772 2003-08-07  Bruno Haible  <bruno@clisp.org>
25773
25774         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
25775         makes the module 'getndelim2' compatible with the module 'getline'.
25776
25777 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25778
25779         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
25780         byte with "\201" to avoid glitches when editing that source file
25781         with multi-gnome-terminal.
25782
25783 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25784
25785         * lib/bumpalloc.h: Remove.
25786
25787 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25788
25789         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
25790         * modules/bumpalloc: Remove.
25791
25792 2003-08-04  Paul Eggert  <eggert@twinsun.com>
25793
25794         * lib/getloadavg.c: Change copyright notice and spacing to conform to
25795         GNU coding style.
25796
25797         Merge from coreutils.
25798         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
25799         1. From glibc.
25800         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
25801         from Karl Berry, implemented by Jim Meyering.
25802         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
25803         from Dmitry V. Levin.
25804         Remove anachronistic cast of xrealloc.
25805         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
25806         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
25807         type. Otherwise, it wouldn't compile with at least /bin/cc on
25808         ymp-cray-unicos9.0.2.X.
25809         Combine two mostly-identical uses of alloca into one.
25810         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
25811
25812 2003-08-04  Dave Love  <d.love@dl.ac.uk>
25813
25814         [From Emacs.]
25815
25816         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
25817         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
25818         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
25819         obsolete NLIST_NAME_UNION.
25820         [__GNU__]: Undef BSD and FSCALE.
25821         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
25822
25823 2003-08-03  Paul Eggert  <eggert@twinsun.com>
25824
25825         * lib/stdbool_.h (_Bool): Make it signed char, instead of
25826         an enum type, so that it's guaranteed to promote to int.  See:
25827         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
25828
25829 2003-08-03  Karl Berry  <karl@gnu.org>
25830
25831         * config/depcomp: update from automake.
25832
25833 2003-07-31  Paul Eggert  <eggert@twinsun.com>
25834
25835         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
25836         (strerror): Don't assume that a printable int fits in 14 bytes.
25837
25838 2003-07-31  Bruno Haible  <bruno@clisp.org>
25839
25840         * modules/getpass-gnu: New file.
25841         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
25842
25843 2003-07-31  Bruno Haible  <bruno@clisp.org>
25844
25845         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
25846
25847 2003-07-24  Karl Berry  <karl@gnu.org>
25848
25849         * config/missing: update from automake.
25850
25851 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
25852             Bruno Haible  <bruno@clisp.org>
25853
25854         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
25855         * lib/getline.c (getline, getdelim): Likewise.
25856         Remove _GNU_SOURCE define; now it's defined in config.h through
25857         m4/getline.m4.
25858
25859 2003-07-23  Karl Berry  <karl@gnu.org>
25860
25861         * config/config.sub: update from prep.
25862
25863 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25864
25865         * modules/xalloc (Depends-on): Add exitfail.
25866         * modules/xmemcoll: Likewise.
25867
25868 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25869
25870         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
25871         over-parenthesization in macros.
25872
25873         Sync with coreutils.
25874
25875         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
25876         required by C99.
25877
25878         Use `exit_failure' for xalloc and xmemcoll instead of their own
25879         private exit-failure variables.
25880         * lib/xalloc.h (xalloc_exit_failure): Remove.
25881         * lib/xmalloc.c: Likewise.  Include exitfail.h.
25882         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
25883         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
25884         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
25885         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
25886
25887 2003-07-20  Jim Meyering  <jim@meyering.net>
25888
25889         * modules/closeout (Depends-on): Add exitfail.
25890         Suggestion from Bruno Haible.
25891
25892 2003-07-19  Karl Berry  <karl@gnu.org>
25893
25894         * config/config.sub: update from prep.
25895
25896 2003-07-18  Paul Eggert  <eggert@twinsun.com>
25897
25898         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
25899         Remove.
25900         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
25901         to test that it can stand by itself.  Include "exitfail.h".
25902         Clients should set exit_failure instead.
25903         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
25904
25905 2003-07-18  Bruno Haible  <bruno@clisp.org>
25906
25907         * modules/getndelim2: New file.
25908         * modules/getline: Share files with module getndelim2.
25909         * modules/getnline: Depend on getndelim2 instead of sharing files with
25910         it. Add getnline.c to lib_SOURCES.
25911         * MODULES.html.sh (func_all_modules): Add getndelim2.
25912
25913 2003-07-18  Bruno Haible  <bruno@clisp.org>
25914
25915         * m4/getndelim2.m4: New file.
25916         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
25917         invoke gl_PREREQ_GETNDELIM2.
25918         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
25919         gl_PREREQ_GETNDELIM2.
25920         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
25921         gl_GETNDELIM2.
25922
25923 2003-07-18  Bruno Haible  <bruno@clisp.org>
25924
25925         * lib/getndelim2.h: New file.
25926         * lib/getndelim2.c: Make into a module of its own. Include config.h,
25927         getndelim2.h.
25928         (getndelim2): Make non-static. Change return type to ssize_t.
25929         * lib/getline.h: Change argument names.
25930         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
25931         * lib/getnline.c: Include getndelim2.h.
25932
25933 2003-07-18  Andreas Schwab  <schwab@suse.de>
25934
25935         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
25936
25937 2003-07-17  Karl Berry  <karl@gnu.org>
25938
25939         * config/config.sub: update from prep.
25940
25941 2003-07-17  Bruno Haible  <bruno@clisp.org>
25942
25943         * modules/getnline: New file.
25944         * modules/getline: Add lib/getndelim2.c to source file list.
25945         * MODULES.html.sh (func_all_modules): Add getnline.
25946
25947 2003-07-17  Bruno Haible  <bruno@clisp.org>
25948
25949         * m4/getnline.m4: New file.
25950
25951 2003-07-17  Bruno Haible  <bruno@clisp.org>
25952
25953         * m4/Makefile.am.in: Remove file.
25954         * m4/Makefile.am: Remove file.
25955         * m4/Makefile.in: Remove file.
25956
25957 2003-07-17  Bruno Haible  <bruno@clisp.org>
25958
25959         * lib/getnline.h: New file.
25960         * lib/getnline.c: New file.
25961         * lib/getndelim2.c: New file, extracted from getline.c.
25962         (getndelim2): Renamed from getdelim2, with added nmax argument.
25963         * lib/getline.c: Include getndelim2.c.
25964         (getdelim2): Moved out to getndelim2.c.
25965         (getline, getdelim): Update.
25966
25967 2003-07-17  Bruno Haible  <bruno@clisp.org>
25968
25969         * lib/Makefile.am: Remove file.
25970         * lib/Makefile.in: Remove file.
25971
25972 2003-07-17  Bruno Haible  <bruno@clisp.org>
25973
25974         * configure.in: Remove file.
25975         * Makefile.in: Remove file.
25976
25977 2003-07-17  Bruno Haible  <bruno@clisp.org>
25978
25979         * MODULES.html.sh: Put the </BODY> right before </HTML>.
25980
25981 2003-07-16  Karl Berry  <karl@gnu.org>
25982
25983         * config/srclist-update: was running fixlicense twice, which caused
25984                 texinfo.tex to be nullified for some reason.  Simplify,
25985                 $gplsrc is no longer needed as far as I can see?
25986
25987 2003-07-16  Jim Meyering  <jim@meyering.net>
25988
25989         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
25990
25991 2003-07-15  Paul Eggert  <eggert@twinsun.com>
25992
25993         * config/srclist.txt: Get the following files from gettext-runtime/intl
25994         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
25995         ref-del.sin.  From Bruno Haible.
25996         * config/srclist-update (fixfile): Change grep pattern again, since the
25997         previous fix didn't work (there was another trailing $).  Use
25998         '[$]' to escape the $s.
25999
26000 2003-07-15  Karl Berry  <karl@gnu.org>
26001
26002         * lib/vasnprintf.c: update from gettext.
26003
26004 2003-07-15  Karl Berry  <karl@gnu.org>
26005
26006         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
26007         gets expanded when surrounded by '$'.
26008
26009 2003-07-15  Jim Meyering  <jim@meyering.net>
26010
26011         * modules/save-cwd: Don't depend on error.  From Derek Price.
26012
26013 2003-07-15  Jim Meyering  <jim@meyering.net>
26014
26015         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
26016
26017 2003-07-14  Simon Josefsson  <jas@extundo.com>
26018
26019         * modules/mempcpy: New file.
26020         * MODULES.html.sh (func_all_modules): Add mempcpy.
26021
26022 2003-07-14  Simon Josefsson  <jas@extundo.com>
26023
26024         * m4/mempcpy.m4: New file.
26025
26026 2003-07-14  Simon Josefsson  <jas@extundo.com>
26027
26028         * lib/mempcpy.h: New file.
26029         * lib/mempcpy.c: New file.
26030
26031 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26032
26033         * modules/getdate, modules/posixtm: Depend on mktime.
26034
26035 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26036
26037         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
26038         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
26039         unicodeio.c, unicodeio.h, unlocked-io.h:
26040         Switch from LGPL to GPL.
26041
26042 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26043
26044         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
26045         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
26046         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
26047         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
26048         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
26049         updated automatically by ../config/srclist-update.  This changes
26050         their license from LPGL to GPL.
26051
26052 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26053
26054         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
26055         assumed to refer to the root of the most recent stable gettext version.
26056         * config/srclistvars.sh: Add defaults for eggert.
26057         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
26058         Match "This program" as well as "The program".  This is needed
26059         for gettext.
26060
26061 2003-07-14  Jim Meyering  <jim@meyering.net>
26062
26063         Don't emit diagnostics.  Let callers do that.
26064         * lib/save-cwd.c: Don't include "error.h".
26065         (save_cwd): Don't call error.  Ensure that errno is valid
26066         when returning nonzero.
26067
26068         * lib/save-cwd.h (restore_cwd): Update prototype.
26069         * lib/save-cwd.c (restore_cwd): Remove two parameters.
26070         Simplify.  Don't call error upon failure.  Let callers do that.
26071         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
26072         when auditing is enabled.  But don't bother updating the #if.
26073
26074 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
26075
26076         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
26077         it breaks C++ compilation.
26078         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
26079
26080 2003-07-10  Simon Josefsson  <jas@extundo.com>
26081
26082         * modules/strchrnul (Makefile.am): Add strchrnul.h.
26083
26084 2003-07-10  Jim Meyering  <jim@meyering.net>
26085
26086         * m4/clock_time.m4: Remove trailing blank.
26087         * m4/intmax_t.m4: Likewise.
26088
26089 2003-07-10  Jim Meyering  <jim@meyering.net>
26090
26091         * lib/vasnprintf.c: Remove trailing blanks.
26092         Make cpp indentation consistent.
26093
26094 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26095
26096         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
26097         posixver.c, strftime.c, strnlen.c, strverscmp.c:
26098         Switch from LGPL to GPL.
26099
26100 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26101
26102         * config/srclist.txt: Sort sublists.  Add
26103         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
26104         that differ from gnulib for one reason or another; we'd like this list
26105         to be smaller but for now let's document what we have.
26106
26107 2003-07-08  Paul Eggert  <eggert@twinsun.com>
26108
26109         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
26110         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
26111         and sweeter "eval x=$x".
26112         * config/srclist.txt: Get lib/argp* from glibc.
26113
26114 2003-07-07  Paul Eggert  <eggert@twinsun.com>
26115
26116         * lib/mktime.c: Fix some boundary cases and remove need for floating
26117         point.
26118
26119         Issue a compile-time diagnostic if time_t is floating point, or if
26120         two's complement arithmetic is not in effect, or if arithmetic
26121         right shift does not propagate the sign.  These assumptions were
26122         all in the original code but they weren't checked.
26123
26124         (TIME_T_MIDPOINT, verify): New macros.
26125         (__isleap): Remove; it has integer overflow problems.
26126         (leapyear): New function, without those problems.
26127         (ydhms_tm_diff): Remove; splitting into two parts.
26128         (ydhms_diff): New function, containing the arithmetic part of
26129         the old ydhms_tm_diff function.  Issue a compile-time
26130         diagnostic if we are not using C99 integer division.
26131         Avoid casts when possible.
26132         (guess_time_tm): New function, containing the checking part of
26133         the old ydhms_tm_diff function.  Return the new value, rather than
26134         the difference between it and the old.  Accept a new argument T
26135         so that *T specifies the old value.  Check for overflow in the result.
26136
26137         (__mktime_internal): Use a time_t offset, not a long int offset.
26138         This undoes the 2003-06-04 change, which is no longer needed now
26139         that we have better overflow checking.
26140         (localtime_offset): Likewise.
26141
26142         (__mktime_internal): Avoid harmful overflow on hosts where time_t
26143         and long are 64-bit but int is only 32-bit.
26144         (ydhms_diff): Use long int to store year1 and yday1.
26145         Issue a compile-time diagnostic if long int is not wide enough.
26146
26147         (__mktime_internal): Use long int to store adjusted year and yday.
26148         Use plain C rather than preprocessor commands, if that doesn't
26149         affect efficiency.
26150         Check for overflow (and try to repair) after each probe
26151         rather than checking only at the very end.  This avoids some bugs
26152         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
26153         does not equal GMT offset at maximum time).
26154         Use integer to check for overflow rather than floating point; this
26155         is more portable to non-IEEE hosts, and is a tad faster.
26156         When we detect that we are oscillating between two values,
26157         don't check whether tm_isdst has the requested value, since
26158         we already know the answer.  When tm_isdst has the wrong value,
26159         use a different heuristic to find the right one, based on the
26160         extreme values actually observed in practice in tz2003a,
26161         rather than the (overly optimistic) "previous 3 calendar quarters".
26162
26163         (not_equal_tm, print_tm, check_result): Use "const T" rather than
26164         "T const" to accommodate glibc style.
26165         (check_result): Use less-confusing report format.  "long" -> "long int.
26166         (main): Likewise.
26167         Don't loop if the iteration overflows time_t.
26168         Allow a negative step in the iteration.
26169
26170 2003-07-06  Karl Berry  <karl@gnu.org>
26171
26172         * config/depcomp: update from automake.
26173         * config/config.sub: update from prep.
26174
26175 2003-07-03  Karl Berry  <karl@gnu.org>
26176
26177         * config/config.guess: update from prep.
26178
26179 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26180
26181         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
26182         xreadlink.c now includes it unconditionally.
26183
26184 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26185
26186         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
26187         having it depend on HAVE_SYS_TYPES_H.
26188
26189 2003-07-01  Bruno Haible  <bruno@clisp.org>
26190
26191         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
26192         <sys/types.h> should be sufficient.
26193         Reported by Paul Eggert.
26194
26195 2003-06-26  Karl Berry  <karl@gnu.org>
26196
26197         * config/depcomp: update from automake.
26198
26199 2003-06-26  Bruno Haible  <bruno@clisp.org>
26200
26201         * modules/human: Depend on module stdbool.
26202
26203 2003-06-25  Bruno Haible  <bruno@clisp.org>
26204
26205         * modules/readlink: New file.
26206         * modules/xreadlink: Depend on it.
26207         * MODULES.html.sh (func_all_modules): Add readlink.
26208
26209 2003-06-25  Bruno Haible  <bruno@clisp.org>
26210
26211         * m4/readlink.m4: New file.
26212
26213 2003-06-25  Bruno Haible  <bruno@clisp.org>
26214
26215         * lib/readlink.c: New file.
26216
26217 2003-06-22  Karl Berry  <karl@gnu.org>
26218
26219         * config/srclist.txt: update mkinstalldirs from automake.
26220         * config/mkinstalldirs: update.
26221
26222 2003-06-22  Bruno Haible  <bruno@clisp.org>
26223
26224         Portability to mingw32.
26225         * m4/ssize_t.m4: New file, from GNU gettext.
26226         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
26227         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
26228
26229 2003-06-22  Bruno Haible  <bruno@clisp.org>
26230
26231         * modules/safe-read: Add m4/ssize_t.m4.
26232         * modules/xreadlink: Add m4/ssize_t.m4.
26233
26234 2003-06-20  Bruno Haible  <bruno@clisp.org>
26235
26236         Assume C89, so PARAMS isn't needed.
26237         * lib/unicodeio.h (PARAMS): Remove.
26238         * lib/unicodeio.c: Don't use PARAMS.
26239
26240 2003-06-18  Karl Berry  <karl@gnu.org>
26241
26242         * config/config.{guess,sub}: update from prep.
26243
26244 2003-06-18  Jim Meyering  <jim@meyering.net>
26245
26246         Merge changes from coreutils.
26247         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
26248         Remove explicit declarations of xmalloc and realloc.
26249         Include xalloc.h.
26250         (read_utmp): Remove anachronistic cast of xmalloc.
26251
26252 2003-06-17  Paul Eggert  <eggert@twinsun.com>
26253
26254         Assume C89, so PARAMS isn't needed.
26255         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
26256         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
26257         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
26258         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
26259         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
26260         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
26261         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
26262         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
26263         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
26264         lib/xstrtod.h, lib/xstrtol.h: Likewise.
26265         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
26266         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
26267         no longer needed. Anyway, config.h should always be included before any
26268         other file.
26269
26270 2003-06-11  Simon Josefsson  <jas@extundo.com>
26271
26272         * modules/sysexits: New file.
26273         * MODULES.html.sh (func_all_modules): Add sysexits.
26274
26275 2003-06-11  Simon Josefsson  <jas@extundo.com>
26276
26277         * lib/sysexit_.h: New file.
26278
26279 2003-06-11  Derek Price  <derek@ximbiot.com>
26280
26281         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
26282         necessary.
26283
26284 2003-06-11  Bruno Haible  <bruno@clisp.org>
26285
26286         * m4/sysexits.m4: New file.
26287
26288 2003-06-10  Simon Josefsson  <jas@extundo.com>
26289
26290         * lib/argp.h: New file, from glibc.
26291         * lib/argp-ba.c: New file, from glibc.
26292         * lib/argp-eexst.c: New file, from glibc.
26293         * lib/argp-fmtstream.c: New file, from glibc.
26294         * lib/argp-fmtstream.h: New file, from glibc.
26295         * lib/argp-fs-xinl.c: New file, from glibc.
26296         * lib/argp-help.c: New file, from glibc.
26297         * lib/argp-namefrob.h: New file, from glibc.
26298         * lib/argp-parse.c: New file, from glibc.
26299         * lib/argp-pv.c: New file, from glibc.
26300         * lib/argp-pvh.c: New file, from glibc.
26301         * lib/argp-xinl.c: New file, from glibc.
26302
26303 2003-06-10  Simon Josefsson  <jas@extundo.com>
26304
26305         * modules/strchrnul: New file.
26306
26307 2003-06-10  Simon Josefsson  <jas@extundo.com>
26308
26309         * modules/argp: New file.
26310
26311 2003-06-10  Simon Josefsson  <jas@extundo.com>
26312
26313         * m4/strchrnul.m4: New file.
26314
26315 2003-06-10  Simon Josefsson  <jas@extundo.com>
26316
26317         * lib/strchrnul.h: New file.
26318         * lib/strchrnul.c: New file.
26319
26320 2003-06-10  Bruno Haible  <bruno@clisp.org>
26321
26322         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
26323
26324 2003-06-07  Karl Berry  <karl@gnu.org>
26325
26326         * config/config.{guess,sub}: update from prep.
26327
26328 2003-06-07  Jim Meyering  <jim@meyering.net>
26329
26330         * modules/strtod: Use $(...) notation, not @...@ for
26331         AC_REPLACE'd variables.
26332         * modules/localcharset: Likewise.
26333
26334 2003-06-07  Jim Meyering  <jim@meyering.net>
26335
26336         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
26337         in place of my name in the copyright comment.
26338         Remove definition and uses of __P.
26339
26340         From coreutils.
26341         * lib/stat.c: Don't declare xmalloc explicitly.
26342         Instead, include "xalloc.h".
26343         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
26344         xrealloc, and xcalloc return values.
26345         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
26346         Improve comment.
26347         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
26348
26349 2003-06-07  Bruno Haible  <bruno@clisp.org>
26350
26351         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
26352         avoid AC_CONFIG_LINKS.
26353         * modules/fnmatch (Makefile.am): Use explicit creation rule for
26354         fnmatch.h, to avoid AC_CONFIG_LINKS.
26355         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
26356
26357 2003-06-07  Bruno Haible  <bruno@clisp.org>
26358
26359         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
26360         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
26361         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26362         directory.
26363         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
26364         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26365         directory.
26366
26367 2003-06-06  Jim Meyering  <jim@meyering.net>
26368
26369         Merge from coreutils.
26370         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
26371         Consolidate declarations and initializations of *_base* locals.
26372
26373         Merge from coreutils.
26374         This avoids a core dump on systems without GNU putenv,
26375         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
26376         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
26377         (unsetenv): New static function, from GNU libc.
26378         (rpl_putenv): Use it.
26379
26380         * lib/modechange.c: Remove trailing blanks.
26381
26382         Merge from coreutils.
26383         * lib/fsusage.c: Remove declaration of statfs.
26384         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
26385
26386         * lib/posixtm.c: Include <stdbool.h> unconditionally.
26387
26388 2003-06-06  Jim Meyering  <jim@meyering.net>
26389
26390         * lib/stdbool_.h: Renamed from stdbool.h.in.
26391
26392 2003-06-06  Jim Meyering  <jim@meyering.net>
26393             Bruno Haible  <bruno@clisp.org>
26394
26395         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
26396         Adjust Makefile.am snippet not to redirect directly to target.
26397         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
26398
26399 2003-06-05  Paul Eggert  <eggert@twinsun.com>
26400
26401         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
26402         mismatch, look in future quarters as well as past.  This fixes a
26403         bug when processing fall-backwards gaps immediately after a long
26404         period of daylight-saving time.
26405
26406         * lib/mktime.c: Assume freestanding C89 or better.
26407         (HAVE_LIMITS_H): Remove.  Assume it's 1.
26408         (__P): Remove; not used.
26409         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
26410         (mktime, not_equal_tm, print_tm, check_result,
26411         main): Use prototypes.  Use const * where appropriate.
26412         (main): Fix typo in testing code that uncovered by above changes.
26413         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
26414
26415 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26416
26417         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
26418         locale.h, localeconv.  This merges changes from coreutils.
26419
26420         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
26421         It can be removed after the next Autoconf is released.
26422         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
26423         needed.
26424
26425 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26426
26427         * lib/mktime.c: Fix Debian bug 177940
26428         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
26429         (localtime_offset): Now long int, not time_t, because we want it
26430         to be guaranteed to be signed.  All uses changed.
26431         (__mktime_internal): If overflow would occur when adding offset,
26432         don't add it.
26433
26434         Merge 'human' changes from coreutils.  Rewrite to support
26435         locale-specific notations like thousands separators.
26436         * lib/human.c: Simplify authorship notice.
26437         Include human.h immediately after config.h.
26438         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
26439         <limits.h>: Do not include, since human.h does.
26440         (SIZE_MAX, UINTMAX_MAX): New macros.
26441         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
26442         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
26443         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
26444         (power_letter): Renamed from suffixes.
26445         (generate_suffix_backwards): Remove.
26446         (adjust_value): Now takes int style (because of human.h changes)
26447         and long double value (for greater precision on some platforms).
26448         (group_number): New function.
26449         (human_readable): Use it.  Use integer options, not enum.
26450         Put the options before the sizes in the arg list.
26451         Support all the new options.
26452         The old human_readable function has been removed;
26453         use inttostr.h instead.
26454         (human_readable, default_block_size, humblock):
26455         Use uintmax_t, not int, for block sizes.
26456         (human_readable_inexact, block_size_types): Remove.
26457         (block_size_opts): New constant.
26458         (human_options): Renamed from human_block_size, with new signature
26459         that allows block sizes up to UINTMAX_MAX.  All callers changed.
26460         * lib/human.h: Add copyright and authorship notice.
26461         Include <limits.h> and <stdbool.h> unconditionally.
26462         (PARAMS): Remove.  All uses removed.
26463         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
26464         (enum human_inexact_style): Remove tag; now a nameless enum.
26465         (human_floor, human_ceiling, human_round_to_even): Now have
26466         values 2, 0, 1 rather than -1, 1, 0.
26467         (human_group_digits, human_suppress_point_zero, human_autoscale,
26468         human_base_1024, human_SI, human_B): New constants.
26469         (human_readable_inexact, human_block_size): Remove.
26470         (human_readable): Size args are now uintmax_t, not int.
26471         (human_options): New decl.
26472
26473         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
26474         unnecessary now that we assume C89 or better.  This change
26475         imported from coreutils.
26476
26477         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26478         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
26479         in the 2003-05-30 sync from glibc.
26480
26481         .h files should stand alone, but we shouldn't include <sys/types.h>
26482         if we can get away with just <stddef.h>.
26483
26484         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
26485         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
26486         rather than <sys/types.h>, as we merely need size_t.
26487         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
26488         to get size_t.
26489         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
26490         Include <stdio.h>, to get FILE.
26491         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
26492         memcasecmp.h has included <stddef.h> and all we need is size_t.
26493         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
26494         our interface, instead of including <sys/types.h>
26495
26496 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26497
26498         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
26499         now, as glibc mktime is buggy on non-glibc systems.
26500
26501 2003-06-03  Karl Berry  <karl@gnu.org>
26502
26503         * config/config.sub: update from prep.
26504
26505 2003-06-02  Paul Eggert  <eggert@twinsun.com>
26506
26507         [from coreutils]
26508         Fix some minor time-related bugs with POSIX time arguments.
26509         Some valid time stamps were being rejected (notably -1, and
26510         time stamps before 1900 on 64-bit hosts).  And some invalid
26511         time stamps were being accepted, e.g. September 31.
26512
26513         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
26514         that we can return (time_t) -1 successfully.
26515         * lib/posixtm.c: Likewise.
26516         [HAVE_STDBOOL_H]: Include <stdbool.h>.
26517         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
26518         (t): Remove static var.
26519         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
26520         of static var.  All uses changed.
26521         (year): Do not reject years before 1900; they can occur with
26522         64-bit time_t.
26523         (posix_time_parse): Do not check for out-of-range components;
26524         that is now the caller's responsibility, since our checks were
26525         only approximations.
26526         (posixtime): Use mktime to check for out-of-range components,
26527         since it knows them exactly.
26528         If mktime returns (time_t) -1, check whether an error actually occurred
26529         by invoking localtime on -1.
26530         (main) [TEST_POSIXTIME]: Check for input data errors, and report
26531         posixtime failures better.
26532         Improve the test data (in comments only).
26533
26534 2003-06-02  Karl Berry  <karl@gnu.org>
26535
26536         * config/mkinstalldirs (version): new variable.
26537         (--version): new option.
26538         (usage): improve message.
26539
26540 2003-05-30  Karl Berry  <karl@gnu.org>
26541
26542         * lib/mktime.c: update from libc.
26543
26544 2003-05-30  Bruno Haible  <bruno@clisp.org>
26545
26546         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
26547         * config/config.rpath: Upgrade to gettext-0.12.1.
26548
26549 2003-05-30  Bruno Haible  <bruno@clisp.org>
26550
26551         * m4/gettext.m4: Upgrade to gettext-0.12.1.
26552         * m4/nls.m4: New file, from gettext-0.12.1.
26553         * m4/po.m4: New file, from gettext-0.12.1.
26554         * m4/progtest.m4: Upgrade to gettext-0.12.1.
26555
26556 2003-05-30  Bruno Haible  <bruno@clisp.org>
26557
26558         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
26559         * lib/localcharset.h: Likewise.
26560         * lib/localcharset.c: Likewise.
26561
26562 2003-05-29  Karl Berry  <karl@gnu.org>
26563
26564         * config/config.rpath: update from gettext.
26565
26566 2003-05-28  Paul Eggert  <eggert@twinsun.com>
26567
26568         Assume the headers required for C89 freestanding compilers.
26569         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
26570         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
26571         * m4/human.m4 (gl_HUMAN): Likewise.
26572         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
26573         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
26574         * m4/userspec.m4 (gl_USERSPEC): Likewise.
26575         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
26576         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
26577         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
26578
26579 2003-05-28  Paul Eggert  <eggert@twinsun.com>
26580
26581         Assume the headers required for C89 freestanding compilers.
26582         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
26583         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
26584         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
26585         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
26586         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
26587         define, since <limits.h> is guaranteed to do that.
26588         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
26589         * lib/exclude.c: Include <stdbool.h> unconditionally.
26590         * lib/tempname.c: Include <stddef.h> unconditionally.
26591         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
26592         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
26593         <stddef.h> does that.
26594         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
26595         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
26596         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
26597         needed.
26598         * lib/xstrtol.c: Likewise.
26599         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
26600         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
26601
26602         * lib/addext.c (addext): Use assignment rather than cast, to avoid
26603         warnings on some platforms.
26604
26605         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26606         arbitrarily.
26607
26608 2003-05-26  Jim Meyering  <jim@meyering.net>
26609
26610         Merge in a change from coreutils:
26611         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
26612         that is guaranteed to be `no'.  Use `no_such_member' to indicate
26613         that condition, rather than `-1' which is slightly misleading.
26614         Change the name of the cache variable to have the gl_ prefix.
26615         Prompted by a patch from Richard Dawe for DJGPP.
26616
26617 2003-05-24  Karl Berry  <karl@gnu.org>
26618
26619         * config/config.guess: update from prep.
26620
26621 2003-05-22  Karl Berry  <karl@gnu.org>
26622
26623         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
26624
26625 2003-05-20  Karl Berry  <karl@gnu.org>
26626
26627         * config/config.guess: update from prep.
26628
26629 2003-05-18  Karl Berry  <karl@gnu.org>
26630
26631         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
26632         might actually be set by the user.
26633
26634         * config/depcomp, install-sh, mdate-sh: update from automake.
26635
26636 2003-05-17  Bruno Haible  <bruno@clisp.org>
26637
26638         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
26639         invalid expansion for AC_EGREP_CPP.
26640         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
26641         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
26642         Suggested by Akim Demaille <akim@epita.fr> in
26643         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
26644
26645 2003-05-12  Jim Meyering  <jim@meyering.net>
26646
26647         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
26648         the space-padded-by-default conversion specifiers, %e, %k, %l.
26649
26650 2003-05-12  Bruno Haible  <bruno@clisp.org>
26651
26652         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
26653         the string is longer than 4 KB.
26654
26655 2003-05-11  Karl Berry  <karl@gnu.org>
26656
26657         * config/config.{guess,sub}: update from prep.
26658
26659 2003-05-09  Bruno Haible  <bruno@clisp.org>
26660
26661         * modules/error: Add m4/strerror_r.m4 to file list.
26662
26663 2003-05-03  Bruno Haible  <bruno@clisp.org>
26664
26665         Upgrade to Unicode-4.0.
26666         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
26667         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
26668         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
26669         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
26670         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
26671         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
26672         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
26673         Change width of U+E0100..U+E01EF from 1 to 0.
26674
26675 2003-04-25  Jim Meyering  <jim@meyering.net>
26676
26677         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
26678         of type size_t, not int.
26679
26680 2003-04-25  Bruno Haible  <bruno@clisp.org>
26681
26682         * lib/copy-file.c: Include <stddef.h>, for size_t.
26683
26684 2003-04-21  Paul Eggert  <eggert@twinsun.com>
26685
26686         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
26687         code which expansion is under static control.  Patch imported from
26688         Akim Demaille's patch to Bison; see
26689         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
26690
26691 2003-04-14  Bruno Haible  <bruno@clisp.org>
26692
26693         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
26694
26695 2003-04-11  Jim Meyering  <jim@meyering.net>
26696
26697         Merge changes from Coreutils.
26698
26699         2003-03-22  Jim Meyering  <jim@meyering.net>
26700
26701         * lib/strftime.c (widen): Cast alloca return value to proper type.
26702
26703         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
26704
26705         From GNU libc.
26706         * lib/strftime.c (my_strftime): Handle very large width
26707         specifications for numeric values correctly.  Improve checks for
26708         overflow.
26709
26710         2003-01-19  Jim Meyering  <jim@meyering.net>
26711
26712         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
26713         definitions.
26714         (nl_get_alt_digit) [! defined my_strftime]: Define.
26715         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
26716         _nl_get_alt_digit and _nl_get_walt_digit.
26717
26718         * lib/strftime.c (my_strftime): Merge in locale-related changes from
26719         libc. These changes have no effect outside of _LIBC.
26720
26721 2003-04-10  Bruno Haible  <bruno@clisp.org>
26722
26723         * modules/findprog: New file.
26724         * MODULES.html.sh (func_all_modules): Add it.
26725
26726 2003-04-10  Bruno Haible  <bruno@clisp.org>
26727
26728         * m4/findprog.m4: New file.
26729         * m4/eaccess.m4: New file.
26730
26731 2003-04-10  Bruno Haible  <bruno@clisp.org>
26732
26733         * lib/findprog.h: New file, from GNU gettext.
26734         * lib/findprog.c: New file, from GNU gettext.
26735
26736 2003-04-05  Jim Meyering  <jim@meyering.net>
26737
26738         Merge changes from Coreutils.
26739
26740         * lib/exclude.h (PARAMS): Remove definition and uses.
26741         * lib/exclude.c: Remove uses of `PARAMS'.
26742
26743         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
26744         Add test-cases for DOS filenames. Declare program_name.
26745         (main): Set up program_name.  Patch by Rich Dawe.
26746
26747         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26748         error from mntctl.
26749         Use mntctl's return value to drive the entry-processing loop, since
26750         we can't rely on the value of the vmt_length member in the last
26751         entry.  On some systems doing so could result in exhausting
26752         virtual memory.  Based in part on a patch from Mike Jetzer.
26753
26754 2003-04-04  Bruno Haible  <bruno@clisp.org>
26755
26756         * modules/linebreak: New file.
26757         * MODULES.html.sh (func_all_modules): Add it.
26758
26759 2003-04-04  Bruno Haible  <bruno@clisp.org>
26760
26761         * m4/linebreak.m4: New file.
26762
26763 2003-04-04  Bruno Haible  <bruno@clisp.org>
26764
26765         * lib/linebreak.h: New file, from GNU gettext.
26766         * lib/linebreak.c: New file, from GNU gettext with slight
26767         modifications.
26768         * lib/lbrkprop.h: New file, from GNU gettext.
26769
26770 2003-04-03  Bruno Haible  <bruno@clisp.org>
26771
26772         * modules/utf8-ucs4: New file.
26773         * modules/utf16-ucs4: New file.
26774         * modules/ucs4-utf8: New file.
26775         * modules/ucs4-utf16: New file.
26776         * MODULES.html.sh (func_all_modules): Add them.
26777
26778 2003-04-03  Bruno Haible  <bruno@clisp.org>
26779
26780         * m4/utf-ucs4.m4: New file.
26781         * m4/ucs4-utf.m4: New file.
26782
26783 2003-04-03  Bruno Haible  <bruno@clisp.org>
26784
26785         * lib/utf8-ucs4.h: New file, from GNU gettext.
26786         * lib/utf16-ucs4.h: New file, from GNU gettext.
26787         * lib/ucs4-utf8.h: New file, from GNU gettext.
26788         * lib/ucs4-utf16.h: New file, from GNU gettext.
26789
26790 2003-04-02  Bruno Haible  <bruno@clisp.org>
26791
26792         * modules/binary-io: New file.
26793         * MODULES.html.sh (func_all_modules): Add it.
26794
26795 2003-04-02  Bruno Haible  <bruno@clisp.org>
26796
26797         * lib/binary-io.h: New file, from GNU gettext.
26798
26799 2003-04-01  Bruno Haible  <bruno@clisp.org>
26800
26801         * modules/pathname: New file.
26802         * MODULES.html.sh (func_all_modules): Add it.
26803
26804 2003-04-01  Bruno Haible  <bruno@clisp.org>
26805
26806         * lib/pathname.h: New file, from GNU gettext.
26807         * lib/concatpath.c: New file, from GNU gettext.
26808
26809 2003-03-30  Bruno Haible  <bruno@clisp.org>
26810
26811         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
26812
26813 2003-03-30  Bruno Haible  <bruno@clisp.org>
26814
26815         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
26816         function chown() doesn't exist.
26817
26818 2003-03-28  Bruno Haible  <bruno@clisp.org>
26819
26820         * modules/copy-file: New file.
26821         * MODULES.html.sh (func_all_modules): Add it.
26822
26823 2003-03-28  Bruno Haible  <bruno@clisp.org>
26824
26825         * m4/copy-file.m4: New file.
26826
26827 2003-03-28  Bruno Haible  <bruno@clisp.org>
26828
26829         * lib/copy-file.h: New file, from GNU gettext.
26830         * lib/copy-file.c: New file, from GNU gettext.
26831
26832 2003-03-18  Jim Meyering  <jim@meyering.net>
26833
26834         * lib/quote.c (quote_n): Fix typo in comment.
26835
26836 2003-03-18  Bruno Haible  <bruno@clisp.org>
26837
26838         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
26839         checking.
26840         * m4/onceonly_2_57.m4: Likewise.
26841
26842 2003-03-17  Bruno Haible  <bruno@clisp.org>
26843
26844         * m4/onceonly.m4: Require autoconf 2.54 or newer.
26845         (m4_quote): Remove macro.
26846         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
26847
26848 2003-03-14  Jim Meyering  <jim@meyering.net>
26849
26850         Merge changes from Coreutils.
26851         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
26852         to be const, in order to avoid warnings.
26853         (obstack_room): Likewise.
26854         (obstack_empty_p): Likewise.
26855
26856 2003-03-14  Bruno Haible  <bruno@clisp.org>
26857
26858         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
26859         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
26860
26861 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26862
26863         Merge changes from Bison.
26864         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
26865         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
26866         when compiling Bison 1.875's `bitset bset = obstack_alloc
26867         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
26868         * lib/hash.c: Include <stdbool.h> unconditionally.
26869
26870 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26871
26872         * m4/onceonly.m4 (m4_quote): New macro.
26873         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
26874         Quote AC_FOREACH variable-expansions properly.
26875
26876 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26877
26878         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
26879
26880 2003-03-09  Paul Eggert  <eggert@twinsun.com>
26881
26882         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
26883         Reported by Bruce Becker; see:
26884         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
26885
26886 2003-03-03  Paul Eggert  <eggert@twinsun.com>
26887             Bruno Haible  <bruno@clisp.org>
26888
26889         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
26890         Reported by John Hughes, see
26891         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
26892
26893 2003-02-20  Bruno Haible  <bruno@clisp.org>
26894
26895         * MODULES.html.sh (func_all_modules): Add poll.
26896
26897 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26898
26899         * modules/poll: New file.
26900
26901 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26902
26903         * lib/poll_.h: New file.
26904         * lib/poll.c: New file.
26905
26906 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26907
26908         * m4/poll.m4: New file.
26909
26910 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26911
26912         * modules/mathl: New file.
26913
26914 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26915
26916         * lib/mathl.h: New file.
26917         * lib/acosl.c: New file.
26918         * lib/asinl.c: New file.
26919         * lib/atanl.c: New file.
26920         * lib/ceill.c: New file.
26921         * lib/cosl.c: New file.
26922         * lib/expl.c: New file.
26923         * lib/floorl.c: New file.
26924         * lib/frexpl.c: New file.
26925         * lib/ldexpl.c: New file.
26926         * lib/logl.c: New file.
26927         * lib/sincosl.c: New file.
26928         * lib/sinl.c: New file.
26929         * lib/sqrtl.c: New file.
26930         * lib/tanl.c: New file.
26931         * lib/trigl.c: New file.
26932         * lib/trigl.h: New file.
26933
26934 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26935
26936         * m4/mathl.m4: New file.
26937
26938 2003-02-18  Bruno Haible  <bruno@clisp.org>
26939
26940         * MODULES.html.sh (func_all_modules): Add mathl.
26941
26942 2003-02-17  Bruno Haible  <bruno@clisp.org>
26943
26944         * modules/mkdtemp: New module.
26945         * MODULES.html.sh (func_all_modules): Add it.
26946
26947 2003-02-17  Bruno Haible  <bruno@clisp.org>
26948
26949         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
26950
26951 2003-02-17  Bruno Haible  <bruno@clisp.org>
26952
26953         * lib/mkdtemp.h: New file, from GNU gettext.
26954         * lib/mkdtemp.c: New file, from GNU gettext.
26955
26956 2003-02-02  Jim Meyering  <jim@meyering.net>
26957
26958         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
26959         e.g. glibc-2.2.93.
26960
26961 2003-01-31  Bruno Haible  <bruno@clisp.org>
26962
26963         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
26964         'rpl_rename'.
26965         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
26966         'rpl_strnlen'.
26967         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
26968         'rpl_strtod'.
26969         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
26970         'rpl_utime'.
26971
26972 2003-01-31  Bruno Haible  <bruno@clisp.org>
26973
26974         * lib/rename.c: #undef rename before defining rpl_rename.
26975         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
26976
26977 2003-01-30  Bruno Haible  <bruno@clisp.org>
26978
26979         * modules/vasnprintf, modules/vasprintf: New modules.
26980         * MODULES.html.sh (func_all_modules): Add them.
26981
26982 2003-01-30  Bruno Haible  <bruno@clisp.org>
26983
26984         * m4/signed.m4: New file, from GNU gettext.
26985         * m4/longdouble.m4: New file, from GNU gettext.
26986         * m4/wchar_t.m4: New file, from GNU gettext.
26987         * m4/wint_t.m4: New file, from GNU gettext.
26988         * m4/vasnprintf.m4: New file.
26989         * m4/vasprintf.m4: New file.
26990
26991 2003-01-30  Bruno Haible  <bruno@clisp.org>
26992
26993         * lib/printf-args.h: New file, from GNU gettext.
26994         * lib/printf-args.c: New file, from GNU gettext.
26995         * lib/printf-parse.h: New file, from GNU gettext.
26996         * lib/printf-parse.c: New file, from GNU gettext.
26997         * lib/vasnprintf.h: New file, from GNU gettext.
26998         * lib/vasnprintf.c: New file, from GNU gettext.
26999         * lib/asnprintf.c: New file, from GNU gettext.
27000         * lib/vasprintf.h: New file, from GNU gettext with modifications.
27001         * lib/vasprintf.c: New file, from GNU gettext.
27002         * lib/asprintf.c: New file, from GNU gettext.
27003
27004 2003-01-29  Bruno Haible  <bruno@clisp.org>
27005
27006         * modules/stpncpy: New module.
27007         * MODULES.html.sh (func_all_modules): Add it.
27008
27009 2003-01-29  Bruno Haible  <bruno@clisp.org>
27010
27011         * m4/stpncpy.m4: New file.
27012
27013 2003-01-29  Bruno Haible  <bruno@clisp.org>
27014
27015         * lib/stpncpy.h: New file, from GNU gettext with modifications.
27016         * lib/stpncpy.c: New file, from GNU gettext with modifications.
27017
27018 2003-01-28  Bruno Haible  <bruno@clisp.org>
27019
27020         * modules/c-ctype: New module.
27021         * MODULES.html.sh (func_all_modules): Add it.
27022
27023 2003-01-28  Bruno Haible  <bruno@clisp.org>
27024
27025         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
27026         Paul Eggert.
27027         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
27028         Paul Eggert.
27029
27030 2003-01-27  Bruno Haible  <bruno@clisp.org>
27031
27032         * modules/xsetenv: New module.
27033         * MODULES.html.sh (func_all_modules): Add it.
27034
27035 2003-01-27  Bruno Haible  <bruno@clisp.org>
27036
27037         * lib/xsetenv.h: New file, from GNU gettext.
27038         * lib/xsetenv.c: New file, from GNU gettext.
27039
27040 2003-01-23  Jim Meyering  <jim@meyering.net>
27041
27042         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
27043         from working on systems without dirfd (at least Irix and OSF1/Tru64).
27044
27045 2003-01-23  Bruno Haible  <bruno@clisp.org>
27046
27047         * modules/minmax: New module.
27048         * MODULES.html.sh (func_all_modules): Add it.
27049
27050 2003-01-23  Bruno Haible  <bruno@clisp.org>
27051
27052         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
27053         Eggert.
27054
27055 2003-01-22  Bruno Haible  <bruno@clisp.org>
27056
27057         * modules/exit: New module.
27058         * MODULES.html.sh (func_all_modules): Add it.
27059
27060 2003-01-22  Bruno Haible  <bruno@clisp.org>
27061
27062         * lib/exit.h: New file, from GNU gettext.
27063
27064 2003-01-19  Bruno Haible  <bruno@clisp.org>
27065
27066         * gnulib-tool: Recognize option --extract-maintainer.
27067         (func_get_maintainer): New function.
27068         * modules/*: Add Maintainer entry.
27069
27070 2003-01-16  Jim Meyering  <jim@meyering.net>
27071
27072         * m4/regex.m4: The `regex' struct is both input and output.
27073         Initialize it before each use.  Patch by Tim Waugh.
27074
27075 2003-01-16  Bruno Haible  <bruno@clisp.org>
27076
27077         * MODULES.html.sh: Add a table of contents. Add the module name as
27078         leftmost column. Add hyperlinks.
27079
27080 2003-01-15  Bruno Haible  <bruno@clisp.org>
27081
27082         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
27083
27084 2003-01-15  Bruno Haible  <bruno@clisp.org>
27085
27086         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
27087         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
27088         suffix.
27089
27090 2003-01-15  Bruno Haible  <bruno@clisp.org>
27091
27092         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
27093
27094 2003-01-15  Bruno Haible  <bruno@clisp.org>
27095
27096         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
27097         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
27098
27099 2003-01-14  Jim Meyering  <jim@meyering.net>
27100
27101         * lib/same.c (same_name): Tweak a comment.
27102
27103 2003-01-14  Bruno Haible  <bruno@clisp.org>
27104
27105         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
27106         when a string comparison is sufficient.
27107
27108 2003-01-14  Bruno Haible  <bruno@clisp.org>
27109
27110         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
27111         'unsigned int'.
27112
27113 2003-01-14  Bruno Haible  <bruno@clisp.org>
27114
27115         * lib/hash-pjw.c: Add comment about low quality of this function.
27116
27117 2003-01-13  Bruno Haible  <bruno@clisp.org>
27118
27119         * modules/stpcpy: Distribute lib/stpcpy.h.
27120         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
27121
27122 2003-01-13  Bruno Haible  <bruno@clisp.org>
27123
27124         * modules/*: Add a description.
27125         * modules/strpbrk: Fix Makefile.am snippet.
27126         * modules/strtoimax: Fix dependencies.
27127         * modules/strtoumax: Likewise.
27128
27129 2003-01-13  Bruno Haible  <bruno@clisp.org>
27130
27131         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
27132         * modules/alloca (Makefile.am): All object files depend on alloca.h.
27133         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
27134
27135 2003-01-13  Bruno Haible  <bruno@clisp.org>
27136
27137         * gnulib-tool (func_create_testdir): Store config/* files in the main
27138         directory.
27139         * config.rpath: Move to ...
27140         * config/config.rpath: ... here.
27141         * modules/gettext: Contains config/config.rpath, not config.rpath.
27142         * modules/iconv: Likewise.
27143
27144 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27145
27146         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27147         to avoid collisions with libcurses and libreadline.
27148
27149         * m4/getstr.m4: Remove.
27150         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
27151
27152 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27153
27154         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27155         to avoid collisions with libcurses and libreadline.
27156
27157         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
27158         * lib/getstr.h, getstr.c: Remove.
27159         * lib/getline.c: Include "getline.h", to check interface.
27160         Move body of old getstr.c here: this defines MIN_CHUNK and
27161         declares getdelim2, which is renamed from getstr.
27162         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
27163
27164         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
27165         All uses changed.
27166         * lib/linebuffer.h: Likewise.
27167         (readline): Remove backward-compatibility macro.
27168
27169 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27170
27171         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27172         to avoid collisions with libcurses and libreadline.
27173         * getstr: Remove.
27174         * MODULES.html.sh: Remove getstr.
27175         * modules/getline: Depend on unlocked-io, not getstr.
27176
27177 2003-01-12  Jim Meyering  <jim@meyering.net>
27178
27179         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
27180
27181 2003-01-10  Bruno Haible  <bruno@clisp.org>
27182
27183         * modules/alloca: Change Makefile.am requirements. Simplify Include
27184         requirements. Add lib/alloca_.h to file list.
27185
27186 2003-01-10  Bruno Haible  <bruno@clisp.org>
27187
27188         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
27189
27190 2003-01-10  Bruno Haible  <bruno@clisp.org>
27191
27192         * lib/alloca_.h: New file.
27193         * lib/getdate.y: Unconditionally include alloca.h.
27194         * lib/makepath.c: Likewise.
27195         * lib/setenv.c: Likewise.
27196         * lib/userspec.c: Likewise.
27197
27198 2003-01-09  Karl Berry  <karl@gnu.org>
27199
27200         * MODULES.html.sh: include `dirname $0` in PATH, to find
27201         gnulib-tool.
27202
27203 2003-01-09  Bruno Haible  <bruno@clisp.org>
27204
27205         * modules/stdbool: Change configure.ac, Makefile.am requirements.
27206         Simplify Include requirements. Add lib/stdbool.h.in to file list.
27207
27208 2003-01-09  Bruno Haible  <bruno@clisp.org>
27209
27210         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
27211
27212 2003-01-09  Bruno Haible  <bruno@clisp.org>
27213
27214         * lib/stdbool.h.in: New file.
27215
27216 2003-01-09  Bruno Haible  <bruno@clisp.org>
27217
27218         * gnulib-tool (func_all_modules): Ignore files ending in ~.
27219         * MODULES.html.sh: Likewise.
27220
27221 2003-01-08  Jim Meyering  <jim@meyering.net>
27222
27223         * lib/full-write.c: Undefine and define-away `const' after inclusion
27224         of errno.h, not before.  Suggestion from Bruno Haible.
27225
27226 2003-01-08  Bruno Haible  <bruno@clisp.org>
27227
27228         * modules/full-read: Depend on full-write.
27229
27230 2003-01-08  Bruno Haible  <bruno@clisp.org>
27231
27232         * lib/safe-read.c: Include specification header first, to ensure its
27233         selfcontainedness.
27234         * lib/full-write.c: Likewise.
27235
27236 2003-01-07  Jim Meyering  <jim@meyering.net>
27237
27238         * lib/full-write.c: Rework so that it may serve to define full_read,
27239         too.
27240         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
27241
27242 2003-01-07  Bruno Haible  <bruno@clisp.org>
27243
27244         * lib/strtoimax.c: Include <stdint.h> as an alternative to
27245         <inttypes.h>.
27246         * lib/xstrtol.h: Likewise.
27247         * lib/xstrtoimax.c: Likewise.
27248         * lib/xstrtoumax.c: Likewise.
27249         * lib/human.h: Likewise.
27250
27251         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
27252         on systems that have <inttypes.h> but not <stdint.h>.
27253
27254 2003-01-07  Bruno Haible  <bruno@clisp.org>
27255
27256         * MODULES.html.sh: Add copyright notice.
27257         (missed_files): Omit CVS directory entries.
27258         (func_module): Make it work with sed-3.02.
27259         * MODULES.txt: Remove file.
27260
27261 2003-01-06  Jim Meyering  <jim@meyering.net>
27262
27263         * lib/version-etc.c: Update year in translatable copyright string.
27264
27265 2003-01-03  Karl Berry  <karl@gnu.org>
27266
27267         * config/config.{guess,sub}: update from prep.
27268
27269 2003-01-02  Karl Berry  <karl@gnu.org>
27270
27271         * doc/COPYING.DOC: belatedly updated to 1.2.
27272
27273 2003-01-01  Karl Berry  <karl@gnu.org>
27274
27275         * gnulib-tool (func_verify_module): report module name $module in
27276         error message, not $1.
27277         * gnulib-tool (create-testdir): don't complain if destdir couldn't
27278         be created, only if it doesn't exist.
27279         * gnulib-tool (last_checkin_date): don't expand the $Date here.
27280
27281 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27282
27283         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
27284
27285 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27286
27287         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
27288         memcmp if strcoll doesn't work.
27289
27290 2002-12-31  Bruno Haible  <bruno@clisp.org>
27291
27292         * lib/utime.c (utime_null): No need to call ftruncate if the file was
27293         nonempty.
27294
27295 2002-12-31  Bruno Haible  <bruno@clisp.org>
27296
27297         * lib/memcoll.c (STRCOLL): New macro.
27298         (memcoll): Use it.
27299
27300 2002-12-31  Bruno Haible  <bruno@clisp.org>
27301
27302         * lib/localcharset.h: New file.
27303         * lib/localcharset.c: Include it.
27304         * lib/unicodeio.c: Likewise.
27305
27306 2002-12-31  Bruno Haible  <bruno@clisp.org>
27307
27308         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
27309         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
27310
27311 2002-12-31  Bruno Haible  <bruno@clisp.org>
27312
27313         * lib/getline.h: Include <stddef.h>, for size_t.
27314
27315         * lib/unicodeio.h: Include <stddef.h>, for size_t.
27316         * lib/unicodeio.c: Don't include <stddef.h>.
27317
27318 2002-12-31  Bruno Haible  <bruno@clisp.org>
27319
27320         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
27321         HAVE_TM_ZONE.
27322
27323 2002-12-24  Karl Berry  <karl@gnu.org>
27324
27325         * config/config.guess: update from prep.
27326
27327 2002-12-24  Bruno Haible  <bruno@clisp.org>
27328
27329         General infrasructure.
27330         * m4/README: Rewritten.
27331         * m4/onceonly.m4: New file.
27332         * m4/onceonly_2_57.m4: New file.
27333
27334         Module atexit.
27335         * m4/atexit.m4: New file.
27336
27337         Module strtod.
27338         * m4/strtod.m4: New file.
27339
27340         Module strtol.
27341         * m4/strtol.m4: New file.
27342
27343         Module strtoul.
27344         * m4/strtoul.m4: New file.
27345
27346         Module memchr.
27347         * m4/memchr.m4: New file.
27348
27349         Module memcmp.
27350         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
27351         (jm_FUNC_MEMCMP): Invoke it.
27352
27353         Module memcpy.
27354         * m4/memcpy.m4: New file.
27355
27356         Module memmove.
27357         * m4/memmove.m4: New file.
27358
27359         Module memset.
27360         * m4/memset.m4: New file.
27361
27362         Module strcspn.
27363         * m4/strcspn.m4: New file.
27364
27365         Module strpbrk.
27366         * m4/strpbrk.m4: New file.
27367
27368         Module strstr.
27369         * m4/strstr.m4: New file.
27370
27371         Module strerror.
27372         * m4/strerror.m4: New file.
27373
27374         Module mktime.
27375         * m4/mktime.m4: Renamed from jm-mktime.m4.
27376         (gl_PREREQ_MKTIME): New macro.
27377         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
27378
27379         Module malloc.
27380         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
27381         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
27382         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
27383
27384         Module realloc.
27385         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
27386         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
27387         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
27388
27389         Module strftime.
27390         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
27391         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
27392         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
27393         gl_TM_GMTOFF.
27394         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
27395
27396         Module xalloc.
27397         * m4/xalloc.m4: New file.
27398
27399         Module alloca.
27400         * m4/alloca.m4: New file.
27401
27402         Module putenv.
27403         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
27404         (jm_FUNC_PUTENV): Invoke it.
27405
27406         Module setenv.
27407         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
27408         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
27409         when invoked twice.
27410         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
27411         gt_FUNC_SETENV.
27412
27413         Module memrchr.
27414         * m4/memrchr.m4: New file.
27415
27416         Module stpcpy.
27417         * m4/stpcpy.m4: New file.
27418
27419         Module strcase.
27420         * m4/strcase.m4: New file.
27421
27422         Module strdup.
27423         * m4/strdup.m4: New file.
27424
27425         Module strnlen.
27426         * m4/strnlen.m4: New file.
27427
27428         Module strndup.
27429         * m4/strndup.m4: New file.
27430
27431         Module xstrtod.
27432         * m4/xstrtod.m4: New file.
27433
27434         Module xstrtol.
27435         * m4/xstrtol.m4: New file.
27436
27437         Module getdate.
27438         * m4/getdate.m4: New file.
27439
27440         Module unlocked-io.
27441         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
27442         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
27443         * m4/jm-glibc-io.m4n: Remove file.
27444
27445         Module long-options.
27446         * m4/long-options.m4: New file.
27447
27448         Module md5.
27449         * m4/md5.m4: New file.
27450
27451         Module sha.
27452         * m4/sha.m4: New file.
27453
27454         Module getstr.
27455         * m4/getstr.m4: New file.
27456
27457         Module getline.
27458         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
27459         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
27460         <sys/types.h>, for size_t. Use the function name gnu_getline, not
27461         simply getline. Infoke gl_PREREQ_GETLINE.
27462
27463         Module obstack.
27464         * m4/obstack.m4: New file.
27465
27466         Module hash.
27467         * m4/hash.m4: New file.
27468
27469         Module readtokens.
27470         * m4/readtokens.m4: New file.
27471
27472         Module strverscmp.
27473         * m4/strverscmp.m4: New file.
27474
27475         Module stdbool.
27476         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
27477         OSF/1.
27478
27479         Module strtoll.
27480         * m4/strtoll.m4: New file.
27481
27482         Module strtoull.
27483         * m4/strtoull.m4: New file.
27484
27485         Module strtoimax.
27486         * m4/strtoimax.m4: New file.
27487
27488         Module strtoumax.
27489         * m4/strtoumax.m4: New file.
27490
27491         Module xstrtoimax.
27492         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
27493         jm_AC_PREREQ_XSTRTOIMAX.
27494         Moved the strtol prerequisites to strtol.m4.
27495         Moved the strtoll prerequisites to strtoll.m4.
27496         Moved the strtoimax prerequisites to strtoimax.m4.
27497
27498         Module xstrtoumax.
27499         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
27500         jm_AC_PREREQ_XSTRTOUMAX.
27501         Moved the strtoul prerequisites to strtoul.m4.
27502         Moved the strtoull prerequisites to strtoull.m4.
27503         Moved the strtoumax prerequisites to strtoumax.m4.
27504
27505         Module chown.
27506         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
27507         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
27508
27509         Module dup2.
27510         * m4/dup2.m4: New file.
27511
27512         Module ftruncate.
27513         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
27514         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
27515
27516         Module getgroups.
27517         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
27518         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
27519
27520         Module gettimeofday.
27521         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
27522         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
27523         gl_PREREQ_GETTIMEOFDAY.
27524
27525         Module mkdir.
27526         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
27527         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
27528
27529         Module mkstemp.
27530         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
27531         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
27532         jm_AC_TYPE_UINTMAX_T.
27533         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
27534
27535         Module stat.
27536         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
27537         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
27538
27539         Module lstat.
27540         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
27541         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
27542
27543         Module timespec.
27544         * m4/timespec.m4 (gl_TIMESPEC): New macro.
27545         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
27546         * m4/st_mtim.m4: Indentation.
27547
27548         Module nanosleep.
27549         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
27550         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
27551         gl_PREREQ_NANOSLEEP.
27552
27553         Module regex.
27554         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
27555         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
27556         (gl_REGEX): New macro.
27557
27558         Module rename.
27559         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
27560         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
27561
27562         Module rmdir.
27563         * m4/rmdir.m4: New file.
27564
27565         Module utime.
27566         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
27567         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
27568         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
27569
27570         Module dirname.
27571         * m4/dirname.m4: New file.
27572
27573         Module getopt.
27574         * m4/getopt.m4: New file.
27575
27576         Module unistd-safer.
27577         * m4/unistd-safer.m4: New file.
27578
27579         Module fnmatch.
27580         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
27581         declaration.
27582         (gl_PREREQ_FNMATCH_EXTRA): New macro.
27583         (gl_FUNC_FNMATCH_POSIX): New macro.
27584         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
27585         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
27586         simply fnmatch.
27587
27588         Module exclude.
27589         * m4/exclude.m4: New file.
27590
27591         Module human.
27592         * m4/human.m4: New file.
27593
27594         Module acl.
27595         * m4/acl.m4: Nop.
27596
27597         Module backupfile.
27598         * m4/backupfile.m4: New file.
27599         * m4/d-ino.m4: Indentation.
27600
27601         Module fsusage.
27602         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
27603         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
27604         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
27605
27606         Module dirfd.
27607         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
27608         requirements.
27609
27610         Module euidaccess.
27611         * m4/euidaccess.m4: New file.
27612
27613         Module file-type.
27614         * m4/file-type.m4: New file.
27615
27616         Module fileblocks.
27617         * m4/fileblocks.m4: New file.
27618
27619         Module filemode.
27620         * m4/filemode.m4: New file.
27621
27622         Module isdir.
27623         * m4/isdir.m4: New file.
27624
27625         Module lchown.
27626         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
27627         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
27628
27629         Module makepath.
27630         * m4/makepath.m4: New file.
27631
27632         Module modechange.
27633         * m4/modechange.m4: New file.
27634
27635         Module mountlist.
27636         * m4/mountlist.m4: New file.
27637         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
27638         Indentation.
27639
27640         Module path-concat.
27641         * m4/path-concat.m4: New file.
27642
27643         Module pathmax.
27644         * m4/pathmax.m4: New file.
27645
27646         Module same.
27647         * m4/same.m4: New file.
27648
27649         Module save-cwd.
27650         * m4/save-cwd.m4: New file.
27651
27652         Module savedir.
27653         * m4/savedir.m4: New file.
27654
27655         Module xgetcwd.
27656         * m4/xgetcwd.m4: New file.
27657         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
27658
27659         Module xreadlink.
27660         * m4/xreadlink.m4: New file.
27661
27662         Module safe-read.
27663         * m4/safe-read.m4: New file.
27664
27665         Module safe-write.
27666         * m4/safe-write.m4: New file.
27667
27668         Module closeout.
27669         * m4/closeout.m4: New file.
27670
27671         Module stdio-safer.
27672         * m4/stdio-safer.m4: New file.
27673
27674         Module getpass.
27675         * m4/getpass.m4: New file.
27676
27677         Module getugroups.
27678         * m4/getugroups.m4: New file.
27679
27680         Module group-member.
27681         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
27682         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
27683
27684         Module idcache.
27685         * m4/idcache.m4: New file.
27686
27687         Module userspec.
27688         * m4/userspec.m4: New file.
27689
27690         Module gettime.
27691         * m4/clock_time.m4: New file.
27692         * m4/gettime.m4: New file.
27693
27694         Module settime.
27695         * m4/settime.m4: New file.
27696
27697         Module posixtm.
27698         * m4/posixtm.m4: New file.
27699
27700         Module gethostname.
27701         * m4/gethostname.m4: New file.
27702
27703         Module canon-host.
27704         * m4/canon-host.m4: New file.
27705
27706         Module gettext.
27707         * m4/codeset.m4: New file, from gettext-0.11.5.
27708         * m4/gettext.m4: New file, from gettext-0.11.5.
27709         * m4/glibc21.m4: New file, from gettext-0.11.5.
27710         * m4/iconv.m4: New file, from gettext-0.11.5.
27711         * m4/intdiv0.m4: New file, from gettext-0.11.5.
27712         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
27713         * m4/inttypes.m4: New file, from gettext-0.11.5.
27714         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
27715         * m4/isc-posix.m4: New file, from gettext-0.11.5.
27716         * m4/lcmessage.m4: New file, from gettext-0.11.5.
27717         * m4/lib-ld.m4: New file, from gettext-0.11.5.
27718         * m4/lib-link.m4: New file, from gettext-0.11.5.
27719         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
27720         * m4/progtest.m4: New file, from gettext-0.11.5.
27721         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
27722         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
27723         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
27724
27725         Module localcharset.
27726         * m4/localcharset.m4: New file.
27727
27728         Module hard-locale.
27729         * m4/hard-locale.m4: New file.
27730
27731         Module mbswidth.
27732         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
27733         onceonly macros.
27734         * m4/mbrtowc.m4: Add comment.
27735
27736         Module memcasecmp.
27737         * m4/memcasecmp.m4: New file.
27738
27739         Module memcoll.
27740         * m4/memcoll.m4: New file.
27741
27742         Module unicodeio.
27743         * m4/unicodeio.m4: New file.
27744
27745         Module rpmatch.
27746         * m4/rpmatch.m4: New file.
27747
27748         Module yesno.
27749         * m4/yesno.m4: New file.
27750
27751         Module exitfail.
27752         * m4/exitfail.m4: New file.
27753
27754         Module c-stack.
27755         * m4/c-stack.m4 (gl_C_STACK): New macro.
27756         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
27757
27758         Module error.
27759         * m4/error.m4 (gl_ERROR): New macro.
27760         (jm_PREREQ_ERROR): Use onceonly macros.
27761
27762         Module fatal.
27763         * m4/fatal.m4: New file.
27764
27765         Module getloadavg.
27766         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
27767         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
27768
27769         Module getpagesize.
27770         * m4/getpagesize.m4: New file.
27771
27772         Module getusershell.
27773         * m4/getusershell.m4: New file.
27774
27775         Module physmem.
27776         * m4/physmem.m4: New file.
27777
27778         Module posixver.
27779         * m4/posixver.m4: New file.
27780
27781         Module quotearg.
27782         * m4/quotearg.m4: New file.
27783
27784         Module quote.
27785         * m4/quote.m4: New file.
27786
27787         Module readutmp.
27788         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
27789
27790         Module sig2str.
27791         * m4/sig2str.m4: New file.
27792
27793         Other.
27794         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
27795         ulonglong.m4.
27796         * m4/intmax_t.m4: New file.
27797         * m4/d-type.m4: Indentation.
27798         * m4/jm-macros.m4: Update.
27799         * m4/prereq.m4 (jm_PREREQ): Update.
27800         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
27801         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
27802         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
27803         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
27804         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
27805         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
27806         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
27807         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
27808         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
27809         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
27810         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
27811         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
27812         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
27813         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
27814         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
27815         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
27816         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
27817         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
27818         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
27819
27820 2002-12-24  Bruno Haible  <bruno@clisp.org>
27821
27822         * MODULES.txt: Update according to m4/ changes.
27823
27824         Module gettext.
27825         * config.rpath: New file, from gettext-0.11.5.
27826
27827         * modules/*: New module descriptions.
27828         * gnulib-tool: New file.
27829         * MODULES.html.sh: New file.
27830
27831 2002-12-21  Karl Berry  <karl@gnu.org>
27832
27833         * doc/fdl.texi: update to version 1.2.
27834
27835 2002-12-19  Karl Berry  <karl@gnu.org>
27836
27837         * config/config.guess: update from prep.
27838
27839 2002-12-18  Bruno Haible  <bruno@clisp.org>
27840
27841         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
27842         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
27843
27844 2002-12-17  Bruno Haible  <bruno@clisp.org>
27845
27846         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
27847         stdlib.h, string.h.
27848
27849 2002-12-17  Bruno Haible  <bruno@clisp.org>
27850
27851         * lib/canon-host.c (strdup): Remove unused declaration.
27852
27853         * lib/fsusage.c: Include full_read.h.
27854         (get_fs_usage): Use full_read instead of safe_read.
27855
27856         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
27857
27858 2002-12-12  Karl Berry  <karl@gnu.org>
27859
27860         * config/config.guess: update from prep.
27861
27862 2002-12-11  Bruno Haible  <bruno@clisp.org>
27863
27864         * m4/setenv.m4: New file, from gettext-0.11.5.
27865
27866 2002-12-11  Bruno Haible  <bruno@clisp.org>
27867
27868         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
27869         not unsetenv().
27870         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
27871         modifications:
27872
27873         2002-12-11  Bruno Haible  <bruno@clisp.org>
27874
27875                 * setenv.c (alloca): Fall back to malloc.
27876                 (freea): New macro.
27877                 (setenv): Use freea() to free memory allocated with alloca().
27878
27879         2002-11-13  Bruno Haible  <bruno@clisp.org>
27880
27881                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
27882                 function declarations.
27883                 * unsetenv.c (unsetenv): Likewise.
27884
27885         2002-03-04  Bruno Haible  <bruno@clisp.org>
27886
27887                 Portability to AIX 4.3.3.
27888                 * unsetenv.c: New file, extracted from setenv.c.
27889                 * setenv.c: Move the unsetenv() function to unsetenv.c.
27890
27891         2001-12-20  Bruno Haible  <bruno@clisp.org>
27892
27893                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
27894                 use malloc instead. For SunOS 4.
27895
27896         2001-12-11  Bruno Haible  <bruno@clisp.org>
27897
27898                 * setenv.c: Declare alloca.
27899                 (compar_fn_t): New typedef.
27900                 (KNOWN_VALUE, STORE_VALUE): Use it.
27901
27902         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
27903         setenv.h.
27904
27905 2002-12-10  Paul Eggert  <eggert@twinsun.com>
27906
27907         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
27908         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
27909         Choose values that are less likely to collide with system fnmatch
27910         options.
27911         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
27912         defined (e.g., a pure POSIX system).
27913         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
27914         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
27915
27916 2002-12-06  Paul Eggert  <eggert@twinsun.com>
27917
27918         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
27919         a pain in practice to deal with generated m4 files.  This change
27920         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
27921
27922         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
27923         and jm-glibc-io.m4, as they are no longer a special case.
27924         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
27925         kludge and the auto-generation stuff.  Check only whether the
27926         functions are declared, not whether they exist, since older hosts
27927         that don't declare the functions can't use the optimization anyway.
27928
27929 2002-12-06  Jim Meyering  <jim@meyering.net>
27930
27931         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
27932
27933         Merge in changes from libc's misc/error.c, in preparation
27934         for the merge of gnulib's changes back into libc.
27935
27936         * lib/error.c (_): Define only if not already defined.
27937         Move definition to follow all #include directives.
27938         Include unlocked-io.h only if !_LIBC.
27939         [_LIBC]: Include <libio/libioP.h>.
27940         [USE_IN_LIBIO]: Include <libio/iolibio.h>
27941         (fflush): Tweak definition to use INTUSE.
27942         (putc): Define.
27943
27944 2002-12-05  Paul Eggert  <eggert@twinsun.com>
27945
27946         * lib/alloca.c [defined emacs]: Include "lisp.h".
27947         (xalloc_die) [defined emacs]: New macro.
27948         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
27949         [! defined emacs]: Include <xalloc.h>.
27950         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
27951         (pointer): Typedef to POINTER_TYPE *.
27952         (malloc): Remove decl; we now always use xmalloc.
27953         (alloca): Use old-style definition, since Emacs needs this.
27954         Check for arithmetic overflow when computing combined size.
27955
27956 2002-12-04  Paul Eggert  <eggert@twinsun.com>
27957
27958         Do not generate unlocked-io.h automatically, since it's easier to
27959         maintain it by hand.
27960
27961         * lib/unlocked-io.h: New file, from GNU diffutils,
27962         but with proper copyright notice and attribution.
27963         * lib/gen-uio: Remove.
27964         * lib/Makefile.am: Add copyright notice.
27965         (libfetish_a_SOURCES): Add unlocked-io.h.
27966         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
27967         (DISTCLEANFILES, io_functions): Remove macros.
27968         (EXTRA_DIST): Remove gen_uio.
27969         (unlocked-io.h): Remove rule.
27970
27971 2002-12-04  Jim Meyering  <jim@meyering.net>
27972
27973         Reflect the fact that stat.c and lstat.c are no longer generated.
27974         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
27975         (DISTCLEANFILES): Likewise.
27976         (EXTRA_DIST): Likewise.
27977         (all_local): Don't depend on stat.c or lstat.c.
27978         (stat.c, lstat.c): Remove rules.
27979         (EXTRA_DIST): Remove xstat.in.
27980
27981         * lib/xstat.in: Remove file.  Contents moved into stat.c.
27982         * lib/stat.c: New file.  Contents mostly from xstat.in.
27983         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
27984         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
27985
27986         * lib/safe-read.c: Rework so that it may serve to define safe_write,
27987         too.
27988         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
27989
27990 2002-12-03  Jim Meyering  <jim@meyering.net>
27991
27992         * lib/safe-read.c, safe-write.c: Change variable names and comments,
27993         but not semantics, to minimize the differences between these two files.
27994         (safe_read): Change comment to mention SAFE_READ_ERROR.
27995
27996         * lib/safe-read.c (IS_EINTR): Define.
27997         (safe_read): Use IS_EINTR in place of in-function cpp directives.
27998
27999 2002-12-02  Jim Meyering  <jim@meyering.net>
28000
28001         * lib/safe-read.c (EINTR): Define.
28002         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
28003         (INT_MAX): Provide fallback.
28004         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
28005
28006         * lib/safe-read.h (SAFE_READ_ERROR): Define.
28007
28008 2002-12-02  Bruno Haible  <bruno@clisp.org>
28009
28010         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
28011         Define, taken from safe-read.c.
28012         (INT_MAX): Provide fallback.
28013         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
28014         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
28015
28016         * lib/safe-read.c (EINTR): Remove definition.
28017         (safe_read): Don't use EINTR if it is absent.
28018
28019 2002-12-01  Jim Meyering  <jim@meyering.net>
28020
28021         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
28022         zero.
28023         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
28024
28025 2002-11-27  Paul Eggert  <eggert@twinsun.com>
28026
28027         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
28028         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
28029         with `if (! (value < limit)) abort ();', for readability.
28030
28031 2002-11-26  Karl Berry  <karl@gnu.org>
28032
28033         * lib/strdup.c: copy from libc again, with jim's ok.
28034         * lib/.cppi-disable: re-add strdup.c
28035
28036 2002-11-25  Karl Berry  <karl@gnu.org>
28037
28038         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
28039         instead of "strtol.c".
28040
28041 2002-11-25  Karl Berry  <karl@gnu.org>
28042
28043         * config/install-sh: update from automake for variable quoting, $0 in
28044         error msgs, etc.
28045
28046         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
28047         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
28048         entry.
28049
28050 2002-11-25  Jim Meyering  <jim@meyering.net>
28051
28052         * lib/mktime.c: Sync from libc, now that it has the latest fix.
28053
28054 2002-11-24  Karl Berry  <karl@gnu.org>
28055
28056         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
28057         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
28058
28059 2002-11-24  Jim Meyering  <jim@meyering.net>
28060
28061         Update from coreutils:
28062
28063         * lib/mktime.c: Merge in changes from libc.
28064
28065         Avoid a link-time failure on some Linux systems.
28066         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
28067         (otherwise).
28068         (__mon_yday): Declare with the STATIC attribute.
28069         (__mktime_internal): Likewise.
28070         Based on a report from Greg Schafer.
28071
28072 2002-11-23  Jim Meyering  <jim@meyering.net>
28073
28074         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
28075         Use `unsigned', not `int', as type of index.
28076
28077         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
28078
28079         * lib/fsusage.c: Remove unneeded parentheses around operands of
28080         `defined'.
28081
28082 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28083
28084         * lib/quotearg.h: Allow multiple inclusion by surrounding with
28085         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
28086         so that we can be included first.
28087         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
28088         * lib/quotearg.c: Include quotearg.h immediately after config.h.
28089         No need to include stddef.h or sys/types.h any more.
28090         Surround local include files with "", not "<>".
28091         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
28092         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
28093         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
28094         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
28095         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
28096         (ISPRINT): Remove; no longer needed now that we assume C89.
28097
28098         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
28099         Preserve errno.
28100
28101         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
28102         quotearg_char): Use SIZE_MAX rather than
28103         (size_t) -1 when we are talking about "infinity".
28104
28105         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
28106
28107 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28108
28109         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
28110         hint that one should use `if (! x) abort ();' rather than `assert
28111         (x);', and anyway it's one less thing to worry about configuring.
28112         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
28113         hash_rehash, hash_insert): Use abort rather than assert.
28114
28115 2002-11-22  Bruno Haible  <bruno@clisp.org>
28116
28117         * lib/safe-read.h: Assume C89. Add comments.
28118         (safe_read): Change return type to size_t.
28119         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
28120         byte counts > SSIZE_MAX correctly.
28121         * lib/safe-write.h: New file.
28122         * lib/safe-write.c: New file.
28123         * lib/full-read.h: New file.
28124         * lib/full-read.c: New file.
28125         * lib/full-write.h: Assume C89. Add comments.
28126         * lib/full-write.c: Include safe-write.h.
28127         (full_write): Rewritten to use safe_write.
28128         Suggested by Jim Meyering and Paul Eggert.
28129
28130 2002-11-21  Jim Meyering  <jim@meyering.net>
28131
28132         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
28133
28134         Merge in changes from the coreutils.
28135
28136         2002-09-25  Paul Eggert  <eggert@twinsun.com>
28137         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
28138         <stdint.h>.
28139         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
28140         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
28141         int.  Work more efficiently if X is the same width as uintmax_t.
28142         Do not compare X to -1, to avoid bogus compiler warning.
28143         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
28144         Don't assume that f_frsize and f_bsize are the same type.
28145
28146         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
28147         warning on FreeBSD.
28148
28149         * lib/makepath.c (make_path): Restore umask *before* creating the final
28150         component.
28151         (make_path): Minor reformatting.
28152
28153         * lib/xmalloc.c: Adjust to work with new autoconf macros,
28154         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
28155         HAVE_MALLOC/HAVE_REALLOC.
28156
28157         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
28158         dummy ones.  At least on GNU/Linux systems, `auto' means something
28159         else.
28160         From Michael Stone.
28161
28162 2002-11-21  Bruno Haible  <bruno@clisp.org>
28163
28164         Remove case insensitive option matching.
28165         * lib/argmatch.h (argcasematch): Remove declaration.
28166         (ARGCASEMATCH): Remove macro.
28167         (__xargmatch_internal): Remove case_sensitive argument.
28168         (XARGMATCH): Update.
28169         (XARGCASEMATCH): Remove macro.
28170         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
28171         case_sensitive argument.
28172         (argcasematch): Remove function.
28173         (__xargmatch_internal): Remove case_sensitive argument.
28174         (main): Use XARGMATCH instead of XARGCASEMATCH.
28175
28176         * lib/xmalloc.c: Change compile-time error message. Add comment about
28177         required autoconf version.
28178
28179 2002-11-20  Paul Eggert  <eggert@twinsun.com>
28180
28181         Merge argmatch cleanups from Bison.  Assume C89.
28182
28183         * lib/argmatch.c: Include config.h here, not in argmatch.h.
28184         Include stdlib.h, for EXIT_FAILURE.
28185         Always include <string.h>, since we assume C89.
28186         (EXIT_FAILURE): Remove pre-C89 bug workaround.
28187         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
28188         Include <stddef.h> instead, since it's all we need for size_t.
28189         (PARAMS): Remove.  All uses removed.
28190         (ARRAY_CARDINALITY): Do not bother to #undef.
28191         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
28192         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28193         Remove unnecessary parentheses.
28194         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28195         Insert necessary parentheses.
28196         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
28197         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
28198
28199 2002-11-19  Bruno Haible  <bruno@clisp.org>
28200
28201         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
28202         * lib/mbswidth.h: Include <stddef.h>, for size_t.
28203
28204         * lib/mbswidth.h (PARAMS): Remove macro.
28205         (mbswidth, mbsnwidth): Use ANSI C function declarations.
28206         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
28207
28208         * lib/gcd.h (PARAMS): Remove macro.
28209         (gcd): Use ANSI C function declarations.
28210         * lib/gcd.c (gcd): Likewise.
28211
28212 2002-11-15  Bruno Haible  <bruno@clisp.org>
28213
28214         * lib/strcspn.c: Include <stddef.h>.
28215         (strcspn): Use ANSI C function declaration. Change return type to
28216         size_t. Use NULL.
28217         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
28218         (strpbrk): Use NULL.
28219         * lib/strpbrk.h (PARAMS): Remove macro.
28220         (strpbrk): Use ANSI C function declaration.
28221         * lib/strstr.c: Don't include <sys/types.h>.
28222         * lib/strstr.h (PARAMS): Remove macro.
28223         (strstr): Use ANSI C function declarations.
28224
28225 2002-11-14  Karl Berry  <karl@gnu.org>
28226
28227         * config/mkinstalldirs: `do' on separate line, instead of
28228         `for var; do'.
28229
28230 2002-11-06  Bruno Haible  <bruno@clisp.org>
28231
28232         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
28233         * lib/gcd.c (gcd): Likewise.
28234
28235 2002-11-05  Bruno Haible  <bruno@clisp.org>
28236
28237         * lib/gcd.h: New file, from gettext-0.11.5.
28238         * lib/gcd.c: New file, from gettext-0.11.5.
28239
28240 2002-11-05  Bruno Haible  <bruno@clisp.org>
28241
28242         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28243         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28244         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28245         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28246
28247         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
28248         <libintl.h>.
28249         * lib/makepath.c: Include gettext.h instead of <locale.h> and
28250         <libintl.h>.
28251
28252         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
28253         * lib/human.c: Include gettext.h instead of <libintl.h>.
28254         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
28255         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
28256         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
28257         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
28258         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
28259         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
28260         (textdomain): Remove definition.
28261         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
28262
28263         * lib/long-options.c: Remove include of <libintl.h> and definition of
28264         _.
28265         * lib/same.c: Remove include of <libintl.h> and definition of _.
28266
28267 2002-11-04  Owen Taylor  <otaylor@redhat.com>
28268
28269         * lib/config.charset: A few additions for Solaris.
28270
28271 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28272
28273         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
28274         * lib/localcharset.c (locale_charset): Declare as extern "C".
28275
28276 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28277
28278         * lib/config.charset: msdos in uk_UA uses CP1125.
28279
28280 2002-11-04  Bruno Haible  <bruno@clisp.org>
28281
28282         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
28283         * lib/strcase.h: New file, from GNU gettext-0.11.5.
28284         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
28285         * lib/strstr.h: New file, from GNU gettext-0.11.5.
28286         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
28287
28288 2002-11-04  Bruno Haible  <bruno@clisp.org>
28289
28290         * lib/localcharset.c (locale_charset): Don't return an empty string.
28291
28292 2002-11-04  Bruno Haible  <bruno@clisp.org>
28293
28294         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
28295         aliases.
28296
28297 2002-11-04  Bruno Haible  <bruno@clisp.org>
28298
28299         * lib/config.charset: Update for newest glibc. Add canonical names
28300         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
28301
28302 2002-11-04  Bruno Haible  <bruno@clisp.org>
28303
28304         * lib/config.charset: Add support for NetBSD.
28305
28306 2002-11-04  Bruno Haible  <bruno@clisp.org>
28307
28308         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
28309
28310 2002-11-01  Bruno Haible  <bruno@clisp.org>
28311
28312         * configure.in: Add AC_CONFIG_AUX_DIR call.
28313         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
28314         test/Makefile.
28315         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
28316
28317 2002-09-28  Karl Berry  <karl@gnu.org>
28318
28319         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
28320         installed automake until the next release, since changes have been
28321         made.
28322
28323 2002-09-25  Karl Berry  <karl@gnu.org>
28324
28325         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
28326         * lib/getopt*: copy from libc/posix.
28327         * lib/gettext.h: copy from gettext.
28328         * lib/.cppi-disable: add strdup.c, gettext.h.
28329
28330 2002-09-25  Karl Berry  <karl@gnu.org>
28331
28332         * config/srclist.txt: enable gettext.h check.
28333         * config/config.{guess,sub}: update from prep.
28334         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
28335                 from automake 1.6.3.
28336         See srclist*.
28337
28338 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
28339
28340         * regex.c (PATFETCH): Remove the translating fetch.
28341         (PATFETCH_RAW): Rename to PATFETCH.
28342         (set_image_of_range): New fun.
28343         (SET_RANGE_TABLE_WORK_AREA): Use it.
28344         (regex_compile): Don't translate the pattern chars so eagerly.
28345         Only do it when inserting an `exactn' bytecode or when handling
28346         a char-range.
28347         (mutually_exclusive_p): Avoid empty statement.
28348
28349 2002-07-06  Jim Meyering  <meyering@lucent.com>
28350
28351         * m4/README: Don't mention Makefile.am.in.
28352         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
28353
28354 2002-07-01  Jim Meyering  <meyering@lucent.com>
28355
28356         * lib/c-stack.c: Include sys/time.h.
28357         From Volker Borchert.
28358
28359 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28360
28361         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
28362
28363 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28364
28365         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
28366         New macro.  Use it uniformly instead of
28367         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
28368         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
28369         reported by Vin Shelton.
28370
28371 2002-06-22  Paul Eggert  <eggert@twinsun.com>
28372
28373         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
28374         Do not assume SA_SIGINFO behavior.
28375         Bug reported by Jim Meyering on NetBSD 1.5.2.
28376
28377 2002-06-22  Jim Meyering  <meyering@lucent.com>
28378
28379         * m4/c-stack.m4: New file, from diffutils-2.8.2.
28380         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
28381
28382         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
28383         now that configure.ac uses AC_GNU_SOURCE.
28384         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
28385         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
28386
28387         Update to latest tools.  Suggestions from Paul Eggert.
28388         * m4/stdbool.m4: New file, from diffutils-2.8.2.
28389         * m4/gnu-source.m4: Update from diffutils-2.8.2.
28390         * m4/fnmatch.m4: Likewise.
28391         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
28392         to AC_HEADER_STDBOOL
28393
28394 2002-06-22  Jim Meyering  <meyering@lucent.com>
28395
28396         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
28397         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
28398
28399 2002-06-22  Jim Meyering  <meyering@lucent.com>
28400
28401         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
28402
28403         * lib/exitfail.c, exitfail.h: Likewise.
28404         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
28405
28406         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
28407         of fnmatch.h.
28408         (EXTRA_DIST): Add fnmatch_loop.c.
28409         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
28410
28411         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
28412         * lib/fnmatch.c: Update from diffutils-2.8.2.
28413         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
28414         * lib/fnmatch.h: Remove file.
28415
28416 2002-06-21  Jim Meyering  <meyering@lucent.com>
28417
28418         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
28419         * m4/mbrtowc.m4: Likewise.
28420
28421         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
28422         * m4/mbswidth.m4: Reflect name change:
28423         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
28424         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
28425
28426         * m4/lib-link.m4: Update from gettext-0.11.2.
28427         * m4/gettext.m4: Likewise.
28428
28429         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
28430         From Alfred M. Szmidt.
28431
28432 2002-06-18  Paul Eggert  <eggert@twinsun.com>
28433
28434         * lib/file-type.h: Report an error if neither S_ISREG nor
28435         S_IFREG is defined, instead of using a test specific to glibc
28436         2.2.  This should be safe, since POSIX requires S_ISREG and
28437         Unix Version 7 had S_IFREG.  We don't need to check for
28438         <sys/types.h> since we don't use any symbols that it defines.
28439
28440 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
28441
28442         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
28443         $@-t, so that each temporary file name is unique and valid in the first
28444         8 characters, for operation under DOS.
28445
28446 2002-06-15  Paul Eggert  <eggert@twinsun.com>
28447
28448         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
28449
28450 2002-06-15  Jim Meyering  <meyering@lucent.com>
28451
28452         Work even with DJGPP 2.03, which lacks support for symlinks.
28453         From Richard Dawe.
28454         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
28455         is defined.
28456         * lib/lchown.c (S_ISLNK): Likewise.
28457
28458 2002-06-15  Jim Meyering  <meyering@lucent.com>
28459
28460         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
28461         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
28462         have been included before this file.
28463
28464 2002-06-14  Jim Meyering  <meyering@lucent.com>
28465
28466         * lib/file-type.h: Use the version from diffutils-2.8.2.
28467         * lib/file-type.c: Likewise.
28468
28469 2002-06-07  Jim Meyering  <meyering@lucent.com>
28470
28471         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
28472         They're needed at least for NetBSD 1.5.2.
28473         ($statxfs_includes): Include those same headers.
28474         ($statxfs_includes): Include sys/vfs.h if available.
28475         ($statxfs_includes): Likewise for sys/statvfs.h.
28476         Check for the following members in both structs statfs and statvfs:
28477         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
28478
28479 2002-06-01  Jim Meyering  <meyering@lucent.com>
28480
28481         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
28482         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
28483
28484 2002-05-28  Jim Meyering  <meyering@lucent.com>
28485
28486         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
28487         Reported by Volker Borchert.
28488
28489 2002-05-27  Jim Meyering  <meyering@lucent.com>
28490
28491         Fix a problem seen only on nonconforming systems whereby ls.c's
28492         use of localtime, and then of gettimeofday would cause trouble:
28493         the localtime call used to initialize rpl_gettimeofday's save
28494         mechanism would clobber ls's current local time information so
28495         that in any long listing the first file would always be listed
28496         with date 1970-01-01.  Analysis by Volker Borchert.
28497
28498         * lib/gettimeofday.c (localtime): Undefine.
28499         (rpl_localtime): New function.
28500
28501 2002-05-27  Jim Meyering  <meyering@lucent.com>
28502
28503         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
28504         localtime.
28505
28506         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
28507         use the replacement function; it wouldn't resolve at link time.
28508         Reported by Volker Borchert.
28509
28510 2002-05-22  Jim Meyering  <meyering@lucent.com>
28511
28512         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
28513         file-type.h.
28514         * lib/file-type.h: New file.
28515         * lib/file-type.c (file_type): New file/function.  Extracted from
28516         diffutils.
28517
28518 2002-04-30  Jim Meyering  <meyering@lucent.com>
28519
28520         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
28521
28522 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28523
28524         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
28525
28526 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28527
28528         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
28529         Do not check for alloca.h (no longer used) or stdbool.h (was never
28530         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
28531
28532 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28533
28534         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
28535
28536 2002-04-29  Jim Meyering  <meyering@lucent.com>
28537
28538         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
28539         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
28540         Use AC_FUNC_STRNLEN here instead.
28541
28542         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
28543         With autoconf-2.53a, it's part of AC_PROG_CC.
28544
28545 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28546
28547         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
28548         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
28549
28550 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28551
28552         * lib/sig2str.h, lib/sig2str.c: New files.
28553         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
28554
28555 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28556
28557         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
28558         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
28559         of 127, since 64 is the largest conceivable number for ancient
28560         nonstandard hosts.
28561         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
28562
28563 2002-04-28  Jim Meyering  <meyering@lucent.com>
28564
28565         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
28566
28567 2002-04-24  Jim Meyering  <meyering@lucent.com>
28568
28569         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
28570         (jm_PREREQ): Use it.
28571
28572         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
28573         mach/mach.h fcntl.h.
28574         Check for this function: setlocale.
28575
28576 2002-04-24  Jim Meyering  <meyering@lucent.com>
28577
28578         * lib/gettext.h: New file, from Gettext.
28579         * lib/Makefile.am (INCLUDES): Remove -I../intl.
28580         (libfetish_a_SOURCES): Add gettext.h.
28581
28582 2002-04-16  Jim Meyering  <meyering@lucent.com>
28583
28584         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
28585         ut_pid, ut_id, ut_exit.
28586
28587 2002-04-16  Jim Meyering  <meyering@lucent.com>
28588
28589         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
28590         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
28591         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
28592
28593 2002-04-12  Jim Meyering  <meyering@lucent.com>
28594
28595         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
28596         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
28597         existence of the getmntinfo function.  Needed for Darwin 5.3.
28598
28599         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
28600         This is necessary at least on Darwin 5.3.
28601
28602         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
28603         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
28604         strnlen.o in the library, and that makes some versions of ranlib
28605         object.
28606
28607 2002-04-12  Jim Meyering  <meyering@lucent.com>
28608
28609         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
28610
28611 2002-04-09  Jim Meyering  <meyering@lucent.com>
28612
28613         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
28614         to be more precise.  Rather than saying we're checking whether the
28615         function `works', say what we're testing.
28616         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
28617         Reported by Bruno Haible.
28618
28619 2002-03-10  Jim Meyering  <meyering@lucent.com>
28620
28621         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
28622         Suggestion from Santiago Vila.
28623
28624 2002-03-08  Jim Meyering  <meyering@lucent.com>
28625
28626         * lib/rename.c: Mention that this wrapper is needed also on
28627         mips-dec-ultrix4.4 systems.
28628
28629 2002-03-02  Jim Meyering  <meyering@lucent.com>
28630
28631         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
28632         not HAVE_CLOCK_SETTIME.
28633
28634 2002-02-27  Paul Eggert  <eggert@twinsun.com>
28635
28636         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
28637         Check for clock_settime.
28638
28639 2002-02-27  Paul Eggert  <eggert@twinsun.com>
28640
28641         * lib/nanosleep.h: Rename to....
28642         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
28643
28644         * lib/gettime.c: New file.
28645         * lib/settime.c: New file.
28646         * lib/stime.c: Remove.
28647
28648         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
28649         timespec.h.  Remove nanosleep.h.
28650
28651 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28652
28653         * m4/acl.m4: New file.
28654         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
28655         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
28656
28657 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28658
28659         * lib/acl.c, lib/acl.h: New files.
28660         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
28661
28662 2002-02-24  Jim Meyering  <meyering@lucent.com>
28663
28664         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
28665         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
28666         cause trouble.  Reported by Nelson Beebe.
28667
28668 2002-02-23  Paul Eggert  <eggert@twinsun.com>
28669
28670         * lib/path-concat.c (xpath_concat): Reorder code to pacify
28671         compilers that don't know that xalloc_die never returns.
28672
28673 2002-02-20  Jim Meyering  <meyering@lucent.com>
28674
28675         * lib/getdate.c: Regenerate using bison-1.33.
28676
28677 2002-02-17  Jim Meyering  <meyering@lucent.com>
28678
28679         * config/config.guess (main): Don't use `head -1'; it's no longer
28680         portable. Use `sed 1q' instead.
28681
28682 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
28683
28684         * m4/codeset.m4: Upgrade to gettext-0.11.
28685         * m4/gettext.m4: Upgrade to gettext-0.11.
28686         * m4/glibc21.m4: Upgrade to gettext-0.11.
28687         * m4/iconv.m4: Upgrade to gettext-0.11.
28688         * m4/isc-posix.m4: Upgrade to gettext-0.11.
28689         * m4/lcmessage.m4: Upgrade to gettext-0.11.
28690         * m4/lib-ld.m4: New file, from gettext-0.11.
28691         * m4/lib-link.m4: New file, from gettext-0.11.
28692         * m4/lib-prefix.m4: New file, from gettext-0.11.
28693         * m4/progtest.m4: Upgrade to gettext-0.11.
28694
28695 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28696
28697         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
28698         (jm_PREREQ): Use it.
28699
28700 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28701
28702         * lib/posixver.c, lib/posixver.h: New files.
28703         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28704
28705 2002-02-02  Paul Eggert  <eggert@twinsun.com>
28706             Bruno Haible  <bruno@clisp.org>
28707
28708         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
28709         (fwrite_success_callback): New declaration.
28710         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
28711         print_unicode_char. Call failure callback instead of error.
28712         (fwrite_success_callback): New function.
28713         (exit_failure_callback): New function.
28714         (fallback_failure_callback): New function.
28715         (print_unicode_char): Call unicode_to_mb.
28716
28717 2002-01-26  Jim Meyering  <meyering@lucent.com>
28718
28719         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
28720         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
28721
28722 2002-01-26  Jim Meyering  <meyering@lucent.com>
28723
28724         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
28725
28726 2002-01-22  Paul Eggert  <eggert@twinsun.com>
28727
28728         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
28729
28730 2002-01-22  Jim Meyering  <meyering@lucent.com>
28731
28732         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
28733         Otherwise, some versions of automake would omit the rule that makes
28734         Makefile from Makefile.in.
28735
28736 2002-01-21  Paul Eggert  <eggert@twinsun.com>
28737
28738         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
28739         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28740         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
28741         (memcoll): Set errno to zero if there is no error.
28742
28743         * lib/quotearg.c (quotearg_buffer_restyled):
28744         Fix bug with quoting buffers containing NUL when backslashing escapes.
28745         This bug was exposed by the other changes in this patch.
28746         (quotearg_n_options): New arg ARGSIZE.
28747         All callers changed.
28748         (quoting_options_from_style): New function.
28749         (quotearg_n_style): Use it.
28750         (quotearg_n_style_mem): New function.
28751
28752         * lib/quotearg.h (quotearg_n_style_mem): New function.
28753
28754 2002-01-19  Jim Meyering  <meyering@lucent.com>
28755
28756         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
28757         Remove useless quotes: DF_PROG="df".
28758         * m4/strnlen.m4: New file.
28759
28760 2002-01-16  Paul Eggert  <eggert@twinsun.com>
28761
28762         * lib/backupfile.c (ISDIGIT): Comment fix.
28763         * lib/getdate.y (ISDIGIT): Likewise.
28764         * lib/posixtm.c (ISDIGIT, year): Likewise.
28765         * lib/strverscmp.c (ISDIGIT): Likewise.
28766         * lib/userspec.c (ISDIGIT): Likewise.
28767
28768 2002-01-16  Jim Meyering  <meyering@lucent.com>
28769
28770         * lib/getdate.y: Add three semicolons, each just before a closing
28771         brace. Bison (as of version 1.31) no longer papers over that mistake.
28772
28773 2002-01-05  Jim Meyering  <meyering@lucent.com>
28774
28775         * lib/version-etc.c (version_etc_copyright): Update copyright year.
28776
28777 2001-12-19  Paul Eggert  <eggert@twinsun.com>
28778
28779         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
28780         not silently exit merely because the output buffer happens to
28781         have nothing pending.
28782
28783 2001-12-18  Paul Eggert  <eggert@twinsun.com>
28784
28785         See the big note in ../ChangeLog.
28786         * lib/human.c (suffixes): Prefer K to k for 1024.
28787         (generate_suffix_backwards): New function.
28788         (human_readable_inexact): Use it.
28789         * lib/xstrtol.c (__xstrtol): If there is no number but there
28790         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
28791         Accept 'K' as well as 'k'.
28792
28793 2001-12-15  Jim Meyering  <meyering@lucent.com>
28794
28795         * lib/regex.h (__restrict_arr): Update from libc.
28796
28797         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
28798         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
28799         (STREQ): Define.
28800
28801 2001-12-14  Jim Meyering  <meyering@lucent.com>
28802
28803         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
28804         Suggestion from Bruno Haible.
28805
28806 2001-12-10  Jim Meyering  <meyering@lucent.com>
28807
28808         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
28809         xrealloc, Instead, include "xalloc.h".
28810         (initbuffer): Don't cast xmalloc return value to char*.
28811         (readline): Reword comment.
28812         Don't cast xrealloc return value to char*
28813         Return NULL, not 0.
28814
28815 2001-12-09  Jim Meyering  <meyering@lucent.com>
28816
28817         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
28818         about `signed and unsigned type in conditional expression'.
28819         * lib/posixtm.c (posix_time_parse): Likewise.
28820
28821         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
28822
28823         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
28824         to avoid a pedantic warning.
28825
28826         * lib/getstr.c: Don't include assert.h.
28827         (getstr): Remove warning-evoking assertions.
28828         Return -1 if offset parameter is out of bounds.
28829         Change the type of a local from int to size_t.
28830
28831         * lib/strftime.c (my_strftime_localtime_r): Include this function
28832         definition in the `#if ! HAVE_TM_GMTOFF' block.
28833
28834         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
28835         Include xalloc.h instead.
28836
28837 2001-12-02  Jim Meyering  <meyering@lucent.com>
28838
28839         * lib/tempname.c: Don't declare getenv, thus reverting the change of
28840         2001-11-18.  It's no longer necessary, now that stdlib.h is always
28841         included.
28842
28843         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
28844         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
28845
28846 2001-11-30  Akim Demaille  <akim@epita.fr>
28847
28848         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
28849         before being defined.
28850
28851 2001-11-27  Paul Eggert  <eggert@twinsun.com>
28852
28853         * lib/quotearg.h (quotearg_n, quotearg_n_style):
28854         First arg is int, not unsigned.
28855         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
28856         (SIZE_MAX, UINT_MAX): New macros.
28857         (quotearg_n_options): Abort if N is negative.
28858         Avoid overflow check on hosts where size_t is 64 bits and int
28859         is 32 bits, as overflow is impossible there.
28860         Fix off-by-one typo that caused unnecessary reallocation.
28861
28862 2001-11-27  Jim Meyering  <meyering@lucent.com>
28863
28864         * lib/tempname.c: Merge with version from libc.
28865         * lib/regex.c: Likewise.
28866
28867         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
28868         systems for which STDC_HEADERS is 0, it was not included, resulting in
28869         a warning about an integer-to-pointer conversion problem with getenv.
28870         Reported by Volker Borchert.
28871
28872 2001-11-26  Jim Meyering  <meyering@lucent.com>
28873
28874         * lib/gtod.h: Remove file.
28875         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
28876         * lib/gettimeofday.c: Don't include gtod.h.
28877         (GTOD_init): Remove function.
28878         (rpl_gettimeofday): Do its job here instead, rather than aborting.
28879         Suggestion from Volker Borchert.
28880
28881 2001-11-23  Jim Meyering  <meyering@lucent.com>
28882
28883         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
28884         it.
28885         * lib/hash.c (struct hash_table): Define it here instead.
28886
28887 2001-11-22  Jim Meyering  <meyering@lucent.com>
28888
28889         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
28890
28891 2001-11-20  Jim Meyering  <meyering@lucent.com>
28892
28893         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
28894         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
28895
28896 2001-11-19  Jim Meyering  <meyering@lucent.com>
28897
28898         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
28899         directory.  Use "conftestXXXXXX" as the template.
28900         Suggestion from Paul Eggert.
28901
28902         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
28903         immediately, so the test doesn't mistakenly hit the max-open-files
28904         limit.
28905
28906 2001-11-18  Paul Eggert  <eggert@twinsun.com>
28907
28908         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
28909         (TEMPORARIES): New macro.
28910         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
28911         removes an artificial limitation (e.g. HP-UX 10.20, where
28912         TMP_MAX is 17576).
28913
28914 2001-11-18  Jim Meyering  <meyering@lucent.com>
28915
28916         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
28917
28918 2001-11-18  Jim Meyering  <meyering@lucent.com>
28919
28920         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
28921         on SunOS 4.
28922
28923         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
28924         files will be created before anything else.
28925
28926 2001-11-17  Paul Eggert  <eggert@twinsun.com>
28927
28928         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
28929         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
28930
28931 2001-11-17  Jim Meyering  <meyering@lucent.com>
28932
28933         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
28934         Prompted by a report from Bob Proulx.
28935
28936         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
28937         Instead, require UTILS_FUNC_MKSTEMP.
28938
28939 2001-11-17  Jim Meyering  <meyering@lucent.com>
28940
28941         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
28942         Now, that's done as part of AC_FUNC_STRTOD.
28943
28944 2001-11-17  Jim Meyering  <meyering@lucent.com>
28945
28946         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
28947         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
28948         rather than group writable.  Patch by Juan F. Codagnone.
28949
28950         * lib/readtokens.c: Remove explicit declarations of xmalloc and
28951         xrealloc, Instead, include "xalloc.h".
28952
28953         * lib/mountlist.c: Include unlocked-io.h after all system headers.
28954         Remove explicit declarations of xmalloc, xrealloc,
28955         and xstrdup.  Instead, include "xalloc.h".
28956
28957         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
28958         unlocked-io.h.
28959         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
28960         Likewise.
28961         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
28962
28963         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
28964         Reported by Padraig Brady.
28965
28966         * lib/mkstemp.c: #undef mkstemp.
28967         Include config.h.
28968         (rpl_mkstemp): Rename from mkstemp.
28969         Protoize.
28970
28971 2001-11-16  Jim Meyering  <meyering@lucent.com>
28972
28973         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
28974         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
28975         determine the amount of total physical memory, use pstat_getstatic.
28976         HPUX-11 doesn't define _SC_PHYS_PAGES.
28977         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
28978         If sysconf couldn't be used to determine the amount of available
28979         physical memory, use both pstat_getstatic and pstat_getdynamic.
28980         Based on a patch from Bob Proulx.
28981
28982 2001-11-10  Jim Meyering  <meyering@lucent.com>
28983
28984         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
28985         (jm_PREREQ): Use it.
28986
28987 2001-11-09  Jim Meyering  <meyering@lucent.com>
28988
28989         * m4/jm-macros.m4: Require autoconf-2.52f.
28990         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
28991         Use these AC_-prefixed names, not the AM_-prefixed ones.
28992
28993         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
28994
28995 2001-11-05  Jim Meyering  <meyering@lucent.com>
28996
28997         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
28998
28999 2001-11-04  Jim Meyering  <meyering@lucent.com>
29000
29001         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
29002         $DEFS.
29003
29004 2001-11-03  Jim Meyering  <meyering@lucent.com>
29005
29006         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
29007         of AC_DEFUN.
29008
29009         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
29010         know the name of the variable in the macro definition.
29011
29012 2001-11-03  Jim Meyering  <meyering@lucent.com>
29013
29014         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
29015         in argmatch_to_argument call.
29016
29017         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
29018         argument.
29019
29020         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
29021         e.g., a fault due to an attempt to free a NULL pointer.
29022
29023 2001-11-01  Jim Meyering  <meyering@lucent.com>
29024
29025         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
29026         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
29027
29028 2001-11-01  Jim Meyering  <meyering@lucent.com>
29029
29030         * lib/dirfd.c, lib/dirfd.h: New files.
29031         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
29032
29033         * lib/hash.c (hash_print) [TESTING]: Clean up.
29034
29035 2001-10-22  Paul Eggert  <eggert@twinsun.com>
29036
29037         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
29038         to avoid a warning if -Wall.
29039
29040 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
29041
29042         * README: New file
29043         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
29044         (per RMS's instructions, this is now the canonical source)
29045         * lgpl/, gpl/: New directories.
29046
29047 2001-10-21  Paul Eggert  <eggert@twinsun.com>
29048
29049         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
29050
29051 2001-10-21  Jim Meyering  <meyering@lucent.com>
29052
29053         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
29054         this code would end up calling gettext even in packages built
29055         with --disable-nls.
29056         * lib/getopt.c (_): Likewise.
29057         * lib/regex.c (_): Likewise.
29058
29059 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29060
29061         * m4/error.m4 (jm_PREREQ_ERROR):
29062         Do not invoke AC_CHECK_FUNCS with strerror_r, as
29063         AC_FUNC_STRERROR_R does that.
29064         Check for strerror declaration.
29065
29066         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
29067         are supposed to have them these days.
29068         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
29069         Merge changes from latest Autoconf CVS.
29070         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
29071         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
29072         POSIX decided to standardize on the int flavor of strerror_r.
29073
29074 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29075
29076         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
29077         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
29078         Use strerror_r that is only a macro, even if it is not a function.
29079         (strerror): Check for HAVE_DECL_STRERROR before declaring.
29080         (private_strerror): Use prototypes, not old-style function definition.
29081         (print_errno_message): New function.
29082         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
29083         char*-flavored one.
29084         (error_tail, error, error_at_line): Use it.
29085
29086 2001-10-11  Jim Meyering  <meyering@lucent.com>
29087
29088         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
29089         and quote_n (1, ... to avoid clobbering a buffer.
29090
29091 2001-10-05  Jim Meyering  <meyering@lucent.com>
29092
29093         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
29094         hash-pjw.h.
29095         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
29096         * lib/hash-pjw.h: New file.
29097
29098 2001-09-30  Jim Meyering  <meyering@lucent.com>
29099
29100         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
29101         `struct fsstat' has the `f_fstypename' member.
29102         Use that to define FS_TYPE, which is now used to make
29103         the getfsstat link test tighter.
29104
29105 2001-09-30  Jim Meyering  <meyering@lucent.com>
29106
29107         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
29108         Include <sys/ucred.h>, for Apple Darwin.
29109         Include sys/mount.h and sys/fs_types.h only if available.
29110         (FS_TYPE): Define.
29111         (read_filesystem_list): Use FS_TYPE.
29112
29113 2001-09-29  Paul Eggert  <eggert@twinsun.com>
29114
29115         * lib/exclude.c (excluded_filename): 0 -> false, since it's
29116         a boolean context.
29117
29118 2001-09-29  Jim Meyering  <meyering@lucent.com>
29119
29120         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29121         [one-argument getmntent function]): Include stdio.h before mntent.h.
29122         SunOS 4.1.x needs it for the declaration of `FILE'.
29123         Patch by Volker Borchert.
29124
29125         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29126         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
29127         sys/fs_types.h, and make the link-test for getfsstat guard #include
29128         directives with appropriate #if HAVE_*_H tests so that we can
29129         detect getfsstat on Apple Darwin1.3.7 systems.
29130         Reported by Nelson Beebe.
29131         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
29132
29133 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29134
29135         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29136         #defines strtoimax.  Also treat the other strto* functions
29137         like strtoimax.
29138
29139         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29140         Check for strtoul and strtoumax,
29141         as those declarations are made even in the signed case.
29142         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
29143         Likewise, for strtol and strtoimax.
29144
29145 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29146
29147         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29148         #defines strtoimax.  Also treat the other strto* functions
29149         like strtoimax.
29150
29151         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
29152         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
29153         (strtoimax, strtoumax): Do not declare if already defined as a macro.
29154
29155 2001-09-26  Jim Meyering  <meyering@lucent.com>
29156
29157         Most macros in unlocked-io.h had the wrong number of arguments.
29158         * lib/gen-uio: New script.
29159         (USE_UNLOCKED_IO): Define to 1 if not already defined.
29160         * lib/unlocked-io.hin: Remove file.
29161         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
29162         rather than trying to embed it here.
29163         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
29164         Reported by Padraig Brady.
29165
29166 2001-09-25  Volker Borchert  <bt@teknon.de>
29167
29168         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
29169         `result'.
29170
29171 2001-09-24  Jim Meyering  <meyering@lucent.com>
29172
29173         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
29174
29175 2001-09-23  Jim Meyering  <meyering@lucent.com>
29176
29177         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
29178         instead of the mere test for existence of mntent.h.  The latter
29179         would get a false-positive on AIX 3.4 systems.
29180         In the outer getmntent if-block, don't die if neither of the getmntent
29181         tests succeeds.  Instead, just fall through and continue with the
29182         remaining tests.
29183
29184 2001-09-23  Jim Meyering  <meyering@lucent.com>
29185
29186         * lib/mountlist.c: Remove useless parentheses in #if directives.
29187         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
29188         the deprecated MOUNTED symbol is no longer defined in mntent.h.
29189
29190 2001-09-22  Jim Meyering  <meyering@lucent.com>
29191
29192         * m4/gettext.m4: New file.  From gettext.
29193         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
29194         * m4/progtest.m4: Likewise
29195         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
29196         * m4/glibc21.m4: Likewise.
29197
29198         * m4/libintl.m4: Remove.  No longer used.
29199
29200 2001-09-22  Jim Meyering  <meyering@lucent.com>
29201
29202         * lib/localcharset.c: Update from latest gettext.
29203         * lib/config.charset: Likewise.
29204
29205 2001-09-20  Jim Meyering  <meyering@lucent.com>
29206
29207         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
29208         strtoimax.
29209         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
29210         strtoumax.
29211
29212 2001-09-20  Jim Meyering  <meyering@lucent.com>
29213
29214         * lib/xstrtol.c (strtoimax): Guard declaration with
29215         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
29216         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
29217         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
29218         (strtoumax): Likewise, for completeness (it wasn't necessary).
29219
29220 2001-09-17  Paul Eggert  <eggert@twinsun.com>
29221
29222         * lib/strtoimax.c (HAVE_LONG_LONG):
29223         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
29224         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
29225         to work around bug in IBM C compiler.
29226
29227 2001-09-17  Jim Meyering  <meyering@lucent.com>
29228
29229         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
29230         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
29231         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
29232         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
29233         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
29234         whenever the right hand side need not be expanded by the shell.
29235
29236 2001-09-16  Paul Eggert  <eggert@twinsun.com>
29237
29238         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
29239         library.  It's not correct, as some older glibcs are buggy.
29240         fnmatch wasn't fixed until glibc 2.2.
29241
29242         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
29243         special shell magic here.
29244
29245 2001-09-16  Jim Meyering  <meyering@lucent.com>
29246
29247         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
29248         * m4/jm-macros.m4: Require it.
29249
29250 2001-09-16  Jim Meyering  <meyering@lucent.com>
29251
29252         * lib/mkdir.c: New file.
29253
29254 2001-09-15  Jim Meyering  <meyering@lucent.com>
29255
29256         * m4/jm-macros.m4: Check for help2man.
29257
29258 2001-09-11  Jim Meyering  <meyering@lucent.com>
29259
29260         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
29261         The body, by Paul Eggert, was moved here from configure.in.
29262         * m4/jm-macros.m4: Require UTILS_HOST_OS.
29263
29264 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29265
29266         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
29267         (jm_PREREQ): Use it.
29268
29269 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29270
29271         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
29272         Use ssize_t, not int, to store result of readlink.
29273         Check for ssize_t overflow as well as size_t overflow,
29274         as POSIX says the result of readlink is implementation-defined
29275         when ssize_t overflows.
29276         Remove unnecessary cast to char*.
29277         Use free+malloc instead of realloc, as the storage doesn't need
29278         to be preserved and it's clearer and can be more efficient that way.
29279         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
29280         * lib/xreadlink.h (xreadlink): Update prototype.
29281
29282 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29283
29284         * lib/xgetcwd.c: Revert some of the previous change; intead,
29285         fix the HAVE_GETCWD_NULL code to behave more like the
29286         !HAVE_GETCWD_NULL code used to.
29287
29288         Include "xalloc.h".
29289         (xgetcwd): Do not return NULL when memory is exhausted; instead,
29290         invoke xalloc_die.
29291
29292 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29293
29294         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
29295         sys/param.h, as pathmax.h includes them.
29296
29297 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29298
29299         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
29300         (jm_PREREQ_XGETCWD): New macro.
29301
29302         * m4/getcwd.m4: New file.
29303
29304 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29305
29306         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
29307         like the HAVE_GETCWD_NULL code.
29308         Include pathmax.h if not HAVE_GETCWD.
29309         Do not include xalloc.h.
29310         (INITIAL_BUFFER_SIZE): New symbol.
29311         Do not use xmalloc / xrealloc, since the caller is responsible for
29312         handling errors.  Preserve errno around `free' during failure.
29313         Do not overrun buffer when using getwd.
29314
29315 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29316
29317         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
29318         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
29319         getcwd (NULL, 0).
29320
29321 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29322
29323         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
29324         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
29325         spotted by Jim Meyering.
29326
29327 2001-09-03  Jim Meyering  <meyering@lucent.com>
29328
29329         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
29330         failure.
29331
29332 2001-09-02  Jim Meyering  <meyering@lucent.com>
29333
29334         * lib/error.c: Update from GNU libc.
29335
29336 2001-09-01  Jim Meyering  <meyering@lucent.com>
29337
29338         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
29339         Used by df.
29340
29341 2001-09-01  Jim Meyering  <meyering@lucent.com>
29342
29343         * lib/xreadlink.c: New file.
29344         * lib/xreadlink.h: New file.
29345         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
29346         xreadlink.h.
29347
29348         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
29349         doesn't conflict with sparc Solaris 7's definition in
29350         /usr/include/sys/int_types.h.
29351
29352         * lib/exclude.c: Use `""', not `<>' to #include non-system header
29353         files.
29354         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
29355         and strncasecmp as r-values.  Unixware didn't have declarations.
29356
29357 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29358
29359         * lib/xstrtol.h: Add copyright notice.
29360         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
29361         LONGINT_INVALID_SUFFIX_CHAR.
29362
29363 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29364
29365         * lib/xstrtol.c (strtoimax): New decl.
29366
29367 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29368
29369         * lib/xgetcwd.c: Don't include pathmax.h.
29370         Include stdlib.h and unistd.h if available.
29371         Include xalloc.h.
29372         (xmalloc, xstrdup, free): Remove decls.
29373         (xgetcwd): Don't assume sizes fit in unsigned.
29374         Check for overflow when computing sizes.
29375         Simplify reallocation code.
29376
29377 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29378
29379         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
29380         a directory's st_size can have an arbitrary value, so the old
29381         usage could waste an arbitrary amount of memory.  All uses
29382         changed.
29383         * lib/savedir.h: Update prototype.
29384
29385 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29386
29387         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
29388
29389         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
29390         old strtoimax.c.
29391
29392         Also, make the following further changes to make this file's
29393         configuration more similar to that of strtol.c:
29394         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
29395         (strtoumax, uintmax_t, strtoull, strtol): Remove.
29396         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
29397         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
29398         changed to signed values.
29399
29400         And make the following changes as well:
29401         Fix copyright notice, as 1999 was missing.
29402         (verify): New macro.
29403         (strtoimax): Check sizes at compile-time, not run-time.
29404         Prefer strtol to strtoll if both work.
29405         (main): Remove; it was not that useful and was a pain to maintain.
29406
29407         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
29408
29409 2001-08-31  Jim Meyering  <meyering@lucent.com>
29410
29411         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
29412         Use an initial, malloc'd, buffer of length 128 rather than
29413         a statically allocated one of length 1024.
29414
29415 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29416
29417         Simplify code, partly by assuming autoconf 2.52 semantics.
29418
29419         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
29420
29421         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
29422         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
29423         All uses removed.
29424         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
29425         Move AC_REQUIRE to next-to-top level, to avoid confusion.
29426         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
29427         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
29428         jm_AC_HEADER_INTTYPES_H.
29429         * m4/jm-macros.m4 (jm_MACROS): Likewise.
29430
29431         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
29432
29433         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29434         Quote first arg of AC_DEFUN.
29435         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
29436         since they are needed to parse the include file even if we need
29437         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
29438         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
29439         but with opposite signedness.
29440
29441 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29442
29443         Merge 'exclude' changes from tar 1.13.22.
29444         This fixes one or two unlikely storage allocation overflow bugs,
29445         but doesn't change user-visible behavior otherwise.
29446
29447 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29448
29449         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
29450         (jm_PREREQ_EXCLUDE): New macro.
29451
29452 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29453
29454         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
29455         tm to be declared.
29456
29457 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29458
29459         * lib/hash.c: Remove '2001' from copyright notice.
29460
29461 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29462
29463         * lib/full-write.h: New file.
29464         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
29465         * lib/full-write.c: Correct credits, as cccp.c no longer
29466         exists and anyway it was so heavily changed from the old cccp
29467         code as to be unrecognizable.  Include full-write.h.
29468         (full_write) Return size_t, with short writes meaning failure.
29469         All callers changed.  This fixes a bug with large buffers
29470         on 64-bit hosts.
29471         * lib/utime.c: Include full-write.h.
29472
29473 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29474
29475         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
29476         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
29477         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
29478         Include if available.
29479         (<xalloc.h>): Include
29480         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
29481         (verify): New macro.  Use it to verify that EXCLUDE macros do not
29482         collide with FNM macros.
29483         (struct patopts): New struct.
29484         (struct exclude): Use it, as exclude patterns now come with options.
29485         (new_exclude): Support above changes.
29486         (new_exclude, add_exclude_file):
29487         Initial size must now be a power of two to simplify overflow checking.
29488         (free_exclude, fnmatch_no_wildcards): New function.
29489         (excluded_filename): No longer requires options arg, as the options
29490         are determined by add_exclude.  Now returns bool, not int.
29491         (excluded_filename, add_exclude):
29492         Add support for the fancy new exclusion options.
29493         (add_exclude, add_exclude_file): Now takes int options arg.
29494         Check for arithmetic overflow when computing sizes.
29495         (add_exclude_file): xrealloc might modify errno, so don't
29496         realloc until after errno might be used.
29497
29498         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
29499         New macros.
29500         (free_exclude): New decl.
29501         (add_exclude, add_exclude_file): Now takes int options arg.
29502         (excluded_filename): No longer requires options arg, as the options
29503         are determined by add_exclude.  Now returns bool, not int.
29504
29505 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29506
29507         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
29508
29509 2001-08-27  Jim Meyering  <meyering@lucent.com>
29510
29511         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
29512
29513         * lib/version-etc.c (N_): Remove definition.
29514         Revert most of last change.
29515         Instead, simply don't mark the `Copyright...' string for translation.
29516         Based on advice from Paul Eggert.
29517
29518         * lib/strtoxmax.c: Tweak comment.
29519
29520 2001-08-26  Jim Meyering  <meyering@lucent.com>
29521
29522         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
29523
29524         * m4/xstrtoimax.m4: New file.
29525         * m4/xstrtoumax.m4: Add comments explaining why we
29526         AC_REPLACE_FUNCS(strtol).
29527
29528 2001-08-26  Jim Meyering  <meyering@lucent.com>
29529
29530         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
29531         of copyright with `%s' so translators don't get an untranslated
29532         message in 2002.
29533         (COPYRIGHT_YEAR): Define.
29534         (version_etc): Use fprintf rather than fputs.
29535         Suggestion from Ulrich Drepper.
29536
29537         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
29538
29539         * lib/strtoll.c: New file, from GNU libc.
29540         * lib/xstrtoimax.c: New file.
29541
29542         * lib/xstrtol.h: Add xstrtoimax.
29543         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
29544         * lib/strtoimax.c: New file.  Likewise, but first define
29545         STRTOUXMAX_SIGNED.
29546
29547         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
29548         ...
29549         * lib/strtoxmax.c: ... then renamed to this.
29550
29551 2001-08-18  Paul Eggert  <eggert@twinsun.com>
29552
29553         * m4/inttypes.m4: Add AC_PREREQ(2.13).
29554         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
29555         (jm_AC_TYPE_INTMAX_T): New macro.
29556         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
29557
29558         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
29559
29560         * m4/longlong.m4: Renamed from ulonglong.m4.
29561         * m4/inttypes.m4: Renamed from inttypes_h.m4.
29562         * m4/uintmax_t.m4: Removed.
29563
29564 2001-08-13  Paul Eggert  <eggert@twinsun.com>
29565
29566         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
29567         Port to Solaris 8, where 'sed' requires a space after the 'r'
29568         command, and where sh dislikes "$/".  Clean up the spacing a bit.
29569         Redirect output to $tmp just once.
29570
29571 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
29572
29573         * lib/addext.c (<errno.h>): Include.
29574         (errno): Declare if not defined.
29575         (addext): Work correctly when pathconf returns -1 and leaves
29576         errno alone because there is no limit.  Also, work even if
29577         pathconf returns a value greater than SIZE_MAX.
29578
29579 2001-08-12  Jim Meyering  <meyering@lucent.com>
29580
29581         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
29582         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
29583         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
29584         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
29585         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
29586         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
29587         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
29588         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
29589         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
29590         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
29591         utime.m4, utimes.m4, xstrtoumax.m4:
29592         Quote the first argument in each use of AC_DEFUN.
29593
29594 2001-08-12  Jim Meyering  <meyering@lucent.com>
29595
29596         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
29597         Simply `return getcwd (NULL, 0);'.
29598         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
29599         Use 1300 as initial value for length, not PATH_MAX.
29600
29601         * lib/pathmax.h: Clean up cpp syntax.
29602
29603 2001-08-12  Jim Meyering  <meyering@lucent.com>
29604
29605         * lib/gettimeofday.c: New file.
29606         * lib/gtod.h: New file.
29607         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
29608
29609 2001-08-05  Jim Meyering  <meyering@lucent.com>
29610
29611         * m4/jm-macros.m4: Require autoconf-2.52.
29612
29613 2001-08-04  Jim Meyering  <meyering@lucent.com>
29614
29615         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
29616         stmt, to get in sync with glibc.
29617
29618 2001-08-03  Paul Eggert  <eggert@twinsun.com>
29619
29620         The following changes are from gettext 0.10.39 as maintained by
29621         Bruno Haible.
29622
29623         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
29624         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
29625         with inverted sense.  All uses changed.
29626
29627         * lib/mbswidth.c: Don't include <limits.h>.
29628         Include <stdlib.h> and <string.h> unconditionally.
29629         (iswcntrl, mbsinit, ISCNTRL): New macros.
29630         (mbsnwidth): Use K&R style function declarations.
29631         Don't bother checking for MB_LEN_MAX == 1, since the compiler
29632         can optimize it when MB_CUR_MAX == 1.
29633         The width of control characters is zero, not 1.
29634
29635 2001-08-03  Paul Eggert  <eggert@twinsun.com>
29636
29637         The following changes are from gettext 0.10.39 as maintained by
29638         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
29639
29640         * m4/codeset.m4: Upgrade to serial AM1.
29641         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
29642         all uses changed.  Quote first arg of AC_DEFUN.
29643         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
29644
29645         * m4/iconv.m4: Upgrade to serial AM2.
29646         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
29647         Add --with-libconv-prefix.
29648         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
29649         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
29650         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
29651         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
29652         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
29653
29654         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
29655         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
29656         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
29657         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
29658         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
29659         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
29660         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
29661         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
29662         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
29663
29664         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
29665         string.h any more.
29666
29667         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
29668         not the default value.
29669
29670         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
29671         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
29672         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
29673         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
29674         Also check for iswcntrl, used for wcwidth fallback.
29675         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
29676         to Autoconf 2.13.
29677
29678 2001-08-03  Jim Meyering  <meyering@lucent.com>
29679
29680         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
29681         as it was in the original.  Reported by Paul Eggert.
29682
29683 2001-07-16  Jim Meyering  <meyering@lucent.com>
29684
29685         * m4/gettimeofday.m4: New file.
29686         Prompted by a report from Bernhard Baehr.
29687
29688 2001-07-15  Jim Meyering  <meyering@lucent.com>
29689
29690         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
29691         stuff. Now it's in ../Makefile.cfg.
29692
29693 2001-07-15  Jim Meyering  <meyering@lucent.com>
29694
29695         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
29696         (BUILT_SOURCES): Add unlocked-io.h.
29697         (io_functions): Define.
29698         (unlocked-io.h): New rule.
29699         (DISTCLEANFILES): Add unlocked-io.h.
29700         (all-local): Depend on unlocked-io.h, to ensure it is created.
29701
29702         * lib/unlocked-io.hin: New file
29703
29704         * lib/regex.c: Update from glibc.
29705
29706 2001-07-05  Jim Meyering  <meyering@lucent.com>
29707
29708         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
29709         recommendation.
29710         (libfetish_a_SOURCES): Put all .h files here instead.
29711         Remove a thus-exposed (better checks in automake) duplicate and
29712         two unnecessary .h files.
29713
29714 2001-07-04  Jim Meyering  <meyering@lucent.com>
29715
29716         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
29717         that generates jm-glibc-io.m4 so that it doesn't trigger any make
29718         distcheck failure.
29719
29720 2001-07-02  Jim Meyering  <meyering@lucent.com>
29721
29722         The following changes were prompted by suggestions from Bruno Haible.
29723
29724         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
29725         is now generated.
29726         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
29727         definition of EXTRA_DIST.
29728         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
29729         ensure that the generated file is created/updated whenever the list
29730         of $(unlocked_functions) is changed.
29731         (jm-glibc-io.m4): New rule.
29732         (unlocked-io.h): New rule -- currently unused.
29733
29734 2001-06-24  Jim Meyering  <meyering@lucent.com>
29735
29736         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
29737         unmatched right bracket, rather than kludging it with an extra,
29738         falsely-matching quote in a comment.  Patch by Akim Demaille.
29739
29740 2001-06-11  Jim Meyering  <meyering@lucent.com>
29741
29742         * lib/regex.c: Update from GNU libc.
29743
29744 2001-05-27  Jim Meyering  <meyering@lucent.com>
29745
29746         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
29747         Check for ut_type in struct utmp.
29748
29749 2001-05-27  Jim Meyering  <meyering@lucent.com>
29750
29751         * lib/readutmp.h (UT_TYPE): Define.
29752
29753 2001-05-24  Jim Meyering  <meyering@lucent.com>
29754
29755         * lib/argmatch.c: Include "quote.h".
29756         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
29757         quote function.  Reported by Göran Uddeborg.
29758
29759 2001-05-22  Jim Meyering  <meyering@lucent.com>
29760
29761         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
29762         now that we use the package-supplied version unconditionally.
29763         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
29764
29765 2001-05-21  Jim Meyering  <meyering@lucent.com>
29766
29767         * m4/regex.m4: Change a couple backticks to single quotes to avoid
29768         shell syntax errors.
29769
29770 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29771
29772         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
29773
29774 2001-05-20  Paul Eggert  <eggert@twinsun.com>
29775
29776         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
29777         Don't bother to check library strftime, since
29778         we'll be using our own my_strftime function anyway.
29779         Define my_strftime instead of strftime.
29780
29781 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
29782
29783         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
29784         which is not yet declared.
29785
29786 2001-05-15  Jim Meyering  <meyering@lucent.com>
29787
29788         * m4/regex.m4: Use proper quoting so brackets appear in the test
29789         program.
29790         Reported by, and with help from, Bruno Haible.
29791
29792 2001-05-13  Jim Meyering  <meyering@lucent.com>
29793
29794         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
29795         undefined.
29796
29797 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29798
29799         dirname code cleanup.  base_name now behaves more compatibly
29800         with POSIX basename when given file names that have trailing
29801         slashes, and similarly for dir_name.  Add new primitives
29802         base_len and dir_len.  Put the directory-name-related decls
29803         into dirname.h.
29804
29805         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
29806         * lib/backupfile.c (base_name): Likewise.
29807         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
29808         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
29809         * lib/makepath.c (strip_trailing_slashes): Likewise.
29810         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
29811         ISSLASH): Likewise.
29812         * lib/rename.c (strip_trailing_slashes): Likewise.
29813         * lib/same.c (base_name): Likewise.
29814         * lib/stripslash.c (ISSLASH): Likewise.
29815
29816         * lib/addext.c: Include <dirname.h> after size_t is defined.
29817         * lib/backupfile.c: Likewise.
29818
29819         * lib/addext.c (addext): Use base_len to trim redundant
29820         trailing slashes instead of doing it ourselves.
29821         But do not trim the last slash if it is not redundant.
29822
29823         * lib/backupfile.c (find_backup_file_name,
29824         max_backup_version): Use base_len instead of rolling it ourselves.
29825         Handle the case of "" and (on DOS) "C:" correctly.
29826
29827         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
29828         needed. Include <string.h>, <dirname.h>.
29829         (base_name): Allow file names ending in slashes, other than names
29830         that are all slashes.  In this case, return the basename followed
29831         by the slashes.  This is more general, and can be used in places
29832         where the original base_name purposely had an assertion failure.
29833         (base_len): New function.
29834
29835         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
29836         Do not include <assert.h>; no longer needed.
29837         Include xalloc.h.
29838         (memrchr): Remove decl.
29839         (dir_name_r): Remove.
29840         (dir_len): Renamed from dirlen.  All callers changed.
29841         Rewrite in terms of base_name, for simplicity and consistency.
29842         (dir_name): Never return NULL.  All callers changed.
29843         Do not include <stdlib.h> in test program; no longer needed.
29844         return 0; is fine for test program.
29845
29846         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
29847         New macros.
29848         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
29849
29850         * lib/path-concat.c (path_concat): Use base_len to compute
29851         base length, not strlen; this means we cannot rely on memcpy
29852         to null-terminate.
29853
29854         * lib/same.c (STREQ): Remove.
29855         (same_name): Handle the case where the basename ends in trailing '/'.
29856
29857         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
29858         a slash was stripped.  Do not strip the last slash after a
29859         file system prefix.
29860
29861 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29862
29863         * lib/Makefile.am (libfetish_a_SOURCES):
29864         Add strftime.c, since we now compile it on all hosts.
29865
29866         * lib/strftime.c (my_strftime):
29867         Define to nstrftime if emacs, but only if my_strftime is not defined.
29868         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
29869         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
29870         Add one more extra argument: a nanoseconds value.
29871         All uses changed.
29872         (ns): New macro.
29873         (my_strftime function): Add %N format.
29874         (emacs_strftimeu): Renamed from emacs_strftime,
29875         with extra ut argument.
29876
29877 2001-05-09  Paul Eggert  <eggert@twinsun.com>
29878
29879         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
29880
29881 2001-04-21  Jim Meyering  <meyering@lucent.com>
29882
29883         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
29884         doesn't interfere.
29885
29886 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29887
29888         * m4/ftruncate.m4: Check for chsize.
29889         Link with ftruncate.o unconditionally if ftruncate is missing.
29890         This was required when cross-compiling to i586-mingw32msvc.
29891
29892 2001-04-08  Jim Meyering  <meyering@lucent.com>
29893
29894         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
29895         recomputed; that's necessary when the offset spans a DST transition.
29896         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
29897
29898 2001-04-02  Jim Meyering  <meyering@lucent.com>
29899
29900         * lib/regex.h, regex.c: Update from GNU libc.
29901
29902 2001-03-24  Jim Meyering  <meyering@lucent.com>
29903
29904         * m4/jm-macros.m4: Require autoconf-2.49d.
29905
29906 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
29907
29908         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
29909
29910 2001-03-19  Paul Eggert  <eggert@twinsun.com>
29911
29912         * lib/version-etc.c (version_etc_copyright): Update to 2001.
29913
29914 2001-03-17  Jim Meyering  <meyering@lucent.com>
29915
29916         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
29917         now that the version in autoconf is equivalent.
29918         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
29919
29920         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
29921         Suggestion from Akim Demaille.
29922
29923         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
29924         (jm_PREREQ_TEMPNAME): New function.
29925
29926 2001-03-16  Paul Eggert  <eggert@twinsun.com>
29927
29928         * lib/tempname.c (uint64_t): Define to uintmax_t if
29929         not defined, and if UINT64_MAX is not defined.
29930         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
29931         Reported by John David Anglin.
29932
29933 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
29934
29935         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
29936         resolve alias if codeset is empty.
29937         * lib/config.charset (BeOS): Use wildcard syntax.
29938
29939 2001-03-13  Jim Meyering  <meyering@lucent.com>
29940
29941         * lib/path-concat.c (path_concat)
29942         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
29943         concatenating e.g., `C:' and `foo'.
29944         From Bruno Haible.
29945
29946 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29947
29948         * lib/localcharset.c (locale_charset): Don't use
29949         setlocale(LC_CTYPE,NULL). Don't return NULL.
29950         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
29951
29952 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29953
29954         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
29955         support for DOS/DJGPP.
29956
29957 2001-03-01  Paul Eggert  <eggert@twinsun.com>
29958
29959         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
29960         lacks mkstemp.  Compile our own tempname.c if we compile our own
29961         mkstemp.c, as mkstemp relies on tempname.
29962
29963 2001-03-01  Jim Meyering  <meyering@lucent.com>
29964
29965         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
29966         AH_VERBATIM really does output its argument verbatim.
29967
29968 2001-02-28  Paul Eggert  <eggert@twinsun.com>
29969
29970         * lib/Makefile.am (libfetish_a_SOURCES):
29971         Add dup-safer.c, fopen-safer.c.
29972         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
29973
29974         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
29975         * lib/unistd-safer.h: New files.
29976
29977 2001-02-25  Paul Eggert  <eggert@twinsun.com>
29978
29979         The mkstemp replacement is taken from glibc 2.2.2, with some
29980         portability fixes for use outside glibc, as follows:
29981
29982         * lib/tempname.c (struct_stat64): New macro.
29983         (direxists, __gen_tempname): Use it.
29984         This avoids a portability problem with Solaris 8.
29985
29986         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
29987         (<stddef.h>, <stdint.h>, <string.h>):
29988         Include only if STDC_HEADERS || _LIBC.
29989         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
29990         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
29991         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
29992         (__set_errno): Define this macro if <errno.h> doesn't.
29993         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
29994         Define these macros if <stdio.h> doesn't.
29995         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
29996         Define these macros if <sys/stat.h>
29997         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
29998         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
29999         __xstat64): Define if not _LIBC.
30000         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
30001         (__gen_tempname): Invoke gettimeofday only if
30002         HAVE_GETTIMEOFDAY || _LIBC;
30003         otherwise, fall back on plain "time".
30004         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
30005
30006         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
30007
30008         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
30009
30010 2001-02-18  Paul Eggert  <eggert@twinsun.com>
30011
30012         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
30013
30014 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30015
30016         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
30017         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
30018         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
30019         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
30020
30021 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30022
30023         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
30024         Remove workaround macros for hosts that have mbrtowc but not
30025         mbstate_t, as we now insist on proper declarations for both
30026         before using mbrtowc.
30027
30028 2001-02-17  Jim Meyering  <meyering@lucent.com>
30029
30030         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
30031         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
30032         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
30033         UnixWare 7.1.1.
30034
30035         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
30036         rather than AC_CACHE_VAL.
30037
30038 2001-02-17  Jim Meyering  <meyering@lucent.com>
30039
30040         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
30041         around included file name.
30042
30043         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
30044
30045         * lib/strftime.c: Update from GNU libc (the only changes were to
30046         comments).
30047
30048 2001-02-17  Jim Meyering  <meyering@lucent.com>
30049
30050         * lib/regex.c: Update from libc.
30051
30052 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
30053
30054         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
30055         clash.
30056
30057 2001-02-16  Paul Eggert  <eggert@twinsun.com>
30058
30059         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
30060         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
30061         Reported by Mark Hounschell via Paul Eggert.
30062
30063 2001-02-07  Jim Meyering  <meyering@lucent.com>
30064
30065         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
30066
30067 2001-02-05  Jim Meyering  <meyering@lucent.com>
30068
30069         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
30070         it includes the patch required for `large file' support with at least
30071         HP-UX's 10.20 /bin/cc.
30072
30073 2001-02-03  Jim Meyering  <meyering@lucent.com>
30074
30075         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
30076         AS_IF, now that it works once again (mysteriously).
30077         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30078
30079 2001-01-30  Jim Meyering  <meyering@lucent.com>
30080
30081         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
30082         * m4/chown.m4: Rename conftestchown to conftest.chown.
30083         * m4/rename.m4: s/conftestdir/conftest.d1/ and
30084         s/conftestdir2/conftest.d2/.
30085         * m4/utimes.m4: s/conftestdata/conftest.data/
30086         Inspired by Pavel Roskin's change in autoconf.
30087
30088 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
30089
30090         * lib/config.charset: Update for FreeBSD 4.2.
30091
30092 2001-01-27  Jim Meyering  <meyering@lucent.com>
30093
30094         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
30095         a use of AS_IF.
30096         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30097
30098 2001-01-26  Jim Meyering  <meyering@lucent.com>
30099
30100         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
30101         quotearg.c includes it.
30102
30103 2001-01-26  Jim Meyering  <meyering@lucent.com>
30104
30105         * lib/quotearg.c: Include stddef.h.
30106         * lib/quote.c: Include stddef.h.
30107         Reported by Axel Kittenberger.
30108
30109         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
30110         line in double quotes so that it evokes a better diagnostic.
30111         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
30112         Reported by Axel Kittenberger.
30113
30114 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
30115
30116         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
30117         as if it was a `charset'.
30118
30119 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30120
30121         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
30122         has const.
30123
30124 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30125
30126         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
30127         to avoid a warning.  Add back 'const' to inptr.
30128
30129 2001-01-20  Jim Meyering  <meyering@lucent.com>
30130
30131         Be sure that headers are checked before used in code compiled
30132         for the type checks.
30133         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
30134         In place of that, invoke jm_CHECK_ALL_TYPES.
30135         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
30136         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
30137         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
30138         The check for ssize_t was mistakenly run before the test for unistd.h.
30139
30140         The configure-time check for stdbool.h was missing.
30141         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
30142         (jm_PREREQ_HASH): New function.
30143
30144 2001-01-17  Jim Meyering  <meyering@lucent.com>
30145
30146         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
30147         for autoconf-2.49c.
30148         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
30149
30150 2001-01-16  Jim Meyering  <meyering@lucent.com>
30151
30152         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
30153         From Bruno Haible.
30154
30155 2001-01-14  Jim Meyering  <meyering@lucent.com>
30156
30157         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
30158         foo and bar.  Create conftestdir/ in the script, not in the C code.
30159         Remove directories in the script, not in the C code.
30160         Remove conftestdir{,2} before trying to create the directory.
30161         Make the entire configure script fail if the mkdir fails.
30162
30163 2001-01-14  Jim Meyering  <meyering@lucent.com>
30164
30165         * lib/rename.c: New file.  From Volker Borchert.
30166         Include stdlib.h, string.h or strings.h, and xalloc.h.
30167         Use strip_trailing_slashes rather than open-coding it.
30168
30169 2001-01-03  Paul Eggert  <eggert@twinsun.com>
30170
30171         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
30172
30173 2001-01-03  Jim Meyering  <meyering@lucent.com>
30174
30175         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
30176         of local `inptr' to avoid warning with some system declarations of
30177         iconv.
30178
30179 2001-01-02  Volker Borchert  <bt@teknon.de>
30180
30181         * m4/rename.m4: New file.
30182         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
30183
30184 2001-01-01  Jim Meyering  <meyering@lucent.com>
30185
30186         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
30187         even on systems with utmpx.h.  It's necessary for the declaration of
30188         utmp's ut_user member.  Reported by Andreas Jaeger.
30189
30190         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
30191         available. They are required for the declarations of getgrgid and
30192         getpwuid resp.
30193         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
30194         Reported by Andreas Jaeger.
30195
30196 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
30197
30198         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
30199         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
30200         so `make install' also works in VPATH builds.
30201
30202 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
30203
30204         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
30205         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
30206         can be used in subdirectories.
30207
30208 2000-12-29  Paul Eggert  <eggert@twinsun.com>
30209
30210         * lib/modechange.c: Do not assume that mode_t uses the
30211         traditional octal encoding.  E.g. "chmod 1 FOO" should set
30212         the other-execute bit of FOO even if S_IXOTH != 1.
30213
30214         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
30215         WOTH, XOTH, ALLM): New macros.
30216         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
30217          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
30218         Use them.
30219         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
30220         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
30221         (mode_compile):
30222         No need to use uintmax_t; unsigned long is long enough.
30223         Don't bother to get suffix since we don't use it.
30224
30225 2000-12-26  Jim Meyering  <meyering@lucent.com>
30226
30227         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
30228         better with autoheader.
30229
30230 2000-12-24  Jim Meyering  <meyering@lucent.com>
30231
30232         * lib/hash.c (is_prime): Return explicit boolean values.
30233         (hash_get_first): Return NULL to appease Irix5.6's 89.
30234         Reported by Nelson Beebe.
30235
30236 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
30237
30238         * lib/localcharset.c (locale_charset): Add support for Win32.
30239
30240 2000-12-18  Paul Eggert  <eggert@twinsun.com>
30241
30242         * lib/physmem.h, lib/physmem.c: New files.
30243
30244         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
30245         (noinst_HEADERS): Add physmem.h.
30246
30247         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
30248         't' for compatibility with Solaris 8 sort.
30249
30250 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
30251
30252         * lib/config.charset: Add support for BeOS.
30253
30254 2000-12-17  Jim Meyering  <meyering@lucent.com>
30255
30256         * m4/dos.m4 (jm_AC_DOS): New file and macro.
30257         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
30258
30259 2000-12-16  Jim Meyering  <meyering@lucent.com>
30260
30261         This bug had a serious impact on chown: `chown N:M FILE' (for integer
30262         N and M) would have treated it like `chown N:N FILE'.
30263
30264         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
30265
30266 2000-12-16  Jim Meyering  <meyering@lucent.com>
30267
30268         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
30269         SHELLS_FILE to a file name that's useful on djgpp systems.
30270         Include stdlib.h.
30271         (ADDITIONAL_DEFAULT_SHELLS): Define.
30272         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
30273         Based mostly on a patch from Prashant TR.
30274
30275 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
30276
30277         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
30278         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
30279         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
30280
30281 2000-12-08  Andreas Schwab  <schwab@suse.de>
30282
30283         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
30284         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
30285
30286 2000-12-07  Jim Meyering  <meyering@lucent.com>
30287
30288         * lib/stripslash.c (ISSLASH): Define.
30289         (strip_trailing_slashes): Use ISSLASH rather than comparing against
30290         `/'.
30291         From Prashant TR.
30292
30293         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
30294         (dir_name_r): Declare this function as static.
30295         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
30296         manifest itself on a name containing a mix of slashes and
30297         backslashes.
30298         Make this function work with names starting with a DOS-style
30299         drive letter and colon prefix.
30300         (dir_name): Append `.' if necessary.
30301         Based mostly on patches from Prashant TR and Eli Zaretskii.
30302
30303         * lib/dirname.h (dir_name_r): Remove prototype.
30304
30305 2000-12-06  Paul Eggert  <eggert@twinsun.com>
30306
30307         * m4/off_t-format.m4: Remove this file.
30308         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
30309
30310 2000-12-06  Jim Meyering  <meyering@lucent.com>
30311
30312         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
30313         replacement strtoull, we may well need the replacement strtoul, too.
30314         Check for declarations of strtoul and strtoull.
30315         Check for strtol.  Mainly as a cue to cause automake to include
30316         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
30317         Check for limits.h -- strtol.c needs it.
30318
30319 2000-12-05  Jim Meyering  <meyering@lucent.com>
30320
30321         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
30322
30323 2000-12-04  Jim Meyering  <meyering@lucent.com>
30324
30325         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
30326         Also include memory.h, stdlib.h, unistd.h if appropriate.
30327         Reported by Andreas Jaeger (conflicting declaration of malloc).
30328
30329 2000-12-02  Jim Meyering  <meyering@lucent.com>
30330
30331         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
30332         * m4/jm-macros.m4 (jm_MACROS): require it.
30333
30334 2000-12-02  Jim Meyering  <meyering@lucent.com>
30335
30336         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
30337
30338 2000-12-01  Paul Eggert  <eggert@twinsun.com>
30339
30340         * lib/memrchr.c: Include <config.h> before any system include file.
30341
30342 2000-11-30  Jim Meyering  <meyering@lucent.com>
30343
30344         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
30345
30346 2000-11-30  Jim Meyering  <meyering@lucent.com>
30347
30348         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
30349
30350 2000-11-29  Paul Eggert  <eggert@twinsun.com>
30351
30352         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
30353
30354 2000-11-26  Jim Meyering  <meyering@lucent.com>
30355
30356         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
30357
30358 2000-11-22  Paul Eggert  <eggert@twinsun.com>
30359
30360         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
30361         size of (size_t) -1; it's not portable.
30362
30363 2000-11-17  Jim Meyering  <meyering@lucent.com>
30364
30365         * lib/strstr.c: Update from GNU libc.
30366
30367 2000-11-17  Akim Demaille  <akim@epita.fr>
30368
30369         * lib/obstack.h: Formatting changes.
30370         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
30371         prevent type checking.
30372         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
30373         cast the value to (void *): assigning a `foo *' to a `void *'
30374         variable is valid.
30375         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
30376
30377 2000-11-16  Jim Meyering  <meyering@lucent.com>
30378
30379         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
30380
30381 2000-11-11  Jim Meyering  <meyering@lucent.com>
30382
30383         * lib/error.c: Add a couple #includes, merging from GNU libc version.
30384
30385 2000-11-10  Jim Meyering  <meyering@lucent.com>
30386
30387         * lib/obstack.h: Update from GNU libc.
30388         * lib/obstack.c: Likewise.
30389
30390 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
30391
30392         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
30393
30394 2000-11-06  Paul Eggert  <eggert@twinsun.com>
30395
30396         * lib/getusershell.c (setusershell): Use rewind rather than
30397         fseek/fseeko, to avoid configuration hassles with fseeko.
30398         Don't bother opening SHELLS_FILE if shellstream is NULL;
30399         it's not necessary.
30400
30401 2000-11-05  Jim Meyering  <meyering@lucent.com>
30402
30403         * lib/makepath.h (make_dir): Declare.
30404         * lib/makepath.c (make_dir): Remove `static' attribute.
30405         Tweak a comment.
30406
30407 2000-11-04  Jim Meyering  <meyering@lucent.com>
30408
30409         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
30410
30411 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
30412
30413         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
30414         last one in a bucket, advance to the next bucket.
30415
30416 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
30417
30418         * lib/fnmatch.c: Do not comment out all the code if we are using
30419         the GNU C library, because in some cases we are replacing buggy
30420         code in the GNU C library itself.
30421
30422 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
30423
30424         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
30425         (regex_compile): Catch bogus \(\1\).
30426
30427 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30428
30429         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
30430         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
30431         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
30432
30433 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30434
30435         * lib/error.h, getline.h, modechange.h:
30436         Remove "2000" from Copyright line, as the file hasn't been
30437         changed this year other than in the copyright notice.
30438
30439         * lib/xalloc.h: Add "2000" to Copyright line, as this file
30440         was changed this year.
30441
30442 2000-10-29  Jim Meyering  <meyering@lucent.com>
30443
30444         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
30445         renaming.
30446         * m4/ls-mntd-fs.m4: Likewise
30447
30448 2000-10-29  Jim Meyering  <meyering@lucent.com>
30449
30450         * lib/xstat.in: Fix grammar in comment.
30451
30452 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
30453
30454         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
30455         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
30456         doesn't define __restrict_arr.
30457
30458 2000-10-28  Jim Meyering  <meyering@lucent.com>
30459
30460         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
30461         (jm_PREREQ_MEMCHR): New function.
30462
30463 2000-10-28  Jim Meyering  <meyering@lucent.com>
30464
30465         * lib/memchr.c: Update from libc.
30466         Adjust for portability:
30467         [HAVE_STDLIB_H]: Include stdlib.h.
30468         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
30469         Undef __memchr, too.
30470         [!weak_alias]: Define __memchr to memchr.
30471
30472         * lib/regex.c: Update from libc.
30473         * lib/regex.h: Likewise.
30474         * lib/getopt1.c: Likewise.
30475         * lib/memcmp.c: Likewise.
30476
30477         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
30478         Avoid using fseek, when possible -- it's broken by design.
30479         Patch by Ulrich Drepper.
30480
30481 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
30482
30483         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
30484         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
30485         Giving in to popular pressure to shut up the compiler with casts.
30486
30487 2000-10-26  Jim Meyering  <meyering@lucent.com>
30488
30489         * lib/strftime.c: Update from libc.
30490
30491 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
30492
30493         * regex.c: More `unsigned char' -> `re_char' changes.
30494         Also change several `int' into `re_wchar_t'.
30495         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
30496         (PUSH_FAILURE_POINTER): Don't cast any more.
30497         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
30498         We want GCC to complain, since this piece of code makes
30499         re_match non-reentrant, which *should* be fixed.
30500         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
30501         (EXTEND_BUFFER): Use RETALLOC.
30502         (SET_LIST_BIT): Don't cast.
30503         (re_wchar_t): New type.
30504         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
30505         that those two functions will always properly return.
30506         (IMMEDIATE_QUIT_CHECK): Cast to void.
30507         (analyse_first): Use recursion rather than an explicit stack.
30508         (re_compile_fastmap): Can't fail anymore.
30509         (re_search_2): Don't check re_compile_fastmap for failure.
30510         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
30511         Now also sets the new value (passed in a new argument).
30512         (re_match_2_internal): Use it.
30513         Also, use a new var `reg' of type size_t when looping through regs
30514         rather than reuse the inappropriate `mcnt'.
30515
30516 2000-10-25  Jim Meyering  <meyering@lucent.com>
30517
30518         * lib/obstack.c: Update from libc.
30519
30520 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
30521
30522         * regex.c (regex_compile): Change the way of handling a range from
30523         a char less than 256 to a char not less than 256.
30524
30525 2000-10-24  Andrew Innes  <andrewi@gnu.org>
30526
30527         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
30528         NT-Emacs only.
30529         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
30530         so that re_search functions only quit when callers expect them to.
30531
30532 2000-10-23  Jim Meyering  <meyering@lucent.com>
30533
30534         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
30535         wrong.  That set_locale call must not have any side effects.
30536         From Paul Eggert.
30537
30538 2000-10-22  Jim Meyering  <meyering@lucent.com>
30539
30540         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
30541         [CYCLIC]: Remove now-unused definition.
30542
30543         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
30544         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
30545         Suggestion from Ulrich Drepper.
30546
30547 2000-10-21  Jim Meyering  <meyering@lucent.com>
30548
30549         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
30550         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
30551         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
30552
30553 2000-10-21  Jim Meyering  <meyering@lucent.com>
30554
30555         * lib/dirname.c (memrchr): Declare if necessary.
30556         (dir_name): Remove the restriction that there be no
30557         trailing slashes.  Now, this code skips past them, effectively
30558         ignoring them.
30559         [TEST_DIRNAME] (main): New unit tests.
30560
30561         * lib/memrchr.c: New file from GNU libc.
30562         Undef __memrchr, too.
30563         [!weak_alias]: Define __memrchr to memrchr.
30564         Guard weak_alias use with `#ifdef weak_alias'.
30565
30566 2000-10-21  Jim Meyering  <meyering@lucent.com>
30567
30568         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
30569         (dir_name): Use dir_name_r.
30570         * lib/dirname.h (dir_name_r): Declare it.
30571
30572 2000-10-17  Jim Meyering  <meyering@lucent.com>
30573
30574         * lib/quote.h (PARAMS): Define and use.
30575         Reported by Akim Demaille.
30576
30577         * lib/getopt.c: Update from libc.
30578
30579 2000-10-16  Jim Meyering  <meyering@lucent.com>
30580
30581         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
30582         setlocale.
30583         From Jan Fedak.
30584
30585 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
30586
30587         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
30588
30589 2000-09-25  Jim Meyering  <meyering@lucent.com>
30590
30591         * lib/md5.h (rol): Define (from GnuPG).
30592
30593         * lib/sha.c: Give credit (GnuPG) where due.
30594         (M): Use rol rather than open-coding it.
30595         Add a FIXME comment.
30596
30597 2000-09-21  Jim Meyering  <meyering@lucent.com>
30598
30599         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
30600         Reported by Michael Stone.
30601
30602 2000-09-20  Jim Meyering  <meyering@lucent.com>
30603
30604         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
30605         (noinst_HEADERS): Add sha.h.
30606         Based on code from Scott G. Miller and from GnuPG.
30607
30608 2000-09-18  Jim Meyering  <meyering@lucent.com>
30609
30610         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
30611         LIBS. Otherwise, everyone ends up linking with -lelf for some
30612         configurations.
30613         Reported by Mike Stone.
30614
30615 2000-09-15  Jim Meyering  <meyering@lucent.com>
30616
30617         * lib/regex.c: Update from libc.
30618
30619 2000-09-10  Jim Meyering  <meyering@lucent.com>
30620
30621         * lib/getopt.c (_getopt_internal): Update from glibc.
30622
30623 2000-09-09  Jim Meyering  <meyering@lucent.com>
30624
30625         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
30626         think it should be used as a general replacement for isascii.
30627         * lib/fnmatch.c: Likewise.
30628         * lib/mbswidth.c: Likewise
30629         * lib/regex.c: Likewise.
30630
30631         Don't use atoi.
30632         * lib/userspec.c: Include sys/param.h and limits.h.
30633         Include xstrtol.h.
30634         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
30635         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
30636         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
30637         UID, GID.  Check range.
30638
30639 2000-09-06  Jim Meyering  <meyering@lucent.com>
30640
30641         * lib/getopt.c (_getopt_internal): Update from glibc.
30642
30643 2000-08-30  Jim Meyering  <meyering@lucent.com>
30644
30645         * lib/strftime.c: Merge in changes from GNU libc.
30646
30647 2000-08-26  Jim Meyering  <meyering@lucent.com>
30648
30649         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
30650         * m4/fpending.m4: New file.
30651
30652 2000-08-26  Jim Meyering  <meyering@lucent.com>
30653
30654         * lib/closeout.c: Include "__fpending.h".
30655         (close_stdout_status): Return right away if there's nothing to flush.
30656
30657         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
30658         * lib/__fpending.c: New file.
30659         * lib/__fpending.h: New file.
30660
30661 2000-08-20  Jim Meyering  <meyering@lucent.com>
30662
30663         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
30664         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
30665         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
30666
30667 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
30668
30669         Improve fileutils installation on systems where running
30670         programs (like install) can't be unlinked.
30671         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
30672         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
30673
30674 2000-08-07  Paul Eggert  <eggert@twinsun.com>
30675
30676         Standardize on "memory exhausted" instead of "Memory exhausted"
30677         or "virtual memory exhausted".
30678         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
30679         "virtual memory exhausted".
30680         * lib/same.c (same_name): Invoke xalloc_die instead of printing
30681         our own message.
30682         * lib/userspec.c (parse_user_spec): Likewise.
30683         * lib/bumpalloc.h: comment fix
30684         * lib/same.c, userspec.c: Include xalloc.h.
30685
30686         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
30687         not char *const and pointing to a constant array.
30688         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
30689         (xrealloc): Comment fix.
30690
30691         * lib/userspec.c (parse_user_spec):
30692         Don't translate a message until just before returning,
30693         to avoid unnecessary translation.
30694
30695 2000-08-07  Jim Meyering  <meyering@lucent.com>
30696
30697         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
30698         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
30699         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
30700         getgroups.c, gethostname.c, getopt.h, group-member.c,
30701         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
30702         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
30703         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
30704         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
30705         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
30706         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
30707         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
30708         yesno.c: Back out Copyright date changes for each file with no change
30709         this year.  This eases coordination with other programs using the same
30710         source code modules.  From Paul Eggert.
30711
30712 2000-08-06  Paul Eggert  <eggert@twinsun.com>
30713
30714         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
30715         not char, for compatibility with glibc 2.1.3 strftime.c.
30716
30717 2000-08-03  Greg McGary  <greg@mcgary.org>
30718
30719         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
30720         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
30721         (EXTEND_BUFFER): Use them.
30722
30723 2000-08-01  Jim Meyering  <meyering@lucent.com>
30724
30725         * lib/dirname.c (ISSLASH): Define.
30726         (BACKSLASH_IS_PATH_SEPARATOR): Define.
30727         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
30728         both `\' and `/' may be use as path separators.
30729         Based on a patch from Prashant TR.
30730
30731 2000-07-31  Paul Eggert  <eggert@twinsun.com>
30732
30733         * lib/quotearg.c (quotearg_n_options): Don't make the initial
30734         slot vector a constant, since it might get modified.
30735
30736 2000-07-31  Jim Meyering  <meyering@lucent.com>
30737
30738         * lib/xmalloc.c: Use `virtual memory exhausted', not
30739         `Memory exhausted'.
30740         * lib/obstack.c (print_and_abort): Likewise.
30741
30742 2000-07-30  Paul Eggert  <eggert@twinsun.com>
30743
30744         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
30745         buffer, so that the caller can always quote one small
30746         component of a "memory exhausted" message in slot 0.
30747         From a suggestion by Jim Meyering.
30748
30749 2000-07-30  Jim Meyering  <meyering@lucent.com>
30750
30751         * lib/makepath.c (make_path): Quote the other instance, too.
30752
30753         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
30754         (STATIC_BUF_SIZE): Define.
30755         (quotearg_n_options): Use only statically allocated storage when
30756         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
30757         than STATIC_BUF_SIZE.
30758
30759 2000-07-29  Jim Meyering  <meyering@lucent.com>
30760
30761         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
30762         * lib/dirname.c (dir_name): Likewise.
30763
30764         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
30765         `/'.
30766
30767         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
30768         (dir_name): Assert that there are no trailing slashes.
30769
30770 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
30771
30772         * lib/mbswidth.h (mbswidth): Add a flags argument.
30773         (mbswidth): New declaration.
30774         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
30775         * lib/mbswidth.c (mbswidth): Add a flags argument.
30776         (mbsnwidth): New function.
30777
30778 2000-07-24  Jim Meyering  <meyering@lucent.com>
30779
30780         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
30781
30782 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30783
30784         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
30785
30786 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30787
30788         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
30789         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
30790         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
30791         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
30792         invoke multibyte primitives.
30793
30794 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30795
30796         * lib/quotearg.c:
30797         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
30798         so that mbstate_t is always defined.
30799
30800         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
30801         be 1 in at least one GCC installation, and this configuration
30802         error is likely to be common.  Ignoring MB_LEN_MAX hurts
30803         performance on hosts that have mbrtowc but have only unibyte
30804         locales, but I assume these hosts are rare.
30805
30806 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30807
30808         * lib/mbswidth.c (_XOPEN_SOURCE):
30809         Don't define; this causes problems on Solaris 7.
30810         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
30811
30812 2000-07-23  Jim Meyering  <meyering@lucent.com>
30813
30814         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
30815         too: getgrgid, getpwuid, getuid.
30816
30817 2000-07-23  Jim Meyering  <meyering@lucent.com>
30818
30819         * lib/basename.c (base_name): Add an assertion.
30820
30821 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
30822
30823         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
30824         shadow its mbsinit function.
30825
30826 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30827
30828         * lib/mbswidth.h: New file.
30829         * lib/mbswidth.c: New file.
30830         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
30831         (noinst_HEADERS): Add mbswidth.h.
30832
30833 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30834
30835         * lib/config.charset: Add support for FreeBSD. Improve support for
30836         HP-UX and IRIX 6.
30837
30838 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
30839
30840         * m4/mbswidth.m4: New file.
30841         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
30842
30843 2000-07-15  Jim Meyering  <meyering@lucent.com>
30844
30845         * lib/makepath.c: Include quote.h.
30846         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
30847         corresponding argument in a `quote (...)' call.
30848         Give better diagnostics.
30849
30850         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
30851         (noinst_HEADERS): Add quote.h.
30852
30853         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
30854         from tar's src/misc.c.
30855         * lib/quote.h: New file.  Prototypes for same.
30856
30857 2000-07-14  Paul Eggert  <eggert@twinsun.com>
30858
30859         From a suggestion by Bruno Haible.
30860         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
30861         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
30862         to decide whether to define the BeOS workaround macro;
30863         this adjusts to the change to AC_MBSTATE_T.
30864
30865 2000-07-14  Jim Meyering  <meyering@lucent.com>
30866
30867         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
30868         jm_AC_TYPE_UINTMAX_T.
30869
30870 2000-07-13  Paul Eggert  <eggert@twinsun.com>
30871
30872         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
30873
30874         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
30875         quotearg_buffer_restyled): Add support for
30876         clocale_quoting_style.  Undo previous change to
30877         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
30878         and "{RIGHT QUOTATION MARK}" msgids.
30879
30880 2000-07-10  Paul Eggert  <eggert@twinsun.com>
30881
30882         From a suggestion by Bruno Haible.
30883         * m4/mbstate_t.m4 (AC_MBSTATE_T):
30884         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
30885         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
30886         and mbstate_t, to a single-part test that simply defines mbstate_t.
30887         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
30888         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
30889
30890 2000-07-10  Jim Meyering  <meyering@lucent.com>
30891
30892         * m4/strerror_r.m4: Mirror the correction made in autoconf.
30893
30894         * m4/gnu-source.m4: Output to confdefs.h directly.
30895         Suggestion from Akim Demaille.
30896
30897 2000-07-09  Paul Eggert  <eggert@twinsun.com>
30898
30899         The old behavior of quoting `like this' doesn't look good with
30900         newer, ISO-style fonts.  See:
30901         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
30902
30903         Instead, quote "like this" by default.  Let the translator
30904         tailor the locale-specific quoting behavior by providing
30905         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
30906
30907         * lib/quotearg.c (N_): New macro.
30908         (gettext_default): New function.
30909         (quotearg_buffer_restyled): Use
30910         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
30911         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
30912
30913 2000-07-09  Jim Meyering  <meyering@lucent.com>
30914
30915         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
30916         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
30917
30918         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
30919         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
30920
30921 2000-07-09  Jim Meyering  <meyering@lucent.com>
30922
30923         * lib/Most files: Update copyright dates to include 2000.
30924
30925 2000-07-08  Jim Meyering  <meyering@lucent.com>
30926
30927         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
30928         if not defined.
30929         (xgethostname): Remove now-unnecessary #ifdef.
30930         Move declaration of `err' into loop where it's used.
30931
30932 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30933         and Bruno Haible  <haible@clisp.cons.org>
30934
30935         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
30936         only if the test for an object-type mbstate_t fails.  This
30937         prevents us from mistakenly reporting that mbstate_t is a
30938         system object type after we "#define mbstate_t int" to work
30939         around its lack.
30940
30941 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30942         and Bruno Haible  <haible@clisp.cons.org>
30943
30944         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
30945
30946 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30947
30948         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
30949         to strerror_r.
30950         Include <ctype.h> for use of isalpha.
30951
30952 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30953
30954         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
30955         by allocating a larger buffer. Test the gethostname return value for
30956         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
30957         returns an error and ENAMETOOLONG isn't defined.
30958
30959 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30960
30961         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
30962         dimension.
30963
30964 2000-07-04  Jim Meyering  <meyering@lucent.com>
30965
30966         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
30967         of the deprecated AC_CHECKING.
30968
30969 2000-07-04  Jim Meyering  <meyering@lucent.com>
30970
30971         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
30972         Reported by Bruno Haible.
30973
30974 2000-07-04  Jim Meyering  <meyering@lucent.com>
30975
30976         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
30977         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
30978         lacks mbrtowc.
30979
30980 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30981
30982         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
30983         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
30984
30985 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30986         and Bruno Haible  <haible@clisp.cons.org>
30987
30988         * lib/quotearg.c (mbrtowc):
30989         Assign to *pwc, and return 1 only if result is nonzero.
30990         (iswprint): Use ISPRINT when substituting our own mbrtowc.
30991
30992 2000-07-03  Jim Meyering  <meyering@lucent.com>
30993
30994         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
30995
30996 2000-07-03  Jim Meyering  <meyering@lucent.com>
30997
30998         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
30999         This is necessary to get a definition of e.g., UTMP_FILE on
31000         HP-UX 10.20.
31001         From Bob Proulx.
31002
31003 2000-07-02  Jim Meyering  <meyering@lucent.com>
31004
31005         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
31006
31007         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
31008         AC_LIBOBJ(function_name).
31009         * m4/chown.m4: Likewise.
31010         * m4/fnmatch.m4: Likewise.
31011         * m4/ftruncate.m4: Likewise.
31012         * m4/getgroups.m4: Likewise.
31013         * m4/getline.m4: Likewise.
31014         * m4/group-member.m4: Likewise.
31015         * m4/jm-macros.m4: Likewise.
31016         * m4/lstat.m4: Likewise.
31017         * m4/malloc.m4: Likewise.
31018         * m4/memcmp.m4: Likewise.
31019         * m4/nanosleep.m4: Likewise.
31020         * m4/putenv.m4: Likewise.
31021         * m4/realloc.m4: Likewise.
31022         * m4/regex.m4: Likewise.
31023         * m4/stat.m4: Likewise.
31024         * m4/strftime.m4: Likewise.
31025
31026 2000-07-02  Jim Meyering  <meyering@lucent.com>
31027
31028         * lib/quotearg.c (mbstate_t): Don't define here.
31029
31030 2000-07-02  Jim Meyering  <meyering@lucent.com>
31031
31032         * lib/nanosleep.c (SIGCONT): Define if not already defined.
31033
31034 2000-07-01  Jim Meyering  <meyering@lucent.com>
31035
31036         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
31037
31038 2000-07-01  Jim Meyering  <meyering@lucent.com>
31039
31040         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
31041         problem.
31042
31043 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31044
31045         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
31046         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
31047
31048 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31049
31050         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
31051         per change in ../m4/ls-mntd-fs.m4.
31052         (read_filesystem_list): Ignore symbolic links.
31053
31054 2000-06-29  Jim Meyering  <meyering@lucent.com>
31055
31056         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
31057         for declaration of strcmp.
31058
31059         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
31060
31061         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
31062         Avoid warning by casting result to `char *' to remove `const'.
31063
31064 2000-06-28  Jim Meyering  <meyering@lucent.com>
31065
31066         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
31067         included by quotearg.c, for which we perform this test.  From
31068         Bruno Haible.
31069
31070 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31071
31072         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
31073         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
31074         <utmpx.h> exists, put readutmp.o into LIBOBJS.
31075
31076 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31077
31078         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
31079
31080 2000-06-26  Paul Eggert  <eggert@twinsun.com>
31081
31082         savedir now sets errno on failure and invokes xmalloc to get memory.
31083         Fix a couple of other minor bugs while we're at it.
31084
31085         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
31086         (NAMLEN): Remove macro.
31087         (malloc, realloc): Remove decls.
31088         (stpcpy): Likewise.
31089         ("xalloc.h"): Include.
31090         (NAME_SIZE_DEFAULT): New macro.
31091         (savedir): Use xmalloc / xrealloc to allocate memory.
31092         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
31093         Skip "" directory entries.
31094         Use strlen to calculate directory entry length, since the old method
31095         is rarely used these days and isn't worth supporting.
31096         Don't use a pointer after freeing it.
31097         Check for integer overflow when calculating allocation size.
31098         Use memcpy to copy entries, instead of stpcpy.
31099         Set errno properly when returning NULL.
31100         Check for readdir error.
31101
31102 2000-06-26  Jim Meyering  <meyering@lucent.com>
31103
31104         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
31105
31106 2000-06-25  Jim Meyering  <meyering@lucent.com>
31107
31108         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
31109         Linux header bug when _XOPEN_SOURCE is defined to 500.
31110
31111 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31112
31113         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
31114         deficiency.
31115
31116 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31117
31118         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
31119         Include xalloc.h.
31120         Don't include <stdlib.h>.  Don't declare malloc, realloc.
31121
31122 2000-06-24  Jim Meyering  <meyering@lucent.com>
31123
31124         * m4/strerror_r.m4: Revive this file -- to try out an experimental
31125         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
31126         for which strerror does return char*, but which lacks a conveniently
31127         accessible declaration of the function.  If the compile-test says
31128         strerror_r doesn't work, then resort to a `run'-test that works on
31129         BeOS and segfaults on DEC Unix.
31130
31131 2000-06-24  Jim Meyering  <meyering@lucent.com>
31132
31133         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
31134
31135 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31136
31137         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
31138         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
31139
31140 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31141
31142         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
31143         (mbrtowc, mbstate_t): Define substitutes if
31144         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
31145         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
31146         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
31147
31148 2000-06-23  Jim Meyering  <meyering@lucent.com>
31149
31150         * m4/afs.m4: Add missing AC_MSG_RESULT.
31151         Reported by Bruno Haible.
31152
31153         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
31154         Suggestion from Bruno Haible.
31155
31156 2000-06-23  Jim Meyering  <meyering@lucent.com>
31157
31158         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
31159
31160 2000-06-21  Jim Meyering  <meyering@lucent.com>
31161
31162         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
31163
31164 2000-06-21  Jim Meyering  <meyering@lucent.com>
31165
31166         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
31167         (noinst_HEADERS): Add getstr.h.
31168
31169         * lib/getline.c (getstr): Move into a separate file.
31170         * lib/getstr.c (getstr): New file, extracted from getline.c, with
31171         the following changes: new parameter, delim2; both delim[12]
31172         parameters have type `int', not `char'.  The latter would lose
31173         with 8-bit delimiters.
31174         * lib/getstr.h: New file.
31175
31176 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31177
31178         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
31179         than 1024, return a memory chunk of least possible size, instead
31180         of size PATH_MAX + 2. In the loop, increment the size proportionally.
31181         Use free/xmalloc instead of xrealloc to avoid copying for very long
31182         paths.
31183
31184 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31185
31186         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
31187         the empty string.
31188
31189 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31190
31191         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
31192         address, not strdup.  Include <stdlib.h> and don't declare free().
31193
31194 2000-06-19  Jim Meyering  <meyering@lucent.com>
31195
31196         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
31197
31198 2000-06-18  Jim Meyering  <meyering@lucent.com>
31199
31200         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
31201
31202         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
31203         `checking whether...' message to be consistent with that of the
31204         lstat test.
31205
31206 2000-06-18  Jim Meyering  <meyering@lucent.com>
31207
31208         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
31209         Besides, these days every porting target provides a mkdir function.
31210
31211         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
31212         needed. (this snippet comes from src/system.h).
31213
31214 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
31215
31216         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
31217
31218 2000-06-15  Paul Eggert  <eggert@twinsun.com>
31219
31220         * lib/human.c (adjust_value): New function.
31221         (human_readable_inexact): Apply rounding style even when
31222         printing approximate values.
31223
31224 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31225
31226         * lib/human.c (human_readable_inexact): Allow an input block
31227         size that is not a multiple of the output block size, and vice versa.
31228         Reported by Piergiorgio Sartor.
31229
31230 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31231
31232         * lib/getdate.y (get_date): Apply relative times after time
31233         zone indicator, not before.  Reported by Todd A. Jacobs.
31234
31235 2000-06-13  Jim Meyering  <meyering@lucent.com>
31236
31237         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
31238
31239         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
31240
31241 2000-06-12  Paul Eggert  <eggert@twinsun.com>
31242
31243         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
31244
31245 2000-06-12  Jim Meyering  <meyering@lucent.com>
31246
31247         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
31248         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
31249         optional argument.
31250         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
31251         the optional argument, `lib'.
31252
31253 2000-06-08  Jim Meyering  <meyering@lucent.com>
31254
31255         * m4/largefile.m4: Remove file (now that it's part of autoconf).
31256
31257 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31258
31259         Rewrite largefile configuration so that we don't need to run
31260         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
31261         AC_CANONICAL_HOST in configure.in -- jmm]
31262
31263         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
31264         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
31265         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
31266         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
31267         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
31268         All uses changed.
31269         Instead of inspecting the output of getconf, try to compile the
31270         test program without and with the macro definition.
31271         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
31272         for getconf.  Instead, check for the needed flags by compiling
31273         test programs.
31274
31275 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31276
31277         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
31278
31279 2000-06-04  Jim Meyering  <meyering@lucent.com>
31280
31281         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
31282         SunOS 4.1.4 for which gid_t is an unsigned type.
31283
31284 2000-06-03  Jim Meyering  <meyering@lucent.com>
31285
31286         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
31287         now that autoconf requires that.
31288
31289         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
31290         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
31291         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
31292
31293 2000-06-03  Jim Meyering  <meyering@lucent.com>
31294
31295         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
31296
31297 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31298
31299         * m4/glibc21.m4: New file.
31300         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
31301
31302 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31303
31304         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
31305         newer, don't install charset.alias.
31306         * lib/config.charset: Change the Linux/glibc rules so they become empty
31307         on glibc-2.1 or newer.
31308
31309 2000-06-02  Jim Meyering  <meyering@lucent.com>
31310
31311         * lib/mountlist.c: Back out last change.  Instead, do this...
31312         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
31313         me_dummy member using the same `ignore'-testing code.
31314         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
31315         fs_type strings.
31316         From Mark D. Roth.
31317
31318 2000-05-29  Jim Meyering  <meyering@lucent.com>
31319
31320         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
31321         mounts with the `ignore' attribute.  Based on a patch from
31322         Mark D. Roth.
31323
31324 2000-05-28  Jim Meyering  <meyering@lucent.com>
31325
31326         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
31327         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31328         * m4/stat.m4: Likewise.
31329         * m4/lstat.m4: Likewise.
31330         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
31331
31332         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
31333         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
31334
31335 2000-05-26  Jim Meyering  <meyering@lucent.com>
31336
31337         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
31338
31339 2000-05-24  Jim Meyering  <meyering@lucent.com>
31340
31341         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
31342         autoconf requires that.
31343         * m4/lib-check.m4: Likewise.
31344         * m4/jm-macros.m4: Likewise.
31345         * m4/strftime.m4: Likewise.
31346
31347         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
31348         AC_CHECK_DECLS, now that autoconf requires that.
31349
31350 2000-05-22  Jim Meyering  <meyering@lucent.com>
31351
31352         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31353         * m4/lstat.m4: Likewise.
31354
31355 2000-05-22  Jim Meyering  <meyering@lucent.com>
31356
31357         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
31358
31359 2000-05-20  Jim Meyering  <meyering@lucent.com>
31360
31361         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
31362         (jm_PREREQ): Use it.
31363
31364 2000-05-18  Jim Meyering  <meyering@lucent.com>
31365
31366         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
31367         back, too, since it may have been modified by allocate_entry.
31368         (hash_delete): Rewrite to use neither the assignment operator
31369         nor the comma operator in an if-expression.
31370
31371 2000-05-15  Paul Eggert  <eggert@twinsun.com>
31372
31373         * lib/closeout.c:
31374         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
31375         Remove; no longer needed.
31376         "quotearg.h": Add include.
31377         (file_name): Do not bother to explicitly initialize to NULL; it's less
31378         efficient on some hosts.
31379         (close_stdout_status): Remove test as to whether stdout was already
31380         closed; it breaks for the case "echo x | sort >&-".
31381         Quote file name colons.
31382         Do not assume that _("write error") lacks format strings.
31383
31384 2000-05-15  Jim Meyering  <meyering@lucent.com>
31385
31386         * lib/version-etc.c (version_etc_copyright): Update the copyright
31387         string used in all --version output.
31388
31389 2000-05-14  Jim Meyering  <meyering@lucent.com>
31390
31391         * lib/closeout.c (close_stdout_set_file_name): New function.
31392         (close_stdout_status): Use new file-scoped global.
31393         Return right away if fstat says the stdout file descriptor is invalid.
31394         * lib/closeout.h (close_stdout_set_file_name): Declare.
31395
31396 2000-05-10  Jim Meyering  <meyering@lucent.com>
31397
31398         * lib/closeout.c [default_exit_status]: New file-scoped variable.
31399         (close_stdout_set_status): New function.
31400         * lib/closeout.h (close_stdout_set_status): Declare.
31401
31402 2000-05-09  Jim Meyering  <meyering@lucent.com>
31403
31404         * m4/gettext.m4: Rename this...
31405         * m4/libintl.m4: ...to this.
31406
31407 2000-05-08  Jim Meyering  <meyering@lucent.com>
31408
31409         * lib/long-options.c: Don't include closeout.h.
31410         (parse_long_options): Don't call close_stdout for --version.
31411
31412 2000-05-06  Paul Eggert  <eggert@twinsun.com>
31413
31414         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
31415         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
31416         2.1.3 bug.  This avoids a clash when files like regex.c define
31417         _GNU_SOURCE.
31418
31419 2000-05-06  Jim Meyering  <meyering@lucent.com>
31420
31421         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
31422         (AC_REPLACE_FUNCS): Add strnlen.
31423
31424         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
31425         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
31426
31427         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
31428         AC_SEARCH_LIBS call for nanosleep.
31429         (LIB_NANOSLEEP): Set and AC_SUBST.
31430
31431 2000-05-06  Jim Meyering  <meyering@lucent.com>
31432
31433         * lib/strnlen.c: Undefine __strnlen and strnlen.
31434         [!weak_alias]: Define __strnlen to strnlen.
31435
31436         * lib/atexit.c: New file, from libiberty.
31437
31438 2000-05-06  Jim Meyering  <meyering@lucent.com>
31439
31440         * lib/closeout.c (close_stdout_status): Also check for errors on the
31441         stderr stream.
31442
31443 2000-05-05  Jim Meyering  <meyering@lucent.com>
31444
31445         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
31446         AC_SEARCH_LIBS call for clock_gettime.
31447         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
31448
31449         * m4/search-libs.m4: Update from autoconf.
31450
31451         su doesn't work on Solaris 2.6.
31452         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
31453         <shadow.h>.  Reported by Dragos Harabor.
31454
31455 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
31456
31457         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
31458         memcpy instead of xmalloc, xrealloc, path_concat.
31459         (locale_charset): Treat empty environment variables as absent.
31460         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
31461
31462 2000-05-04  Jim Meyering  <meyering@lucent.com>
31463
31464         * lib/getopt.c: Update from glibc.
31465         * lib/obstack.c: Likewise.
31466         * lib/obstack.h: Likewise.
31467         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
31468         file
31469
31470         * lib/regex.h: Likewise.
31471         * lib/strndup.c: Likewise.
31472         * lib/strnlen.c: New file, from glibc.
31473
31474 2000-05-03  Jim Meyering  <meyering@lucent.com>
31475
31476         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
31477
31478 2000-05-02  Paul Eggert  <eggert@twinsun.com>
31479
31480         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
31481         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
31482         compile-time test, rather than inspecting host and OS, to
31483         decide whether to define _LARGEFILE_SOURCE.
31484
31485 2000-05-01  Jim Meyering  <meyering@lucent.com>
31486
31487         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
31488
31489         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
31490         Based on a patch from Bruno Haible.
31491
31492 2000-05-01  Jim Meyering  <meyering@lucent.com>
31493
31494         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
31495
31496 2000-04-29  Jim Meyering  <meyering@lucent.com>
31497
31498         * lib/path-concat.c: Declare strdup only if it's not defined.
31499         * lib/canon-host.c: Likewise.
31500
31501 2000-04-28  Jim Meyering  <meyering@lucent.com>
31502
31503         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
31504         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
31505         is included first, then limits.h is included by locale.h by libintl.h.
31506         From John David Anglin.
31507
31508 2000-04-25  Jim Meyering  <meyering@lucent.com>
31509
31510         * lib/makepath.c (S_IRWXUGO): Define.
31511         (make_path): Always perform explicit chmod if MODE specifies any
31512         of the `special' permission bits.  Prompted by a bug report against
31513         install from Mate Wierdl and Joost van Baal.
31514
31515 2000-04-18  Jim Meyering  <meyering@lucent.com>
31516
31517         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
31518         (jm_PREREQ): Use it.
31519
31520 2000-04-18  Jim Meyering  <meyering@lucent.com>
31521
31522         * lib/README: New file.
31523
31524         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
31525         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
31526
31527 2000-04-17  Jim Meyering  <meyering@lucent.com>
31528
31529         Get it right :-)
31530         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
31531         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
31532         Suggestion from Akim Demaille.
31533
31534 2000-04-17  Jim Meyering  <meyering@lucent.com>
31535
31536         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
31537         the definition of it to rpl_strftime also defined-away the system's
31538         declaration.
31539
31540 2000-04-15  Jim Meyering  <meyering@lucent.com>
31541
31542         Use `C' to denote so-called `contiguous' files, the same way
31543         that tar does.
31544         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
31545         (ftypelet): Use S_ISCTG.
31546         From Michael Deutschmann.
31547
31548 2000-04-14  Jim Meyering  <meyering@lucent.com>
31549
31550         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
31551         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
31552         clobbered.
31553
31554 2000-04-14  Jim Meyering  <meyering@lucent.com>
31555
31556         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
31557
31558 2000-04-13  Jim Meyering  <meyering@lucent.com>
31559
31560         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
31561         AH_VERBATIM to insert required #ifndef into config.h.in.
31562         Suggestion from Akim Demaille.
31563
31564 2000-04-12  Jim Meyering  <meyering@lucent.com>
31565
31566         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
31567         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
31568         Christian Krackowizer.
31569
31570         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
31571         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
31572         (AC_SYS_LARGEFILE): Require.
31573         (AM_C_PROTOTYPES): Require.
31574
31575 2000-04-08  Jim Meyering  <meyering@lucent.com>
31576
31577         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
31578         names don't conflict.  Reported by Eli Zaretskii.
31579
31580 2000-04-07  Jim Meyering  <meyering@lucent.com>
31581
31582         * lib/putenv.c: Move inclusion of errno.h so it follows that of
31583         sys/types.h, to work around system header problems on AIX 3.2.5.
31584         From Bruno Haible.
31585
31586 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
31587
31588         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
31589         bug.  Deal with the different error behavior of Irix iconv.
31590
31591 2000-04-05  Paul Eggert  <eggert@twinsun.com>
31592
31593         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
31594         IRIX if the installer said otherwise.
31595
31596 2000-04-05  Jim Meyering  <meyering@lucent.com>
31597
31598         Portability tweaks required for ultrix4.3.
31599         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
31600         (jm_CHECK_DECLS): Add getutent to the list of functions.
31601         (_jm_DECL_HEADERS): Add utmpx.h.
31602         From John David Anglin.
31603
31604         * m4/strftime.m4: Back out the 2000-04-02 change.
31605         Instead of that change, simply undefine putenv in the test program.
31606
31607 2000-04-05  Jim Meyering  <meyering@lucent.com>
31608
31609         Portability tweaks required for ultrix4.3.
31610         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
31611         getutent.
31612         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
31613         * lib/canon-host.c: Declare strdup.
31614         * lib/path-concat.c: Likewise.
31615         From John David Anglin.
31616
31617 2000-04-04  Jim Meyering  <meyering@lucent.com>
31618
31619         Be more DOS 8.3-friendly.
31620         * lib/ref-add.sin: Renamed from ref-add.sed.in.
31621         * lib/ref-del.sin: Renamed from ref-del.sed.in.
31622         * lib/Makefile.am: Reflect renaming.
31623         Reported by Eli Zaretskii.
31624
31625         Use a temporary file name that won't clash with `charset.alias'
31626         in the DOS 8.3 name space.
31627         * lib/Makefile.am (charset_tmp): Define.
31628         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
31629         (uninstall-local): Likewise.
31630         Reported by Eli Zaretskii.
31631
31632 2000-04-03  Jim Meyering  <meyering@lucent.com>
31633
31634         * m4/gettext.m4: Fix typo in comment.
31635
31636         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
31637         textutils/configure.in).  Suggestion from Paul Eggert.
31638         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
31639
31640 2000-04-02  Paul Eggert  <eggert@twinsun.com>
31641
31642         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
31643         variable in the shell rather than using putenv, which isn't
31644         portable.  This avoids the configure-time inter-test dependency
31645         on the potentially-renamed putenv function.
31646
31647 2000-03-30  Paul Eggert  <eggert@twinsun.com>
31648
31649         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
31650         before checking struct stat.st_blksize, so that
31651         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
31652
31653 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31654
31655         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
31656         since strftime.c uses HAVE_STRFTIME to decide whether to use
31657         the underlying strftime.
31658
31659 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31660
31661         * lib/time/strftime.c (my_strftime): Make sure we call the system
31662         strftime, not ourselves, when invoking the underlying strftime.
31663
31664 2000-03-24  Jim Meyering  <meyering@lucent.com>
31665
31666         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
31667         (charset_alias): Define.
31668         (install-exec-local): Factor out common code.
31669         (uninstall-local): Split lines longer than 80.
31670         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
31671         (SUFFIXES): Define.
31672         (.sed.in.sed): New rule.  Don't redirect directly to $@.
31673         (CLEANFILES): Add ref-add.sed and ref-del.sed.
31674
31675 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
31676
31677         * lib/config.charset: Output a line containing "Packages using this
31678         file".
31679         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
31680         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
31681         ref-del.sed): New rules.
31682
31683 2000-03-17  Jim Meyering  <meyering@lucent.com>
31684
31685         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
31686         Otherwise, include <strings.h>
31687
31688 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
31689
31690         * lib/unicodeio.c (utf8_wctomb): New function.
31691         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
31692         format instead of in UCS-4 with platform dependent endianness.
31693
31694 2000-03-10  Jim Meyering  <meyering@lucent.com>
31695
31696         * m4/lib-check.m4: Look for getspnam in -lgen, too.
31697         From Marco Franzen.
31698
31699 2000-03-07  Paul Eggert  <eggert@twinsun.com>
31700
31701         * lib/savedir.c (savedir): Work even if directory size is
31702         negative; this can happen with some screwy NFS configurations.
31703
31704 2000-03-06  Jim Meyering  <meyering@lucent.com>
31705
31706         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
31707         if it's NULL (because we ran out of memory).  From Bruno Haible.
31708
31709 2000-03-05  Jim Meyering  <meyering@lucent.com>
31710
31711         * lib/localcharset.c ("path-concat.h"): Include.
31712         (get_charset_aliases): Use path_concat instead of ANSI string
31713         concatenation.
31714
31715         * lib/unicodeio.h (PARAMS): Define.
31716         Use it to guard prototype.
31717
31718 2000-03-04  Jim Meyering  <meyering@lucent.com>
31719
31720         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
31721         for lib/localcharset.c.
31722
31723 2000-03-04  Jim Meyering  <meyering@lucent.com>
31724
31725         * lib/Makefile.am (install-exec-local): Create $(libdir) before
31726         installing into it.
31727         (uninstall-local): Uncomment this rule so `make distcheck' works
31728         once again.
31729
31730         * lib/unicodeio.c (<errno.h>): Include it.
31731         (errno): Declare if not defined.
31732
31733         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
31734
31735         * lib/config.charset: New version, incorporating remarks from a linux
31736         i18n mailing list.  From Bruno Haible.
31737
31738 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
31739
31740         * m4/codeset.m4: New file.
31741         * m4/iconv.m4: New file.
31742         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
31743
31744 2000-03-03  Jim Meyering  <meyering@lucent.com>
31745
31746         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
31747
31748 2000-03-02  Jim Meyering  <meyering@lucent.com>
31749
31750         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
31751         the messages come out on separate lines.
31752
31753         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
31754         rather than jm_CHECK_DECLARATIONS.
31755         * m4/decl.m4: Remove now-unused file.
31756
31757         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
31758         geteuid.
31759
31760 2000-03-02  Jim Meyering  <meyering@lucent.com>
31761
31762         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
31763
31764 2000-03-01  Jim Meyering  <meyering@lucent.com>
31765
31766         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
31767         * lib/unicodeio.c: Likewise.
31768
31769 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
31770
31771         * lib/config.charset: New file.
31772         * lib/localcharset.c: New file.
31773         * lib/unicodeio.h, lib/unicodeio.c: New files.
31774         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
31775         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
31776         (noinst_HEADERS): Add unicodeio.h.
31777         (all-local, install-exec-local, charset.alias): New targets.
31778
31779 2000-02-28  Paul Eggert  <eggert@twinsun.com>
31780
31781         * lib/quotearg.c (ALERT_CHAR): New macro.
31782         (quotearg_buffer_restyled): Use it.
31783
31784 2000-02-27  Jim Meyering  <meyering@lucent.com>
31785
31786         * m4/check-decl.m4: Add getenv to the list.
31787
31788 2000-02-27  Jim Meyering  <meyering@lucent.com>
31789
31790         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
31791         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
31792
31793         * lib/backupfile.c: Guard inclusion of stdlib.h with
31794         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
31795         Declare malloc if needed.
31796
31797         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
31798         `#ifndef HAVE_DECL..'
31799         now that autoconf always defines the HAVE_DECL_ symbols.
31800         * lib/human.c: Likewise.
31801         * lib/same.c: Likewise.
31802         * lib/strtoumax.c: Likewise.
31803
31804         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
31805         declaration check was not run.
31806         * lib/hash.c: Likewise.
31807         * lib/human.c: Likewise.
31808         * lib/same.c: Likewise.
31809         * lib/strtoumax.c: Likewise.
31810
31811         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
31812         `.', then first look up the entire `.'-containing string as a login
31813         name.
31814
31815 2000-02-23  Jim Meyering  <meyering@lucent.com>
31816
31817         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
31818         in place of my hack.
31819
31820 2000-02-18  Paul Eggert  <eggert@twinsun.com>
31821
31822         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
31823         (textint): New typedef.
31824         (parser_control): Member year changed from int to textint.
31825         All uses changed.
31826         (YYSTYPE): Removed; replaced by %union with int and textint members.
31827         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
31828         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
31829         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
31830         (tSNUMBER, tUNUMBER): Now of type <textintval>.
31831         (date, number, to_year): Use width of number in digits, not its value,
31832         to determine whether it's a 2-digit year, or a 2-digit time.
31833         (yylex): Store number of digits of numeric tokens.
31834         Reported by John Kendall.
31835
31836         (parser_control): Changed from struct parser_control to typedef (for
31837         consistency).  All uses changed.
31838
31839         (tID): Removed; not used.
31840         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
31841
31842 2000-02-14  Paul Eggert  <eggert@twinsun.com>
31843
31844         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
31845         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
31846
31847 2000-02-12  Jim Meyering  <meyering@lucent.com>
31848
31849         * lib/userspec.c (ISDIGIT): Define it.
31850         (isdigit): Remove definition.
31851         (is_number): Use ISDIGIT, not isdigit.
31852         <libintl.h>: Include.
31853         (_ and N_): Define.
31854         (parse_user_spec): Mark translatable strings.
31855
31856 2000-02-10  Jim Meyering  <meyering@lucent.com>
31857
31858         With these changes, nanosleep.[ch] are finally enough like the other
31859         lib/* replacement files to compile on a few more losing systems.
31860
31861         * lib/nanosleep.h: Don't include config.h.
31862         Remove prototype from declaration of nanosleep.
31863         (PARAMS): Remove now-unneeded definition.
31864         * lib/nanosleep.c: #undef nanosleep.
31865         (rpl_nanosleep): Rename from nanosleep.
31866
31867 2000-02-10  Jim Meyering  <meyering@lucent.com>
31868
31869         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
31870         gnu_nanosleep to rpl_nanosleep.
31871
31872 2000-02-09  Jim Meyering  <meyering@lucent.com>
31873
31874         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
31875         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
31876
31877 2000-02-08  Akim Demaille  <akim@epita.fr>
31878
31879         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
31880         `[' and `]' and remove uses of `changequote'.
31881         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
31882         (AC_SYS_LARGEFILE): Likewise.
31883         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
31884         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
31885         of changequote.
31886         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
31887         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
31888         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
31889         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
31890
31891 2000-02-05  Jim Meyering  <meyering@lucent.com>
31892
31893         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
31894         Remove explicit use of AC_HEADER_TIME.  It is required by
31895         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
31896         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
31897         in autoconf whereby the expansion of the latter ended up preceding
31898         the expansion of its prerequisite, AC_HEADER_TIME.
31899         Reported by Volker Borchert.
31900
31901 2000-02-03  Jim Meyering  <meyering@lucent.com>
31902
31903         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
31904
31905 2000-02-03  Jim Meyering  <meyering@lucent.com>
31906
31907         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
31908         rather than with `#if HAVE_UTMPNAME'.
31909
31910 2000-02-02  Jim Meyering  <meyering@lucent.com>
31911
31912         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
31913         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
31914         Reported by Eli Zaretskii.
31915
31916 2000-02-01  Jim Meyering  <meyering@lucent.com>
31917
31918         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
31919
31920 2000-01-31  Jim Meyering  <meyering@lucent.com>
31921
31922         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
31923         functions.  Add the time.h and sys/time.h headers along with the
31924         AC_REQUIRE'ment of AC_HEADER_TIME.
31925
31926 2000-01-31  Jim Meyering  <meyering@lucent.com>
31927
31928         * lib/nanosleep.h (nanosleep): Guard declaration with
31929         `#if ! HAVE_DECL_NANOSLEEP'.
31930         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
31931         the declaration in that vendor's sys/timers.h.
31932         Reported by Christian Krackowizer.
31933
31934         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
31935         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
31936         (ISPRINT): Likewise.
31937         Reported by Tom Tromey.
31938
31939 2000-01-30  Jim Meyering  <meyering@lucent.com>
31940
31941         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
31942
31943         * m4/prereq.m4 (utmp_includes): Define.
31944         Check for ut_user and ut_name members in both struct utmpx
31945         and struct utmp.
31946
31947 2000-01-30  Jim Meyering  <meyering@lucent.com>
31948
31949         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
31950         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
31951         header files where only utmpx.ut_user is declared.
31952
31953         * lib/readutmp.h (UT_USER): Define.
31954
31955 2000-01-29  Jim Meyering  <meyering@lucent.com>
31956
31957         * m4/lib-check.m4: New file containing library-related checks from
31958         fileutils and sh-utils (textutils had none).
31959
31960 2000-01-28  Jim Meyering  <meyering@lucent.com>
31961
31962         * m4/perl.m4: Change format of warning message to look more like that
31963         from the missing script.  Suggestion from François Pinard.
31964
31965 2000-01-25  Jim Meyering  <meyering@lucent.com>
31966
31967         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
31968         well as time.h in the compile check.
31969         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
31970         Fix typo in cross-compiling case: s/yes/no/.
31971
31972 2000-01-23  Jim Meyering  <meyering@lucent.com>
31973
31974         * m4/jm-macros.m4: Move df-related tests here from
31975         fileutils/configure.in
31976
31977         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
31978         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
31979
31980         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
31981         s/space/ac_fsusage_space/.
31982         (jm_FILE_SYSTEM_USAGE): Take two parameters.
31983
31984         * m4/ftruncate.m4: New file (derived from part of
31985         fileutils/configure.in).
31986         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
31987         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
31988
31989         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
31990         AC_SUBST these here, rather than just in sh-util/configure.in, so
31991         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
31992         all the same.
31993         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
31994         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
31995         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
31996         (AC_SUBST(POW_LIBM)): Likewise.
31997         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
31998
31999 2000-01-23  Jim Meyering  <meyering@lucent.com>
32000
32001         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
32002         obstack.c.
32003
32004 2000-01-22  Jim Meyering  <meyering@lucent.com>
32005
32006         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
32007
32008         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
32009
32010         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
32011         configure.in
32012         (AC_CHECK_HEADERS): Likewise for sh-utils.
32013         (AC_CHECK_HEADERS): Likewise for textutils.
32014         Merge the three lists of headers.
32015
32016         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
32017         from fileutils' configure.in.
32018
32019         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
32020         code. Moved tests into their own function (_jm_DECL_HEADERS) in
32021         check-decl.m4.
32022
32023         * m4/check-decl.m4: Use #if rather than #ifdef.
32024         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
32025         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
32026         (_jm_DECL_HEADERS): Define new function.
32027         (jm_CHECK_DECLARATIONS): Require it.
32028
32029 2000-01-22  Jim Meyering  <meyering@lucent.com>
32030
32031         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
32032         [! HAVE_DECL_STRTOULL]: Declare strtoull.
32033         Required for some AIX systems.  Reported by Christian Krackowizer.
32034         [TESTING] (main): New function.
32035
32036         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
32037         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
32038         letters.
32039
32040         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
32041         iswprint.
32042
32043         * lib/strverscmp.c (ISDIGIT): Define.
32044         (strverscmp): Use ISDIGIT, not isdigit.
32045
32046 2000-01-19  Jim Meyering  <meyering@lucent.com>
32047
32048         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
32049         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
32050         defines `struct timespec' in <sys/time.h>
32051
32052         * m4/c-bs-a.m4: Remove uses of changequote altogether.
32053         Thanks to Akim for explaining.
32054
32055 2000-01-17  Paul Eggert  <eggert@twinsun.com>
32056
32057         * lib/nanosleep.c (nanosleep):
32058         Don't use SA_INTERRUPT to decide whether to call sigaction, as
32059         POSIX.1 doesn't require SA_INTERRUPT and some systems
32060         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
32061         it's been part of POSIX.1 since day 1 (in 1988).
32062
32063 2000-01-17  Jim Meyering  <meyering@lucent.com>
32064
32065         * lib/interlock: Remove unused file.  Reported by François Pinard.
32066
32067 2000-01-16  Paul Eggert  <eggert@twinsun.com>
32068
32069         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
32070         alert, backslash, formfeed, and vertical tab unnecessarily in
32071         shell quoting style.
32072
32073 2000-01-16  Jim Meyering  <meyering@lucent.com>
32074
32075         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
32076         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
32077         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
32078         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
32079
32080 2000-01-16  Jim Meyering  <meyering@lucent.com>
32081
32082         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
32083         because the latter didn't work.
32084
32085 2000-01-15  Jim Meyering  <meyering@lucent.com>
32086
32087         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
32088         (AC_REPLACE_FUNCS): Add memcpy and memset.
32089         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
32090         Add strpbrk.
32091         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
32092
32093 2000-01-12  Jim Meyering  <meyering@lucent.com>
32094
32095         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
32096         (jm_PREREQ): Use it.
32097         (jm_PREREQ_READUTMP): New macro.
32098         (jm_PREREQ): Use it.
32099
32100 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32101
32102         Quote multibyte characters correctly.
32103         * m4/c-bs-a.m4: New file.
32104         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
32105         (jm_PREREQ): Use it.
32106
32107 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32108
32109         * m4/uintmax_t.m4: Port to autoconf 2.13.
32110
32111 2000-01-08  Jim Meyering  <meyering@ascend.com>
32112
32113         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
32114         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
32115
32116 2000-01-04  Jim Meyering  <meyering@ascend.com>
32117
32118         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
32119         jm_STRUCT_DIRENT_D_TYPE.
32120         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
32121         jm_STRUCT_DIRENT_D_INO.
32122         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
32123         jm_STRUCT_UTIMBUF.
32124         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
32125         renamings.
32126         * m4/utime.m4: Likewise.
32127
32128         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
32129         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
32130
32131 2000-01-03  Paul Eggert  <eggert@twinsun.com>
32132
32133         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
32134         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
32135
32136 2000-01-02  Jim Meyering  <meyering@ascend.com>
32137
32138         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
32139         remember if this is necessary.
32140
32141 1999-12-26  Jim Meyering  <meyering@ascend.com>
32142
32143         * m4/jm-macros.m4: Use it here.
32144         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
32145
32146 1999-12-23  Jim Meyering  <meyering@ascend.com>
32147
32148         * m4/jm-macros.m4: Check for clock_gettime (moved from
32149         fileutils/configure.in)
32150         Check for gettimeofday.
32151
32152 1999-12-20  Jim Meyering  <meyering@ascend.com>
32153
32154         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
32155         autoconf-2.14a-1999-12-20.
32156
32157 1999-12-19  Jim Meyering  <meyering@ascend.com>
32158
32159         * m4/lstat-slash.m4: New file.
32160         * m4/jm-macros.m4: Use the new macro:
32161         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
32162
32163 1999-12-07  Jim Meyering  <meyering@ascend.com>
32164
32165         * m4/perl.m4: Require that File::Compare be available, too.
32166         Too many systems seem to lack it.
32167
32168         * m4/strftime.m4: Add checks for most of the cpp macros tested in
32169         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
32170
32171 1999-11-18  Paul Eggert  <eggert@twinsun.com>
32172
32173         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
32174         problem with the QNX 4.25 shell, which doesn't propagate exit
32175         status of failed commands inside shell assignments.
32176
32177 1999-11-17  Jim Meyering  <meyering@ascend.com>
32178
32179         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
32180
32181 1999-11-07  Jim Meyering  <meyering@ascend.com>
32182
32183         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
32184
32185 1999-11-06  Jim Meyering  <meyering@ascend.com>
32186
32187         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
32188         * m4/jm-macros.m4 (jm_MACROS): Use it here.
32189
32190 1999-11-05  Jim Meyering  <meyering@ascend.com>
32191
32192         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
32193         configure.in of textutils, fileutils, and sh-utils into this one
32194         (shared between those packages) file.
32195         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
32196         AC_STRUCT_ST_BLKSIZE.
32197
32198 1999-11-03  Jim Meyering  <meyering@ascend.com>
32199
32200         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
32201         of AC_CHECK_TYPE checks includes unistd.h.
32202         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
32203         Suggestion from Akim Demaille.
32204
32205 1999-10-30  Jim Meyering  <meyering@ascend.com>
32206
32207         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
32208         m4-quoted string.
32209         * m4/ls-mntd-fs.m4: Likewise.
32210         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
32211         * m4/jm-winsz1.m4: Likewise.
32212
32213         * m4/const.m4: Remove file, since the fix made it into the experimental
32214         version of autoconf.
32215         * m4/mktime.m4: Likewise.
32216
32217         * m4/check-type.m4: Remove file, now that the latest version of
32218         AC_CHECK_TYPE takes a third arg to specify additional #includes.
32219
32220         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
32221         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
32222         AC_CHECK_TYPE.
32223
32224 1999-10-04  Jim Meyering  <meyering@ascend.com>
32225
32226         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
32227
32228 1999-09-22  Paul Eggert  <eggert@twinsun.com>
32229
32230         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
32231         2.95.1 bug with HP-UX 10.20.
32232
32233 1999-09-17  Jim Meyering  <meyering@ascend.com>
32234
32235         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
32236         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
32237         due to missing strdup (against sh-utils-2.0).
32238
32239 1999-08-29  Jim Meyering  <meyering@ascend.com>
32240
32241         * m4/jm-macros.m4: Require jm_BISON.
32242         * m4/bison.m4: New file.
32243
32244 1999-08-17  Paul Eggert  <eggert@twinsun.com>
32245
32246         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
32247         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
32248
32249 1999-08-05  Jim Meyering  <meyering@ascend.com>
32250
32251         * m4/getline.m4: Rename test file from conftestdata to conftest.data
32252         to avoid conflicts with `conftest' on 8+3 filesystems.
32253         Suggestion from Eli Zaretskii.
32254
32255 1999-08-04  Jim Meyering  <meyering@ascend.com>
32256
32257         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
32258         fileutils and sh-utils (textutils's getline test was inadequate).
32259         (AM_FUNC_GETLINE): Run this test.
32260         (AC_CHECK_FUNCS): Check for getdelim.
32261         Reported by Bob Proulx.
32262
32263 1999-08-02  Jim Meyering  <meyering@ascend.com>
32264
32265         * m4/jm-macros.m4: Add a comment.
32266
32267 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32268
32269         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
32270         <inttypes.h> defines strtoumax as a macro (and not as a
32271         function).
32272
32273 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32274
32275         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
32276         that we can shift, multiply and divide unsigned long long
32277         values; Ultrix cc can't do it.
32278
32279 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32280
32281         * m4/mktime.m4: New file, which is a preview of what should appear
32282         in the next public autoconf release.
32283
32284 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32285
32286         * m4/lfs.m4: Remove this file.
32287         * m4/largefile.m4: New file.  It contains the old contents of
32288         lfs.m4, except that all names with prefix AC_LFS have been
32289         changed to use the prefix AC_SYS_LARGEFILE instead, to be
32290         compatible with future autoconf versions.  Also, some minor m4
32291         quoting problems have been fixed.
32292
32293 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32294
32295         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
32296         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
32297         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
32298         and simplify the shell code.
32299
32300 1999-08-01  Jim Meyering  <meyering@ascend.com>
32301
32302         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
32303         m4.
32304
32305 1999-07-20  Jim Meyering  <meyering@ascend.com>
32306
32307         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
32308
32309 1999-07-15  Jim Meyering  <meyering@ascend.com>
32310
32311         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
32312
32313 1999-05-22  Jim Meyering  <meyering@ascend.com>
32314
32315         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
32316
32317 1999-05-20  Jim Meyering  <meyering@ascend.com>
32318
32319         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
32320         Add a colon after each `then' in case $4 is empty.
32321
32322 1999-05-16  Jim Meyering  <meyering@ascend.com>
32323
32324         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
32325
32326 1999-05-10  Jim Meyering  <meyering@ascend.com>
32327
32328         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
32329
32330         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
32331         AC_FUNC_MKTIME.
32332
32333 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
32334
32335         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
32336
32337 1999-05-04  Paul Eggert  <eggert@twinsun.com>
32338
32339         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
32340         not CPPFLAGS, so that linking works correctly in IRIX.
32341
32342 1999-04-30  Paul Eggert  <eggert@twinsun.com>
32343
32344         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
32345
32346 1999-04-20  Paul Eggert  <eggert@twinsun.com>
32347
32348         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
32349         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
32350         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
32351         jm_AC_TYPE_UNSIGNED_LONG_LONG.
32352         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
32353
32354         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
32355
32356 1999-04-20  Jim Meyering  <meyering@ascend.com>
32357
32358         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
32359         AC_REPLACE xstroull if necessary.  From Paul Eggert.
32360         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
32361
32362 1999-04-18  Jim Meyering  <meyering@ascend.com>
32363
32364         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
32365         * m4/jm-macros.m4: Use it.
32366
32367 1999-04-06  Jim Meyering  <meyering@ascend.com>
32368
32369         * m4/strftime.m4: Remove test for %f.
32370
32371 1999-03-29  Jim Meyering  <meyering@ascend.com>
32372
32373         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
32374         superset of the AC_TYPE_* checks in the textutils, fileutils,
32375         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
32376         AC_TYPE_PID_T.
32377
32378 1999-03-28  Jim Meyering  <meyering@ascend.com>
32379
32380         * m4/jm-macros.m4: Define GNU_PACKAGE here.
32381         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
32382         replaced e.g., in the *.sh files of the sh-utils.
32383
32384 1999-03-20  Jim Meyering  <meyering@ascend.com>
32385
32386         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
32387         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
32388         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
32389
32390 1999-03-19  Jim Meyering  <meyering@ascend.com>
32391
32392         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
32393
32394 1999-03-12  Jim Meyering  <meyering@ascend.com>
32395
32396         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
32397
32398 1999-03-07  Jim Meyering  <meyering@ascend.com>
32399
32400         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
32401         declared.
32402
32403 1999-02-17  Jim Meyering  <meyering@ascend.com>
32404
32405         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
32406         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
32407
32408 1999-02-07  Jim Meyering  <meyering@ascend.com>
32409
32410         * m4/group-member.m4: New file -- extracted from sh-utils'
32411         configure.in.
32412
32413         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
32414         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
32415
32416 1999-02-06  Jim Meyering  <meyering@ascend.com>
32417
32418         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
32419         * m4/fnmatch.m4: Likewise.
32420         * m4/getgroups.m4: Likewise.
32421         * m4/lstat.m4: Likewise.
32422         * m4/malloc.m4: Likewise.
32423         * m4/putenv.m4: Likewise.
32424         * m4/realloc.m4: Likewise.
32425         * m4/regex.m4: Likewise.
32426         * m4/stat.m4: Likewise.
32427         * m4/strftime.m4: Likewise.
32428         Suggestion from Alain Magloire.
32429
32430         * m4/chown.m4: Use `.$ac_objext', not `.o'.
32431         * m4/fnmatch.m4: Likewise.
32432         * m4/getgroups.m4: Likewise.
32433         * m4/getline.m4: Likewise.
32434         * m4/lstat.m4: Likewise.
32435         * m4/malloc.m4: Likewise.
32436         * m4/memcmp.m4: Likewise.
32437         * m4/putenv.m4: Likewise.
32438         * m4/realloc.m4: Likewise.
32439         * m4/regex.m4: Likewise.
32440         * m4/stat.m4: Likewise.
32441         * m4/strftime.m4: Likewise.
32442         Suggestion from Alain Magloire.
32443
32444         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
32445         an argument.
32446
32447         * m4/regex.m4: Add a run-time Test for proper operation of
32448         re_compile_pattern.
32449
32450 1999-01-31  Jim Meyering  <meyering@ascend.com>
32451
32452         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
32453
32454 1999-01-30  Jim Meyering  <meyering@ascend.com>
32455
32456         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
32457
32458         * m4/jm-mktime.m4: Make this a wrapper around the official
32459         AM_FUNC_MKTIME rather than my private copy, now that the official one
32460         is up to date.
32461         * m4/mktime.m4: Remove file.
32462
32463         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
32464         * m4/uptime.m4: Likewise.
32465         * m4/uintmax_t.m4: Likewise.
32466
32467 1999-01-28  Jim Meyering  <meyering@ascend.com>
32468
32469         * m4/jm-macros.m4: Use jm_AFS.
32470         * m4/afs.m4: New file (from fileutils' configure.in).
32471
32472         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
32473         * m4/chown.m4: Likewise.
32474         * m4/d-ino.m4: Likewise.
32475         * m4/d-type.m4: Likewise.
32476         * m4/fnmatch.m4: Likewise.
32477         * m4/getgroups.m4: Likewise.
32478         * m4/gettext.m4: Likewise.
32479         * m4/jm-mktime.m4: Likewise.
32480         * m4/jm-winsz2.m4: Likewise.
32481         * m4/lcmessage.m4: Likewise.
32482         * m4/ls-mntd-fs.m4: Likewise.
32483         * m4/malloc.m4: Likewise.
32484         * m4/memcmp.m4: Likewise.
32485         * m4/putenv.m4: Likewise.
32486         * m4/realloc.m4: Likewise.
32487         * m4/st_mtim.m4: Likewise.
32488         * m4/strftime.m4: Likewise.
32489
32490 1999-01-16  Jim Meyering  <meyering@ascend.com>
32491
32492         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
32493         (ARGMATCH_DIE_DECL): Define.
32494
32495 1999-01-12  Jim Meyering  <meyering@ascend.com>
32496
32497         * m4/Makefile.am.in: Rewrite to avoid using fmt.
32498         Reported by Lars Hecking.
32499
32500 1999-01-10  Jim Meyering  <meyering@ascend.com>
32501
32502         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
32503         gross kludge.
32504         * m4/inttypes_h.m4: Likewise.
32505         * m4/lstat.m4: Likewise.
32506         * m4/malloc.m4: Likewise.
32507         * m4/readdir.m4: Likewise.
32508         * m4/realloc.m4: Likewise.
32509         * m4/st_dm_mode.m4: Likewise.
32510         * m4/stat.m4: Likewise.
32511         * m4/utimbuf.m4: Likewise.
32512         * m4/utimes.m4: Likewise.
32513
32514         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
32515         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
32516         comments in config.h.in are meaningful.
32517
32518         * m4/jm-macros.m4: Require autoconf-2.13 here.
32519
32520         * m4/regex.m4: By default, don't use the included regex.c on systems
32521         with glibc 2.  Suggestion from Uli Drepper.
32522
32523 1999-01-02  Jim Meyering  <meyering@ascend.com>
32524
32525         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
32526
32527 1998-12-18  Jim Meyering  <meyering@ascend.com>
32528
32529         * m4/Makefile.am.in (Makefile.am): Simplify rule.
32530         Based on a suggestion from Lars Hecking.
32531
32532 1998-11-16  Paul Eggert  <eggert@twinsun.com>
32533
32534         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
32535
32536 1998-11-16  Jim Meyering  <meyering@ascend.com>
32537
32538         * m4/lfs.m4: Double-quote the `uname...` expression.
32539
32540 1998-11-14  Jim Meyering  <meyering@ascend.com>
32541
32542         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
32543         * m4/stat.m4: Likewise.
32544
32545 1998-11-03  Jim Meyering  <meyering@ascend.com>
32546
32547         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
32548         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
32549
32550 1998-10-18  Jim Meyering  <meyering@ascend.com>
32551
32552         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
32553
32554 1998-10-17  Jim Meyering  <meyering@ascend.com>
32555
32556         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
32557         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
32558         calls for those previously hard-coded headers.  Instead, take a new
32559         parameter.
32560         (jm_CHECK_DECLARATIONS): Reflect interface change.
32561         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
32562         (jm_CHECK_DECL_LOCALTIME_R): New macro.
32563
32564         * m4/mktime.m4: Test for spring-forward gap before long-running test.
32565
32566 1998-10-14  Jim Meyering  <meyering@ascend.com>
32567
32568         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
32569         instead of "TZ=America/Vancouver".  From Paul Eggert.
32570
32571 1998-10-11  Jim Meyering  <meyering@ascend.com>
32572
32573         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
32574         This adds a test for a recently added compatibility fix for mktime.c.
32575         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
32576
32577 1998-09-27  Jim Meyering  <meyering@ascend.com>
32578
32579         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
32580
32581         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
32582         ../configure.in, including a change from Gordon Matzigkeit to allow
32583         cross-compiling for the Hurd.
32584
32585         * m4/glibc.m4: New file/macro to test for the GNU C Library
32586         versions 1 and 2.  From Gordon Matzigkeit.
32587         Indent.
32588
32589 1998-09-21  Jim Meyering  <meyering@ascend.com>
32590
32591         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
32592
32593 1998-08-18  Paul Eggert  <eggert@twinsun.com>
32594
32595         Port nanosecond-resolution times to UnixWare 2.1.2 and
32596         pedantic Solaris 2.6.
32597
32598         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
32599         AC_STRUCT_ST_MTIM.
32600         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
32601         Generate name of ns member, instead of just 1 or undef.
32602         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
32603
32604 1998-08-15  Jim Meyering  <meyering@ascend.com>
32605
32606         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
32607         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
32608         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
32609         instead of jm_TYPE_SSIZE_T.
32610
32611 1998-08-12  Jim Meyering  <meyering@ascend.com>
32612
32613         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
32614
32615 1998-08-02  Jim Meyering  <meyering@ascend.com>
32616
32617         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
32618         in acconfig.h manually.
32619
32620 1998-07-31  Paul Eggert  <eggert@twinsun.com>
32621
32622         * m4/st_mtim.m4: New file.
32623
32624 1998-07-28  Jim Meyering  <meyering@ascend.com>
32625
32626         * m4/utimes.m4: Undef stat.
32627
32628 1998-07-25  Jim Meyering  <meyering@ascend.com>
32629
32630         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
32631         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
32632
32633 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
32634
32635         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
32636         uid and gid actually remain unchanged.
32637
32638 1998-07-07  Jim Meyering  <meyering@ascend.com>
32639
32640         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
32641
32642 1998-07-04  Jim Meyering  <meyering@ascend.com>
32643
32644         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
32645         to prove that this macro can be used in packages without regex.c.
32646
32647 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
32648
32649         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
32650         is to be used.
32651
32652 1998-07-03  Jim Meyering  <meyering@ascend.com>
32653
32654         * m4/gettext.m4: Add -lintl if it's found to be necessary.
32655
32656         * m4/gettext.m4: New file -- from gettext-0.10.35.
32657         * m4/lcmessage.m4: Likewise.
32658         * m4/progtest.m4: Likewise.
32659
32660         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
32661         * m4/jm-macros.m4: Require the new macro.
32662
32663 1998-06-29  Jim Meyering  <meyering@ascend.com>
32664
32665         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
32666         for the definition of NGROUPS (used in a system header included
32667         by sys/mount.h).
32668
32669 1998-06-28  Jim Meyering  <meyering@ascend.com>
32670
32671         * m4/ls-mntd-fs.m4: New file.
32672         * m4/fstypename.m4: New file.
32673
32674         * m4/jm-macros.m4: Require the new macro.
32675         * m4/jm-glibc-io.m4: New file.
32676
32677 1998-05-19  Jim Meyering  <meyering@ascend.com>
32678
32679         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
32680         * m4/lchown.m4: New file.
32681
32682         * m4/Makefile.am.in: New file.
32683         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
32684
32685 1998-05-14  Jim Meyering  <meyering@ascend.com>
32686
32687         * m4/Makefile.am (EXTRA_DIST): Add them.
32688         * m4/jm-macros.m4: New file.
32689         * m4/utimbuf.m4: New file.
32690
32691 1998-05-12  Jim Meyering  <meyering@ascend.com>
32692
32693         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
32694
32695 1998-05-11  Jim Meyering  <meyering@ascend.com>
32696
32697         * m4/isc-posix.m4: New file.
32698
32699 1998-05-10  Jim Meyering  <meyering@ascend.com>