mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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.
This commit is contained in:
28
ChangeLog
28
ChangeLog
@ -1,5 +1,33 @@
|
|||||||
|
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>
|
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.
|
* libio/tst-ungetwc2.c (main): Define str const.
|
||||||
|
|
||||||
* include/wchar.h: Add prototypes for __fwprintf and __vfwprintf.
|
* include/wchar.h: Add prototypes for __fwprintf and __vfwprintf.
|
||||||
|
@ -100,7 +100,7 @@ __argp_fmtstream_free (argp_fmtstream_t fs)
|
|||||||
{
|
{
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (fs->stream, 0) > 0)
|
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
|
else
|
||||||
#endif
|
#endif
|
||||||
fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
|
fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
|
||||||
@ -286,8 +286,8 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
|||||||
{
|
{
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (fs->stream, 0) > 0)
|
if (_IO_fwide (fs->stream, 0) > 0)
|
||||||
fwprintf (fs->stream, L"%.*s\n",
|
__fwprintf (fs->stream, L"%.*s\n",
|
||||||
(int) (nl - fs->buf), fs->buf);
|
(int) (nl - fs->buf), fs->buf);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@ __gconv_load_cache (void)
|
|||||||
|| st.st_size < sizeof (struct gconvcache_header))
|
|| st.st_size < sizeof (struct gconvcache_header))
|
||||||
{
|
{
|
||||||
close_and_exit:
|
close_and_exit:
|
||||||
close (fd);
|
__close (fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ __gconv_load_cache (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* We don't need the file descriptor anymore. */
|
/* We don't need the file descriptor anymore. */
|
||||||
close (fd);
|
__close (fd);
|
||||||
|
|
||||||
/* Check the consistency. */
|
/* Check the consistency. */
|
||||||
header = (struct gconvcache_header *) cache;
|
header = (struct gconvcache_header *) cache;
|
||||||
@ -121,7 +121,7 @@ __gconv_load_cache (void)
|
|||||||
}
|
}
|
||||||
#ifdef _POSIX_MAPPED_FILES
|
#ifdef _POSIX_MAPPED_FILES
|
||||||
else
|
else
|
||||||
munmap (cache, cache_size);
|
__munmap (cache, cache_size);
|
||||||
#endif
|
#endif
|
||||||
cache = NULL;
|
cache = NULL;
|
||||||
|
|
||||||
@ -444,7 +444,7 @@ free_mem (void)
|
|||||||
free (cache);
|
free (cache);
|
||||||
#ifdef _POSIX_MAPPED_FILES
|
#ifdef _POSIX_MAPPED_FILES
|
||||||
else
|
else
|
||||||
munmap (cache, cache_size);
|
__munmap (cache, cache_size);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ extern int __wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2)
|
|||||||
extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
|
extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
|
||||||
size_t __n)
|
size_t __n)
|
||||||
__attribute_pure__;
|
__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 __wcslen (__const wchar_t *__s) __attribute_pure__;
|
||||||
extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
|
extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
|
||||||
__attribute_pure__;
|
__attribute_pure__;
|
||||||
|
20
inet/rcmd.c
20
inet/rcmd.c
@ -206,7 +206,7 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
|
|||||||
NULL, 0,
|
NULL, 0,
|
||||||
NI_NUMERICHOST);
|
NI_NUMERICHOST);
|
||||||
|
|
||||||
asprintf (&buf, _("connect to address %s: "), paddr);
|
__asprintf (&buf, _("connect to address %s: "), paddr);
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
__fwprintf(stderr, L"%s", buf);
|
__fwprintf(stderr, L"%s", buf);
|
||||||
@ -220,7 +220,7 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
|
|||||||
paddr, sizeof(paddr),
|
paddr, sizeof(paddr),
|
||||||
NULL, 0,
|
NULL, 0,
|
||||||
NI_NUMERICHOST);
|
NI_NUMERICHOST);
|
||||||
asprintf (&buf, _("Trying %s...\n"), paddr);
|
__asprintf (&buf, _("Trying %s...\n"), paddr);
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
__fwprintf (stderr, L"%s", buf);
|
__fwprintf (stderr, L"%s", buf);
|
||||||
@ -267,8 +267,8 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
|
|||||||
if (__write(s, num, strlen(num)+1) != (ssize_t)strlen(num)+1) {
|
if (__write(s, num, strlen(num)+1) != (ssize_t)strlen(num)+1) {
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
|
|
||||||
asprintf (&buf,
|
__asprintf (&buf, _("\
|
||||||
_("rcmd: write (setting up stderr): %m\n"));
|
rcmd: write (setting up stderr): %m\n"));
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
__fwprintf(stderr, L"%s", buf);
|
__fwprintf(stderr, L"%s", buf);
|
||||||
@ -286,10 +286,10 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
|
|||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
|
|
||||||
if (errno != 0)
|
if (errno != 0)
|
||||||
asprintf(&buf,
|
__asprintf(&buf,
|
||||||
_("rcmd: poll (setting up stderr): %m\n"));
|
_("rcmd: poll (setting up stderr): %m\n"));
|
||||||
else
|
else
|
||||||
asprintf(&buf,
|
__asprintf(&buf,
|
||||||
_("poll: protocol failure in circuit setup\n"));
|
_("poll: protocol failure in circuit setup\n"));
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
@ -331,7 +331,7 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
|
|||||||
if (rport >= IPPORT_RESERVED || rport < IPPORT_RESERVED / 2){
|
if (rport >= IPPORT_RESERVED || rport < IPPORT_RESERVED / 2){
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
|
|
||||||
asprintf(&buf,
|
__asprintf(&buf,
|
||||||
_("socket: protocol failure in circuit setup\n"));
|
_("socket: protocol failure in circuit setup\n"));
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
@ -351,9 +351,9 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
|
|||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
|
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
asprintf(&buf, _("rcmd: %s: short read"), *ahost);
|
__asprintf(&buf, _("rcmd: %s: short read"), *ahost);
|
||||||
else
|
else
|
||||||
asprintf(&buf, "rcmd: %s: %m\n", *ahost);
|
__asprintf(&buf, "rcmd: %s: %m\n", *ahost);
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
__fwprintf (stderr, L"%s", buf);
|
__fwprintf (stderr, L"%s", buf);
|
||||||
|
@ -47,7 +47,7 @@ freopen (filename, mode, fp)
|
|||||||
_IO_flockfile (fp);
|
_IO_flockfile (fp);
|
||||||
if (filename == NULL && _IO_fileno (fp) >= 0)
|
if (filename == NULL && _IO_fileno (fp) >= 0)
|
||||||
{
|
{
|
||||||
fd = dup (_IO_fileno (fp));
|
fd = __dup (_IO_fileno (fp));
|
||||||
if (fd != -1)
|
if (fd != -1)
|
||||||
filename = fd_to_filename (fd);
|
filename = fd_to_filename (fd);
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ freopen (filename, mode, fp)
|
|||||||
result->_mode = 0;
|
result->_mode = 0;
|
||||||
if (fd != -1)
|
if (fd != -1)
|
||||||
{
|
{
|
||||||
close (fd);
|
__close (fd);
|
||||||
if (filename != NULL)
|
if (filename != NULL)
|
||||||
free ((char *) filename);
|
free ((char *) filename);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ freopen64 (filename, mode, fp)
|
|||||||
_IO_flockfile (fp);
|
_IO_flockfile (fp);
|
||||||
if (filename == NULL && _IO_fileno (fp) >= 0)
|
if (filename == NULL && _IO_fileno (fp) >= 0)
|
||||||
{
|
{
|
||||||
fd = dup (_IO_fileno (fp));
|
fd = __dup (_IO_fileno (fp));
|
||||||
if (fd != -1)
|
if (fd != -1)
|
||||||
filename = fd_to_filename (fd);
|
filename = fd_to_filename (fd);
|
||||||
}
|
}
|
||||||
@ -57,7 +57,7 @@ freopen64 (filename, mode, fp)
|
|||||||
result->_mode = 0;
|
result->_mode = 0;
|
||||||
if (fd != -1)
|
if (fd != -1)
|
||||||
{
|
{
|
||||||
close (fd);
|
__close (fd);
|
||||||
if (filename != NULL)
|
if (filename != NULL)
|
||||||
free ((char *) filename);
|
free ((char *) filename);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ __fwprintf (FILE *stream, const wchar_t *format, ...)
|
|||||||
int done;
|
int done;
|
||||||
|
|
||||||
va_start (arg, format);
|
va_start (arg, format);
|
||||||
done = vfwprintf (stream, format, arg);
|
done = __vfwprintf (stream, format, arg);
|
||||||
va_end (arg);
|
va_end (arg);
|
||||||
|
|
||||||
return done;
|
return done;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* 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.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -27,5 +27,5 @@ vwprintf (format, arg)
|
|||||||
const wchar_t *format;
|
const wchar_t *format;
|
||||||
__gnuc_va_list arg;
|
__gnuc_va_list arg;
|
||||||
{
|
{
|
||||||
return vfwprintf (stdout, format, arg);
|
return __vfwprintf (stdout, format, arg);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* 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.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -29,7 +29,7 @@ wprintf (const wchar_t *format, ...)
|
|||||||
int done;
|
int done;
|
||||||
|
|
||||||
va_start (arg, format);
|
va_start (arg, format);
|
||||||
done = vfwprintf (stdout, format, arg);
|
done = __vfwprintf (stdout, format, arg);
|
||||||
va_end (arg);
|
va_end (arg);
|
||||||
|
|
||||||
return done;
|
return done;
|
||||||
|
@ -77,7 +77,7 @@ convert_and_print (const char *format, __gnuc_va_list ap)
|
|||||||
memset (&st, '\0', sizeof (st));
|
memset (&st, '\0', sizeof (st));
|
||||||
tmp =format;
|
tmp =format;
|
||||||
}
|
}
|
||||||
while ((res = mbsrtowcs (wformat, &tmp, len, &st)) == len);
|
while ((res = __mbsrtowcs (wformat, &tmp, len, &st)) == len);
|
||||||
|
|
||||||
if (res == (size_t) -1)
|
if (res == (size_t) -1)
|
||||||
/* The string cannot be converted. */
|
/* The string cannot be converted. */
|
||||||
|
35
misc/error.c
35
misc/error.c
@ -28,6 +28,7 @@
|
|||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# include <wchar.h>
|
# include <wchar.h>
|
||||||
|
# define mbsrtowcs __mbsrtowcs
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
|
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
|
||||||
@ -225,7 +226,11 @@ error (status, errnum, message, va_alist)
|
|||||||
|
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
flockfile (stderr);
|
# ifdef USE_IN_LIBIO
|
||||||
|
_IO_flockfile (stderr);
|
||||||
|
# else
|
||||||
|
__flockfile (stderr);
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
if (error_print_progname)
|
if (error_print_progname)
|
||||||
(*error_print_progname) ();
|
(*error_print_progname) ();
|
||||||
@ -242,9 +247,6 @@ error (status, errnum, message, va_alist)
|
|||||||
#ifdef VA_START
|
#ifdef VA_START
|
||||||
VA_START (args, message);
|
VA_START (args, message);
|
||||||
error_tail (status, errnum, message, args);
|
error_tail (status, errnum, message, args);
|
||||||
# ifdef _LIBC
|
|
||||||
funlockfile (stderr);
|
|
||||||
# endif
|
|
||||||
#else
|
#else
|
||||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||||
|
|
||||||
@ -256,6 +258,14 @@ error (status, errnum, message, va_alist)
|
|||||||
if (status)
|
if (status)
|
||||||
exit (status);
|
exit (status);
|
||||||
#endif
|
#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
|
/* 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);
|
fflush (stdout);
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
flockfile (stderr);
|
# ifdef USE_IN_LIBIO
|
||||||
|
_IO_flockfile (stderr);
|
||||||
|
# else
|
||||||
|
__flockfile (stderr);
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
if (error_print_progname)
|
if (error_print_progname)
|
||||||
(*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
|
#ifdef VA_START
|
||||||
VA_START (args, message);
|
VA_START (args, message);
|
||||||
error_tail (status, errnum, message, args);
|
error_tail (status, errnum, message, args);
|
||||||
# ifdef _LIBC
|
|
||||||
funlockfile (stderr);
|
|
||||||
# endif
|
|
||||||
#else
|
#else
|
||||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
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)
|
if (status)
|
||||||
exit (status);
|
exit (status);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
|
# ifdef USE_IN_LIBIO
|
||||||
|
_IO_funlockfile (stderr);
|
||||||
|
# else
|
||||||
|
__funlockfile (stderr);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
|
@ -1284,7 +1284,11 @@ convert_mbs_to_wcs (dest, src, len, offset_buffer, is_binary)
|
|||||||
for( ; mb_remain > 0 ; ++wc_count, ++pdest, mb_remain -= consumed,
|
for( ; mb_remain > 0 ; ++wc_count, ++pdest, mb_remain -= consumed,
|
||||||
psrc += consumed)
|
psrc += consumed)
|
||||||
{
|
{
|
||||||
|
#ifdef _LIBC
|
||||||
|
consumed = __mbrtowc (pdest, psrc, mb_remain, &mbs);
|
||||||
|
#else
|
||||||
consumed = mbrtowc (pdest, psrc, mb_remain, &mbs);
|
consumed = mbrtowc (pdest, psrc, mb_remain, &mbs);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (consumed <= 0)
|
if (consumed <= 0)
|
||||||
/* failed to convert. maybe src contains binary data.
|
/* failed to convert. maybe src contains binary data.
|
||||||
@ -6333,8 +6337,13 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
|||||||
& ~(uintptr_t)(__alignof__(wctype_t) - 1);
|
& ~(uintptr_t)(__alignof__(wctype_t) - 1);
|
||||||
wctype = *((wctype_t*)alignedp);
|
wctype = *((wctype_t*)alignedp);
|
||||||
workp += CHAR_CLASS_SIZE;
|
workp += CHAR_CLASS_SIZE;
|
||||||
|
# ifdef _LIBC
|
||||||
|
if (__iswctype((wint_t)c, wctype))
|
||||||
|
goto char_set_matched;
|
||||||
|
# else
|
||||||
if (iswctype((wint_t)c, wctype))
|
if (iswctype((wint_t)c, wctype))
|
||||||
goto char_set_matched;
|
goto char_set_matched;
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* match with collating_symbol? */
|
/* match with collating_symbol? */
|
||||||
@ -6370,12 +6379,16 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
|||||||
for (workp2 = workp + coll_symbol_length ; workp < workp2 ;)
|
for (workp2 = workp + coll_symbol_length ; workp < workp2 ;)
|
||||||
{
|
{
|
||||||
const CHAR_T *backup_d = d, *backup_dend = dend;
|
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,
|
/* If wcscoll(the collating symbol, whole string) > 0,
|
||||||
any substring of the string never match with the
|
any substring of the string never match with the
|
||||||
collating symbol. */
|
collating symbol. */
|
||||||
if (wcscoll(workp, d) > 0)
|
if (__wcscoll (workp, d) > 0)
|
||||||
{
|
{
|
||||||
workp += length + 1;
|
workp += length + 1;
|
||||||
continue;
|
continue;
|
||||||
@ -6400,7 +6413,11 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
|||||||
str_buf[i] = TRANSLATE(*d);
|
str_buf[i] = TRANSLATE(*d);
|
||||||
str_buf[i+1] = '\0';
|
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)
|
if (match == 0)
|
||||||
goto char_set_matched;
|
goto char_set_matched;
|
||||||
|
|
||||||
@ -6511,12 +6528,20 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
|||||||
for (workp2 = workp + equiv_class_length ; workp < workp2 ;)
|
for (workp2 = workp + equiv_class_length ; workp < workp2 ;)
|
||||||
{
|
{
|
||||||
const CHAR_T *backup_d = d, *backup_dend = dend;
|
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,
|
/* If wcscoll(the collating symbol, whole string) > 0,
|
||||||
any substring of the string never match with the
|
any substring of the string never match with the
|
||||||
collating symbol. */
|
collating symbol. */
|
||||||
if (wcscoll(workp, d) > 0)
|
# ifdef _LIBC
|
||||||
|
if (__wcscoll (workp, d) > 0)
|
||||||
|
# else
|
||||||
|
if (wcscoll (workp, d) > 0)
|
||||||
|
# endif
|
||||||
{
|
{
|
||||||
workp += length + 1;
|
workp += length + 1;
|
||||||
break;
|
break;
|
||||||
@ -6541,7 +6566,11 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
|||||||
str_buf[i] = TRANSLATE(*d);
|
str_buf[i] = TRANSLATE(*d);
|
||||||
str_buf[i+1] = '\0';
|
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)
|
if (match == 0)
|
||||||
goto char_set_matched;
|
goto char_set_matched;
|
||||||
@ -6564,7 +6593,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* match with char_range? */
|
/* match with char_range? */
|
||||||
#ifdef _LIBC
|
# ifdef _LIBC
|
||||||
if (nrules != 0)
|
if (nrules != 0)
|
||||||
{
|
{
|
||||||
uint32_t collseqval;
|
uint32_t collseqval;
|
||||||
@ -6587,7 +6616,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
# endif
|
||||||
{
|
{
|
||||||
/* We set range_start_char at str_buf[0], range_end_char
|
/* We set range_start_char at str_buf[0], range_end_char
|
||||||
at str_buf[4], and compared char at str_buf[2]. */
|
at str_buf[4], and compared char at str_buf[2]. */
|
||||||
@ -6623,9 +6652,13 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
|||||||
range_end_char = str_buf + 4;
|
range_end_char = str_buf + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wcscoll(range_start_char, str_buf+2) <= 0 &&
|
# ifdef _LIBC
|
||||||
wcscoll(str_buf+2, range_end_char) <= 0)
|
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;
|
goto char_set_matched;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ arg_service_list (const char *fname, int line_num, const char *args,
|
|||||||
|
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
fwprintf (stderr, L"%s", buf);
|
__fwprintf (stderr, L"%s", buf);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
fputs (buf, stderr);
|
fputs (buf, stderr);
|
||||||
@ -167,7 +167,7 @@ arg_service_list (const char *fname, int line_num, const char *args,
|
|||||||
|
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
fwprintf (stderr, L"%s", buf);
|
__fwprintf (stderr, L"%s", buf);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
fputs (buf, stderr);
|
fputs (buf, stderr);
|
||||||
@ -194,7 +194,7 @@ arg_service_list (const char *fname, int line_num, const char *args,
|
|||||||
|
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
fwprintf (stderr, L"%s", buf);
|
__fwprintf (stderr, L"%s", buf);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
fputs (buf, stderr);
|
fputs (buf, stderr);
|
||||||
@ -234,7 +234,7 @@ arg_trimdomain_list (const char *fname, int line_num, const char *args,
|
|||||||
|
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
fwprintf (stderr, L"%s", buf);
|
__fwprintf (stderr, L"%s", buf);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
fputs (buf, stderr);
|
fputs (buf, stderr);
|
||||||
@ -259,7 +259,7 @@ arg_trimdomain_list (const char *fname, int line_num, const char *args,
|
|||||||
|
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
fwprintf (stderr, L"%s", buf);
|
__fwprintf (stderr, L"%s", buf);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
fputs (buf, stderr);
|
fputs (buf, stderr);
|
||||||
@ -321,7 +321,7 @@ arg_bool (const char *fname, int line_num, const char *args, unsigned flag)
|
|||||||
|
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
fwprintf (stderr, L"%s", buf);
|
__fwprintf (stderr, L"%s", buf);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
fputs (buf, stderr);
|
fputs (buf, stderr);
|
||||||
@ -368,7 +368,7 @@ parse_line (const char *fname, int line_num, const char *str)
|
|||||||
|
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
fwprintf (stderr, L"%s", buf);
|
__fwprintf (stderr, L"%s", buf);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
fputs (buf, stderr);
|
fputs (buf, stderr);
|
||||||
@ -393,7 +393,7 @@ parse_line (const char *fname, int line_num, const char *str)
|
|||||||
|
|
||||||
__asprintf (&buf,
|
__asprintf (&buf,
|
||||||
_("%s: line %d: ignoring trailing garbage `%s'\n"),
|
_("%s: line %d: ignoring trailing garbage `%s'\n"),
|
||||||
fname, line_num, str);
|
fname, line_num, str);
|
||||||
|
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
|
@ -64,11 +64,11 @@ perror (const char *s)
|
|||||||
using the same underlying file descriptor. */
|
using the same underlying file descriptor. */
|
||||||
if (__builtin_expect (_IO_fwide (stderr, 0) != 0, 1)
|
if (__builtin_expect (_IO_fwide (stderr, 0) != 0, 1)
|
||||||
|| fileno_unlocked (stderr) == -1
|
|| fileno_unlocked (stderr) == -1
|
||||||
|| (fd = dup (fileno_unlocked (stderr))) == -1
|
|| (fd = __dup (fileno_unlocked (stderr))) == -1
|
||||||
|| (fp = fdopen (fd, "w+")) == NULL)
|
|| (fp = fdopen (fd, "w+")) == NULL)
|
||||||
{
|
{
|
||||||
if (__builtin_expect (fd != -1, 0))
|
if (__builtin_expect (fd != -1, 0))
|
||||||
close (fd);
|
__close (fd);
|
||||||
|
|
||||||
/* Use standard error as is. */
|
/* Use standard error as is. */
|
||||||
perror_internal (stderr, s);
|
perror_internal (stderr, s);
|
||||||
|
@ -124,7 +124,7 @@ registerrpc (u_long prognum, u_long versnum, u_long procnum,
|
|||||||
err_out:
|
err_out:
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
(void) fwprintf (stderr, L"%s", buf);
|
(void) __fwprintf (stderr, L"%s", buf);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
(void) fputs (buf, stderr);
|
(void) fputs (buf, stderr);
|
||||||
@ -148,7 +148,7 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l)
|
|||||||
{
|
{
|
||||||
if (svc_sendreply (transp_l, (xdrproc_t)xdr_void, (char *) NULL) == FALSE)
|
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);
|
exit (1);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -1798,7 +1798,7 @@ envsubst:
|
|||||||
const char *str = pattern;
|
const char *str = pattern;
|
||||||
|
|
||||||
if (str[0] == '\0')
|
if (str[0] == '\0')
|
||||||
str = gettext ("parameter null or not set");
|
str = _("parameter null or not set");
|
||||||
|
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
if (_IO_fwide (stderr, 0) > 0)
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
|
@ -24,5 +24,5 @@ int
|
|||||||
sockatmark (fd)
|
sockatmark (fd)
|
||||||
int fd;
|
int fd;
|
||||||
{
|
{
|
||||||
return ioctl (fd, SIOCATMARK);
|
return __ioctl (fd, SIOCATMARK);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ __gai_sigqueue (sig, val, caller_pid)
|
|||||||
info.si_signo = sig;
|
info.si_signo = sig;
|
||||||
info.si_code = SI_ASYNCNL;
|
info.si_code = SI_ASYNCNL;
|
||||||
info.si_pid = caller_pid;
|
info.si_pid = caller_pid;
|
||||||
info.si_uid = getuid ();
|
info.si_uid = __getuid ();
|
||||||
info.si_value = val;
|
info.si_value = val;
|
||||||
|
|
||||||
return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid,
|
return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||||
|
|
||||||
@ -25,7 +25,7 @@
|
|||||||
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
||||||
# define STRCOLL __wcscoll_l
|
# define STRCOLL __wcscoll_l
|
||||||
#else
|
#else
|
||||||
# define STRCOLL wcscoll
|
# define STRCOLL __wcscoll
|
||||||
#endif
|
#endif
|
||||||
#define STRCMP wcscmp
|
#define STRCMP wcscmp
|
||||||
#define STRLEN __wcslen
|
#define STRLEN __wcslen
|
||||||
@ -35,3 +35,7 @@
|
|||||||
#define WIDE_CHAR_VERSION 1
|
#define WIDE_CHAR_VERSION 1
|
||||||
|
|
||||||
#include "../string/strcoll.c"
|
#include "../string/strcoll.c"
|
||||||
|
|
||||||
|
#ifndef USE_IN_EXTENDED_LOCALE_MODEL
|
||||||
|
weak_alias (__wcscoll, wcscoll)
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user