48 Commits
Author SHA1 Message Date
Bruno Haible 0facee0479 Add missing definition of _ macro. 2007-07-21 08:10:38 +00:00
Paul Eggert 0632e11574 * _fpending.c: Include <config.h> unconditionally, since we no
longer worry about uses that don't define HAVE_CONFIG_H.
* acl.c, alloca.c, argmatch.c, atexit.c, backupfile.c:
* basename.c, c-stack.c, c-strtod.c, calloc.c, canon-host.c:
* canonicalize.c, chdir-long.c, chdir-safer.c, chown.c:
* cloexec.c, close-stream.c, closeout.c, creat-safer.c:
* cycle-check.c, diacrit.c, dirchownmod.c, dirfd.c, dirname.c:
* dup-safer.c, dup2.c, error.c, euidaccess.c, exclude.c:
* exitfail.c, fchmodat.c, fchown-stub.c, fd-safer.c:
* file-type.c, fileblocks.c, filemode.c, filenamecat.c:
* fnmatch.c, fopen-safer.c, fprintftime.c, free.c, fsusage.c:
* ftruncate.c, fts-cycle.c, fts.c, full-write.c, gai_strerror.c:
* getcwd.c, getdate.y, getdomainname.c, getgroups.c:
* gethostname.c, gethrxtime.c, getloadavg.c, getlogin_r.c:
* getndelim2.c, getnline.c, getopt.c, getopt1.c, getpass.c:
* gettime.c, gettimeofday.c, getugroups.c, getusershell.c:
* glob.c, group-member.c, hard-locale.c, hash-pjw.c, hash.c:
* human.c, idcache.c, inet_ntop.c, inet_pton.c, inttostr.c:
* isdir.c, lchown.c, linebuffer.c, long-options.c, lstat.c:
* malloc.c, md5.c, memcasecmp.c, memchr.c, memcmp.c, memcoll.c:
* memcpy.c, memmove.c, memrchr.c, mkancesdirs.c, mkdir-p.c:
* mkdir.c, mkdirat.c, mkstemp-safer.c, mkstemp.c, modechange.c:
* mountlist.c, nanosleep.c, obstack.c, open-safer.c:
* openat-die.c, openat.c, pagealign_alloc.c, physmem.c:
* pipe-safer.c, posixtm.c, posixver.c, putenv.c, quote.c:
* quotearg.c, raise.c, readtokens.c, readtokens0.c, readutmp.c:
* realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c, safe-read.c:
* same.c, save-cwd.c, savedir.c, setenv.c, settime.c, sha1.c:
* sig2str.c, snprintf.c, strdup.c, strerror.c, strftime.c:
* stripslash.c, strndup.c, strnlen.c, strpbrk.c, strtod.c:
* strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c:
* timegm.c, tmpfile-safer.c, unlinkdir.c, userspec.c, utime.c:
* utimecmp.c, utimens.c, version-etc-fsf.c, version-etc.c:
* xalloc-die.c, xgetcwd.c, xgethostname.c, xmalloc.c:
* xmemcoll.c, xnanosleep.c, xreadlink.c, xstrtod.c:
* xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c:
Likewise.
2006-09-13 22:38:14 +00:00
Eric Blake 26bb2bf67a * error.c (error_at_line, print_errno_message): Match libc, after
resolution of upstream bug 3044.
2006-08-29 16:58:34 +00:00
Eric Blake 1a420a876d * misc/error.c: Add space between program name and message if file
name is missing.
2006-08-14 16:08:25 +00:00
Eric Blake be5a3998ec * error.h: Fold in some upstream changes from glibc.
* error.c: Likewise.
2006-08-06 12:36:47 +00:00
Paul Eggert 267a39bafd *** empty log message *** 2005-05-14 06:03:57 +00:00
Paul Eggert 4d04667fe1 [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
not needed.  This removes a dependency on the gettext module.
[defined _LIBC]: Do not include <libintl.h>; not needed.
2004-12-29 05:49:08 +00:00
Simon Josefsson c60b43afa7 error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
'#ifdef USE_UNLOCKED_IO'.
2004-10-04 20:30:46 +00:00
Paul Eggert 917752adb1 Remove dependencies on unlocked-io. 2004-10-04 20:17:39 +00:00
Paul Eggert ce528855d3 Work around bug in OpenBSD 3.4 sterror_r: it
sometimes returns a positive errno value even when it succeeds.
(print_errno_message) [!LIBC]: Fall back on strerror if
__strerror_r fails.
2004-08-05 23:39:18 +00:00
Jim Meyering 1936bcb201 Correct cpp indentation. 2003-09-28 08:09:13 +00:00
Paul Eggert 22c1c15d0a (error_tail): Don't cast alloca to (void *); it's already (void *). 2003-09-27 14:30:57 +00:00
Paul Eggert 30a788ee9d * error.c (error_tail): Move some declarations
into inner scope where the local variables are used.
2003-09-27 05:11:56 +00:00
Paul Eggert cd6df927ef (SIZE_MAX) [!defined SIZE_MAX]: Define.
(error_tail): Do not loop, reallocating temporary buffer, since
the original size is big enough.  This avoids one potential size
overflow calculation.  Check for size overflow when calculating
temporary buffer size.  Free temporary buffer when done, if
it was allocated with malloc; this closes a memory leak.
2003-09-26 07:41:40 +00:00
Paul Eggert 2fee8e2261 Merge changes from glibc. 2003-09-26 07:35:01 +00:00
Paul Eggert c5467a5a59 Assume vprintf. 2003-09-12 19:47:20 +00:00
Jim Meyering bc304cd48f Correct indentation of cpp directives. 2003-09-10 08:33:11 +00:00
Paul Eggert 9ecb528856 Remove K&R cruft. 2003-09-08 23:26:06 +00:00
Paul Eggert 8518213783 [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is 1.
This merges changes from glibc (merge done by Jim Meyering for coreutils).
2003-08-04 22:46:12 +00:00
Jim Meyering 88cade9dab Be consistent: change #ifndef _LIBC' to #if !_LIBC'. 2002-12-06 08:08:13 +00:00
Jim Meyering ccd26a7b9b Merge in changes from libc's misc/error.c, in preparation
for the merge of gnulib's changes back into libc.

(_): Define only if not already defined.
Move definition to follow all #include directives.
Include unlocked-io.h only if !_LIBC.
[_LIBC]: Include <libio/libioP.h>.
[USE_IN_LIBIO]: Include <libio/iolibio.h>
(fflush): Tweak definition to use INTUSE.
(putc): Define.
2002-12-06 08:00:45 +00:00
Karl Berry b747607866 change license to gpl. 2002-11-25 00:17:33 +00:00
Jim Meyering ca45c1dd80 Add copyright date of 2002. 2002-11-23 15:07:14 +00:00
Bruno Haible f9fa25dca3 Include gettext.h instead of <libintl.h> with #ifdefs. 2002-11-05 21:45:29 +00:00
Jim Meyering 92f1833aff Include unlocked-io.h. 2001-11-17 13:29:42 +00:00
Jim Meyering e5bf94ff35 (strerror_r): Do not declare unless !_LIBC.
Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
Use strerror_r that is only a macro, even if it is not a function.
(strerror): Check for HAVE_DECL_STRERROR before declaring.
(private_strerror): Use prototypes, not old-style function definition.
(print_errno_message): New function.
Support the POSIX 'int'-flavored strerror_r, as well as the traditional
char*-flavored one.
(error_tail, error, error_at_line): Use it.
2001-10-21 07:59:04 +00:00
Jim Meyering 0a3f156068 Update from GNU libc. 2001-09-02 13:22:25 +00:00
Jim Meyering f534d0f5bc Add a couple #includes, merging from GNU libc version. 2000-11-11 14:32:00 +00:00
Jim Meyering 067a83f1ec [!HAVE_DECL_STRERROR_R]: Declare strerror_r. 2000-06-24 12:01:03 +00:00
Jim Meyering eb0bfaedf2 remove stray define before _LIBC 2000-01-08 17:53:35 +00:00
Jim Meyering 3e6339641e (error): Use __strerror_r's return value only if HAVE_WORKING_STRERROR_R.
(error_at_line): Likewise.
2000-01-08 16:44:19 +00:00
Jim Meyering 6e93b42a69 (error_at_line): Use strerror portably here, too,
just as was done in error.
1999-09-28 14:48:43 +00:00
Jim Meyering 82a4c5fa91 (error): Don't use strerror_r's return value. 1998-11-15 17:35:34 +00:00
Jim Meyering 9e096f5feb new version from Uli 1998-03-27 11:23:07 +00:00
Jim Meyering 35f707281a update from fsf 1998-03-15 08:11:02 +00:00
Jim Meyering 729a416929 libitize 1997-02-04 03:26:31 +00:00
Jim Meyering 552dcada1a . 1996-10-29 13:47:56 +00:00
Jim Meyering a76c51d1f6 Use #if, not #ifdef in test for HAVE_CONFIG_H. 1996-10-10 02:50:37 +00:00
Jim Meyering 045e7caeba Include error.h to align with libit -- under protest, François :-). 1996-10-09 02:33:18 +00:00
Jim Meyering 9243fffedb Indent cpp-directives. 1996-04-18 23:02:17 +00:00
Jim Meyering 0a3a4d1e45 . 1996-04-03 12:33:23 +00:00
Jim Meyering 36ffc38fe4 update from FSF:/home/gd/gnu/lib 1996-03-30 14:26:16 +00:00
Jim Meyering 533ec87bc2 Update from libc. 1996-03-30 12:39:36 +00:00
Jim Meyering f88e233cf5 new version from FSF 1995-12-15 15:35:15 +00:00
Jim Meyering 4ad1794bf3 Fix typo in comment. 1995-09-13 13:15:35 +00:00
Jim Meyering b80c3874f5 merge with 1.11.1a 1995-05-20 13:28:24 +00:00
Jim Meyering 1f08620264 . 1995-03-20 14:26:41 +00:00
Jim Meyering 43e78b970f Initial revision 1992-11-01 05:44:30 +00:00