+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.
+
2001-08-16 Ulrich Drepper <drepper@redhat.com>
+ * 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.
+
* libio/tst-ungetwc2.c (main): Define str const.
* include/wchar.h: Add prototypes for __fwprintf and __vfwprintf.
{
#ifdef USE_IN_LIBIO
if (_IO_fwide (fs->stream, 0) > 0)
- fwprintf (fs->stream, L"%.*s", (int) (fs->p - fs->buf), fs->buf);
+ __fwprintf (fs->stream, L"%.*s", (int) (fs->p - fs->buf), fs->buf);
else
#endif
fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
{
#ifdef USE_IN_LIBIO
if (_IO_fwide (fs->stream, 0) > 0)
- fwprintf (fs->stream, L"%.*s\n",
- (int) (nl - fs->buf), fs->buf);
+ __fwprintf (fs->stream, L"%.*s\n",
+ (int) (nl - fs->buf), fs->buf);
else
#endif
{
|| st.st_size < sizeof (struct gconvcache_header))
{
close_and_exit:
- close (fd);
+ __close (fd);
return -1;
}
}
/* We don't need the file descriptor anymore. */
- close (fd);
+ __close (fd);
/* Check the consistency. */
header = (struct gconvcache_header *) cache;
}
#ifdef _POSIX_MAPPED_FILES
else
- munmap (cache, cache_size);
+ __munmap (cache, cache_size);
#endif
cache = NULL;
free (cache);
#ifdef _POSIX_MAPPED_FILES
else
- munmap (cache, cache_size);
+ __munmap (cache, cache_size);
#endif
}
extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
size_t __n)
__attribute_pure__;
+extern int __wcscoll (__const wchar_t *__s1, __const wchar_t *__s2);
extern size_t __wcslen (__const wchar_t *__s) __attribute_pure__;
extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
__attribute_pure__;
NULL, 0,
NI_NUMERICHOST);
- asprintf (&buf, _("connect to address %s: "), paddr);
+ __asprintf (&buf, _("connect to address %s: "), paddr);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
__fwprintf(stderr, L"%s", buf);
paddr, sizeof(paddr),
NULL, 0,
NI_NUMERICHOST);
- asprintf (&buf, _("Trying %s...\n"), paddr);
+ __asprintf (&buf, _("Trying %s...\n"), paddr);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
__fwprintf (stderr, L"%s", buf);
if (__write(s, num, strlen(num)+1) != (ssize_t)strlen(num)+1) {
char *buf = NULL;
- asprintf (&buf,
- _("rcmd: write (setting up stderr): %m\n"));
+ __asprintf (&buf, _("\
+rcmd: write (setting up stderr): %m\n"));
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
__fwprintf(stderr, L"%s", buf);
char *buf = NULL;
if (errno != 0)
- asprintf(&buf,
- _("rcmd: poll (setting up stderr): %m\n"));
+ __asprintf(&buf,
+ _("rcmd: poll (setting up stderr): %m\n"));
else
- asprintf(&buf,
+ __asprintf(&buf,
_("poll: protocol failure in circuit setup\n"));
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
if (rport >= IPPORT_RESERVED || rport < IPPORT_RESERVED / 2){
char *buf = NULL;
- asprintf(&buf,
+ __asprintf(&buf,
_("socket: protocol failure in circuit setup\n"));
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
char *buf = NULL;
if (n == 0)
- asprintf(&buf, _("rcmd: %s: short read"), *ahost);
+ __asprintf(&buf, _("rcmd: %s: short read"), *ahost);
else
- asprintf(&buf, "rcmd: %s: %m\n", *ahost);
+ __asprintf(&buf, "rcmd: %s: %m\n", *ahost);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
__fwprintf (stderr, L"%s", buf);
_IO_flockfile (fp);
if (filename == NULL && _IO_fileno (fp) >= 0)
{
- fd = dup (_IO_fileno (fp));
+ fd = __dup (_IO_fileno (fp));
if (fd != -1)
filename = fd_to_filename (fd);
}
result->_mode = 0;
if (fd != -1)
{
- close (fd);
+ __close (fd);
if (filename != NULL)
free ((char *) filename);
}
_IO_flockfile (fp);
if (filename == NULL && _IO_fileno (fp) >= 0)
{
- fd = dup (_IO_fileno (fp));
+ fd = __dup (_IO_fileno (fp));
if (fd != -1)
filename = fd_to_filename (fd);
}
result->_mode = 0;
if (fd != -1)
{
- close (fd);
+ __close (fd);
if (filename != NULL)
free ((char *) filename);
}
int done;
va_start (arg, format);
- done = vfwprintf (stream, format, arg);
+ done = __vfwprintf (stream, format, arg);
va_end (arg);
return done;
-/* Copyright (C) 1991, 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1993,1995,1997,1999,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
const wchar_t *format;
__gnuc_va_list arg;
{
- return vfwprintf (stdout, format, arg);
+ return __vfwprintf (stdout, format, arg);
}
-/* Copyright (C) 1991, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995,1996,1997,1999,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
int done;
va_start (arg, format);
- done = vfwprintf (stdout, format, arg);
+ done = __vfwprintf (stdout, format, arg);
va_end (arg);
return done;
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. */
#include <libintl.h>
#ifdef _LIBC
# include <wchar.h>
+# define mbsrtowcs __mbsrtowcs
#endif
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
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) ();
#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);
if (status)
exit (status);
#endif
+
+#ifdef _LIBC
+# ifdef USE_IN_LIBIO
+ _IO_funlockfile (stderr);
+# else
+ __funlockfile (stderr);
+# endif
+#endif
}
\f
/* Sometimes we want to have at most one error per line. This
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) ();
#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);
if (status)
exit (status);
#endif
+
+#ifdef _LIBC
+# ifdef USE_IN_LIBIO
+ _IO_funlockfile (stderr);
+# else
+ __funlockfile (stderr);
+# endif
+#endif
}
#ifdef _LIBC
for( ; mb_remain > 0 ; ++wc_count, ++pdest, mb_remain -= consumed,
psrc += consumed)
{
+#ifdef _LIBC
+ consumed = __mbrtowc (pdest, psrc, mb_remain, &mbs);
+#else
consumed = mbrtowc (pdest, psrc, mb_remain, &mbs);
+#endif
if (consumed <= 0)
/* failed to convert. maybe src contains binary data.
& ~(uintptr_t)(__alignof__(wctype_t) - 1);
wctype = *((wctype_t*)alignedp);
workp += CHAR_CLASS_SIZE;
+# ifdef _LIBC
+ if (__iswctype((wint_t)c, wctype))
+ goto char_set_matched;
+# else
if (iswctype((wint_t)c, wctype))
goto char_set_matched;
+# endif
}
/* match with collating_symbol? */
for (workp2 = workp + coll_symbol_length ; workp < workp2 ;)
{
const CHAR_T *backup_d = d, *backup_dend = dend;
- length = wcslen(workp);
+# ifdef _LIBC
+ length = __wcslen (workp);
+# else
+ length = wcslen (workp);
+# endif
/* If wcscoll(the collating symbol, whole string) > 0,
any substring of the string never match with the
collating symbol. */
- if (wcscoll(workp, d) > 0)
+ if (__wcscoll (workp, d) > 0)
{
workp += length + 1;
continue;
str_buf[i] = TRANSLATE(*d);
str_buf[i+1] = '\0';
- match = wcscoll(workp, str_buf);
+# ifdef _LIBC
+ match = __wcscoll (workp, str_buf);
+# else
+ match = wcscoll (workp, str_buf);
+# endif
if (match == 0)
goto char_set_matched;
for (workp2 = workp + equiv_class_length ; workp < workp2 ;)
{
const CHAR_T *backup_d = d, *backup_dend = dend;
- length = wcslen(workp);
+# ifdef _LIBC
+ length = __wcslen (workp);
+# else
+ length = wcslen (workp);
+# endif
/* If wcscoll(the collating symbol, whole string) > 0,
any substring of the string never match with the
collating symbol. */
- if (wcscoll(workp, d) > 0)
+# ifdef _LIBC
+ if (__wcscoll (workp, d) > 0)
+# else
+ if (wcscoll (workp, d) > 0)
+# endif
{
workp += length + 1;
break;
str_buf[i] = TRANSLATE(*d);
str_buf[i+1] = '\0';
- match = wcscoll(workp, str_buf);
+# ifdef _LIBC
+ match = __wcscoll (workp, str_buf);
+# else
+ match = wcscoll (workp, str_buf);
+# endif
if (match == 0)
goto char_set_matched;
}
/* match with char_range? */
-#ifdef _LIBC
+# ifdef _LIBC
if (nrules != 0)
{
uint32_t collseqval;
}
}
else
-#endif
+# endif
{
/* We set range_start_char at str_buf[0], range_end_char
at str_buf[4], and compared char at str_buf[2]. */
range_end_char = str_buf + 4;
}
- if (wcscoll(range_start_char, str_buf+2) <= 0 &&
- wcscoll(str_buf+2, range_end_char) <= 0)
-
+# ifdef _LIBC
+ if (__wcscoll (range_start_char, str_buf+2) <= 0
+ && __wcscoll (str_buf+2, range_end_char) <= 0)
+# else
+ if (wcscoll (range_start_char, str_buf+2) <= 0
+ && wcscoll (str_buf+2, range_end_char) <= 0)
+# endif
goto char_set_matched;
}
}
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
- fwprintf (stderr, L"%s", buf);
+ __fwprintf (stderr, L"%s", buf);
else
#endif
fputs (buf, stderr);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
- fwprintf (stderr, L"%s", buf);
+ __fwprintf (stderr, L"%s", buf);
else
#endif
fputs (buf, stderr);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
- fwprintf (stderr, L"%s", buf);
+ __fwprintf (stderr, L"%s", buf);
else
#endif
fputs (buf, stderr);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
- fwprintf (stderr, L"%s", buf);
+ __fwprintf (stderr, L"%s", buf);
else
#endif
fputs (buf, stderr);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
- fwprintf (stderr, L"%s", buf);
+ __fwprintf (stderr, L"%s", buf);
else
#endif
fputs (buf, stderr);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
- fwprintf (stderr, L"%s", buf);
+ __fwprintf (stderr, L"%s", buf);
else
#endif
fputs (buf, stderr);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
- fwprintf (stderr, L"%s", buf);
+ __fwprintf (stderr, L"%s", buf);
else
#endif
fputs (buf, stderr);
__asprintf (&buf,
_("%s: line %d: ignoring trailing garbage `%s'\n"),
- fname, line_num, str);
+ fname, line_num, str);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
using the same underlying file descriptor. */
if (__builtin_expect (_IO_fwide (stderr, 0) != 0, 1)
|| fileno_unlocked (stderr) == -1
- || (fd = dup (fileno_unlocked (stderr))) == -1
+ || (fd = __dup (fileno_unlocked (stderr))) == -1
|| (fp = fdopen (fd, "w+")) == NULL)
{
if (__builtin_expect (fd != -1, 0))
- close (fd);
+ __close (fd);
/* Use standard error as is. */
perror_internal (stderr, s);
err_out:
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
- (void) fwprintf (stderr, L"%s", buf);
+ (void) __fwprintf (stderr, L"%s", buf);
else
#endif
(void) fputs (buf, stderr);
{
if (svc_sendreply (transp_l, (xdrproc_t)xdr_void, (char *) NULL) == FALSE)
{
- write (STDERR_FILENO, "xxx\n", 4);
+ __write (STDERR_FILENO, "xxx\n", 4);
exit (1);
}
return;
const char *str = pattern;
if (str[0] == '\0')
- str = gettext ("parameter null or not set");
+ str = _("parameter null or not set");
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
sockatmark (fd)
int fd;
{
- return ioctl (fd, SIOCATMARK);
+ return __ioctl (fd, SIOCATMARK);
}
info.si_signo = sig;
info.si_code = SI_ASYNCNL;
info.si_pid = caller_pid;
- info.si_uid = getuid ();
+ info.si_uid = __getuid ();
info.si_value = val;
return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid,
-/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
# define STRCOLL __wcscoll_l
#else
-# define STRCOLL wcscoll
+# define STRCOLL __wcscoll
#endif
#define STRCMP wcscmp
#define STRLEN __wcslen
#define WIDE_CHAR_VERSION 1
#include "../string/strcoll.c"
+
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
+weak_alias (__wcscoll, wcscoll)
+#endif