Index: linux/libc/ChangeLog diff -u linux/libc/ChangeLog:1.167 linux/libc/ChangeLog:1.169 --- linux/libc/ChangeLog:1.167 Fri Feb 14 19:42:59 1997 +++ linux/libc/ChangeLog Fri Mar 14 20:32:12 1997 @@ -1,3 +1,41 @@ +Fri Mar 14 20:01:08 1997 H.J. Lu (hjl@gnu.ai.mit.edu) + + * version 5.4.24 is released. + + * <_G_config.h>: change version to 5.4.24. + + * elf/libc/jump.params: set version to 5.4.24. + + * release.libc: update. + +Wed Mar 12 22:13:44 1997 alan@spri.levels.unisa.edu.au (Alan Modra) + + * time/strptime.c: Fix abbreviated/full names. Reported by + Steven Gribble . + +Wed Mar 12 20:40:45 1997 H.J. Lu (hjl@gnu.ai.mit.edu) + + * inet/gethstnmad.c (_gethtbyname): return the complete aliase + list no matter what. + +Sun Mar 9 07:32:37 1997 "Marty Leisner" + + * sysdeps/linux/__lseek.S: define __CHECK_RETURN_ADDR. + +Thu Feb 27 08:07:07 1997 David van Leeuwen + + * sysdeps/linux/_errlist.c (ENOMEDIUM, EMEDIUMTYPE): new. + +Mon Feb 24 07:25:58 1997 H.J. Lu (hjl@gnu.ai.mit.edu) + + * sysdeps/m68k/hton.c: updated from sysdeps/i386/hton.c. + +Fri Feb 21 13:28:23 1997 H.J. Lu (hjl@gnu.ai.mit.edu) + + * : undefine assert_perror first. + + * posix/putenv.c: update from glibc 2.0.2. + Fri Feb 14 19:41:54 1997 H.J. Lu (hjl@gnu.ai.mit.edu) * version 5.4.23 is released. Index: linux/libc/release.libc diff -u linux/libc/release.libc:1.38 linux/libc/release.libc:1.39 --- linux/libc/release.libc:1.38 Fri Feb 14 19:42:59 1997 +++ linux/libc/release.libc Fri Mar 14 20:03:01 1997 @@ -19,20 +19,20 @@ so that the old XFree86 binaries will run fine with the new XFree86 shared librraries compiled with libc 6.x/glibc 2.x. -If you use linux 2.1.x, you need libc 5.4.23 or above to compile libc +If you use linux 2.1.x, you need libc 5.4.24 or above to compile libc yourself. The pre-compiled libc should run fine under linux 2.1.x. Also this library is compiled with -D_REENTRANT so that errno is MT safe. The shared libraries are now compiled with -g1 which can provide minimum information when core dump happens. You can strip -libc.so.5.4.23 if you want. +libc.so.5.4.24 if you want. -Due to the new, improved locale, the Linux C library 5.4.23 is binary +Due to the new, improved locale, the Linux C library 5.4.24 is binary compatible with libc 5.3.12 but not vice versa. The binaries -compiled/linked with libc.so.5.4.23 may not run with libc.so.5.3.12. +compiled/linked with libc.so.5.4.24 may not run with libc.so.5.3.12. You may need to regenerate locale files for the new locale in libc -5.4.23 if you use locales other tha C/POSIX which are the defaults. +5.4.24 if you use locales other tha C/POSIX which are the defaults. The locale sources are at @@ -41,7 +41,7 @@ There are many security bug fixes. Please consult ChangeLog for details. Please let me know if there are more security bugs remains. -This is the beta release of the Linux C library 5.4.23. Please read +This is the beta release of the Linux C library 5.4.24. Please read the ChangeLog for details regarding changes/bug fixes. DISTRIBUTION SITES: @@ -62,11 +62,11 @@ DISTRIBUTION FILES: -1. libc-5.4.23.bin.tar.gz +1. libc-5.4.24.bin.tar.gz REQUIRED. This package contains the header files for libc, shared and static ELF libraries libc and libm, and the static ELF library libbsd.a. -The header files in libc-5.4.23.bin.tar.gz are not complete. You need to +The header files in libc-5.4.24.bin.tar.gz are not complete. You need to install the kernel source tree for the system-dependent header files. The header files are in lib-x.y.z.bin.tar.gz and libc-x.y.z.tar.gz. You @@ -77,11 +77,11 @@ to extract the header files without the binaries files. A separate tar file for the header files may cause unnecessary confusion. -2. libc-5.4.23.tar.gz +2. libc-5.4.24.tar.gz Source tree for libc and header files. -3. libc-5.4.22-5.4.23.diff.gz +3. libc-5.4.23-5.4.24.diff.gz Context diffs against the source tree from the previous libc release. Please make sure the empty libc/regex/rx.h is deleted. @@ -152,7 +152,7 @@ rm -f /usr/include/wcstr.h /usr/include/mbstr.h rm -f /usr/include/ld_so_config.h /usr/include/localeinfo.h rm -rf /usr/include/netinet /usr/include/net /usr/include/pthread -gzip -dc libc-5.4.23.bin.tar.gz | tar xvf - +gzip -dc libc-5.4.24.bin.tar.gz | tar xvf - SOURCE INSTALLATION: @@ -219,7 +219,7 @@ H.J. hjl@gnu.ai.mit.edu -02/14/97 +03/14/97 ---- RCS file: /home/cvs/gnu/make/dir.c,v retrieving revision 1.1.1.1 Index: linux/libc/elf/libc/jump.params diff -u linux/libc/elf/libc/jump.params:1.76 linux/libc/elf/libc/jump.params:1.77 --- linux/libc/elf/libc/jump.params:1.76 Fri Feb 14 19:38:15 1997 +++ linux/libc/elf/libc/jump.params Fri Mar 14 20:03:02 1997 @@ -1 +1 @@ -Version=5.4.23 +Version=5.4.24 Index: linux/libc/inet/gethstnmad.c diff -u linux/libc/inet/gethstnmad.c:1.15 linux/libc/inet/gethstnmad.c:1.16 --- linux/libc/inet/gethstnmad.c:1.15 Fri Feb 14 19:38:15 1997 +++ linux/libc/inet/gethstnmad.c Fri Mar 14 20:03:03 1997 @@ -1333,6 +1333,9 @@ * alias field contains that name, and the name field contains the primary * name of the host. Unlike dns, however, this behavior will still take place * even if the alias applies only to one of the interfaces. + * + * I changed to return aliase list no matter what. H.J. + * * - determining a "local" address to put first is dependant on the netmask * being such that the least significant network bit is more significant * than any host bit. Only strange netmasks will violate this. @@ -1359,6 +1362,8 @@ static struct hostent ht; static char *aliases[MAXALIASES]; static char namebuf[MAXHOSTNAMELEN]; + static char aliasebuf[BUFSIZ+1]; + int gap = aliasebuf - hostbuf; hap = ht_addr_ptrs; lhap = loc_addr_ptrs; @@ -1384,7 +1389,9 @@ for (cp = p->h_aliases; *cp != 0; cp++) if (strcasecmp(*cp, name) == 0){ found++; +#if 0 aliases[0]=name; +#endif /* * This should not overflow, but it is * better to be safe than sorry. @@ -1393,6 +1400,22 @@ sizeof(namebuf)); namebuf[sizeof(namebuf)-1] = 0; } + + cp = p->h_aliases; + if (found && aliases[0] == NULL && *cp) + { + int i; + + memcpy (aliasebuf, hostbuf, sizeof(aliasebuf)); + for (i = 0; *cp != 0 && + i < sizeof (aliases) / sizeof (aliases [0]) - 1; + i++, cp++) + { + aliases [i] = *cp + gap; + } + aliases [i] = NULL; + } + if (strcasecmp(p->h_name, localname) == 0) localfound++; else Index: linux/libc/nls/msgcat.c diff -u linux/libc/nls/msgcat.c:1.6 linux/libc/nls/msgcat.c:1.7 --- linux/libc/nls/msgcat.c:1.6 Fri Oct 4 15:53:05 1996 +++ linux/libc/nls/msgcat.c Fri Mar 14 20:03:04 1997 @@ -1,5 +1,5 @@ #if 0 -static char rcsid[] = "@(#)$Id: msgcat.c,v 1.5 1996/09/19 21:23:02 hjl Exp $"; +static char rcsid[] = "@(#)$Id: msgcat.c,v 1.6 1996/10/04 22:53:05 hjl Exp $"; #endif /* -*- c++ -*- */ @@ -141,13 +141,13 @@ if (stat(catpath, &sbuf)) return(NLERR); } else { #if BROKEN_SETLOCALE - if ((lang = (char *) getenv("LANG")) == NULL) lang = "C"; + if ((lang = (char *) getenv ("LANG")) == NULL) lang = "C"; #else /* Query the locale from the previous setlocale call in msgcat-libc.c*/ if ((lang = (char *) setlocale(LC_MESSAGES,(char *) NULL)) == NULL) lang="C"; #endif - if ((nlspath = (char *) getenv("NLSPATH")) == NULL) { + if ((nlspath = (char *) getenv ("NLSPATH")) == NULL) { #if OLD_NLS_PATHS nlspath = "/nlslib/%L/%N.cat:/nlslib/%N/%L"; #else Index: linux/libc/posix/putenv.c diff -u linux/libc/posix/putenv.c:1.1.1.1 linux/libc/posix/putenv.c:1.2 --- linux/libc/posix/putenv.c:1.1.1.1 Fri Feb 17 21:33:24 1995 +++ linux/libc/posix/putenv.c Fri Mar 14 20:03:06 1997 @@ -1,80 +1,68 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1994, 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include -#include -#include + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#if !defined(HAVE_GNU_LD) && !defined (__ELF__) -#define __environ environ +#if defined (_AIX) && !defined (__GNUC__) + #pragma alloca #endif +#if HAVE_CONFIG_H +# include +#endif + +#if _LIBC || HAVE_STDLIB_H +# include +#endif +#if _LIBC || HAVE_STRING_H +# include +#endif + +#if !__GNU_LIBRARY__ && !HAVE_STRCHR +# define strchr index +#endif + +#ifndef _LIBC +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef __GNUC__ +# define alloca __builtin_alloca +# else +extern char *alloca (); +# endif /* __GNUC__ */ +# endif /* HAVE_ALLOCA_H */ +#endif /* _LIBC */ + + /* Put STRING, which is of the form "NAME=VALUE", in the environment. */ int -DEFUN(putenv, (string), CONST char *string) +putenv (string) + const char *string; { - CONST char *CONST name_end = strchr(string, '='); - register size_t size; - register char **ep; - - if (name_end == NULL) - { - /* Remove the variable from the environment. */ - size = strlen(string); - for (ep = __environ; *ep != NULL; ++ep) - if (!strncmp(*ep, string, size) && (*ep)[size] == '=') - { - while (ep[1] != NULL) - { - ep[0] = ep[1]; - ++ep; - } - *ep = NULL; - return 0; - } - } - - size = 0; - for (ep = __environ; *ep != NULL; ++ep) - if (!strncmp(*ep, string, name_end - string) && - (*ep)[name_end - string] == '=') - break; - else - ++size; + const char *const name_end = strchr (string, '='); - if (*ep == NULL) + if (name_end) { - static char **last_environ = NULL; - char **new_environ = (char **) malloc((size + 2) * sizeof(char *)); - if (new_environ == NULL) - return -1; - (void) memcpy((PTR) new_environ, (PTR) __environ, size * sizeof(char *)); - new_environ[size] = (char *) string; - new_environ[size + 1] = NULL; - if (last_environ != NULL) - free((PTR) last_environ); - last_environ = new_environ; - __environ = new_environ; + char *name = alloca (name_end - string + 1); + memcpy (name, string, name_end - string); + name[name_end - string] = '\0'; + return setenv (name, name_end + 1, 1); } - else - *ep = (char *) string; + unsetenv (string); return 0; } Index: linux/libc/sysdeps/linux/__lseek.S diff -u linux/libc/sysdeps/linux/__lseek.S:1.1.1.1 linux/libc/sysdeps/linux/__lseek.S:1.2 --- linux/libc/sysdeps/linux/__lseek.S:1.1.1.1 Fri Feb 17 21:33:32 1995 +++ linux/libc/sysdeps/linux/__lseek.S Fri Mar 14 20:03:07 1997 @@ -16,6 +16,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define __CHECK_RETURN_ADDR #include SYSCALL__ (lseek, 3) Index: linux/libc/sysdeps/linux/_errlist.c diff -u linux/libc/sysdeps/linux/_errlist.c:1.2 linux/libc/sysdeps/linux/_errlist.c:1.3 --- linux/libc/sysdeps/linux/_errlist.c:1.2 Wed Mar 15 19:05:31 1995 +++ linux/libc/sysdeps/linux/_errlist.c Fri Mar 14 20:03:07 1997 @@ -130,6 +130,8 @@ "Is a named type file", /* EISNAM */ "Remote I/O error", /* EREMOTEIO */ "Quota exceeded", /* EDQUOT */ + "No medium found", /* ENOMEDIUM */ + "Wrong medium type", /* EMEDIUMTYPE */ NULL }; Index: linux/libc/sysdeps/m68k/hton.c diff -u linux/libc/sysdeps/m68k/hton.c:1.3 linux/libc/sysdeps/m68k/hton.c:1.4 --- linux/libc/sysdeps/m68k/hton.c:1.3 Fri Jan 19 14:04:41 1996 +++ linux/libc/sysdeps/m68k/hton.c Fri Mar 14 20:32:16 1997 @@ -1,5 +1,13 @@ #include #include +#ifdef __linux__ +# include +# ifdef LINUX_VERSION_CODE +# if LINUX_VERSION_CODE >= 131328 +# include +# endif +# endif +#endif #undef ntohl #undef ntohs Index: linux/libc/time/strptime.c diff -u linux/libc/time/strptime.c:1.4 linux/libc/time/strptime.c:1.5 --- linux/libc/time/strptime.c:1.4 Fri Feb 14 19:38:18 1997 +++ linux/libc/time/strptime.c Fri Mar 14 20:03:08 1997 @@ -119,10 +119,10 @@ /* Match day of week. */ for (cnt = 0; cnt < 7; ++cnt) { - if (match_string (_NL_CURRENT (LC_TIME, ABDAY_1 + cnt), rp)) - break; if (match_string (_NL_CURRENT (LC_TIME, DAY_1 + cnt), rp)) break; + if (match_string (_NL_CURRENT (LC_TIME, ABDAY_1 + cnt), rp)) + break; } if (cnt == 7) /* Does not match a weekday name. */ @@ -135,9 +135,9 @@ /* Match month name. */ for (cnt = 0; cnt < 12; ++cnt) { - if (match_string (_NL_CURRENT (LC_TIME, ABMON_1 + cnt), rp)) - break; if (match_string (_NL_CURRENT (LC_TIME, MON_1 + cnt), rp)) + break; + if (match_string (_NL_CURRENT (LC_TIME, ABMON_1 + cnt), rp)) break; } if (cnt == 12) Index: linux/include/_G_config.h diff -u linux/include/_G_config.h:1.82 linux/include/_G_config.h:1.83 --- linux/include/_G_config.h:1.82 Fri Feb 14 19:37:18 1997 +++ linux/include/_G_config.h Fri Mar 14 20:03:44 1997 @@ -2,10 +2,10 @@ #ifndef _G_config_h #define _G_config_h -#define _LINUX_C_LIB_VERSION "5.4.23" +#define _LINUX_C_LIB_VERSION "5.4.24" #define _LINUX_C_LIB_VERSION_MAJOR 5 #define _LINUX_C_LIB_VERSION_MINOR 4 -#define _LINUX_C_LIB_VERSION_SUBMINOR 23 +#define _LINUX_C_LIB_VERSION_SUBMINOR 24 #define _G_LIB_VERSION "2.7.2" Index: linux/include/assert.h diff -u linux/include/assert.h:1.4 linux/include/assert.h:1.5 --- linux/include/assert.h:1.4 Thu Jul 6 19:15:27 1995 +++ linux/include/assert.h Fri Mar 14 20:03:44 1997 @@ -24,6 +24,7 @@ #undef _ASSERT_H #undef assert +#undef assert_perror #endif /* assert.h */