Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update.
1999-02-06  Ulrich Drepper  <drepper@cygnus.com>

	* Versions.def: Add versions for ld.so.
	* csu/Versions: Remove __libc_stack_end here.
	* elf/Versions: Split libc definitions in libc and ld.so definitions.
	* elf/Makefile (ld-map): Change to ld.so.map.
	* scripts/versions.awk: Recognize dot in library names.

	* ctype/ctype.h: Remove definitions of __tolower and __toupper.
	Don't use __tolower and __toupper in inline functions.
	Add optimizing macros for tolower and toupper.
	* ctype/ctype-extn.c (_tolower): Don't use __tolower.
	(_toupper): Don't use __toupper.
	* ctype/ctype.c (tolower): Don't use __tolower.
	(toupper): Don't use toupper.

	* nscd/cache.c (prune_cache): Correct printing of debugging messages.

	* resolv/Versions (libresolv): Export __ns_name_unpack and
	__ns_name_ntop.
	* resolv/res_comp.c: Rename ns_name_unpack to __ns_name_unpack and
	make it global.  Change all users.  Similar for ns_name_ntop.
	* resolv/nss_dns/dns-host.c: Don't use dn_expand when extracting in
	user-provided buffer.  Use __ns_name_unpack and __ns_name_ntop
	directly to detect too small buffer.
	* stdio-common/Makefile (tests): Add scanf12.
	* stdio-common/scanf12.c: New file.
	* stdio-common/scanf12.input: New file.
	* stdio-common/vfscanf.c (__vfscanf): Handle +/- at beginning of
	floating-point correctly if the number is invalid.
	* stdio-common/vfscanf.c: Don't use non-reentrant multibyte conversion
	* stdio-common/printf_fphex.c: Likewise.
	* stdio-common/vfprintf.c: Likewise.
See ChangeLog.9 for earlier changes.
  • Loading branch information
Ulrich Drepper committed Feb 7, 1999
1 parent b8f558b commit 8d8c6ef
Show file tree
Hide file tree
Showing 28 changed files with 7,043 additions and 6,768 deletions.
6,672 changes: 35 additions & 6,637 deletions ChangeLog

Large diffs are not rendered by default.

6,652 changes: 6,652 additions & 0 deletions ChangeLog.9

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion FAQ
Expand Up @@ -1042,7 +1042,8 @@ on a glibc 2.1 system. You just add -lcompat and you should be fine.
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
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 <URL>
system. This add-on is still in development. You can get it from
ftp://alpha.gnu.org/gnu/glibc-compat-2.1.tar.gz
but please keep in mind that it is experimental.


Expand Down
3 changes: 2 additions & 1 deletion FAQ.in
Expand Up @@ -858,7 +858,8 @@ on a glibc 2.1 system. You just add -lcompat and you should be fine.
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
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 <URL>
system. This add-on is still in development. You can get it from
ftp://alpha.gnu.org/gnu/glibc-compat-2.1.tar.gz
but please keep in mind that it is experimental.

?? Why is extracting files via tar so slow?
Expand Down
25 changes: 13 additions & 12 deletions README
Expand Up @@ -50,18 +50,19 @@ electronic mail to <bug-glibc@gnu.org>.

