mirror of git://sourceware.org/git/glibc.git
Update.
* stdlib/strtol.c: Optimize inner loop of long long versions.
This commit is contained in:
parent
26262bc29e
commit
66f6a52b79
|
@ -1,5 +1,7 @@
|
||||||
1999-05-15 Ulrich Drepper <drepper@cygnus.com>
|
1999-05-15 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* stdlib/strtol.c: Optimize inner loop of long long versions.
|
||||||
|
|
||||||
* sysdeps/gnu/utmpx.h: Add needed type definitions according to
|
* sysdeps/gnu/utmpx.h: Add needed type definitions according to
|
||||||
Unix98. Add forward declaration of struct utmp.
|
Unix98. Add forward declaration of struct utmp.
|
||||||
|
|
||||||
|
|
6
FAQ
6
FAQ
|
@ -838,7 +838,7 @@ ypbind. ypbind 3.3 and older versions don't always remove these files, so
|
||||||
glibc will continue to use them. Other BSD versions seem to work correctly.
|
glibc will continue to use them. Other BSD versions seem to work correctly.
|
||||||
Until ypbind 3.4 is released, you can find a patch at
|
Until ypbind 3.4 is released, you can find a patch at
|
||||||
|
|
||||||
ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypbind-3.3-glibc4.diff.gz
|
<ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypbind-3.3-glibc4.diff.gz>
|
||||||
|
|
||||||
|
|
||||||
2.14. Under Linux/Alpha, I always get "do_ypcall: clnt_call:
|
2.14. Under Linux/Alpha, I always get "do_ypcall: clnt_call:
|
||||||
|
@ -929,7 +929,7 @@ gcc-2.8.1 together with libstdc++ 2.8.1.1. egcs 1.1 has the better C++
|
||||||
support and works directly with glibc 2.1. If you use gcc-2.8.1 with
|
support and works directly with glibc 2.1. If you use gcc-2.8.1 with
|
||||||
libstdc++ 2.8.1.1, you need to modify libstdc++ a bit. A patch is available
|
libstdc++ 2.8.1.1, you need to modify libstdc++ a bit. A patch is available
|
||||||
as:
|
as:
|
||||||
ftp://alpha.gnu.org/gnu/libstdc++-2.8.1.1-glibc2.1-diff.gz
|
<ftp://alpha.gnu.org/gnu/libstdc++-2.8.1.1-glibc2.1-diff.gz>
|
||||||
|
|
||||||
Please note that libg++ 2.7.2 (and the Linux Versions 2.7.2.x) doesn't work
|
Please note that libg++ 2.7.2 (and the Linux Versions 2.7.2.x) doesn't work
|
||||||
very well with the GNU C library due to vtable thunks. If you're upgrading
|
very well with the GNU C library due to vtable thunks. If you're upgrading
|
||||||
|
@ -1071,7 +1071,7 @@ The glibc-compat add-on will provide the libcompat.a library, the older
|
||||||
nss modules, and a few other files. Together, they should make it
|
nss modules, and a few other files. Together, they should make it
|
||||||
possible to do development with old static libraries on a glibc 2.1
|
possible to do development with old static libraries on a glibc 2.1
|
||||||
system. This add-on is still in development. You can get it from
|
system. This add-on is still in development. You can get it from
|
||||||
ftp://alpha.gnu.org/gnu/glibc-compat-2.1.tar.gz
|
<ftp://alpha.gnu.org/gnu/glibc-compat-2.1.tar.gz>
|
||||||
but please keep in mind that it is experimental.
|
but please keep in mind that it is experimental.
|
||||||
|
|
||||||
|
|
||||||
|
|
6
FAQ.in
6
FAQ.in
|
@ -651,7 +651,7 @@ ypbind. ypbind 3.3 and older versions don't always remove these files, so
|
||||||
glibc will continue to use them. Other BSD versions seem to work correctly.
|
glibc will continue to use them. Other BSD versions seem to work correctly.
|
||||||
Until ypbind 3.4 is released, you can find a patch at
|
Until ypbind 3.4 is released, you can find a patch at
|
||||||
|
|
||||||
ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypbind-3.3-glibc4.diff.gz
|
<ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypbind-3.3-glibc4.diff.gz>
|
||||||
|
|
||||||
?? Under Linux/Alpha, I always get "do_ypcall: clnt_call:
|
?? Under Linux/Alpha, I always get "do_ypcall: clnt_call:
|
||||||
RPC: Unable to receive; errno = Connection refused" when using NIS.
|
RPC: Unable to receive; errno = Connection refused" when using NIS.
|
||||||
|
@ -736,7 +736,7 @@ gcc-2.8.1 together with libstdc++ 2.8.1.1. egcs 1.1 has the better C++
|
||||||
support and works directly with glibc 2.1. If you use gcc-2.8.1 with
|
support and works directly with glibc 2.1. If you use gcc-2.8.1 with
|
||||||
libstdc++ 2.8.1.1, you need to modify libstdc++ a bit. A patch is available
|
libstdc++ 2.8.1.1, you need to modify libstdc++ a bit. A patch is available
|
||||||
as:
|
as:
|
||||||
ftp://alpha.gnu.org/gnu/libstdc++-2.8.1.1-glibc2.1-diff.gz
|
<ftp://alpha.gnu.org/gnu/libstdc++-2.8.1.1-glibc2.1-diff.gz>
|
||||||
|
|
||||||
Please note that libg++ 2.7.2 (and the Linux Versions 2.7.2.x) doesn't work
|
Please note that libg++ 2.7.2 (and the Linux Versions 2.7.2.x) doesn't work
|
||||||
very well with the GNU C library due to vtable thunks. If you're upgrading
|
very well with the GNU C library due to vtable thunks. If you're upgrading
|
||||||
|
@ -872,7 +872,7 @@ The glibc-compat add-on will provide the libcompat.a library, the older
|
||||||
nss modules, and a few other files. Together, they should make it
|
nss modules, and a few other files. Together, they should make it
|
||||||
possible to do development with old static libraries on a glibc 2.1
|
possible to do development with old static libraries on a glibc 2.1
|
||||||
system. This add-on is still in development. You can get it from
|
system. This add-on is still in development. You can get it from
|
||||||
ftp://alpha.gnu.org/gnu/glibc-compat-2.1.tar.gz
|
<ftp://alpha.gnu.org/gnu/glibc-compat-2.1.tar.gz>
|
||||||
but please keep in mind that it is experimental.
|
but please keep in mind that it is experimental.
|
||||||
|
|
||||||
?? Why is extracting files via tar so slow?
|
?? Why is extracting files via tar so slow?
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Convert string representation of a number into an integer value.
|
/* Convert string representation of a number into an integer value.
|
||||||
Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
|
Copyright (C) 1991,92,94,95,96,97,98,99 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
|
||||||
|
@ -344,7 +344,42 @@ INTERNAL (strtol) (nptr, endptr, base, group LOCALE_PARAM)
|
||||||
|
|
||||||
overflow = 0;
|
overflow = 0;
|
||||||
i = 0;
|
i = 0;
|
||||||
for (c = *s; c != L_('\0'); c = *++s)
|
c = *s;
|
||||||
|
if (sizeof (long int) != sizeof (LONG int))
|
||||||
|
{
|
||||||
|
unsigned long int j = 0;
|
||||||
|
|
||||||
|
for (;c != L_('\0'); c = *++s)
|
||||||
|
{
|
||||||
|
if (s == end)
|
||||||
|
break;
|
||||||
|
if (c >= L_('0') && c <= L_('9'))
|
||||||
|
c -= L_('0');
|
||||||
|
else if (ISALPHA (c))
|
||||||
|
c = TOUPPER (c) - L_('A') + 10;
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
if ((int) c >= base)
|
||||||
|
break;
|
||||||
|
/* Note that we never can have an overflow. */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unsigned long int jj = j * (unsigned long int) base;
|
||||||
|
if (jj < j)
|
||||||
|
{
|
||||||
|
/* We have an overflow. Now use the long representation. */
|
||||||
|
i = (unsigned LONG int) j;
|
||||||
|
goto use_long;
|
||||||
|
}
|
||||||
|
j = jj;
|
||||||
|
j += c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
i = (unsigned LONG int) j;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
for (;c != L_('\0'); c = *++s)
|
||||||
{
|
{
|
||||||
if (s == end)
|
if (s == end)
|
||||||
break;
|
break;
|
||||||
|
@ -361,6 +396,7 @@ INTERNAL (strtol) (nptr, endptr, base, group LOCALE_PARAM)
|
||||||
overflow = 1;
|
overflow = 1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
use_long:
|
||||||
i *= (unsigned LONG int) base;
|
i *= (unsigned LONG int) base;
|
||||||
i += c;
|
i += c;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue