mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-18 06:30:05 +00:00
Convert miscellaneous function definitions to prototype style.
This patch converts various miscellaneous functions definitions in glibc, found with grep and not covered by my previous scripted conversions, from old-style K&R to prototype-style. These changes were made manually. This is not necessarily exhaustive as formatting variants may have prevented my grep from finding some such definitions. Regarding the changes to files from GMP, they may originally have been omitted when removing __STDC__ conditionals because of the files coming from another package, but (a) GMP no longer has __STDC__ conditionals there anyway and (b) we don't try to keep these files verbatim in sync with GMP (and there are licensing differences), so making the change to them in glibc seems reasonable. Tested for x86_64 and x86 (testsuite - this patch affects files containing assertions). * debug/fortify_fail.c (__fortify_fail): Convert to prototype-style function definition. Use internal_function. * libio/genops.c (save_for_backup): Convert to prototype-style function definition. * libio/wgenops.c (save_for_wbackup): Likewise. * login/grantpt.c (grantpt): Likewise. * login/ptsname.c (ptsname): Likewise. (__ptsname_r): Likewise. * login/unlockpt.c (unlockpt): Likewise. * mach/msgserver.c (__mach_msg_server): Likewise. * misc/efgcvt.c (__APPEND (FUNC_PREFIX, fcvt)): Likewise. (__APPEND (FUNC_PREFIX, ecvt)): Likewise. (__APPEND (FUNC_PREFIX, gcvt)): Likewise. * misc/efgcvt_r.c (__APPEND (FUNC_PREFIX, fcvt_r)): Likewise. (__APPEND (FUNC_PREFIX, ecvt_r)): Likewise. * nptl/cleanup_compat.c (_pthread_cleanup_push): Likewise. * nptl/cleanup_defer_compat.c (_pthread_cleanup_push_defer): Likewise. * nptl/libc_pthread_init.c (__libc_pthread_init): Likewise. Use internal_function. * nptl/pthread_atfork.c (__pthread_atfork): Convert to prototype-style function definition. * nptl/pthread_create.c (__pthread_create_2_1): Likewise. [SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)] (__pthread_create_2_0): Likewise. * nptl/pthread_key_create.c (__pthread_key_create): Likewise. * nptl/register-atfork.c (__register_atfork): Likewise. * posix/glob.c (glob): Likewise. * posix/regcomp.c (re_comp): Likewise. * posix/regexec.c (re_exec): Likewise. * stdlib/add_n.c [__STDC__]: Make code unconditional. [!__STDC__]: Remove conditional code. * stdlib/cmp.c [__STDC__]: Make code unconditional. [!__STDC__]: Remove conditional code. * stdlib/divmod_1.c [__STDC__]: Make code unconditional. [!__STDC__]: Remove conditional code. * stdlib/divrem.c [__STDC__]: Make code unconditional. [!__STDC__]: Remove conditional code. * stdlib/lshift.c [__STDC__]: Make code unconditional. [!__STDC__]: Remove conditional code. * stdlib/mod_1.c [__STDC__]: Make code unconditional. [!__STDC__]: Remove conditional code. * stdlib/mul.c [__STDC__]: Make code unconditional. [!__STDC__]: Remove conditional code. * stdlib/mul_n.c [__STDC__]: Make code unconditional. [!__STDC__]: Remove conditional code. * stdlib/rshift.c [__STDC__]: Make code unconditional. [!__STDC__]: Remove conditional code. * stdlib/strtod.c (INTERNAL (STRTOF)): Convert to prototype-style function definition. (STRTOF): Likewise. * stdlib/strtod_l.c (__STRTOF): Likewise. * stdlib/strtol.c (INTERNAL (strtol)): Likewise. * stdlib/strtol_l.c (INTERNAL (__strtol_l)): Likewise. (__strtol_l): Likewise. * stdlib/sub_n.c [__STDC__]: Make code unconditional. [!__STDC__]: Remove conditional code. * string/memrchr.c (MEMRCHR): Convert to prototype-style function definition. * string/strcasecmp.c (LOCALE_PARAM_DECL): Remove macro. [USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument type. (__strcasecmp): Convert to prototype-style function definition. * string/strncase.c (LOCALE_PARAM_DECL): Remove macro. [USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument type. (__strncasecmp): Convert to prototype-style function definition. * sunrpc/pm_getport.c (__libc_rpc_getport): Likewise. * sunrpc/xdr.c (xdr_union): Likewise. * sunrpc/xdr_array.c (xdr_array): Likewise. * sunrpc/xdr_ref.c (xdr_reference): Likewise. * sysdeps/m68k/m680x0/fpu/s_atan.c (__CONCATX(__,FUNC)): Likewise. * sysdeps/m68k/m680x0/fpu/s_isinf.c (__CONCATX(__,FUNC)): Likewise. * sysdeps/m68k/m680x0/fpu/s_scalbn.c (__CONCATX(__scalbn,suffix): Likewise. * sysdeps/m68k/m680x0/fpu/s_sincos.c (CONCATX(__,FUNC)): Likewise. * sysdeps/unix/sysv/linux/i386/scandir64.c (__old_scandir64): Likewise. * time/strftime_l.c (LOCALE_PARAM_DECL): Remove macro. (LOCALE_PARAM_PROTO): Likewise. [_LIBC && USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument type. (ut_argument_spec): Remove macro. (ut_argument_spec_iso): Rename to ut_argument_spec. (memcpy_lowcase): Use LOCALE_PARAM in declaration. Convert to prototype-style function definition. (memcpy_uppcase): Likewise. (__strftime_internal): Likewise. (my_strftime): Likewise. * time/strptime_l.c (LOCALE_PARAM_PROTO): Remove macro. (LOCALE_PARAM_DECL): Likewise. [_LIBC] (LOCALE_PARAM): Include argument type. (__strptime_internal): Convert to prototype-style function definition. (strptime): Likewise. * wcsmbs/wcscasecmp.c (LOCALE_PARAM_DECL): Remove macro. [USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument type. (__wcscasecmp): Convert to prototype-style function definition. * wcsmbs/wcsncase.c (LOCALE_PARAM_DECL): Remove macro. [USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument type. (__wcsncasecmp): Convert to prototype-style function definition.
This commit is contained in:
parent
9dd346ff43
commit
80d9be8122
105
ChangeLog
105
ChangeLog
@ -1,5 +1,110 @@
|
|||||||
2015-10-20 Joseph Myers <joseph@codesourcery.com>
|
2015-10-20 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* debug/fortify_fail.c (__fortify_fail): Convert to
|
||||||
|
prototype-style function definition. Use internal_function.
|
||||||
|
* libio/genops.c (save_for_backup): Convert to prototype-style
|
||||||
|
function definition.
|
||||||
|
* libio/wgenops.c (save_for_wbackup): Likewise.
|
||||||
|
* login/grantpt.c (grantpt): Likewise.
|
||||||
|
* login/ptsname.c (ptsname): Likewise.
|
||||||
|
(__ptsname_r): Likewise.
|
||||||
|
* login/unlockpt.c (unlockpt): Likewise.
|
||||||
|
* mach/msgserver.c (__mach_msg_server): Likewise.
|
||||||
|
* misc/efgcvt.c (__APPEND (FUNC_PREFIX, fcvt)): Likewise.
|
||||||
|
(__APPEND (FUNC_PREFIX, ecvt)): Likewise.
|
||||||
|
(__APPEND (FUNC_PREFIX, gcvt)): Likewise.
|
||||||
|
* misc/efgcvt_r.c (__APPEND (FUNC_PREFIX, fcvt_r)): Likewise.
|
||||||
|
(__APPEND (FUNC_PREFIX, ecvt_r)): Likewise.
|
||||||
|
* nptl/cleanup_compat.c (_pthread_cleanup_push): Likewise.
|
||||||
|
* nptl/cleanup_defer_compat.c (_pthread_cleanup_push_defer):
|
||||||
|
Likewise.
|
||||||
|
* nptl/libc_pthread_init.c (__libc_pthread_init): Likewise. Use
|
||||||
|
internal_function.
|
||||||
|
* nptl/pthread_atfork.c (__pthread_atfork): Convert to
|
||||||
|
prototype-style function definition.
|
||||||
|
* nptl/pthread_create.c (__pthread_create_2_1): Likewise.
|
||||||
|
[SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)]
|
||||||
|
(__pthread_create_2_0): Likewise.
|
||||||
|
* nptl/pthread_key_create.c (__pthread_key_create): Likewise.
|
||||||
|
* nptl/register-atfork.c (__register_atfork): Likewise.
|
||||||
|
* posix/glob.c (glob): Likewise.
|
||||||
|
* posix/regcomp.c (re_comp): Likewise.
|
||||||
|
* posix/regexec.c (re_exec): Likewise.
|
||||||
|
* stdlib/add_n.c [__STDC__]: Make code unconditional.
|
||||||
|
[!__STDC__]: Remove conditional code.
|
||||||
|
* stdlib/cmp.c [__STDC__]: Make code unconditional.
|
||||||
|
[!__STDC__]: Remove conditional code.
|
||||||
|
* stdlib/divmod_1.c [__STDC__]: Make code unconditional.
|
||||||
|
[!__STDC__]: Remove conditional code.
|
||||||
|
* stdlib/divrem.c [__STDC__]: Make code unconditional.
|
||||||
|
[!__STDC__]: Remove conditional code.
|
||||||
|
* stdlib/lshift.c [__STDC__]: Make code unconditional.
|
||||||
|
[!__STDC__]: Remove conditional code.
|
||||||
|
* stdlib/mod_1.c [__STDC__]: Make code unconditional.
|
||||||
|
[!__STDC__]: Remove conditional code.
|
||||||
|
* stdlib/mul.c [__STDC__]: Make code unconditional.
|
||||||
|
[!__STDC__]: Remove conditional code.
|
||||||
|
* stdlib/mul_n.c [__STDC__]: Make code unconditional.
|
||||||
|
[!__STDC__]: Remove conditional code.
|
||||||
|
* stdlib/rshift.c [__STDC__]: Make code unconditional.
|
||||||
|
[!__STDC__]: Remove conditional code.
|
||||||
|
* stdlib/strtod.c (INTERNAL (STRTOF)): Convert to prototype-style
|
||||||
|
function definition.
|
||||||
|
(STRTOF): Likewise.
|
||||||
|
* stdlib/strtod_l.c (__STRTOF): Likewise.
|
||||||
|
* stdlib/strtol.c (INTERNAL (strtol)): Likewise.
|
||||||
|
* stdlib/strtol_l.c (INTERNAL (__strtol_l)): Likewise.
|
||||||
|
(__strtol_l): Likewise.
|
||||||
|
* stdlib/sub_n.c [__STDC__]: Make code unconditional.
|
||||||
|
[!__STDC__]: Remove conditional code.
|
||||||
|
* string/memrchr.c (MEMRCHR): Convert to prototype-style function
|
||||||
|
definition.
|
||||||
|
* string/strcasecmp.c (LOCALE_PARAM_DECL): Remove macro.
|
||||||
|
[USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument
|
||||||
|
type.
|
||||||
|
(__strcasecmp): Convert to prototype-style function definition.
|
||||||
|
* string/strncase.c (LOCALE_PARAM_DECL): Remove macro.
|
||||||
|
[USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument
|
||||||
|
type.
|
||||||
|
(__strncasecmp): Convert to prototype-style function definition.
|
||||||
|
* sunrpc/pm_getport.c (__libc_rpc_getport): Likewise.
|
||||||
|
* sunrpc/xdr.c (xdr_union): Likewise.
|
||||||
|
* sunrpc/xdr_array.c (xdr_array): Likewise.
|
||||||
|
* sunrpc/xdr_ref.c (xdr_reference): Likewise.
|
||||||
|
* sysdeps/m68k/m680x0/fpu/s_atan.c (__CONCATX(__,FUNC)): Likewise.
|
||||||
|
* sysdeps/m68k/m680x0/fpu/s_isinf.c (__CONCATX(__,FUNC)):
|
||||||
|
Likewise.
|
||||||
|
* sysdeps/m68k/m680x0/fpu/s_scalbn.c (__CONCATX(__scalbn,suffix):
|
||||||
|
Likewise.
|
||||||
|
* sysdeps/m68k/m680x0/fpu/s_sincos.c (CONCATX(__,FUNC)): Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/scandir64.c (__old_scandir64):
|
||||||
|
Likewise.
|
||||||
|
* time/strftime_l.c (LOCALE_PARAM_DECL): Remove macro.
|
||||||
|
(LOCALE_PARAM_PROTO): Likewise.
|
||||||
|
[_LIBC && USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include
|
||||||
|
argument type.
|
||||||
|
(ut_argument_spec): Remove macro.
|
||||||
|
(ut_argument_spec_iso): Rename to ut_argument_spec.
|
||||||
|
(memcpy_lowcase): Use LOCALE_PARAM in declaration. Convert to
|
||||||
|
prototype-style function definition.
|
||||||
|
(memcpy_uppcase): Likewise.
|
||||||
|
(__strftime_internal): Likewise.
|
||||||
|
(my_strftime): Likewise.
|
||||||
|
* time/strptime_l.c (LOCALE_PARAM_PROTO): Remove macro.
|
||||||
|
(LOCALE_PARAM_DECL): Likewise.
|
||||||
|
[_LIBC] (LOCALE_PARAM): Include argument type.
|
||||||
|
(__strptime_internal): Convert to prototype-style function
|
||||||
|
definition.
|
||||||
|
(strptime): Likewise.
|
||||||
|
* wcsmbs/wcscasecmp.c (LOCALE_PARAM_DECL): Remove macro.
|
||||||
|
[USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument
|
||||||
|
type.
|
||||||
|
(__wcscasecmp): Convert to prototype-style function definition.
|
||||||
|
* wcsmbs/wcsncase.c (LOCALE_PARAM_DECL): Remove macro.
|
||||||
|
[USE_IN_EXTENDED_LOCALE_MODEL] (LOCALE_PARAM): Include argument
|
||||||
|
type.
|
||||||
|
(__wcsncasecmp): Convert to prototype-style function definition.
|
||||||
|
|
||||||
* crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style
|
* crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style
|
||||||
function definition.
|
function definition.
|
||||||
* crypt/sha256-crypt.c (__sha256_crypt_r): Likewise.
|
* crypt/sha256-crypt.c (__sha256_crypt_r): Likewise.
|
||||||
|
@ -22,9 +22,8 @@
|
|||||||
extern char **__libc_argv attribute_hidden;
|
extern char **__libc_argv attribute_hidden;
|
||||||
|
|
||||||
void
|
void
|
||||||
__attribute__ ((noreturn))
|
__attribute__ ((noreturn)) internal_function
|
||||||
__fortify_fail (msg)
|
__fortify_fail (const char *msg)
|
||||||
const char *msg;
|
|
||||||
{
|
{
|
||||||
/* The loop is added only to keep gcc happy. */
|
/* The loop is added only to keep gcc happy. */
|
||||||
while (1)
|
while (1)
|
||||||
|
@ -243,9 +243,7 @@ static int
|
|||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
internal_function
|
internal_function
|
||||||
#endif
|
#endif
|
||||||
save_for_backup (fp, end_p)
|
save_for_backup (_IO_FILE *fp, char *end_p)
|
||||||
_IO_FILE *fp;
|
|
||||||
char *end_p;
|
|
||||||
{
|
{
|
||||||
/* Append [_IO_read_base..end_p] to backup area. */
|
/* Append [_IO_read_base..end_p] to backup area. */
|
||||||
_IO_ssize_t least_mark = _IO_least_marker (fp, end_p);
|
_IO_ssize_t least_mark = _IO_least_marker (fp, end_p);
|
||||||
|
@ -469,9 +469,7 @@ static int
|
|||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
internal_function
|
internal_function
|
||||||
#endif
|
#endif
|
||||||
save_for_wbackup (fp, end_p)
|
save_for_wbackup (_IO_FILE *fp, wchar_t *end_p)
|
||||||
_IO_FILE *fp;
|
|
||||||
wchar_t *end_p;
|
|
||||||
{
|
{
|
||||||
/* Append [_IO_read_base..end_p] to backup area. */
|
/* Append [_IO_read_base..end_p] to backup area. */
|
||||||
_IO_ssize_t least_mark = _IO_least_wmarker (fp, end_p);
|
_IO_ssize_t least_mark = _IO_least_wmarker (fp, end_p);
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
with the slave to the calling process, and set its group and
|
with the slave to the calling process, and set its group and
|
||||||
mode appropriately. Note that this is an unprivileged operation. */
|
mode appropriately. Note that this is an unprivileged operation. */
|
||||||
int
|
int
|
||||||
grantpt (fd)
|
grantpt (int fd __attribute__ ((unused)))
|
||||||
int fd __attribute__ ((unused));
|
|
||||||
{
|
{
|
||||||
__set_errno (ENOSYS);
|
__set_errno (ENOSYS);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -24,18 +24,16 @@
|
|||||||
of the associated slave. */
|
of the associated slave. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
ptsname (fd)
|
ptsname (int fd __attribute__ ((unused)))
|
||||||
int fd __attribute__ ((unused));
|
|
||||||
{
|
{
|
||||||
__set_errno (ENOSYS);
|
__set_errno (ENOSYS);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__ptsname_r (fd, buf, len)
|
__ptsname_r (int fd __attribute__ ((unused)),
|
||||||
int fd __attribute__ ((unused));
|
char *buf __attribute__ ((unused)),
|
||||||
char *buf __attribute__ ((unused));
|
size_t len __attribute__ ((unused)))
|
||||||
size_t len __attribute__ ((unused));
|
|
||||||
{
|
{
|
||||||
__set_errno (ENOSYS);
|
__set_errno (ENOSYS);
|
||||||
return ENOSYS;
|
return ENOSYS;
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
the slave can be opened. This is to avoid a race between opening the
|
the slave can be opened. This is to avoid a race between opening the
|
||||||
master and calling grantpt() to take possession of the slave. */
|
master and calling grantpt() to take possession of the slave. */
|
||||||
int
|
int
|
||||||
unlockpt (fd)
|
unlockpt (int fd __attribute__ ((unused)))
|
||||||
int fd __attribute__ ((unused));
|
|
||||||
{
|
{
|
||||||
__set_errno (ENOSYS);
|
__set_errno (ENOSYS);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -187,10 +187,10 @@ __mach_msg_server_timeout (boolean_t (*demux) (mach_msg_header_t *request,
|
|||||||
weak_alias (__mach_msg_server_timeout, mach_msg_server_timeout)
|
weak_alias (__mach_msg_server_timeout, mach_msg_server_timeout)
|
||||||
|
|
||||||
mach_msg_return_t
|
mach_msg_return_t
|
||||||
__mach_msg_server (demux, max_size, rcv_name)
|
__mach_msg_server (boolean_t (*demux) (mach_msg_header_t *in,
|
||||||
boolean_t (*demux) (mach_msg_header_t *in, mach_msg_header_t *out);
|
mach_msg_header_t *out),
|
||||||
mach_msg_size_t max_size;
|
mach_msg_size_t max_size,
|
||||||
mach_port_t rcv_name;
|
mach_port_t rcv_name)
|
||||||
{
|
{
|
||||||
return __mach_msg_server_timeout (demux, max_size, rcv_name,
|
return __mach_msg_server_timeout (demux, max_size, rcv_name,
|
||||||
MACH_MSG_OPTION_NONE,
|
MACH_MSG_OPTION_NONE,
|
||||||
|
@ -64,9 +64,8 @@ static char ECVT_BUFFER[MAXDIG];
|
|||||||
libc_freeres_ptr (static char *FCVT_BUFPTR);
|
libc_freeres_ptr (static char *FCVT_BUFPTR);
|
||||||
|
|
||||||
char *
|
char *
|
||||||
__APPEND (FUNC_PREFIX, fcvt) (value, ndigit, decpt, sign)
|
__APPEND (FUNC_PREFIX, fcvt) (FLOAT_TYPE value, int ndigit, int *decpt,
|
||||||
FLOAT_TYPE value;
|
int *sign)
|
||||||
int ndigit, *decpt, *sign;
|
|
||||||
{
|
{
|
||||||
if (FCVT_BUFPTR == NULL)
|
if (FCVT_BUFPTR == NULL)
|
||||||
{
|
{
|
||||||
@ -87,9 +86,8 @@ __APPEND (FUNC_PREFIX, fcvt) (value, ndigit, decpt, sign)
|
|||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
__APPEND (FUNC_PREFIX, ecvt) (value, ndigit, decpt, sign)
|
__APPEND (FUNC_PREFIX, ecvt) (FLOAT_TYPE value, int ndigit, int *decpt,
|
||||||
FLOAT_TYPE value;
|
int *sign)
|
||||||
int ndigit, *decpt, *sign;
|
|
||||||
{
|
{
|
||||||
(void) __APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign,
|
(void) __APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign,
|
||||||
ECVT_BUFFER, MAXDIG);
|
ECVT_BUFFER, MAXDIG);
|
||||||
@ -98,10 +96,7 @@ __APPEND (FUNC_PREFIX, ecvt) (value, ndigit, decpt, sign)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
__APPEND (FUNC_PREFIX, gcvt) (value, ndigit, buf)
|
__APPEND (FUNC_PREFIX, gcvt) (FLOAT_TYPE value, int ndigit, char *buf)
|
||||||
FLOAT_TYPE value;
|
|
||||||
int ndigit;
|
|
||||||
char *buf;
|
|
||||||
{
|
{
|
||||||
sprintf (buf, "%.*" FLOAT_FMT_FLAG "g", MIN (ndigit, NDIGIT_MAX), value);
|
sprintf (buf, "%.*" FLOAT_FMT_FLAG "g", MIN (ndigit, NDIGIT_MAX), value);
|
||||||
return buf;
|
return buf;
|
||||||
|
@ -71,11 +71,8 @@
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len)
|
__APPEND (FUNC_PREFIX, fcvt_r) (FLOAT_TYPE value, int ndigit, int *decpt,
|
||||||
FLOAT_TYPE value;
|
int *sign, char *buf, size_t len)
|
||||||
int ndigit, *decpt, *sign;
|
|
||||||
char *buf;
|
|
||||||
size_t len;
|
|
||||||
{
|
{
|
||||||
ssize_t n;
|
ssize_t n;
|
||||||
ssize_t i;
|
ssize_t i;
|
||||||
@ -169,11 +166,8 @@ __APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign, buf, len)
|
__APPEND (FUNC_PREFIX, ecvt_r) (FLOAT_TYPE value, int ndigit, int *decpt,
|
||||||
FLOAT_TYPE value;
|
int *sign, char *buf, size_t len)
|
||||||
int ndigit, *decpt, *sign;
|
|
||||||
char *buf;
|
|
||||||
size_t len;
|
|
||||||
{
|
{
|
||||||
int exponent = 0;
|
int exponent = 0;
|
||||||
|
|
||||||
|
@ -21,10 +21,8 @@
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_pthread_cleanup_push (buffer, routine, arg)
|
_pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer,
|
||||||
struct _pthread_cleanup_buffer *buffer;
|
void (*routine) (void *), void *arg)
|
||||||
void (*routine) (void *);
|
|
||||||
void *arg;
|
|
||||||
{
|
{
|
||||||
struct pthread *self = THREAD_SELF;
|
struct pthread *self = THREAD_SELF;
|
||||||
|
|
||||||
|
@ -20,10 +20,8 @@
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_pthread_cleanup_push_defer (buffer, routine, arg)
|
_pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer,
|
||||||
struct _pthread_cleanup_buffer *buffer;
|
void (*routine) (void *), void *arg)
|
||||||
void (*routine) (void *);
|
|
||||||
void *arg;
|
|
||||||
{
|
{
|
||||||
struct pthread *self = THREAD_SELF;
|
struct pthread *self = THREAD_SELF;
|
||||||
|
|
||||||
|
@ -38,10 +38,9 @@ extern int __libc_multiple_threads attribute_hidden;
|
|||||||
|
|
||||||
int *
|
int *
|
||||||
#endif
|
#endif
|
||||||
__libc_pthread_init (ptr, reclaim, functions)
|
internal_function
|
||||||
unsigned long int *ptr;
|
__libc_pthread_init (unsigned long int *ptr, void (*reclaim) (void),
|
||||||
void (*reclaim) (void);
|
const struct pthread_functions *functions)
|
||||||
const struct pthread_functions *functions;
|
|
||||||
{
|
{
|
||||||
/* Remember the pointer to the generation counter in libpthread. */
|
/* Remember the pointer to the generation counter in libpthread. */
|
||||||
__fork_generation_pointer = ptr;
|
__fork_generation_pointer = ptr;
|
||||||
|
@ -48,10 +48,8 @@ int
|
|||||||
/* Don't mark the compatibility function as hidden. */
|
/* Don't mark the compatibility function as hidden. */
|
||||||
attribute_hidden
|
attribute_hidden
|
||||||
#endif
|
#endif
|
||||||
__pthread_atfork (prepare, parent, child)
|
__pthread_atfork (void (*prepare) (void), void (*parent) (void),
|
||||||
void (*prepare) (void);
|
void (*child) (void))
|
||||||
void (*parent) (void);
|
|
||||||
void (*child) (void);
|
|
||||||
{
|
{
|
||||||
return __register_atfork (prepare, parent, child,
|
return __register_atfork (prepare, parent, child,
|
||||||
&__dso_handle == NULL ? NULL : __dso_handle);
|
&__dso_handle == NULL ? NULL : __dso_handle);
|
||||||
|
@ -487,11 +487,8 @@ report_thread_creation (struct pthread *pd)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__pthread_create_2_1 (newthread, attr, start_routine, arg)
|
__pthread_create_2_1 (pthread_t *newthread, const pthread_attr_t *attr,
|
||||||
pthread_t *newthread;
|
void *(*start_routine) (void *), void *arg)
|
||||||
const pthread_attr_t *attr;
|
|
||||||
void *(*start_routine) (void *);
|
|
||||||
void *arg;
|
|
||||||
{
|
{
|
||||||
STACK_VARIABLES;
|
STACK_VARIABLES;
|
||||||
|
|
||||||
@ -723,11 +720,8 @@ versioned_symbol (libpthread, __pthread_create_2_1, pthread_create, GLIBC_2_1);
|
|||||||
|
|
||||||
#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
|
#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
|
||||||
int
|
int
|
||||||
__pthread_create_2_0 (newthread, attr, start_routine, arg)
|
__pthread_create_2_0 (pthread_t *newthread, const pthread_attr_t *attr,
|
||||||
pthread_t *newthread;
|
void *(*start_routine) (void *), void *arg)
|
||||||
const pthread_attr_t *attr;
|
|
||||||
void *(*start_routine) (void *);
|
|
||||||
void *arg;
|
|
||||||
{
|
{
|
||||||
/* The ATTR attribute is not really of type `pthread_attr_t *'. It has
|
/* The ATTR attribute is not really of type `pthread_attr_t *'. It has
|
||||||
the old size and access to the new members might crash the program.
|
the old size and access to the new members might crash the program.
|
||||||
|
@ -22,9 +22,7 @@
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__pthread_key_create (key, destr)
|
__pthread_key_create (pthread_key_t *key, void (*destr) (void *))
|
||||||
pthread_key_t *key;
|
|
||||||
void (*destr) (void *);
|
|
||||||
{
|
{
|
||||||
/* Find a slot in __pthread_keys which is unused. */
|
/* Find a slot in __pthread_keys which is unused. */
|
||||||
for (size_t cnt = 0; cnt < PTHREAD_KEYS_MAX; ++cnt)
|
for (size_t cnt = 0; cnt < PTHREAD_KEYS_MAX; ++cnt)
|
||||||
|
@ -80,11 +80,8 @@ fork_handler_alloc (void)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__register_atfork (prepare, parent, child, dso_handle)
|
__register_atfork (void (*prepare) (void), void (*parent) (void),
|
||||||
void (*prepare) (void);
|
void (*child) (void), void *dso_handle)
|
||||||
void (*parent) (void);
|
|
||||||
void (*child) (void);
|
|
||||||
void *dso_handle;
|
|
||||||
{
|
{
|
||||||
/* Get the lock to not conflict with other allocations. */
|
/* Get the lock to not conflict with other allocations. */
|
||||||
lll_lock (__fork_lock, LLL_PRIVATE);
|
lll_lock (__fork_lock, LLL_PRIVATE);
|
||||||
|
@ -250,11 +250,8 @@ int
|
|||||||
#ifdef GLOB_ATTRIBUTE
|
#ifdef GLOB_ATTRIBUTE
|
||||||
GLOB_ATTRIBUTE
|
GLOB_ATTRIBUTE
|
||||||
#endif
|
#endif
|
||||||
glob (pattern, flags, errfunc, pglob)
|
glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
|
||||||
const char *pattern;
|
glob_t *pglob)
|
||||||
int flags;
|
|
||||||
int (*errfunc) (const char *, int);
|
|
||||||
glob_t *pglob;
|
|
||||||
{
|
{
|
||||||
const char *filename;
|
const char *filename;
|
||||||
char *dirname = NULL;
|
char *dirname = NULL;
|
||||||
|
@ -662,8 +662,7 @@ char *
|
|||||||
regcomp/regexec above without link errors. */
|
regcomp/regexec above without link errors. */
|
||||||
weak_function
|
weak_function
|
||||||
# endif
|
# endif
|
||||||
re_comp (s)
|
re_comp (const char *s)
|
||||||
const char *s;
|
|
||||||
{
|
{
|
||||||
reg_errcode_t ret;
|
reg_errcode_t ret;
|
||||||
char *fastmap;
|
char *fastmap;
|
||||||
|
@ -588,8 +588,7 @@ int
|
|||||||
# ifdef _LIBC
|
# ifdef _LIBC
|
||||||
weak_function
|
weak_function
|
||||||
# endif
|
# endif
|
||||||
re_exec (s)
|
re_exec (const char *s)
|
||||||
const char *s;
|
|
||||||
{
|
{
|
||||||
return 0 == regexec (&re_comp_buf, s, 0, NULL, 0);
|
return 0 == regexec (&re_comp_buf, s, 0, NULL, 0);
|
||||||
}
|
}
|
||||||
|
@ -22,15 +22,7 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
|
|||||||
#include "gmp-impl.h"
|
#include "gmp-impl.h"
|
||||||
|
|
||||||
mp_limb_t
|
mp_limb_t
|
||||||
#if __STDC__
|
|
||||||
mpn_add_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size)
|
mpn_add_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size)
|
||||||
#else
|
|
||||||
mpn_add_n (res_ptr, s1_ptr, s2_ptr, size)
|
|
||||||
register mp_ptr res_ptr;
|
|
||||||
register mp_srcptr s1_ptr;
|
|
||||||
register mp_srcptr s2_ptr;
|
|
||||||
mp_size_t size;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
register mp_limb_t x, y, cy;
|
register mp_limb_t x, y, cy;
|
||||||
register mp_size_t j;
|
register mp_size_t j;
|
||||||
|
@ -27,14 +27,7 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
|
|||||||
Return 1 if OP1 > OP2, 0 if they are equal, and -1 if OP1 < OP2. */
|
Return 1 if OP1 > OP2, 0 if they are equal, and -1 if OP1 < OP2. */
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
mpn_cmp (mp_srcptr op1_ptr, mp_srcptr op2_ptr, mp_size_t size)
|
mpn_cmp (mp_srcptr op1_ptr, mp_srcptr op2_ptr, mp_size_t size)
|
||||||
#else
|
|
||||||
mpn_cmp (op1_ptr, op2_ptr, size)
|
|
||||||
mp_srcptr op1_ptr;
|
|
||||||
mp_srcptr op2_ptr;
|
|
||||||
mp_size_t size;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
mp_size_t i;
|
mp_size_t i;
|
||||||
mp_limb_t op1_word, op2_word;
|
mp_limb_t op1_word, op2_word;
|
||||||
|
@ -40,17 +40,9 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
|
|||||||
here (not udiv_qrnnd). */
|
here (not udiv_qrnnd). */
|
||||||
|
|
||||||
mp_limb_t
|
mp_limb_t
|
||||||
#if __STDC__
|
|
||||||
mpn_divmod_1 (mp_ptr quot_ptr,
|
mpn_divmod_1 (mp_ptr quot_ptr,
|
||||||
mp_srcptr dividend_ptr, mp_size_t dividend_size,
|
mp_srcptr dividend_ptr, mp_size_t dividend_size,
|
||||||
mp_limb_t divisor_limb)
|
mp_limb_t divisor_limb)
|
||||||
#else
|
|
||||||
mpn_divmod_1 (quot_ptr, dividend_ptr, dividend_size, divisor_limb)
|
|
||||||
mp_ptr quot_ptr;
|
|
||||||
mp_srcptr dividend_ptr;
|
|
||||||
mp_size_t dividend_size;
|
|
||||||
mp_limb_t divisor_limb;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
mp_size_t i;
|
mp_size_t i;
|
||||||
mp_limb_t n1, n0, r;
|
mp_limb_t n1, n0, r;
|
||||||
|
@ -40,19 +40,9 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
|
|||||||
3. NSIZE >= DSIZE, even if QEXTRA_LIMBS is non-zero. */
|
3. NSIZE >= DSIZE, even if QEXTRA_LIMBS is non-zero. */
|
||||||
|
|
||||||
mp_limb_t
|
mp_limb_t
|
||||||
#if __STDC__
|
|
||||||
mpn_divrem (mp_ptr qp, mp_size_t qextra_limbs,
|
mpn_divrem (mp_ptr qp, mp_size_t qextra_limbs,
|
||||||
mp_ptr np, mp_size_t nsize,
|
mp_ptr np, mp_size_t nsize,
|
||||||
mp_srcptr dp, mp_size_t dsize)
|
mp_srcptr dp, mp_size_t dsize)
|
||||||
#else
|
|
||||||
mpn_divrem (qp, qextra_limbs, np, nsize, dp, dsize)
|
|
||||||
mp_ptr qp;
|
|
||||||
mp_size_t qextra_limbs;
|
|
||||||
mp_ptr np;
|
|
||||||
mp_size_t nsize;
|
|
||||||
mp_srcptr dp;
|
|
||||||
mp_size_t dsize;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
mp_limb_t most_significant_q_limb = 0;
|
mp_limb_t most_significant_q_limb = 0;
|
||||||
|
|
||||||
|
@ -31,17 +31,9 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
mp_limb_t
|
mp_limb_t
|
||||||
#if __STDC__
|
|
||||||
mpn_lshift (register mp_ptr wp,
|
mpn_lshift (register mp_ptr wp,
|
||||||
register mp_srcptr up, mp_size_t usize,
|
register mp_srcptr up, mp_size_t usize,
|
||||||
register unsigned int cnt)
|
register unsigned int cnt)
|
||||||
#else
|
|
||||||
mpn_lshift (wp, up, usize, cnt)
|
|
||||||
register mp_ptr wp;
|
|
||||||
register mp_srcptr up;
|
|
||||||
mp_size_t usize;
|
|
||||||
register unsigned int cnt;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
register mp_limb_t high_limb, low_limb;
|
register mp_limb_t high_limb, low_limb;
|
||||||
register unsigned sh_1, sh_2;
|
register unsigned sh_1, sh_2;
|
||||||
|
@ -37,15 +37,8 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
|
|||||||
here (not udiv_qrnnd). */
|
here (not udiv_qrnnd). */
|
||||||
|
|
||||||
mp_limb_t
|
mp_limb_t
|
||||||
#if __STDC__
|
|
||||||
mpn_mod_1 (mp_srcptr dividend_ptr, mp_size_t dividend_size,
|
mpn_mod_1 (mp_srcptr dividend_ptr, mp_size_t dividend_size,
|
||||||
mp_limb_t divisor_limb)
|
mp_limb_t divisor_limb)
|
||||||
#else
|
|
||||||
mpn_mod_1 (dividend_ptr, dividend_size, divisor_limb)
|
|
||||||
mp_srcptr dividend_ptr;
|
|
||||||
mp_size_t dividend_size;
|
|
||||||
mp_limb_t divisor_limb;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
mp_size_t i;
|
mp_size_t i;
|
||||||
mp_limb_t n1, n0, r;
|
mp_limb_t n1, n0, r;
|
||||||
|
@ -42,18 +42,9 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
mp_limb_t
|
mp_limb_t
|
||||||
#if __STDC__
|
|
||||||
mpn_mul (mp_ptr prodp,
|
mpn_mul (mp_ptr prodp,
|
||||||
mp_srcptr up, mp_size_t usize,
|
mp_srcptr up, mp_size_t usize,
|
||||||
mp_srcptr vp, mp_size_t vsize)
|
mp_srcptr vp, mp_size_t vsize)
|
||||||
#else
|
|
||||||
mpn_mul (prodp, up, usize, vp, vsize)
|
|
||||||
mp_ptr prodp;
|
|
||||||
mp_srcptr up;
|
|
||||||
mp_size_t usize;
|
|
||||||
mp_srcptr vp;
|
|
||||||
mp_size_t vsize;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
mp_ptr prod_endp = prodp + usize + vsize - 1;
|
mp_ptr prod_endp = prodp + usize + vsize - 1;
|
||||||
mp_limb_t cy;
|
mp_limb_t cy;
|
||||||
|
@ -49,15 +49,7 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
|
|||||||
algorithm below. */
|
algorithm below. */
|
||||||
|
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
impn_mul_n_basecase (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size)
|
impn_mul_n_basecase (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size)
|
||||||
#else
|
|
||||||
impn_mul_n_basecase (prodp, up, vp, size)
|
|
||||||
mp_ptr prodp;
|
|
||||||
mp_srcptr up;
|
|
||||||
mp_srcptr vp;
|
|
||||||
mp_size_t size;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
mp_size_t i;
|
mp_size_t i;
|
||||||
mp_limb_t cy_limb;
|
mp_limb_t cy_limb;
|
||||||
@ -100,17 +92,8 @@ impn_mul_n_basecase (prodp, up, vp, size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
impn_mul_n (mp_ptr prodp,
|
impn_mul_n (mp_ptr prodp,
|
||||||
mp_srcptr up, mp_srcptr vp, mp_size_t size, mp_ptr tspace)
|
mp_srcptr up, mp_srcptr vp, mp_size_t size, mp_ptr tspace)
|
||||||
#else
|
|
||||||
impn_mul_n (prodp, up, vp, size, tspace)
|
|
||||||
mp_ptr prodp;
|
|
||||||
mp_srcptr up;
|
|
||||||
mp_srcptr vp;
|
|
||||||
mp_size_t size;
|
|
||||||
mp_ptr tspace;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if ((size & 1) != 0)
|
if ((size & 1) != 0)
|
||||||
{
|
{
|
||||||
@ -219,14 +202,7 @@ impn_mul_n (prodp, up, vp, size, tspace)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
impn_sqr_n_basecase (mp_ptr prodp, mp_srcptr up, mp_size_t size)
|
impn_sqr_n_basecase (mp_ptr prodp, mp_srcptr up, mp_size_t size)
|
||||||
#else
|
|
||||||
impn_sqr_n_basecase (prodp, up, size)
|
|
||||||
mp_ptr prodp;
|
|
||||||
mp_srcptr up;
|
|
||||||
mp_size_t size;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
mp_size_t i;
|
mp_size_t i;
|
||||||
mp_limb_t cy_limb;
|
mp_limb_t cy_limb;
|
||||||
@ -269,16 +245,8 @@ impn_sqr_n_basecase (prodp, up, size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
impn_sqr_n (mp_ptr prodp,
|
impn_sqr_n (mp_ptr prodp,
|
||||||
mp_srcptr up, mp_size_t size, mp_ptr tspace)
|
mp_srcptr up, mp_size_t size, mp_ptr tspace)
|
||||||
#else
|
|
||||||
impn_sqr_n (prodp, up, size, tspace)
|
|
||||||
mp_ptr prodp;
|
|
||||||
mp_srcptr up;
|
|
||||||
mp_size_t size;
|
|
||||||
mp_ptr tspace;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if ((size & 1) != 0)
|
if ((size & 1) != 0)
|
||||||
{
|
{
|
||||||
@ -358,15 +326,7 @@ impn_sqr_n (prodp, up, size, tspace)
|
|||||||
|
|
||||||
/* This should be made into an inline function in gmp.h. */
|
/* This should be made into an inline function in gmp.h. */
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
mpn_mul_n (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size)
|
mpn_mul_n (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size)
|
||||||
#else
|
|
||||||
mpn_mul_n (prodp, up, vp, size)
|
|
||||||
mp_ptr prodp;
|
|
||||||
mp_srcptr up;
|
|
||||||
mp_srcptr vp;
|
|
||||||
mp_size_t size;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
TMP_DECL (marker);
|
TMP_DECL (marker);
|
||||||
TMP_MARK (marker);
|
TMP_MARK (marker);
|
||||||
|
@ -31,17 +31,9 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
mp_limb_t
|
mp_limb_t
|
||||||
#if __STDC__
|
|
||||||
mpn_rshift (register mp_ptr wp,
|
mpn_rshift (register mp_ptr wp,
|
||||||
register mp_srcptr up, mp_size_t usize,
|
register mp_srcptr up, mp_size_t usize,
|
||||||
register unsigned int cnt)
|
register unsigned int cnt)
|
||||||
#else
|
|
||||||
mpn_rshift (wp, up, usize, cnt)
|
|
||||||
register mp_ptr wp;
|
|
||||||
register mp_srcptr up;
|
|
||||||
mp_size_t usize;
|
|
||||||
register unsigned int cnt;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
register mp_limb_t high_limb, low_limb;
|
register mp_limb_t high_limb, low_limb;
|
||||||
register unsigned sh_1, sh_2;
|
register unsigned sh_1, sh_2;
|
||||||
|
@ -46,10 +46,7 @@
|
|||||||
|
|
||||||
|
|
||||||
FLOAT
|
FLOAT
|
||||||
INTERNAL (STRTOF) (nptr, endptr, group)
|
INTERNAL (STRTOF) (const STRING_TYPE *nptr, STRING_TYPE **endptr, int group)
|
||||||
const STRING_TYPE *nptr;
|
|
||||||
STRING_TYPE **endptr;
|
|
||||||
int group;
|
|
||||||
{
|
{
|
||||||
return INTERNAL(STRTOF_L) (nptr, endptr, group, _NL_CURRENT_LOCALE);
|
return INTERNAL(STRTOF_L) (nptr, endptr, group, _NL_CURRENT_LOCALE);
|
||||||
}
|
}
|
||||||
@ -62,9 +59,7 @@ FLOAT
|
|||||||
#ifdef weak_function
|
#ifdef weak_function
|
||||||
weak_function
|
weak_function
|
||||||
#endif
|
#endif
|
||||||
STRTOF (nptr, endptr)
|
STRTOF (const STRING_TYPE *nptr, STRING_TYPE **endptr)
|
||||||
const STRING_TYPE *nptr;
|
|
||||||
STRING_TYPE **endptr;
|
|
||||||
{
|
{
|
||||||
return INTERNAL(STRTOF_L) (nptr, endptr, 0, _NL_CURRENT_LOCALE);
|
return INTERNAL(STRTOF_L) (nptr, endptr, 0, _NL_CURRENT_LOCALE);
|
||||||
}
|
}
|
||||||
|
@ -1781,10 +1781,7 @@ FLOAT
|
|||||||
#ifdef weak_function
|
#ifdef weak_function
|
||||||
weak_function
|
weak_function
|
||||||
#endif
|
#endif
|
||||||
__STRTOF (nptr, endptr, loc)
|
__STRTOF (const STRING_TYPE *nptr, STRING_TYPE **endptr, __locale_t loc)
|
||||||
const STRING_TYPE *nptr;
|
|
||||||
STRING_TYPE **endptr;
|
|
||||||
__locale_t loc;
|
|
||||||
{
|
{
|
||||||
return ____STRTOF_INTERNAL (nptr, endptr, 0, loc);
|
return ____STRTOF_INTERNAL (nptr, endptr, 0, loc);
|
||||||
}
|
}
|
||||||
|
@ -92,11 +92,8 @@ extern INT INTERNAL (__strtol_l) (const STRING_TYPE *, STRING_TYPE **, int,
|
|||||||
|
|
||||||
|
|
||||||
INT
|
INT
|
||||||
INTERNAL (strtol) (nptr, endptr, base, group)
|
INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
|
||||||
const STRING_TYPE *nptr;
|
int base, int group)
|
||||||
STRING_TYPE **endptr;
|
|
||||||
int base;
|
|
||||||
int group;
|
|
||||||
{
|
{
|
||||||
return INTERNAL (__strtol_l) (nptr, endptr, base, group, _NL_CURRENT_LOCALE);
|
return INTERNAL (__strtol_l) (nptr, endptr, base, group, _NL_CURRENT_LOCALE);
|
||||||
}
|
}
|
||||||
|
@ -222,12 +222,8 @@ extern const unsigned char __strtol_ull_rem_tab[] attribute_hidden;
|
|||||||
one converted is stored in *ENDPTR. */
|
one converted is stored in *ENDPTR. */
|
||||||
|
|
||||||
INT
|
INT
|
||||||
INTERNAL (__strtol_l) (nptr, endptr, base, group, loc)
|
INTERNAL (__strtol_l) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
|
||||||
const STRING_TYPE *nptr;
|
int base, int group, __locale_t loc)
|
||||||
STRING_TYPE **endptr;
|
|
||||||
int base;
|
|
||||||
int group;
|
|
||||||
__locale_t loc;
|
|
||||||
{
|
{
|
||||||
int negative;
|
int negative;
|
||||||
unsigned LONG int cutoff;
|
unsigned LONG int cutoff;
|
||||||
@ -546,11 +542,8 @@ INT
|
|||||||
#ifdef weak_function
|
#ifdef weak_function
|
||||||
weak_function
|
weak_function
|
||||||
#endif
|
#endif
|
||||||
__strtol_l (nptr, endptr, base, loc)
|
__strtol_l (const STRING_TYPE *nptr, STRING_TYPE **endptr,
|
||||||
const STRING_TYPE *nptr;
|
int base, __locale_t loc)
|
||||||
STRING_TYPE **endptr;
|
|
||||||
int base;
|
|
||||||
__locale_t loc;
|
|
||||||
{
|
{
|
||||||
return INTERNAL (__strtol_l) (nptr, endptr, base, 0, loc);
|
return INTERNAL (__strtol_l) (nptr, endptr, base, 0, loc);
|
||||||
}
|
}
|
||||||
|
@ -22,15 +22,7 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
|
|||||||
#include "gmp-impl.h"
|
#include "gmp-impl.h"
|
||||||
|
|
||||||
mp_limb_t
|
mp_limb_t
|
||||||
#if __STDC__
|
|
||||||
mpn_sub_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size)
|
mpn_sub_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size)
|
||||||
#else
|
|
||||||
mpn_sub_n (res_ptr, s1_ptr, s2_ptr, size)
|
|
||||||
register mp_ptr res_ptr;
|
|
||||||
register mp_srcptr s1_ptr;
|
|
||||||
register mp_srcptr s2_ptr;
|
|
||||||
mp_size_t size;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
register mp_limb_t x, y, cy;
|
register mp_limb_t x, y, cy;
|
||||||
register mp_size_t j;
|
register mp_size_t j;
|
||||||
|
@ -61,10 +61,7 @@ __memrchr
|
|||||||
#else
|
#else
|
||||||
MEMRCHR
|
MEMRCHR
|
||||||
#endif
|
#endif
|
||||||
(s, c_in, n)
|
(const __ptr_t s, int c_in, size_t n)
|
||||||
const __ptr_t s;
|
|
||||||
int c_in;
|
|
||||||
size_t n;
|
|
||||||
{
|
{
|
||||||
const unsigned char *char_ptr;
|
const unsigned char *char_ptr;
|
||||||
const unsigned long int *longword_ptr;
|
const unsigned long int *longword_ptr;
|
||||||
|
@ -34,21 +34,16 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
||||||
# define LOCALE_PARAM , loc
|
# define LOCALE_PARAM , __locale_t loc
|
||||||
# define LOCALE_PARAM_DECL __locale_t loc;
|
|
||||||
#else
|
#else
|
||||||
# define LOCALE_PARAM
|
# define LOCALE_PARAM
|
||||||
# define LOCALE_PARAM_DECL
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Compare S1 and S2, ignoring case, returning less than, equal to or
|
/* Compare S1 and S2, ignoring case, returning less than, equal to or
|
||||||
greater than zero if S1 is lexicographically less than,
|
greater than zero if S1 is lexicographically less than,
|
||||||
equal to or greater than S2. */
|
equal to or greater than S2. */
|
||||||
int
|
int
|
||||||
__strcasecmp (s1, s2 LOCALE_PARAM)
|
__strcasecmp (const char *s1, const char *s2 LOCALE_PARAM)
|
||||||
const char *s1;
|
|
||||||
const char *s2;
|
|
||||||
LOCALE_PARAM_DECL
|
|
||||||
{
|
{
|
||||||
#if defined _LIBC && !defined USE_IN_EXTENDED_LOCALE_MODEL
|
#if defined _LIBC && !defined USE_IN_EXTENDED_LOCALE_MODEL
|
||||||
__locale_t loc = _NL_CURRENT_LOCALE;
|
__locale_t loc = _NL_CURRENT_LOCALE;
|
||||||
|
@ -36,11 +36,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
||||||
# define LOCALE_PARAM , loc
|
# define LOCALE_PARAM , __locale_t loc
|
||||||
# define LOCALE_PARAM_DECL __locale_t loc;
|
|
||||||
#else
|
#else
|
||||||
# define LOCALE_PARAM
|
# define LOCALE_PARAM
|
||||||
# define LOCALE_PARAM_DECL
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Compare no more than N characters of S1 and S2,
|
/* Compare no more than N characters of S1 and S2,
|
||||||
@ -48,11 +46,7 @@
|
|||||||
greater than zero if S1 is lexicographically less
|
greater than zero if S1 is lexicographically less
|
||||||
than, equal to or greater than S2. */
|
than, equal to or greater than S2. */
|
||||||
int
|
int
|
||||||
__strncasecmp (s1, s2, n LOCALE_PARAM)
|
__strncasecmp (const char *s1, const char *s2, size_t n LOCALE_PARAM)
|
||||||
const char *s1;
|
|
||||||
const char *s2;
|
|
||||||
size_t n;
|
|
||||||
LOCALE_PARAM_DECL
|
|
||||||
{
|
{
|
||||||
#if defined _LIBC && !defined USE_IN_EXTENDED_LOCALE_MODEL
|
#if defined _LIBC && !defined USE_IN_EXTENDED_LOCALE_MODEL
|
||||||
__locale_t loc = _NL_CURRENT_LOCALE;
|
__locale_t loc = _NL_CURRENT_LOCALE;
|
||||||
|
@ -82,14 +82,9 @@ __get_socket (struct sockaddr_in *saddr)
|
|||||||
*/
|
*/
|
||||||
u_short
|
u_short
|
||||||
internal_function
|
internal_function
|
||||||
__libc_rpc_getport (address, program, version, protocol, timeout_sec,
|
__libc_rpc_getport (struct sockaddr_in *address, u_long program,
|
||||||
tottimeout_sec)
|
u_long version, u_int protocol, time_t timeout_sec,
|
||||||
struct sockaddr_in *address;
|
time_t tottimeout_sec)
|
||||||
u_long program;
|
|
||||||
u_long version;
|
|
||||||
u_int protocol;
|
|
||||||
time_t timeout_sec;
|
|
||||||
time_t tottimeout_sec;
|
|
||||||
{
|
{
|
||||||
const struct timeval timeout = {timeout_sec, 0};
|
const struct timeval timeout = {timeout_sec, 0};
|
||||||
const struct timeval tottimeout = {tottimeout_sec, 0};
|
const struct timeval tottimeout = {tottimeout_sec, 0};
|
||||||
|
15
sunrpc/xdr.c
15
sunrpc/xdr.c
@ -675,12 +675,15 @@ libc_hidden_nolink_sunrpc (xdr_netobj, GLIBC_2_0)
|
|||||||
* If there is no specific or default routine an error is returned.
|
* If there is no specific or default routine an error is returned.
|
||||||
*/
|
*/
|
||||||
bool_t
|
bool_t
|
||||||
xdr_union (xdrs, dscmp, unp, choices, dfault)
|
xdr_union (XDR *xdrs,
|
||||||
XDR *xdrs;
|
/* enum to decide which arm to work on */
|
||||||
enum_t *dscmp; /* enum to decide which arm to work on */
|
enum_t *dscmp,
|
||||||
char *unp; /* the union itself */
|
/* the union itself */
|
||||||
const struct xdr_discrim *choices; /* [value, xdr proc] for each arm */
|
char *unp,
|
||||||
xdrproc_t dfault; /* default xdr routine */
|
/* [value, xdr proc] for each arm */
|
||||||
|
const struct xdr_discrim *choices,
|
||||||
|
/* default xdr routine */
|
||||||
|
xdrproc_t dfault)
|
||||||
{
|
{
|
||||||
enum_t dscm;
|
enum_t dscm;
|
||||||
|
|
||||||
|
@ -53,13 +53,17 @@
|
|||||||
* xdr procedure to call to handle each element of the array.
|
* xdr procedure to call to handle each element of the array.
|
||||||
*/
|
*/
|
||||||
bool_t
|
bool_t
|
||||||
xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
|
xdr_array (XDR *xdrs,
|
||||||
XDR *xdrs;
|
/* array pointer */
|
||||||
caddr_t *addrp; /* array pointer */
|
caddr_t *addrp,
|
||||||
u_int *sizep; /* number of elements */
|
/* number of elements */
|
||||||
u_int maxsize; /* max numberof elements */
|
u_int *sizep,
|
||||||
u_int elsize; /* size in bytes of each element */
|
/* max numberof elements */
|
||||||
xdrproc_t elproc; /* xdr routine to handle each element */
|
u_int maxsize,
|
||||||
|
/* size in bytes of each element */
|
||||||
|
u_int elsize,
|
||||||
|
/* xdr routine to handle each element */
|
||||||
|
xdrproc_t elproc)
|
||||||
{
|
{
|
||||||
u_int i;
|
u_int i;
|
||||||
caddr_t target = *addrp;
|
caddr_t target = *addrp;
|
||||||
|
@ -54,11 +54,13 @@
|
|||||||
* proc is the routine to handle the referenced structure.
|
* proc is the routine to handle the referenced structure.
|
||||||
*/
|
*/
|
||||||
bool_t
|
bool_t
|
||||||
xdr_reference (xdrs, pp, size, proc)
|
xdr_reference (XDR *xdrs,
|
||||||
XDR *xdrs;
|
/* the pointer to work on */
|
||||||
caddr_t *pp; /* the pointer to work on */
|
caddr_t *pp,
|
||||||
u_int size; /* size of the object pointed to */
|
/* size of the object pointed to */
|
||||||
xdrproc_t proc; /* xdr routine to handle the object */
|
u_int size,
|
||||||
|
/* xdr routine to handle the object */
|
||||||
|
xdrproc_t proc)
|
||||||
{
|
{
|
||||||
caddr_t loc = *pp;
|
caddr_t loc = *pp;
|
||||||
bool_t stat;
|
bool_t stat;
|
||||||
|
@ -27,8 +27,7 @@
|
|||||||
#define __CONCATX(a,b) __CONCAT(a,b)
|
#define __CONCATX(a,b) __CONCAT(a,b)
|
||||||
|
|
||||||
float_type
|
float_type
|
||||||
__CONCATX(__,FUNC) (x)
|
__CONCATX(__,FUNC) (float_type x)
|
||||||
float_type x;
|
|
||||||
{
|
{
|
||||||
return __m81_u(__CONCATX(__,FUNC))(x);
|
return __m81_u(__CONCATX(__,FUNC))(x);
|
||||||
}
|
}
|
||||||
|
@ -27,8 +27,7 @@
|
|||||||
#define __CONCATX(a,b) __CONCAT(a,b)
|
#define __CONCATX(a,b) __CONCAT(a,b)
|
||||||
|
|
||||||
int
|
int
|
||||||
__CONCATX(__,FUNC) (x)
|
__CONCATX(__,FUNC) (float_type x)
|
||||||
float_type x;
|
|
||||||
{
|
{
|
||||||
return __m81_u(__CONCATX(__,FUNC))(x);
|
return __m81_u(__CONCATX(__,FUNC))(x);
|
||||||
}
|
}
|
||||||
|
@ -39,9 +39,7 @@
|
|||||||
#define __CONCATX(a,b) __CONCAT(a,b)
|
#define __CONCATX(a,b) __CONCAT(a,b)
|
||||||
|
|
||||||
float_type
|
float_type
|
||||||
__CONCATX(__scalbn,suffix) (x, exp)
|
__CONCATX(__scalbn,suffix) (float_type x, int exp)
|
||||||
float_type x;
|
|
||||||
int exp;
|
|
||||||
{
|
{
|
||||||
return __m81_u(__CONCATX(__scalbn,suffix))(x, exp);
|
return __m81_u(__CONCATX(__scalbn,suffix))(x, exp);
|
||||||
}
|
}
|
||||||
|
@ -27,8 +27,7 @@
|
|||||||
#define CONCATX(a,b) __CONCAT(a,b)
|
#define CONCATX(a,b) __CONCAT(a,b)
|
||||||
|
|
||||||
void
|
void
|
||||||
CONCATX(__,FUNC) (x, sinx, cosx)
|
CONCATX(__,FUNC) (float_type x, float_type *sinx, float_type *cosx)
|
||||||
float_type x, *sinx, *cosx;
|
|
||||||
{
|
{
|
||||||
__m81_u(CONCATX(__,FUNC))(x, sinx, cosx);
|
__m81_u(CONCATX(__,FUNC))(x, sinx, cosx);
|
||||||
}
|
}
|
||||||
|
@ -37,12 +37,10 @@ versioned_symbol (libc, __scandir64, scandir64, GLIBC_2_2);
|
|||||||
# include "olddirent.h"
|
# include "olddirent.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
__old_scandir64 (dir, namelist, select, cmp)
|
__old_scandir64 (const char *dir, struct __old_dirent64 ***namelist,
|
||||||
const char *dir;
|
int (*select) (const struct __old_dirent64 *),
|
||||||
struct __old_dirent64 ***namelist;
|
|
||||||
int (*select) (const struct __old_dirent64 *);
|
|
||||||
int (*cmp) (const struct __old_dirent64 **,
|
int (*cmp) (const struct __old_dirent64 **,
|
||||||
const struct __old_dirent64 **);
|
const struct __old_dirent64 **))
|
||||||
{
|
{
|
||||||
DIR *dp = __opendir (dir);
|
DIR *dp = __opendir (dir);
|
||||||
struct __old_dirent64 **v = NULL;
|
struct __old_dirent64 **v = NULL;
|
||||||
|
@ -284,16 +284,12 @@ static const CHAR_T zeroes[16] = /* "0000000000000000" */
|
|||||||
# undef _NL_CURRENT
|
# undef _NL_CURRENT
|
||||||
# define _NL_CURRENT(category, item) \
|
# define _NL_CURRENT(category, item) \
|
||||||
(current->values[_NL_ITEM_INDEX (item)].string)
|
(current->values[_NL_ITEM_INDEX (item)].string)
|
||||||
# define LOCALE_PARAM , loc
|
# define LOCALE_PARAM , __locale_t loc
|
||||||
# define LOCALE_ARG , loc
|
# define LOCALE_ARG , loc
|
||||||
# define LOCALE_PARAM_DECL __locale_t loc;
|
|
||||||
# define LOCALE_PARAM_PROTO , __locale_t loc
|
|
||||||
# define HELPER_LOCALE_ARG , current
|
# define HELPER_LOCALE_ARG , current
|
||||||
#else
|
#else
|
||||||
# define LOCALE_PARAM
|
# define LOCALE_PARAM
|
||||||
# define LOCALE_PARAM_PROTO
|
|
||||||
# define LOCALE_ARG
|
# define LOCALE_ARG
|
||||||
# define LOCALE_PARAM_DECL
|
|
||||||
# ifdef _LIBC
|
# ifdef _LIBC
|
||||||
# define HELPER_LOCALE_ARG , _NL_CURRENT_DATA (LC_TIME)
|
# define HELPER_LOCALE_ARG , _NL_CURRENT_DATA (LC_TIME)
|
||||||
# else
|
# else
|
||||||
@ -330,14 +326,10 @@ static const CHAR_T zeroes[16] = /* "0000000000000000" */
|
|||||||
#define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9)
|
#define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9)
|
||||||
|
|
||||||
static CHAR_T *memcpy_lowcase (CHAR_T *dest, const CHAR_T *src,
|
static CHAR_T *memcpy_lowcase (CHAR_T *dest, const CHAR_T *src,
|
||||||
size_t len LOCALE_PARAM_PROTO) __THROW;
|
size_t len LOCALE_PARAM) __THROW;
|
||||||
|
|
||||||
static CHAR_T *
|
static CHAR_T *
|
||||||
memcpy_lowcase (dest, src, len LOCALE_PARAM)
|
memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM)
|
||||||
CHAR_T *dest;
|
|
||||||
const CHAR_T *src;
|
|
||||||
size_t len;
|
|
||||||
LOCALE_PARAM_DECL
|
|
||||||
{
|
{
|
||||||
while (len-- > 0)
|
while (len-- > 0)
|
||||||
dest[len] = TOLOWER ((UCHAR_T) src[len], loc);
|
dest[len] = TOLOWER ((UCHAR_T) src[len], loc);
|
||||||
@ -345,14 +337,10 @@ memcpy_lowcase (dest, src, len LOCALE_PARAM)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static CHAR_T *memcpy_uppcase (CHAR_T *dest, const CHAR_T *src,
|
static CHAR_T *memcpy_uppcase (CHAR_T *dest, const CHAR_T *src,
|
||||||
size_t len LOCALE_PARAM_PROTO) __THROW;
|
size_t len LOCALE_PARAM) __THROW;
|
||||||
|
|
||||||
static CHAR_T *
|
static CHAR_T *
|
||||||
memcpy_uppcase (dest, src, len LOCALE_PARAM)
|
memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM)
|
||||||
CHAR_T *dest;
|
|
||||||
const CHAR_T *src;
|
|
||||||
size_t len;
|
|
||||||
LOCALE_PARAM_DECL
|
|
||||||
{
|
{
|
||||||
while (len-- > 0)
|
while (len-- > 0)
|
||||||
dest[len] = TOUPPER ((UCHAR_T) src[len], loc);
|
dest[len] = TOUPPER ((UCHAR_T) src[len], loc);
|
||||||
@ -429,8 +417,7 @@ static CHAR_T const month_name[][10] =
|
|||||||
#ifdef emacs
|
#ifdef emacs
|
||||||
# define my_strftime emacs_strftimeu
|
# define my_strftime emacs_strftimeu
|
||||||
# define ut_argument , ut
|
# define ut_argument , ut
|
||||||
# define ut_argument_spec int ut;
|
# define ut_argument_spec , int ut
|
||||||
# define ut_argument_spec_iso , int ut
|
|
||||||
#else
|
#else
|
||||||
# ifdef COMPILE_WIDE
|
# ifdef COMPILE_WIDE
|
||||||
# define my_strftime wcsftime
|
# define my_strftime wcsftime
|
||||||
@ -441,15 +428,14 @@ static CHAR_T const month_name[][10] =
|
|||||||
# endif
|
# endif
|
||||||
# define ut_argument
|
# define ut_argument
|
||||||
# define ut_argument_spec
|
# define ut_argument_spec
|
||||||
# define ut_argument_spec_iso
|
|
||||||
/* We don't have this information in general. */
|
/* We don't have this information in general. */
|
||||||
# define ut 0
|
# define ut 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static size_t __strftime_internal (CHAR_T *, size_t, const CHAR_T *,
|
static size_t __strftime_internal (CHAR_T *, size_t, const CHAR_T *,
|
||||||
const struct tm *, bool *
|
const struct tm *, bool *
|
||||||
ut_argument_spec_iso
|
ut_argument_spec
|
||||||
LOCALE_PARAM_PROTO) __THROW;
|
LOCALE_PARAM) __THROW;
|
||||||
|
|
||||||
/* Write information from TP into S according to the format
|
/* Write information from TP into S according to the format
|
||||||
string FORMAT, writing no more that MAXSIZE characters
|
string FORMAT, writing no more that MAXSIZE characters
|
||||||
@ -459,13 +445,8 @@ static size_t __strftime_internal (CHAR_T *, size_t, const CHAR_T *,
|
|||||||
written, use NULL for S and (size_t) UINT_MAX for MAXSIZE. */
|
written, use NULL for S and (size_t) UINT_MAX for MAXSIZE. */
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
my_strftime (s, maxsize, format, tp ut_argument LOCALE_PARAM)
|
my_strftime (CHAR_T *s, size_t maxsize, const CHAR_T *format,
|
||||||
CHAR_T *s;
|
const struct tm *tp ut_argument_spec LOCALE_PARAM)
|
||||||
size_t maxsize;
|
|
||||||
const CHAR_T *format;
|
|
||||||
const struct tm *tp;
|
|
||||||
ut_argument_spec
|
|
||||||
LOCALE_PARAM_DECL
|
|
||||||
{
|
{
|
||||||
#if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET
|
#if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET
|
||||||
/* Solaris 2.5 tzset sometimes modifies the storage returned by localtime.
|
/* Solaris 2.5 tzset sometimes modifies the storage returned by localtime.
|
||||||
@ -483,15 +464,9 @@ libc_hidden_def (my_strftime)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
__strftime_internal (s, maxsize, format, tp, tzset_called ut_argument
|
__strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format,
|
||||||
LOCALE_PARAM)
|
const struct tm *tp, bool *tzset_called
|
||||||
CHAR_T *s;
|
ut_argument_spec LOCALE_PARAM)
|
||||||
size_t maxsize;
|
|
||||||
const CHAR_T *format;
|
|
||||||
const struct tm *tp;
|
|
||||||
bool *tzset_called;
|
|
||||||
ut_argument_spec
|
|
||||||
LOCALE_PARAM_DECL
|
|
||||||
{
|
{
|
||||||
#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL
|
#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL
|
||||||
struct __locale_data *const current = loc->__locales[LC_TIME];
|
struct __locale_data *const current = loc->__locales[LC_TIME];
|
||||||
|
@ -181,17 +181,13 @@ static const unsigned short int __mon_yday[2][13] =
|
|||||||
# undef _NL_CURRENT_WORD
|
# undef _NL_CURRENT_WORD
|
||||||
# define _NL_CURRENT_WORD(category, item) \
|
# define _NL_CURRENT_WORD(category, item) \
|
||||||
(current->values[_NL_ITEM_INDEX (item)].word)
|
(current->values[_NL_ITEM_INDEX (item)].word)
|
||||||
# define LOCALE_PARAM , locale
|
# define LOCALE_PARAM , __locale_t locale
|
||||||
# define LOCALE_ARG , locale
|
# define LOCALE_ARG , locale
|
||||||
# define LOCALE_PARAM_PROTO , __locale_t locale
|
|
||||||
# define LOCALE_PARAM_DECL __locale_t locale;
|
|
||||||
# define HELPER_LOCALE_ARG , current
|
# define HELPER_LOCALE_ARG , current
|
||||||
# define ISSPACE(Ch) __isspace_l (Ch, locale)
|
# define ISSPACE(Ch) __isspace_l (Ch, locale)
|
||||||
#else
|
#else
|
||||||
# define LOCALE_PARAM
|
# define LOCALE_PARAM
|
||||||
# define LOCALE_ARG
|
# define LOCALE_ARG
|
||||||
# define LOCALE_PARAM_DECL
|
|
||||||
# define LOCALE_PARAM_PROTO
|
|
||||||
# define HELPER_LOCALE_ARG
|
# define HELPER_LOCALE_ARG
|
||||||
# define ISSPACE(Ch) isspace (Ch)
|
# define ISSPACE(Ch) isspace (Ch)
|
||||||
#endif
|
#endif
|
||||||
@ -239,12 +235,8 @@ internal_function
|
|||||||
#else
|
#else
|
||||||
static char *
|
static char *
|
||||||
#endif
|
#endif
|
||||||
__strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
|
__strptime_internal (const char *rp, const char *fmt, struct tm *tmp,
|
||||||
const char *rp;
|
void *statep LOCALE_PARAM)
|
||||||
const char *fmt;
|
|
||||||
struct tm *tmp;
|
|
||||||
void *statep;
|
|
||||||
LOCALE_PARAM_DECL
|
|
||||||
{
|
{
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
struct __locale_data *const current = locale->__locales[LC_TIME];
|
struct __locale_data *const current = locale->__locales[LC_TIME];
|
||||||
@ -1209,11 +1201,7 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
|
|||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
strptime (buf, format, tm LOCALE_PARAM)
|
strptime (const char *buf, const char *format, struct tm *tm LOCALE_PARAM)
|
||||||
const char *buf;
|
|
||||||
const char *format;
|
|
||||||
struct tm *tm;
|
|
||||||
LOCALE_PARAM_DECL
|
|
||||||
{
|
{
|
||||||
return __strptime_internal (buf, format, tm, NULL LOCALE_ARG);
|
return __strptime_internal (buf, format, tm, NULL LOCALE_ARG);
|
||||||
}
|
}
|
||||||
|
@ -35,21 +35,16 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
||||||
# define LOCALE_PARAM , loc
|
# define LOCALE_PARAM , __locale_t loc
|
||||||
# define LOCALE_PARAM_DECL __locale_t loc;
|
|
||||||
#else
|
#else
|
||||||
# define LOCALE_PARAM
|
# define LOCALE_PARAM
|
||||||
# define LOCALE_PARAM_DECL
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Compare S1 and S2, ignoring case, returning less than, equal to or
|
/* Compare S1 and S2, ignoring case, returning less than, equal to or
|
||||||
greater than zero if S1 is lexicographically less than,
|
greater than zero if S1 is lexicographically less than,
|
||||||
equal to or greater than S2. */
|
equal to or greater than S2. */
|
||||||
int
|
int
|
||||||
__wcscasecmp (s1, s2 LOCALE_PARAM)
|
__wcscasecmp (const wchar_t *s1, const wchar_t *s2 LOCALE_PARAM)
|
||||||
const wchar_t *s1;
|
|
||||||
const wchar_t *s2;
|
|
||||||
LOCALE_PARAM_DECL
|
|
||||||
{
|
{
|
||||||
wint_t c1, c2;
|
wint_t c1, c2;
|
||||||
|
|
||||||
|
@ -37,11 +37,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
||||||
# define LOCALE_PARAM , loc
|
# define LOCALE_PARAM , __locale_t loc
|
||||||
# define LOCALE_PARAM_DECL __locale_t loc;
|
|
||||||
#else
|
#else
|
||||||
# define LOCALE_PARAM
|
# define LOCALE_PARAM
|
||||||
# define LOCALE_PARAM_DECL
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Compare no more than N wide characters of S1 and S2,
|
/* Compare no more than N wide characters of S1 and S2,
|
||||||
@ -49,11 +47,7 @@
|
|||||||
greater than zero if S1 is lexicographically less
|
greater than zero if S1 is lexicographically less
|
||||||
than, equal to or greater than S2. */
|
than, equal to or greater than S2. */
|
||||||
int
|
int
|
||||||
__wcsncasecmp (s1, s2, n LOCALE_PARAM)
|
__wcsncasecmp (const wchar_t *s1, const wchar_t *s2, size_t n LOCALE_PARAM)
|
||||||
const wchar_t *s1;
|
|
||||||
const wchar_t *s2;
|
|
||||||
size_t n;
|
|
||||||
LOCALE_PARAM_DECL
|
|
||||||
{
|
{
|
||||||
wint_t c1, c2;
|
wint_t c1, c2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user