The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
provides the Unix `crypt' function, plus some other entry points.
Because of the United States export restriction on DES implementations,
we are distributing this code separately from the rest of the C
library. There is an extra distribution tar file just for crypt; it is
called `glibc-crypt-2.1.tar.gz'. You can just unpack the crypt
distribution along with the rest of the C library and build; you can
also build the library without getting crypt. Users outside the USA
can get the crypt distribution via anonymous FTP from ftp.ifi.uio.no
[129.240.64.21], or another archive site outside the USA. Archive
maintainers are encouraged to copy this distribution to their archives
outside the USA. Please get it from ftp.ifi.uio.no; transferring this
distribution from ftp.gnu.org (or any other site in the USA) to a
site outside the USA is in violation of US export laws.
Because of the United States export restriction on DES
implementations, we are distributing this code separately from the
rest of the C library. There is an extra distribution tar file just
for crypt; it is called `glibc-crypt-2.1.tar.gz'. You can just
unpack the crypt distribution along with the rest of the C library and
build; you can also build the library without getting crypt. Users
outside the USA can get the crypt distribution via anonymous FTP from
ftp.funet.fi [128.214.248.6] in the directory pub/gnu/funet, or
another archive site outside the USA. Archive maintainers are
encouraged to copy this distribution to their archives outside the
USA. Please get it from ftp.funet.fi; transferring this distribution
from ftp.gnu.org (or any other site in the USA) to a site outside the
USA is in violation of US export laws.

Beside the separate crypt tar file there are some more add-ons which can be
used together with GNU libc. They are designed in a way to ease the
Expand Down
25 changes: 13 additions & 12 deletions README.template
Expand Up @@ -50,18 +50,19 @@ electronic mail to <bug-glibc@gnu.org>.

The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
provides the Unix `crypt' function, plus some other entry points.
Because of the United States export restriction on DES implementations,
we are distributing this code separately from the rest of the C
library. There is an extra distribution tar file just for crypt; it is
called `glibc-crypt-VERSION.tar.gz'. You can just unpack the crypt
distribution along with the rest of the C library and build; you can
also build the library without getting crypt. Users outside the USA
can get the crypt distribution via anonymous FTP from ftp.ifi.uio.no
[129.240.64.21], or another archive site outside the USA. Archive
maintainers are encouraged to copy this distribution to their archives
outside the USA. Please get it from ftp.ifi.uio.no; transferring this
distribution from ftp.gnu.org (or any other site in the USA) to a
site outside the USA is in violation of US export laws.
Because of the United States export restriction on DES
implementations, we are distributing this code separately from the
rest of the C library. There is an extra distribution tar file just
for crypt; it is called `glibc-crypt-VERSION.tar.gz'. You can just
unpack the crypt distribution along with the rest of the C library and
build; you can also build the library without getting crypt. Users
outside the USA can get the crypt distribution via anonymous FTP from
ftp.funet.fi [128.214.248.6] in the directory pub/gnu/funet, or
another archive site outside the USA. Archive maintainers are
encouraged to copy this distribution to their archives outside the
USA. Please get it from ftp.funet.fi; transferring this distribution
from ftp.gnu.org (or any other site in the USA) to a site outside the
USA is in violation of US export laws.

