aboutsummaryrefslogtreecommitdiff
path: root/misc/error.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-17 07:51:36 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-17 07:51:36 +0000
commit6293b80374f7c7b017515b9a8716a9ea16eb063a (patch)
treee2c8c00c351a5da2e44e534f298c65901e085303 /misc/error.c
parent51028f34ceeb7c4c91abc2ac2b818afeaa671b91 (diff)
downloadglibc-6293b80374f7c7b017515b9a8716a9ea16eb063a.tar
glibc-6293b80374f7c7b017515b9a8716a9ea16eb063a.tar.gz
glibc-6293b80374f7c7b017515b9a8716a9ea16eb063a.tar.bz2
glibc-6293b80374f7c7b017515b9a8716a9ea16eb063a.zip
Update.
2001-08-17 Ulrich Drepper <drepper@redhat.com> * 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.
Diffstat (limited to 'misc/error.c')
-rw-r--r--misc/error.c35
1 files changed, 27 insertions, 8 deletions
diff --git a/misc/error.c b/misc/error.c
index 86d49a52a6..8306fd569f 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -28,6 +28,7 @@
#include <libintl.h>
#ifdef _LIBC
# include <wchar.h>
+# 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