Mercurial > hg > octave-lyh > gnulib-hg
changeset 4070:925594d77a99
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.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Fri, 06 Dec 2002 08:00:45 +0000 |
parents | 335a257b54d7 |
children | 7c099bf32c2f |
files | lib/error.c |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/error.c +++ b/lib/error.c @@ -27,7 +27,6 @@ #else # include "gettext.h" #endif -#define _(msgid) gettext (msgid) #ifdef _LIBC # include <wchar.h> @@ -55,7 +54,14 @@ #endif #include "error.h" -#include "unlocked-io.h" + +#ifndef _LIBC +# include "unlocked-io.h" +#endif + +#ifndef _ +# define _(String) String +#endif /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this @@ -74,6 +80,7 @@ # define program_name program_invocation_name # include <errno.h> +# include <libio/libioP.h> /* In GNU libc we want do not want to use the common name `error' directly. Instead make it a weak alias. */ @@ -88,7 +95,9 @@ # ifdef USE_IN_LIBIO # include <libio/iolibio.h> -# define fflush(s) _IO_fflush (s) +# define fflush(s) INTUSE(_IO_fflush) (s) +# undef putc +# define putc(c, fp) INTUSE(_IO_putc) (c, fp) # endif #else /* not _LIBC */