Beside the separate crypt tar file there are some more add-ons which can be
used together with GNU libc. They are designed in a way to ease the
Expand Down
4 changes: 4 additions & 0 deletions Versions.def
Expand Up @@ -67,3 +67,7 @@ libutil {
libdb1 {
GLIBC_2.0
}
ld.so {
GLIBC_2.0
GLIBC_2.1 GLIBC_2.0
}
3 changes: 0 additions & 3 deletions csu/Versions
Expand Up @@ -15,9 +15,6 @@ libc {
errno;
}
GLIBC_2.1 {
# global variables
__libc_stack_end;

# New special glibc functions.
gnu_get_libc_release; gnu_get_libc_version;
}
Expand Down
4 changes: 2 additions & 2 deletions ctype/ctype-extn.c
Expand Up @@ -30,12 +30,12 @@ isblank (int c)
int
_tolower (int c)
{
return __tolower (c);
return c < -128 || c > 255 ? c : __ctype_tolower[c];
}
int
_toupper (int c)
{
return __toupper (c);
return c < -128 || c > 255 ? c : __ctype_toupper[c];
}

int
Expand Down
4 changes: 2 additions & 2 deletions ctype/ctype.c
Expand Up @@ -39,11 +39,11 @@ func (isxdigit, _ISxdigit)
int
tolower (int c)
{
return c >= -128 && c < 256 ? __tolower (c) : c;
return c >= -128 && c < 256 ? __ctype_tolower[c] : c;
}

int
toupper (int c)
{
return c >= -128 && c < 256 ? __toupper (c) : c;
return c >= -128 && c < 256 ? __ctype_toupper[c] : c;
}
41 changes: 30 additions & 11 deletions ctype/ctype.h
Expand Up @@ -82,9 +82,6 @@ extern __const __int32_t *__ctype_toupper; /* Case conversions. */
#define __isascii(c) (((c) & ~0x7f) == 0) /* If C is a 7 bit value. */
#define __toascii(c) ((c) & 0x7f) /* Mask off high bits. */

#define __tolower(c) ((int) __ctype_tolower[(int) (c)])
#define __toupper(c) ((int) __ctype_toupper[(int) (c)])

#define __exctype(name) extern int name __P ((int))

/* The following names are all functions:
Expand Down Expand Up @@ -128,7 +125,8 @@ extern int toascii __P ((int __c));
#endif /* Use SVID or use misc. */

#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
/* These are the same as `toupper' and `tolower'. */
/* These are the same as `toupper' and `tolower' except that they do not
check the argument for being in the range of a `char'. */
__exctype (_toupper);
__exctype (_tolower);
#endif
Expand All @@ -151,26 +149,47 @@ __exctype (_tolower);
#endif

#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
&& defined __USE_EXTERN_INLINES
&& defined __USE_EXTERN_INLINES
extern __inline int
tolower (int __c)
{
return __c >= -128 && __c < 256 ? __tolower (__c) : __c;
return __c >= -128 && __c < 256 ? __ctype_tolower[__c] : __c;
}

extern __inline int
toupper (int __c)
{
return __c >= -128 && __c < 256 ? __toupper (__c) : __c;
return __c >= -128 && __c < 256 ? __ctype_toupper[__c] : __c;
}
#endif

#if __GNUC__ >= 2 && defined __OPTIMIZE__
# define __tobody(c, f, a) \
({ int __res; \
if (sizeof (c) > 1) \
{ \
if (__builtin_constant_p (c)) \
{ \
int __c = (c); \
__res = __c < -128 || __c > 255 ? __c : a[__c]; \
} \
else \
__res = f (c); \
} \
else \
__res = a[(int) (c)]; \
__res; })

# define tolower(c) __tobody (c, tolower, __ctype_tolower)
# define toupper(c) __tobody (c, toupper, __ctype_toupper)
#endif /* Optimizing gcc */

#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
# define isascii(c) __isascii(c)
# define toascii(c) __toascii(c)
# define isascii(c) __isascii (c)
# define toascii(c) __toascii (c)

# define _tolower(c) __tolower(c)
# define _toupper(c) __toupper(c)
# define _tolower(c) ((int) __ctype_tolower[(int) (c)])
# define _toupper(c) ((int) __ctype_toupper[(int) (c)])
#endif

#endif /* Not __NO_CTYPE. */
Expand Down
2 changes: 1 addition & 1 deletion elf/Makefile
Expand Up @@ -55,7 +55,7 @@ endif
before-compile = $(objpfx)trusted-dirs.h

ifeq ($(versioning),yes)
ld-map = $(common-objpfx)libc.map
ld-map = $(common-objpfx)ld.so.map
endif

ifeq (yes,$(build-shared))
Expand Down
22 changes: 17 additions & 5 deletions elf/Versions
@@ -1,11 +1,19 @@
libc {
GLIBC_2.0 {
# functions used in other libraries
_dl_open; _dl_close; _dl_addr;
}
GLIBC_2.1 {
# functions used in other libraries
_dl_mcount_wrapper; _dl_mcount_wrapper_check;
}
}

ld.so {
GLIBC_2.0 {
# global variables
_dl_debug_impcalls; _dl_debug_fd;

# functions used in other libraries
_dl_open; _dl_close; _dl_addr; _dl_sysdep_output; _dl_debug_message;

# Those are in the dynamic linker, but used by libc.so.
__libc_enable_secure; _dl_catch_error; _dl_check_all_versions;
_dl_debug_initialize; _dl_debug_state; _dl_default_scope;
Expand All @@ -15,15 +23,19 @@ libc {
_dl_sysdep_start; _r_debug;
_dl_global_scope; _dl_lookup_symbol_skip;
_dl_lookup_versioned_symbol; _dl_lookup_versioned_symbol_skip;
_dl_debug_message;

# Function from libc.so which must be shared with libc.
calloc; free; malloc; realloc;
}
GLIBC_2.1 {
# global variables
_dl_profile; _dl_profile_map; _dl_profile_output; _dl_start_profile;
_dl_loaded; _dl_main_searchlist; _dl_fpu_control; _dl_initial_searchlist;
_dl_global_scope_alloc;
_dl_global_scope_alloc; __libc_stack_end;

# functions used in other libraries
_dl_mcount; _dl_mcount_wrapper; _dl_mcount_wrapper_check; _dl_unload_cache;
_dl_mcount; _dl_unload_cache;
}
}

Expand Down
21 changes: 17 additions & 4 deletions nscd/cache.c
Expand Up @@ -225,10 +225,23 @@ prune_cache (struct database *table, time_t now)
struct hashentry *old = head;

if (debug_level > 0)
dbg_log ("remove %s entry \"%s\"",
serv2str[old->type],
old->last
? old->key : old->data == (void *) -1 ? old->key : "???");
{
char buf[INET6_ADDRSTRLEN];
const char *str;

if ((old->type == GETHOSTBYADDR || old->type == GETHOSTBYADDRv6)
&& (old->last || old->data == (void *) -1))
{
inet_ntop (old->type == GETHOSTBYADDR ? AF_INET : AF_INET6,
old->key, buf, sizeof (buf));
str = buf;
}
else
str = old->last ? old->key : (old->data == (void *) -1
? old->key : "???");

dbg_log ("remove %s entry \"%s\"", serv2str[old->type], str);
}

/* Free the data structures. */
if (old->data == (void *) -1)
Expand Down
17 changes: 15 additions & 2 deletions nscd/connections.c
@@ -1,5 +1,5 @@
/* Inner loops of cache daemon.
Copyright (C) 1998 Free Software Foundation, Inc.
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
Expand All @@ -24,6 +24,7 @@
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/param.h>
#include <sys/poll.h>
#include <sys/socket.h>
Expand Down Expand Up @@ -214,7 +215,19 @@ cannot handle old request version %d; current version is %d"),
struct database *db = &dbs[serv2db[req->type]];

if (debug_level > 0)
dbg_log ("\t%s (%s)", serv2str[req->type], key);
{
if (req->type == GETHOSTBYADDR || req->type == GETHOSTBYADDRv6)
{
char buf[INET6_ADDRSTRLEN];

dbg_log ("\t%s (%s)", serv2str[req->type],
inet_ntop (req->type == GETHOSTBYADDR
? AF_INET : AF_INET6,
key, buf, sizeof (buf)));
}
else
dbg_log ("\t%s (%s)", serv2str[req->type], key);
}

/* Is this service enabled? */
if (!db->enabled)
Expand Down
13 changes: 9 additions & 4 deletions nscd/hstcache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
Copyright (C) 1998 Free Software Foundation, Inc.
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
Expand Down Expand Up @@ -324,7 +324,7 @@ addhstbyaddr (struct database *db, int fd, request_header *req, void *key)

if (debug_level > 0)
{
char buf[64];
char buf[INET_ADDRSTRLEN];
dbg_log (_("Haven't found \"%s\" in hosts cache!"),
inet_ntop (AF_INET, key, buf, sizeof (buf)));
}
Expand Down Expand Up @@ -356,7 +356,12 @@ addhstbynamev6 (struct database *db, int fd, request_header *req, void *key)
struct hostent *hst;

if (debug_level > 0)
dbg_log (_("Haven't found \"%s\" in hosts cache!"), key);
{
char buf[INET6_ADDRSTRLEN];

dbg_log (_("Haven't found \"%s\" in hosts cache!"),
inet_ntop (AF_INET6, key, buf, sizeof (buf)));
}

while (gethostbyname2_r (key, AF_INET6, &resultbuf, buffer, buflen, &hst,
&h_errno) != 0
Expand Down Expand Up @@ -386,7 +391,7 @@ addhstbyaddrv6 (struct database *db, int fd, request_header *req, void *key)

if (debug_level > 0)
{
char buf[64];
char buf[INET6_ADDRSTRLEN];
dbg_log (_("Haven't found \"%s\" in hosts cache!"),
inet_ntop (AF_INET6, key, buf, sizeof (buf)));
}
Expand Down
4 changes: 4 additions & 0 deletions resolv/Versions
Expand Up @@ -42,6 +42,10 @@ libresolv {
__res_send;
__sym_ntop; __sym_ntos; __sym_ston;
}
GLIBC_2.1 {
# Needed in libnss_dns.
__ns_name_unpack; __ns_name_ntop;
}
}

libnss_dns {
Expand Down

0 comments on commit 8d8c6ef

Please sign in to comment.