Sergey Poznyakoff [Tue, 23 Nov 2004 02:50:54 +0000 (02:50 +0000)]
Re-addition of __getopt_argv_const caused
redefinition warnings. To avoid them, include the defines
in `#if !defined __need_getopt ... #endif'. The only place
where __getopt_argv_const is used is in definitions
of getopt_long and getopt_long_only below, which are as well
protected by `#ifndef __need_getopt'.
[defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
__need_getopt after including <stdio.h> and <unistd.h> These
headers might have defined it.
Sergey Poznyakoff [Tue, 23 Nov 2004 02:50:02 +0000 (02:50 +0000)]
Updated
Paul Eggert [Sun, 21 Nov 2004 07:22:23 +0000 (07:22 +0000)]
Update log to match latest getopt checkin.
Paul Eggert [Sun, 21 Nov 2004 07:22:02 +0000 (07:22 +0000)]
Fix brain cramp in previous checkin.
Paul Eggert [Sun, 21 Nov 2004 05:11:14 +0000 (05:11 +0000)]
* getopt_.h: Use __CONCAT rather than ## directly.
Paul Eggert [Sun, 21 Nov 2004 05:10:10 +0000 (05:10 +0000)]
(__CONCAT): New macro.
(getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
optopt): Use it instead of invoking ## directly; otherwise, the
symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
Bruno Haible [Fri, 19 Nov 2004 13:46:41 +0000 (13:46 +0000)]
Move comments from strtok_r.c to strtok_r.h.
Karl Berry [Fri, 19 Nov 2004 13:18:58 +0000 (13:18 +0000)]
cannot sync getopt_int.h any more
Karl Berry [Fri, 19 Nov 2004 12:55:36 +0000 (12:55 +0000)]
update from texinfo
Paul Eggert [Wed, 17 Nov 2004 23:07:53 +0000 (23:07 +0000)]
realloc, calloc portability fixes.
Paul Eggert [Wed, 17 Nov 2004 23:07:37 +0000 (23:07 +0000)]
* calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc implementations
that mishandle size_t overflow.
Paul Eggert [Wed, 17 Nov 2004 23:07:25 +0000 (23:07 +0000)]
(_AC_FUNC_CALLOC_IF): Check for buggy calloc implementations
that mishandle size_t overflow.
Paul Eggert [Wed, 17 Nov 2004 23:05:47 +0000 (23:05 +0000)]
(rpl_calloc): Defend against buggy calloc implementations
that mishandle size_t overflow.
Paul Eggert [Wed, 17 Nov 2004 23:05:02 +0000 (23:05 +0000)]
Fix header comment to match module title.
Paul Eggert [Wed, 17 Nov 2004 22:48:23 +0000 (22:48 +0000)]
(rpl_realloc): Call 'free' if n==0, since realloc might fail.
Problem reported by Yoann Vandoorselaere.
Karl Berry [Wed, 17 Nov 2004 13:17:00 +0000 (13:17 +0000)]
.
Karl Berry [Wed, 17 Nov 2004 08:52:44 +0000 (08:52 +0000)]
.
Paul Eggert [Wed, 17 Nov 2004 07:32:27 +0000 (07:32 +0000)]
Add log for human.h, xgetcwd.c (import from coreutils).
Paul Eggert [Wed, 17 Nov 2004 07:18:27 +0000 (07:18 +0000)]
Import from coreutils.
Paul Eggert [Wed, 17 Nov 2004 01:54:16 +0000 (01:54 +0000)]
Further getopt changes to make it more acceptable to glibc.
Paul Eggert [Wed, 17 Nov 2004 01:53:27 +0000 (01:53 +0000)]
(__getopt_argv_const): Bring it back.
(getopt_long, getopt_long_only): Use it.
Paul Eggert [Wed, 17 Nov 2004 01:52:50 +0000 (01:52 +0000)]
(getopt_long, getopt_long_only): Arg is char * const *
when compiling for libc.
Paul Eggert [Wed, 17 Nov 2004 01:52:35 +0000 (01:52 +0000)]
(POSIXLY_CORRECT): New constant.
Paul Eggert [Wed, 17 Nov 2004 01:13:54 +0000 (01:13 +0000)]
Merge from coreutils to support a more-standard getopt.
Jim Meyering [Tue, 16 Nov 2004 13:46:34 +0000 (13:46 +0000)]
*** empty log message ***
Jim Meyering [Tue, 16 Nov 2004 13:44:34 +0000 (13:44 +0000)]
(Depends-on): Add fpending.
Paul Eggert [Tue, 16 Nov 2004 08:25:50 +0000 (08:25 +0000)]
* getdate.y (tORDINAL): New token.
Paul Eggert [Tue, 16 Nov 2004 08:25:37 +0000 (08:25 +0000)]
(tORDINAL): New token.
(day, relunit): Allow it for relative times.
(relative_time_table): Use tORDINAL for ordinals.
Paul Eggert [Tue, 16 Nov 2004 08:25:13 +0000 (08:25 +0000)]
* getdate.texi (General date syntax): "next" is 1, not 2.
Paul Eggert [Tue, 16 Nov 2004 08:25:01 +0000 (08:25 +0000)]
getdate.texi (General date syntax): "next" is 1, not 2.
Document that "second" isn't allowed as an ordinal number.
Jim Meyering [Mon, 15 Nov 2004 17:46:17 +0000 (17:46 +0000)]
.
Jim Meyering [Mon, 15 Nov 2004 17:45:32 +0000 (17:45 +0000)]
Include "__fpending.h" once again.
Include <stdbool.h>.
(close_stdout): Don't fail just because stdout was closed initially,
since some programs don't write to stdout in the normal course of
operation (other than --version and --help), and we don't want this
function to make e.g. `touch file >&-' fail.
But do fail if it was closed and someone has tried to write to it.
E.g., `printf foo >&-' must fail.
Karl Berry [Sun, 14 Nov 2004 13:09:13 +0000 (13:09 +0000)]
.
Bruno Haible [Fri, 12 Nov 2004 16:55:30 +0000 (16:55 +0000)]
More caveats, taken from strtok_r.c.
Simon Josefsson [Fri, 12 Nov 2004 16:18:49 +0000 (16:18 +0000)]
Revert doc, suggested by Bruno.
Karl Berry [Fri, 12 Nov 2004 14:18:08 +0000 (14:18 +0000)]
.
Bruno Haible [Fri, 12 Nov 2004 13:06:40 +0000 (13:06 +0000)]
Add a cross-reference to strtok_r.
Karl Berry [Fri, 12 Nov 2004 09:07:35 +0000 (09:07 +0000)]
.
Simon Josefsson [Fri, 12 Nov 2004 00:09:08 +0000 (00:09 +0000)]
Remove buggy ChangeLog entry (sorry!).
Simon Josefsson [Fri, 12 Nov 2004 00:07:20 +0000 (00:07 +0000)]
Add strtok_r.
Simon Josefsson [Fri, 12 Nov 2004 00:05:45 +0000 (00:05 +0000)]
Add strtok_r.c.
Simon Josefsson [Fri, 12 Nov 2004 00:04:22 +0000 (00:04 +0000)]
Sync with glibc CVS.
Simon Josefsson [Fri, 12 Nov 2004 00:00:47 +0000 (00:00 +0000)]
Add strtok_r.
Simon Josefsson [Thu, 11 Nov 2004 23:49:55 +0000 (23:49 +0000)]
Add jas.
Paul Eggert [Thu, 11 Nov 2004 21:23:56 +0000 (21:23 +0000)]
* getopt_.h: Add __getopt_argv_const. Include <stdlib.h> and <stdio.h>
along with <unistd.h>.
Paul Eggert [Thu, 11 Nov 2004 21:16:28 +0000 (21:16 +0000)]
(_getopt_internal, _getopt_internal_r, _getopt_long_r, _getopt_long_only_r):
Use __getopt_argv_count.
Paul Eggert [Thu, 11 Nov 2004 21:16:03 +0000 (21:16 +0000)]
(getopt_long, _getopt_long_r, getopt_long_only, _getopt_long_only_r):
Use __getopt_argv_const.
Paul Eggert [Thu, 11 Nov 2004 21:15:33 +0000 (21:15 +0000)]
(_getopt_initialize, _getopt_internal_r, _getopt_internal, getopt):
Use __getopt_argv_const.
Paul Eggert [Thu, 11 Nov 2004 21:14:57 +0000 (21:14 +0000)]
(__getopt_argv_const): New macro, to be used so that
we can stop lying to compilers about the constness of argv when we
are compiled outside glibc.
(getopt, getopt_long, getopt_long_only): Use it.
[defined __GETOPT_PREFIX && !defined __need_getopt]:
Include <stdlib.h> and <stdio.h>, too.
Paul Eggert [Thu, 11 Nov 2004 21:00:47 +0000 (21:00 +0000)]
(gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
of replacing opterr, getopt, etc. This should handle the
powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
Paul Eggert [Thu, 11 Nov 2004 20:30:14 +0000 (20:30 +0000)]
* getopt_.h: rename getopt to __GETOPT_PREFIX##getopt, and so forth
Paul Eggert [Thu, 11 Nov 2004 20:27:32 +0000 (20:27 +0000)]
(gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
of replacing opterr, getopt, etc.
Paul Eggert [Thu, 11 Nov 2004 20:24:58 +0000 (20:24 +0000)]
[defined __GETOPT_PREFIX && !defined __need_getopt]:
Include <unistd.h> if available.
Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
the other external symbols.
(getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
declaration, since the above renaming now works around collisions.
Simon Josefsson [Thu, 11 Nov 2004 15:32:19 +0000 (15:32 +0000)]
Replace opterr.
Jim Meyering [Thu, 11 Nov 2004 11:04:13 +0000 (11:04 +0000)]
*** empty log message ***
Jim Meyering [Thu, 11 Nov 2004 09:40:45 +0000 (09:40 +0000)]
Remove trailing blanks.
Jim Meyering [Thu, 11 Nov 2004 09:29:44 +0000 (09:29 +0000)]
remove blank lines at end of file
Jim Meyering [Thu, 11 Nov 2004 09:26:43 +0000 (09:26 +0000)]
Remove trailing blanks.
Jim Meyering [Thu, 11 Nov 2004 09:25:55 +0000 (09:25 +0000)]
Remove trailing blank.
Karl Berry [Thu, 11 Nov 2004 08:55:03 +0000 (08:55 +0000)]
.
Paul Eggert [Thu, 11 Nov 2004 06:09:40 +0000 (06:09 +0000)]
Fix >> problems in getdate.y, strftime.c, quotearg.c.
Paul Eggert [Thu, 11 Nov 2004 05:58:47 +0000 (05:58 +0000)]
(struct quoting_options): Use unsigned int for quote_these_too, so
that right shifts are well defined. All uses changed.
Paul Eggert [Thu, 11 Nov 2004 05:57:27 +0000 (05:57 +0000)]
(SHR): New macro, which is a portable
substitute for >> that should work even on Crays.
(tm_diff): Use it.
Paul Eggert [Thu, 11 Nov 2004 04:59:09 +0000 (04:59 +0000)]
Sync from coreutils.
Paul Eggert [Thu, 11 Nov 2004 04:58:52 +0000 (04:58 +0000)]
(gl_MACROS): Don't require gl_FUNC_FPENDING.
Paul Eggert [Thu, 11 Nov 2004 04:58:05 +0000 (04:58 +0000)]
(gl_PREREQ): Require gt_FUNC_SETENV.
Paul Eggert [Thu, 11 Nov 2004 04:39:19 +0000 (04:39 +0000)]
* mktime.c (SHR): New macro.
Paul Eggert [Thu, 11 Nov 2004 04:37:32 +0000 (04:37 +0000)]
(SHR): New macro, which is a portable
substitute for >> that should work even on Crays.
(TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
Problem reported by Mark D. Baushke in
<http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
Simon Josefsson [Wed, 10 Nov 2004 14:53:00 +0000 (14:53 +0000)]
Add getaddrinfo.
Karl Berry [Wed, 10 Nov 2004 09:02:14 +0000 (09:02 +0000)]
.
Jim Meyering [Wed, 10 Nov 2004 08:49:39 +0000 (08:49 +0000)]
(Depends-on): Remove fpending.
Jim Meyering [Wed, 10 Nov 2004 08:48:50 +0000 (08:48 +0000)]
*** empty log message ***
Jim Meyering [Wed, 10 Nov 2004 08:48:41 +0000 (08:48 +0000)]
Ensure that no close failure goes unreported.
(close_stdout): Always close stdout. I.e., don't
return early when it seems there's nothing to flush.
Don't include __fpending.h.
Paul Eggert [Tue, 9 Nov 2004 20:55:29 +0000 (20:55 +0000)]
* strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
Paul Eggert [Tue, 9 Nov 2004 20:55:12 +0000 (20:55 +0000)]
(DO_MULTIBYTE): Check for wchar.h, too.
Paul Eggert [Tue, 9 Nov 2004 20:54:49 +0000 (20:54 +0000)]
* strftime.m4: Check for wchar.h and clean up a bit.
Paul Eggert [Tue, 9 Nov 2004 20:53:49 +0000 (20:53 +0000)]
(_gl_STRFTIME_PREREQS): Remove. Move its body to
gl_FUNC_STRFTIME.
(gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
and AC_REQUIRE when possible, to avoid duplicate checks.
Check for <wchar.h>.
Bruno Haible [Tue, 9 Nov 2004 12:56:41 +0000 (12:56 +0000)]
Detect support for IPv4 and IPv6 protocol families.
Karl Berry [Tue, 9 Nov 2004 00:09:09 +0000 (00:09 +0000)]
update from texinfo
Bruno Haible [Mon, 8 Nov 2004 12:54:48 +0000 (12:54 +0000)]
Use British English, not German English.
Bruno Haible [Fri, 5 Nov 2004 21:57:55 +0000 (21:57 +0000)]
Make sure size_t is defined.
Karl Berry [Fri, 5 Nov 2004 08:50:12 +0000 (08:50 +0000)]
.
Bruno Haible [Thu, 4 Nov 2004 13:34:20 +0000 (13:34 +0000)]
Distribute allocsa.valgrind.
Bruno Haible [Thu, 4 Nov 2004 13:32:03 +0000 (13:32 +0000)]
Upgrade allocsa module from GNU gettext.
Paul Eggert [Wed, 3 Nov 2004 23:26:03 +0000 (23:26 +0000)]
Update serial number.
Paul Eggert [Wed, 3 Nov 2004 17:37:58 +0000 (17:37 +0000)]
Remove trailing white space.
Paul Eggert [Wed, 3 Nov 2004 17:20:55 +0000 (17:20 +0000)]
* uint32_t.m4 (gl_AC_TYPE_UINT32_T): Fix typo and define _UINT32_T.
Paul Eggert [Wed, 3 Nov 2004 17:20:32 +0000 (17:20 +0000)]
(gl_AC_TYPE_UINT32_T): When determining uint32_t
equivalent, substitute $ac_type for equivalent type rather than
blindly using uint32_t *always* which won't work if uint32_t is not
available. Define _UINT32_T to work around typedef of uint32_t if
<sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
2.5.1.
Paul Eggert [Wed, 3 Nov 2004 09:24:41 +0000 (09:24 +0000)]
* xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
with errno == ERANGE if the buffer is too small.
Paul Eggert [Wed, 3 Nov 2004 09:24:17 +0000 (09:24 +0000)]
xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
with errno == ERANGE if the buffer is too small.
Paul Eggert [Tue, 2 Nov 2004 20:18:26 +0000 (20:18 +0000)]
xreadlink problems with SSIZE_MAX.
Paul Eggert [Tue, 2 Nov 2004 20:17:37 +0000 (20:17 +0000)]
(MAXSIZE): New macro.
(xreadlink): Use it instead of SSIZE_MAX. Ensure initial buffer
size does not exceed MAXSIZE. Avoid cast.
As suggested by Mark D. Baushke in
<http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
if readlink fails with buffer size just under MAXSIZE, try again
with MAXSIZE.
Paul Eggert [Tue, 2 Nov 2004 19:22:29 +0000 (19:22 +0000)]
* srclist.txt: Add mktime.c; glibc bought all our changes.
Paul Eggert [Tue, 2 Nov 2004 19:20:58 +0000 (19:20 +0000)]
* jm-macros.m4: Sync from coreutils.
Paul Eggert [Tue, 2 Nov 2004 19:18:44 +0000 (19:18 +0000)]
* getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
(get_date): Overparenthesize to avoid GCC warning.
Bruno Haible [Tue, 2 Nov 2004 12:29:39 +0000 (12:29 +0000)]
Provide a return value for unsetenv() if the system doesn't.
Simon Josefsson [Mon, 1 Nov 2004 21:46:25 +0000 (21:46 +0000)]
getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
fflush_unlocked, flockfile, funlockfile, funlockfile,
fputs_unlocked, putc_unlocked.
Simon Josefsson [Mon, 1 Nov 2004 21:45:37 +0000 (21:45 +0000)]
(fflush_unlocked, flockfile, funlockfile)
(funlockfile, fputs_unlocked, putc_unlocked): Don't define if
already declared.
Karl Berry [Sun, 31 Oct 2004 15:00:30 +0000 (15:00 +0000)]
update from texinfo
Karl Berry [Sat, 30 Oct 2004 08:00:13 +0000 (08:00 +0000)]
.