From 6293b80374f7c7b017515b9a8716a9ea16eb063a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 17 Aug 2001 07:51:36 +0000 Subject: Update. 2001-08-17 Ulrich Drepper * sunrpc/svc_simple.c (universal): Use __write instead of write. * wcsmbs/wcscoll.c: Also define __wcscoll. * include/wchar.h: Declare __wcscoll. * libio/fwprintf.c: Use __vfwprintf instead of vfwprintf. * libio/vwprintf.c: Likewise. * libio/wprintf.c: Likewise. * iconv/gconv_cache.c: Use __munmap instead of munmap. * posix/regex.c [_LIBC] (convert_mbs_to_wcs): Use __mbrtowc instead of mbrtowc. [_LIBC]: Use __iswctype instead of iswctype, __wcslen instead of wcslen, and __wcscoll instead of wcscoll. * sysdeps/unix/sockatmark.c (sockatmark): Use __ioctl instead of ioctl. * sysdeps/unix/sysv/linux/gai_sigqueue.c (__gai_sigqueue): Use __getuid instead of getuid. * stdio-common/perror.c (perror): Use __close instead of close. * iconv/gconv_cache.c (__gconv_load_cache): Likewise. * libio/freopen.c (freopen): Likewise. * libio/freopen64.c (freopen64): Likewise. --- misc/err.c | 2 +- misc/error.c | 35 +++++++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 9 deletions(-) (limited to 'misc') diff --git a/misc/err.c b/misc/err.c index 24b615b..4c37203 100644 --- a/misc/err.c +++ b/misc/err.c @@ -77,7 +77,7 @@ convert_and_print (const char *format, __gnuc_va_list ap) memset (&st, '\0', sizeof (st)); tmp =format; } - while ((res = mbsrtowcs (wformat, &tmp, len, &st)) == len); + while ((res = __mbsrtowcs (wformat, &tmp, len, &st)) == len); if (res == (size_t) -1) /* The string cannot be converted. */ diff --git a/misc/error.c b/misc/error.c index 86d49a5..8306fd5 100644 --- a/misc/error.c +++ b/misc/error.c @@ -28,6 +28,7 @@ #include #ifdef _LIBC # include +# define mbsrtowcs __mbsrtowcs #endif #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC @@ -225,7 +226,11 @@ error (status, errnum, message, va_alist) fflush (stdout); #ifdef _LIBC - flockfile (stderr); +# ifdef USE_IN_LIBIO + _IO_flockfile (stderr); +# else + __flockfile (stderr); +# endif #endif if (error_print_progname) (*error_print_progname) (); @@ -242,9 +247,6 @@ error (status, errnum, message, va_alist) #ifdef VA_START VA_START (args, message); error_tail (status, errnum, message, args); -# ifdef _LIBC - funlockfile (stderr); -# endif #else fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8); @@ -256,6 +258,14 @@ error (status, errnum, message, va_alist) if (status) exit (status); #endif + +#ifdef _LIBC +# ifdef USE_IN_LIBIO + _IO_funlockfile (stderr); +# else + __funlockfile (stderr); +# endif +#endif } /* Sometimes we want to have at most one error per line. This @@ -297,7 +307,11 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist) fflush (stdout); #ifdef _LIBC - flockfile (stderr); +# ifdef USE_IN_LIBIO + _IO_flockfile (stderr); +# else + __flockfile (stderr); +# endif #endif if (error_print_progname) (*error_print_progname) (); @@ -324,9 +338,6 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist) #ifdef VA_START VA_START (args, message); error_tail (status, errnum, message, args); -# ifdef _LIBC - funlockfile (stderr); -# endif #else fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8); @@ -338,6 +349,14 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist) if (status) exit (status); #endif + +#ifdef _LIBC +# ifdef USE_IN_LIBIO + _IO_funlockfile (stderr); +# else + __funlockfile (stderr); +# endif +#endif } #ifdef _LIBC -- cgit v1.1