aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-04 00:01:02 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-04 00:01:02 +0000
commitc891b2df087e0219319785c29d3af6042e4ac94f (patch)
tree35f252e14d0024b991068214f533f738d23bdab7
parentf114375059d2f3ee90aaeea242120b3dda84787b (diff)
downloadglibc-c891b2df087e0219319785c29d3af6042e4ac94f.tar.xz
glibc-c891b2df087e0219319785c29d3af6042e4ac94f.zip
Update.
2001-04-03 Ulrich Drepper <drepper@redhat.com> * misc/dirname.c (dirname): Handle multiple slashes correctly. 2001-04-03 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/s390/s390-64/initfini.c: Fix __gmon_start__ GOT access. 2001-04-03 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/s390/s390-32/bcopy.S: Optimize for speed. * sysdeps/s390/s390-64/bcopy.S: Likewise. * sysdeps/s390/s390-32/mempcy.S: Likewise. * sysdeps/s390/s390-64/memcpy.S: Likewise. 2001-04-02 Bruno Haible <haible@clisp.cons.org> * manual/message.texi (Advanced gettext functions): More specific syntax in the plural formula examples. 2001-04-02 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * sysdeps/powerpc/atomicity.h: Silence warnings. * sysdeps/powerpc/dl-machine.h: Likewise. * sysdeps/powerpc/register-dump.h: Likewise. * sysdeps/powerpc/fpu/s_lrint.c: Likewise. 2001-04-02 Andreas Jaeger <aj@suse.de> * misc/tst-dirname.c (main): Add more tests, derived from a bug report by Michael Kerrisk <mtk16@ext.canterbury.ac.nz>. 2001-04-01 Andreas Jaeger <aj@suse.de> * debug/xtrace.sh (pcprofileso): Use SLIBDIR since libpcprofile.so is installed there. * malloc/memusage.sh (memusageso): Likewise for libmemusage.so. 2001-04-01 H.J. Lu <hjl@gnu.org> * posix/annexc.c (macrofile): Renamed from TMPFILE and set to tmpnam (NULL). * stdlib/isomac.c (macrofile): Likewise. 2001-03-30 Thorsten Kukuk <kukuk@suse.de> * inet/rcmd.c: Allow AF_UNSPEC as parameter. * nis/ypclnt.c (yp_all): Print error message only at last try, check for protocoll error only if we don't have a network error.
-rw-r--r--ChangeLog50
-rw-r--r--FAQ12
-rw-r--r--FAQ.in12
-rwxr-xr-xdebug/xtrace.sh2
-rwxr-xr-xmalloc/memusage.sh2
-rw-r--r--manual/message.texi29
-rw-r--r--misc/dirname.c38
-rw-r--r--misc/tst-dirname.c9
-rw-r--r--nis/ypclnt.c8
-rw-r--r--posix/annexc.c27
-rw-r--r--stdlib/isomac.c27
-rw-r--r--sysdeps/powerpc/atomicity.h58
-rw-r--r--sysdeps/powerpc/dl-machine.h190
-rw-r--r--sysdeps/powerpc/fpu/s_lrint.c12
-rw-r--r--sysdeps/powerpc/register-dump.h34
-rw-r--r--sysdeps/s390/s390-32/bcopy.S54
-rw-r--r--sysdeps/s390/s390-32/memcpy.S37
-rw-r--r--sysdeps/s390/s390-64/bcopy.S47
-rw-r--r--sysdeps/s390/s390-64/initfini.c4
-rw-r--r--sysdeps/s390/s390-64/memcpy.S34
20 files changed, 410 insertions, 276 deletions
diff --git a/ChangeLog b/ChangeLog
index f43ec8b9b0..ed9cba9b90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,53 @@
+2001-04-03 Ulrich Drepper <drepper@redhat.com>
+
+ * misc/dirname.c (dirname): Handle multiple slashes correctly.
+
+2001-04-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * sysdeps/s390/s390-64/initfini.c: Fix __gmon_start__ GOT access.
+
+2001-04-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * sysdeps/s390/s390-32/bcopy.S: Optimize for speed.
+ * sysdeps/s390/s390-64/bcopy.S: Likewise.
+ * sysdeps/s390/s390-32/mempcy.S: Likewise.
+ * sysdeps/s390/s390-64/memcpy.S: Likewise.
+
+2001-04-02 Bruno Haible <haible@clisp.cons.org>
+
+ * manual/message.texi (Advanced gettext functions): More specific
+ syntax in the plural formula examples.
+
+2001-04-02 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * sysdeps/powerpc/atomicity.h: Silence warnings.
+ * sysdeps/powerpc/dl-machine.h: Likewise.
+ * sysdeps/powerpc/register-dump.h: Likewise.
+ * sysdeps/powerpc/fpu/s_lrint.c: Likewise.
+
+2001-04-02 Andreas Jaeger <aj@suse.de>
+
+ * misc/tst-dirname.c (main): Add more tests, derived from a bug
+ report by Michael Kerrisk <mtk16@ext.canterbury.ac.nz>.
+
+2001-04-01 Andreas Jaeger <aj@suse.de>
+
+ * debug/xtrace.sh (pcprofileso): Use SLIBDIR since libpcprofile.so
+ is installed there.
+ * malloc/memusage.sh (memusageso): Likewise for libmemusage.so.
+
+2001-04-01 H.J. Lu <hjl@gnu.org>
+
+ * posix/annexc.c (macrofile): Renamed from TMPFILE and set to
+ tmpnam (NULL).
+ * stdlib/isomac.c (macrofile): Likewise.
+
+2001-03-30 Thorsten Kukuk <kukuk@suse.de>
+
+ * inet/rcmd.c: Allow AF_UNSPEC as parameter.
+ * nis/ypclnt.c (yp_all): Print error message only at last try,
+ check for protocoll error only if we don't have a network error.
+
2001-04-02 Andreas Schwab <schwab@suse.de>
* resolv/res_data.c (res_isourserver): Fix cast.
diff --git a/FAQ b/FAQ
index f9ae5af441..955cc543be 100644
--- a/FAQ
+++ b/FAQ
@@ -163,6 +163,7 @@ please let me know.
when I try to use it, it always returns -1 and sets errno to ENOSYS.
3.22. My program segfaults when I call fclose() on the FILE* returned
from setmntent(). Is this a glibc bug?
+3.23. I get "undefined reference to `atexit'"
4. Miscellaneous
@@ -1683,6 +1684,17 @@ In the case of setmntent(), it may appear to work in most cases, but it
won't always work. Unfortunately, for compatibility reasons, we can't
change the return type of setmntent() to something other than FILE *.
+
+3.23. I get "undefined reference to `atexit'"
+
+{UD} This means that your installation is somehow broken. The situation is
+the same as for 'stat', 'fstat', etc (see question 2.7). Investigate why the
+linker does not pick up libc_nonshared.a.
+
+If a similar message is issued at runtime this means that the application or
+DSO is not linked against libc. This can cause problems since 'atexit' is
+not exported anymore.
+
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
diff --git a/FAQ.in b/FAQ.in
index f06569ace4..397b62fe8b 100644
--- a/FAQ.in
+++ b/FAQ.in
@@ -565,7 +565,7 @@ exactly what to use.
Version 2.7.2.3 does and future versions of GCC will automatically
provide the correct specs.
-?? Looking through the shared libc file I haven't found the
+??nonsh Looking through the shared libc file I haven't found the
functions `stat', `lstat', `fstat', and `mknod' and while
linking on my Linux system I get error messages. How is
this supposed to work?
@@ -1438,6 +1438,16 @@ In the case of setmntent(), it may appear to work in most cases, but it
won't always work. Unfortunately, for compatibility reasons, we can't
change the return type of setmntent() to something other than FILE *.
+?? I get "undefined reference to `atexit'"
+
+{UD} This means that your installation is somehow broken. The situation is
+the same as for 'stat', 'fstat', etc (see ?nonsh). Investigate why the
+linker does not pick up libc_nonshared.a.
+
+If a similar message is issued at runtime this means that the application or
+DSO is not linked against libc. This can cause problems since 'atexit' is
+not exported anymore.
+
? Miscellaneous
diff --git a/debug/xtrace.sh b/debug/xtrace.sh
index 3c7c7fe5f7..d885650446 100755
--- a/debug/xtrace.sh
+++ b/debug/xtrace.sh
@@ -18,7 +18,7 @@
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-pcprofileso=@LIBDIR@/libpcprofile.so
+pcprofileso=@SLIBDIR@/libpcprofile.so
pcprofiledump=@BINDIR@/pcprofiledump
# Print usage message.
diff --git a/malloc/memusage.sh b/malloc/memusage.sh
index 70595e8b78..1268f8879a 100755
--- a/malloc/memusage.sh
+++ b/malloc/memusage.sh
@@ -18,7 +18,7 @@
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-memusageso=@LIBDIR@/libmemusage.so
+memusageso=@SLIBDIR@/libmemusage.so
memusagestat=@BINDIR@/memusagestat
# Print usage message.
diff --git a/manual/message.texi b/manual/message.texi
index ebf373d49a..ff410f083b 100644
--- a/manual/message.texi
+++ b/manual/message.texi
@@ -1075,7 +1075,7 @@ code similar to the following:
@end smallexample
@noindent
-After the first complains from people internationalizing the code people
+After the first complaints from people internationalizing the code people
either completely avoided formulations like this or used strings like
@code{"file(s)"}. Both look unnatural and should be avoided. First
tries to solve the problem correctly looked like this:
@@ -1193,11 +1193,11 @@ details are explained in the GNU @code{gettext} manual. Here only a a
bit of information is provided.
The information about the plural form selection has to be stored in the
-header entry (the one with the empty (@code{msgid} string). There should
-be something like:
+header entry (the one with the empty (@code{msgid} string). It looks
+like this:
@smallexample
- nplurals=2; plural=n == 1 ? 0 : 1
+Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;
@end smallexample
The @code{nplurals} value must be a decimal number which specifies how
@@ -1222,11 +1222,11 @@ below).@footnote{Additions are welcome. Send appropriate information to
@table @asis
@item Only one form:
Some languages only require one single form. There is no distinction
-between the singular and plural form. And appropriate header entry
+between the singular and plural form. An appropriate header entry
would look like this:
@smallexample
-nplurals=1; plural=0
+Plural-Forms: nplurals=1; plural=0;
@end smallexample
@noindent
@@ -1246,7 +1246,7 @@ This is the form used in most existing programs since it is what English
is using. A header entry would look like this:
@smallexample
-nplurals=2; plural=n != 1
+Plural-Forms: nplurals=2; plural=n != 1;
@end smallexample
(Note: this uses the feature of C expressions that boolean expressions
@@ -1274,7 +1274,7 @@ Esperanto
Exceptional case in the language family. The header entry would be:
@smallexample
-nplurals=2; plural=n>1
+Plural-Forms: nplurals=2; plural=n>1;
@end smallexample
@noindent
@@ -1289,7 +1289,7 @@ French
The header entry would be:
@smallexample
-nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2
+Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;
@end smallexample
@noindent
@@ -1304,7 +1304,8 @@ Gaeilge
The header entry would look like this:
@smallexample
-nplurals=3; plural=n%100/10==1 ? 2 : n%10==1 ? 0 : (n+9)%10>3 ? 2 : 1
+Plural-Forms: nplurals=3; \
+ plural=n%100/10==1 ? 2 : n%10==1 ? 0 : (n+9)%10>3 ? 2 : 1;
@end smallexample
@noindent
@@ -1319,8 +1320,9 @@ Czech, Russian, Slovak
The header entry would look like this:
@smallexample
-nplurals=3; plural=n==1 ? 0 : \
- n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2
+Plural-Forms: nplurals=3; \
+ plural=n==1 ? 0 : \
+ n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
@end smallexample
(Continuation in the next line is possible.)
@@ -1337,7 +1339,8 @@ Polish
The header entry would look like this:
@smallexample
-nplurals=4; plural=n==1 ? 0 : n%10==2 ? 1 : n%10==3 || n%10==4 ? 2 : 3
+Plural-Forms: nplurals=4; \
+ plural=n==1 ? 0 : n%10==2 ? 1 : n%10==3 || n%10==4 ? 2 : 3;
@end smallexample
@noindent
diff --git a/misc/dirname.c b/misc/dirname.c
index 8be25e51b8..b837404975 100644
--- a/misc/dirname.c
+++ b/misc/dirname.c
@@ -1,5 +1,5 @@
/* dirname - return directory part of PATH.
- Copyright (C) 1996, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -32,16 +32,40 @@ dirname (char *path)
last_slash = path != NULL ? strrchr (path, '/') : NULL;
if (last_slash != NULL && last_slash != path && last_slash[1] == '\0')
- /* The '/' is the last character, we have to look further. */
- last_slash = __memrchr (path, '/', last_slash - path);
+ {
+ /* Determine whether all remaining characters are slashes. */
+ char *runp;
+
+ for (runp = last_slash; runp != path; --runp)
+ if (runp[-1] != '/')
+ break;
+
+ /* The '/' is the last character, we have to look further. */
+ if (runp != path)
+ last_slash = __memrchr (path, '/', runp - path);
+ }
if (last_slash != NULL)
{
+ /* Determine whether all remaining characters are slashes. */
+ char *runp;
+
+ for (runp = last_slash; runp != path; --runp)
+ if (runp[-1] != '/')
+ break;
+
/* Terminate the path. */
- if (last_slash == path)
- /* The last slash is the first character in the string. We have to
- return "/". */
- ++last_slash;
+ if (runp == path)
+ {
+ /* The last slash is the first character in the string. We have to
+ return "/". As a special case we have to return "//" if there
+ are exactly two slashes at the beginning of the string. See
+ XBD 4.10 Path Name Resolution for more information. */
+ if (last_slash == path + 1)
+ ++last_slash;
+ else
+ last_slash = path + 1;
+ }
last_slash[0] = '\0';
}
diff --git a/misc/tst-dirname.c b/misc/tst-dirname.c
index e688bd3a42..aa0d782392 100644
--- a/misc/tst-dirname.c
+++ b/misc/tst-dirname.c
@@ -1,5 +1,5 @@
/* Test program for dirname function a la XPG.
- Copyright (C) 1996, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -54,6 +54,13 @@ main (void)
/* Some more tests. */
result |= test ("/usr/lib/", "/usr");
result |= test ("/usr", "/");
+ result |= test ("a//", ".");
+ result |= test ("a////", ".");
+ result |= test ("////usr", "/");
+ result |= test ("////usr//", "/");
+ result |= test ("//usr", "//");
+ result |= test ("//usr//", "//");
+ result |= test ("//", "//");
return result != 0;
}
diff --git a/nis/ypclnt.c b/nis/ypclnt.c
index a62e356912..67ac42597b 100644
--- a/nis/ypclnt.c
+++ b/nis/ypclnt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
@@ -729,7 +729,9 @@ yp_all (const char *indomain, const char *inmap,
if (result != RPC_SUCCESS)
{
- clnt_perror (clnt, "yp_all: clnt_call");
+ /* Print the error message only on the last try */
+ if (try == MAXTRIES - 1)
+ clnt_perror (clnt, "yp_all: clnt_call");
res = YPERR_RPC;
}
else
@@ -738,7 +740,7 @@ yp_all (const char *indomain, const char *inmap,
__yp_unbind (ydb);
clnt_destroy (clnt);
- if (status != YP_NOMORE)
+ if (res == YPERR_SUCCESS && status != YP_NOMORE)
{
__set_errno (saved_errno);
return ypprot_err (status);
diff --git a/posix/annexc.c b/posix/annexc.c
index 1dbc3f617b..78d70fa804 100644
--- a/posix/annexc.c
+++ b/posix/annexc.c
@@ -25,9 +25,10 @@
#include <signal.h>
#include <sys/wait.h>
-#define TMPFILE "/tmp/macros"
#define HEADER_MAX 256
+static const char *macrofile;
+
/* <aio.h>. */
static const char *const aio_syms[] =
{
@@ -712,8 +713,10 @@ get_null_defines (void)
FILE *input;
int first = 1;
+ macrofile = tmpnam (NULL);
+
command = malloc (sizeof fmt + sizeof "/dev/null" + 2 * strlen (CC)
- + strlen (INC) + strlen (TMPFILE));
+ + strlen (INC) + strlen (macrofile));
if (command == NULL)
{
@@ -721,7 +724,7 @@ get_null_defines (void)
exit (1);
}
- sprintf (command, fmt, "/dev/null", CC, INC, CC, TMPFILE);
+ sprintf (command, fmt, "/dev/null", CC, INC, CC, macrofile);
if (xsystem (command))
{
@@ -729,11 +732,11 @@ get_null_defines (void)
return NULL;
}
free (command);
- input = fopen (TMPFILE, "r");
+ input = fopen (macrofile, "r");
if (input == NULL)
{
- printf ("Could not read %s: ", TMPFILE);
+ printf ("Could not read %s: ", macrofile);
perror (NULL);
return NULL;
}
@@ -782,7 +785,7 @@ get_null_defines (void)
}
result[result_len] = NULL;
fclose (input);
- remove (TMPFILE);
+ remove (macrofile);
return (const char **) result;
}
@@ -799,7 +802,7 @@ check_header (const struct header *header, const char **except)
memset (found, '\0', header->nsyms * sizeof (int));
command = alloca (sizeof fmt + strlen (header->name) + 2 * strlen (CC)
- + strlen (INC) + strlen (TMPFILE));
+ + strlen (INC) + strlen (macrofile));
if (command == NULL)
@@ -809,13 +812,13 @@ check_header (const struct header *header, const char **except)
}
printf ("=== %s ===\n", header->name);
- sprintf (command, fmt, header->name, CC, INC, CC, TMPFILE);
+ sprintf (command, fmt, header->name, CC, INC, CC, macrofile);
/* First see whether this subset is supported at all. */
if (header->subset != NULL)
{
sprintf (line, testfmt, header->subset, header->subset, CC, INC, CC,
- TMPFILE);
+ macrofile);
if (xsystem (line))
{
printf ("!! not available\n");
@@ -828,11 +831,11 @@ check_header (const struct header *header, const char **except)
puts ("system() returned nonzero");
result = 1;
}
- input = fopen (TMPFILE, "r");
+ input = fopen (macrofile, "r");
if (input == NULL)
{
- printf ("Could not read %s: ", TMPFILE);
+ printf ("Could not read %s: ", macrofile);
perror (NULL);
return 1;
}
@@ -884,7 +887,7 @@ check_header (const struct header *header, const char **except)
result |= 1;
}
fclose (input);
- remove (TMPFILE);
+ remove (macrofile);
for (i = 0; i < header->nsyms; ++i)
if (found[i] == 0)
diff --git a/stdlib/isomac.c b/stdlib/isomac.c
index ab63d1b154..f18e8d92eb 100644
--- a/stdlib/isomac.c
+++ b/stdlib/isomac.c
@@ -52,7 +52,7 @@
preprocessor has something similar to gcc's -dM option. Tune
PRINT_MACROS in this case. This program assumes headers are found
under /usr/include and that there is a writable /tmp directory.
- Tune SYSTEM_INCLUDE and TMPFILE if your system differs.
+ Tune SYSTEM_INCLUDE if your system differs.
#define BROKEN_SYSTEM if system(NULL) bombs -- one more violation
of ISO C, by the way.
@@ -75,9 +75,10 @@
#include <stdlib.h>
#include <string.h>
-#define TMPFILE "/tmp/macros"
#define HEADER_MAX 256
+static const char *macrofile;
+
/* ISO C header names including Amendment 1 (without ".h" suffix). */
static char *header[] =
{
@@ -247,8 +248,10 @@ get_null_defines (void)
FILE *input;
int first = 1;
+ macrofile = tmpnam (NULL);
+
command = malloc (sizeof fmt + sizeof "/dev/null" + 2 * strlen (CC)
- + strlen (INC) + strlen (TMPFILE));
+ + strlen (INC) + strlen (macrofile));
if (command == NULL)
{
@@ -256,7 +259,7 @@ get_null_defines (void)
exit (1);
}
- sprintf (command, fmt, "/dev/null", CC, INC, CC, TMPFILE);
+ sprintf (command, fmt, "/dev/null", CC, INC, CC, macrofile);
if (system (command))
{
@@ -264,11 +267,11 @@ get_null_defines (void)
return NULL;
}
free (command);
- input = fopen (TMPFILE, "r");
+ input = fopen (macrofile, "r");
if (input == NULL)
{
- printf ("Could not read %s: ", TMPFILE);
+ printf ("Could not read %s: ", macrofile);
perror (NULL);
return NULL;
}
@@ -321,7 +324,7 @@ get_null_defines (void)
}
result[result_len] = NULL;
fclose (input);
- remove (TMPFILE);
+ remove (macrofile);
return (const char **) result;
}