[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r5707 - in /fsf/trunk/libc: ./ locale/programs/ nscd/ posix/ stdio-common/ stdlib/ sunrpc/ sysdeps/posix/



Author: eglibc
Date: Sun Mar 30 00:04:44 2008
New Revision: 5707

Log:
Import glibc-mainline for 2008-03-30

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/locale/programs/ld-time.c
    fsf/trunk/libc/locale/programs/locfile.c
    fsf/trunk/libc/nscd/nscd.c
    fsf/trunk/libc/posix/getopt.c
    fsf/trunk/libc/stdio-common/vfprintf.c
    fsf/trunk/libc/stdlib/strtod_l.c
    fsf/trunk/libc/sunrpc/auth_unix.c
    fsf/trunk/libc/sunrpc/clnt_tcp.c
    fsf/trunk/libc/sunrpc/clnt_udp.c
    fsf/trunk/libc/sunrpc/clnt_unix.c
    fsf/trunk/libc/sunrpc/svc_tcp.c
    fsf/trunk/libc/sunrpc/svc_udp.c
    fsf/trunk/libc/sunrpc/svc_unix.c
    fsf/trunk/libc/sunrpc/xdr.c
    fsf/trunk/libc/sunrpc/xdr_array.c
    fsf/trunk/libc/sunrpc/xdr_rec.c
    fsf/trunk/libc/sunrpc/xdr_ref.c
    fsf/trunk/libc/sysdeps/posix/tempname.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Mar 30 00:04:44 2008
@@ -1,3 +1,35 @@
+2008-03-29  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* stdio-common/vfprintf.c (vfprintf): Correct overflow test.
+
+	[BZ #5939]
+	* sysdeps/posix/tempname.c (__gen_tempname): Correct flag selection.
+
+	* posix/getopt.c (_getopt_internal_r): Remove old POSIX-demanded
+	error message.  POSIX today does not require the messages to be in
+	a specific form.  Suggested by Jim Meyering <jim@xxxxxxxxxxxx>.
+
+	[BZ #5979]
+	* sunrpc/auth_unix.c: Unify printed strings.
+	* sunrpc/clnt_tcp.c: Likewise.
+	* sunrpc/clnt_udp.c: Likewise.
+	* sunrpc/clnt_unix.c: Likewise.
+	* sunrpc/svc_tcp.c: Likewise.
+	* sunrpc/svc_udp.c: Likewise.
+	* sunrpc/svc_unix.c: Likewise.
+	* sunrpc/xdr.c: Likewise.
+	* sunrpc/xdr_array.c: Likewise.
+	* sunrpc/xdr_rec.c: Likewise.
+	* sunrpc/xdr_ref.c: Likewise.
+	* locale/programs/ld-time.c (time_finish): Unify messages.
+	* locale/programs/locfile.c (handle_copy): Fix typo.
+	* nscd/nscd.c (options): Fix typo.
+
+	[BZ #5995]
+	* stdlib/strtod_l.c: Use correct sign for result in one more
+	underflow case.
+	Patch by Eric Blake <ebb9@xxxxxxx>.
+
 2008-03-27  Jakub Jelinek  <jakub@xxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: Add open

Modified: fsf/trunk/libc/locale/programs/ld-time.c
==============================================================================
--- fsf/trunk/libc/locale/programs/ld-time.c (original)
+++ fsf/trunk/libc/locale/programs/ld-time.c Sun Mar 30 00:04:44 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxx>, 1995.
 
@@ -433,7 +433,7 @@
 			   && !__isleap (time->era_entries[idx].stop_date[0])))
 		      && !be_quiet)
 			  WITH_CUR_LOCALE (error (0, 0, _("\
-%s: stopping date is invalid in string %Zd in `era' field"),
+%s: invalid stopping date in string %Zd in `era' field"),
 						  "LC_TIME", idx + 1));
 		}
 	    }

Modified: fsf/trunk/libc/locale/programs/locfile.c
==============================================================================
--- fsf/trunk/libc/locale/programs/locfile.c (original)
+++ fsf/trunk/libc/locale/programs/locfile.c Sun Mar 30 00:04:44 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2004, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2004, 2005, 2006, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxx>, 1996.
 
@@ -779,7 +779,7 @@
 
   now = lr_token (ldfile, charmap, result, NULL, verbose);
   if (now->tok != tok_string)
-    lr_error (ldfile, _("expect string argument for `copy'"));
+    lr_error (ldfile, _("expecting string argument for `copy'"));
   else if (!ignore_content)
     {
       if (now->val.str.startmb == NULL)

Modified: fsf/trunk/libc/nscd/nscd.c
==============================================================================
--- fsf/trunk/libc/nscd/nscd.c (original)
+++ fsf/trunk/libc/nscd/nscd.c Sun Mar 30 00:04:44 2008
@@ -100,7 +100,7 @@
     N_("Do not fork and display messages on the current tty") },
   { "nthreads", 't', N_("NUMBER"), 0, N_("Start NUMBER threads") },
   { "shutdown", 'K', NULL, 0, N_("Shut the server down") },
-  { "statistic", 'g', NULL, 0, N_("Print current configuration statistic") },
+  { "statistics", 'g', NULL, 0, N_("Print current configuration statistics") },
   { "invalidate", 'i', N_("TABLE"), 0,
     N_("Invalidate the specified cache") },
   { "secure", 'S', N_("TABLE,yes"), OPTION_HIDDEN,

Modified: fsf/trunk/libc/posix/getopt.c
==============================================================================
--- fsf/trunk/libc/posix/getopt.c (original)
+++ fsf/trunk/libc/posix/getopt.c Sun Mar 30 00:04:44 2008
@@ -792,30 +792,16 @@
 	if (print_errors)
 	  {
 #if defined _LIBC && defined USE_IN_LIBIO
-	      char *buf;
-	      int n;
-#endif
-
-	    if (d->__posixly_correct)
-	      {
-#if defined _LIBC && defined USE_IN_LIBIO
-		n = __asprintf (&buf, _("%s: illegal option -- '%c'\n"),
-				argv[0], c);
-#else
-		fprintf (stderr, _("%s: illegal option -- '%c'\n"), argv[0],
-			 c);
-#endif
-	      }
-	    else
-	      {
-#if defined _LIBC && defined USE_IN_LIBIO
-		n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
-				argv[0], c);
-#else
-		fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0],
-			 c);
-#endif
-	      }
+	    char *buf;
+	    int n;
+#endif
+
+#if defined _LIBC && defined USE_IN_LIBIO
+	    n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
+			    argv[0], c);
+#else
+	    fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
+#endif
 
 #if defined _LIBC && defined USE_IN_LIBIO
 	    if (n >= 0)

Modified: fsf/trunk/libc/stdio-common/vfprintf.c
==============================================================================
--- fsf/trunk/libc/stdio-common/vfprintf.c (original)
+++ fsf/trunk/libc/stdio-common/vfprintf.c Sun Mar 30 00:04:44 2008
@@ -1513,7 +1513,8 @@
       if (prec > width
 	  && prec + 32 > (int)(sizeof (work_buffer) / sizeof (work_buffer[0])))
 	{
-	  if (__builtin_expect (prec > ~((size_t) 0) - 31, 0))
+	  if (__builtin_expect (prec > ~((size_t) 0) / sizeof (CHAR_T) - 31,
+				0))
 	    {
 	      done = -1;
 	      goto all_done;

Modified: fsf/trunk/libc/stdlib/strtod_l.c
==============================================================================
--- fsf/trunk/libc/stdlib/strtod_l.c (original)
+++ fsf/trunk/libc/stdlib/strtod_l.c Sun Mar 30 00:04:44 2008
@@ -1028,7 +1028,7 @@
   if (__builtin_expect (exponent < MIN_10_EXP - (DIG + 1), 0))
     {
       __set_errno (ERANGE);
-      return 0.0;
+      return negative ? -0.0 : 0.0;
     }
 
   if (int_no > 0)

Modified: fsf/trunk/libc/sunrpc/auth_unix.c
==============================================================================
--- fsf/trunk/libc/sunrpc/auth_unix.c (original)
+++ fsf/trunk/libc/sunrpc/auth_unix.c Sun Mar 30 00:04:44 2008
@@ -111,7 +111,7 @@
   if (auth == NULL || au == NULL)
     {
 no_memory:
-      (void) __fxprintf (NULL, "%s", _("authunix_create: out of memory\n"));
+      (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
       mem_free (auth, sizeof (*auth));
       mem_free (au, sizeof (*au));
       return NULL;

Modified: fsf/trunk/libc/sunrpc/clnt_tcp.c
==============================================================================
--- fsf/trunk/libc/sunrpc/clnt_tcp.c (original)
+++ fsf/trunk/libc/sunrpc/clnt_tcp.c Sun Mar 30 00:04:44 2008
@@ -128,7 +128,7 @@
   if (h == NULL || ct == NULL)
     {
       struct rpc_createerr *ce = &get_rpc_createerr ();
-      (void) __fxprintf (NULL, "%s", _("clnttcp_create: out of memory\n"));
+      (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
       ce->cf_stat = RPC_SYSTEMERROR;
       ce->cf_error.re_errno = ENOMEM;
       goto fooy;

Modified: fsf/trunk/libc/sunrpc/clnt_udp.c
==============================================================================
--- fsf/trunk/libc/sunrpc/clnt_udp.c (original)
+++ fsf/trunk/libc/sunrpc/clnt_udp.c Sun Mar 30 00:04:44 2008
@@ -136,7 +136,8 @@
   if (cl == NULL || cu == NULL)
     {
       struct rpc_createerr *ce = &get_rpc_createerr ();
-      (void) __fxprintf (NULL, "%s", _("clntudp_create: out of memory\n"));
+      (void) __fxprintf (NULL, "%s: %s",
+			 "clntudp_create", _("out of memory\n"));
       ce->cf_stat = RPC_SYSTEMERROR;
       ce->cf_error.re_errno = ENOMEM;
       goto fooy;

Modified: fsf/trunk/libc/sunrpc/clnt_unix.c
==============================================================================
--- fsf/trunk/libc/sunrpc/clnt_unix.c (original)
+++ fsf/trunk/libc/sunrpc/clnt_unix.c Sun Mar 30 00:04:44 2008
@@ -125,7 +125,7 @@
   if (h == NULL || ct == NULL)
     {
       struct rpc_createerr *ce = &get_rpc_createerr ();
-      (void) __fxprintf (NULL, "%s", _("clntunix_create: out of memory\n"));
+      (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
       ce->cf_stat = RPC_SYSTEMERROR;
       ce->cf_error.re_errno = ENOMEM;
       goto fooy;

Modified: fsf/trunk/libc/sunrpc/svc_tcp.c
==============================================================================
--- fsf/trunk/libc/sunrpc/svc_tcp.c (original)
+++ fsf/trunk/libc/sunrpc/svc_tcp.c Sun Mar 30 00:04:44 2008
@@ -176,7 +176,7 @@
   xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT));
   if (r == NULL || xprt == NULL)
     {
-      (void) __fxprintf (NULL, "%s", _("svctcp_create: out of memory\n"));
+      (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
       mem_free (r, sizeof (*r));
       mem_free (xprt, sizeof (SVCXPRT));
       return NULL;
@@ -214,8 +214,8 @@
   cd = (struct tcp_conn *) mem_alloc (sizeof (struct tcp_conn));
   if (xprt == (SVCXPRT *) NULL || cd == NULL)
     {
-      (void) __fxprintf (NULL, "%s",
-			 _("svc_tcp: makefd_xprt: out of memory\n"));
+      (void) __fxprintf (NULL, "%s: %s", "svc_tcp: makefd_xprt",
+			 _("out of memory\n"));
       mem_free (xprt, sizeof (SVCXPRT));
       mem_free (cd, sizeof (struct tcp_conn));
       return NULL;

Modified: fsf/trunk/libc/sunrpc/svc_udp.c
==============================================================================
--- fsf/trunk/libc/sunrpc/svc_udp.c (original)
+++ fsf/trunk/libc/sunrpc/svc_udp.c Sun Mar 30 00:04:44 2008
@@ -149,7 +149,8 @@
   buf = mem_alloc (((MAX (sendsz, recvsz) + 3) / 4) * 4);
   if (xprt == NULL || su == NULL || buf == NULL)
     {
-      (void) __fxprintf (NULL, "%s", _("svcudp_create: out of memory\n"));
+      (void) __fxprintf (NULL, "%s: %s",
+			 "svcudp_create",  _("out of memory\n"));
       mem_free (xprt, sizeof (SVCXPRT));
       mem_free (su, sizeof (*su));
       mem_free (buf, ((MAX (sendsz, recvsz) + 3) / 4) * 4);

Modified: fsf/trunk/libc/sunrpc/svc_unix.c
==============================================================================
--- fsf/trunk/libc/sunrpc/svc_unix.c (original)
+++ fsf/trunk/libc/sunrpc/svc_unix.c Sun Mar 30 00:04:44 2008
@@ -173,7 +173,7 @@
   xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT));
   if (r == NULL || xprt == NULL)
     {
-      __fxprintf (NULL, "%s", _("svcunix_create: out of memory\n"));
+      __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
       mem_free (r, sizeof (*r));
       mem_free (xprt, sizeof (SVCXPRT));
       return NULL;
@@ -211,8 +211,8 @@
   cd = (struct unix_conn *) mem_alloc (sizeof (struct unix_conn));
   if (xprt == (SVCXPRT *) NULL || cd == (struct unix_conn *) NULL)
     {
-      (void) __fxprintf (NULL, "%s",
-			 _("svc_unix: makefd_xprt: out of memory\n"));
+      (void) __fxprintf (NULL, "%s: %s", "svc_unix: makefd_xprt",
+			 _("out of memory\n"));
       mem_free (xprt, sizeof (SVCXPRT));
       mem_free (cd, sizeof (struct unix_conn));
       return NULL;

Modified: fsf/trunk/libc/sunrpc/xdr.c
==============================================================================
--- fsf/trunk/libc/sunrpc/xdr.c (original)
+++ fsf/trunk/libc/sunrpc/xdr.c Sun Mar 30 00:04:44 2008
@@ -563,7 +563,7 @@
 	}
       if (sp == NULL)
 	{
-	  (void) __fxprintf (NULL, "%s", _("xdr_bytes: out of memory\n"));
+	  (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
 	  return FALSE;
 	}
       /* fall into ... */
@@ -715,7 +715,7 @@
 	*cpp = sp = (char *) mem_alloc (nodesize);
       if (sp == NULL)
 	{
-	  (void) __fxprintf (NULL, "%s", _("xdr_string: out of memory\n"));
+	  (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
 	  return FALSE;
 	}
       sp[size] = 0;

Modified: fsf/trunk/libc/sunrpc/xdr_array.c
==============================================================================
--- fsf/trunk/libc/sunrpc/xdr_array.c (original)
+++ fsf/trunk/libc/sunrpc/xdr_array.c Sun Mar 30 00:04:44 2008
@@ -103,7 +103,7 @@
 	*addrp = target = calloc (c, elsize);
 	if (target == NULL)
 	  {
-	    (void) __fxprintf (NULL, "%s", _("xdr_array: out of memory\n"));
+	    (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
 	    return FALSE;
 	  }
 	break;

Modified: fsf/trunk/libc/sunrpc/xdr_rec.c
==============================================================================
--- fsf/trunk/libc/sunrpc/xdr_rec.c (original)
+++ fsf/trunk/libc/sunrpc/xdr_rec.c Sun Mar 30 00:04:44 2008
@@ -153,7 +153,7 @@
 
   if (rstrm == NULL || buf == NULL)
     {
-      (void) __fxprintf (NULL, "%s", _("xdrrec_create: out of memory\n"));
+      (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
       mem_free (rstrm, sizeof (RECSTREAM));
       mem_free (buf, sendsize + recvsize + BYTES_PER_XDR_UNIT);
       /*

Modified: fsf/trunk/libc/sunrpc/xdr_ref.c
==============================================================================
--- fsf/trunk/libc/sunrpc/xdr_ref.c (original)
+++ fsf/trunk/libc/sunrpc/xdr_ref.c Sun Mar 30 00:04:44 2008
@@ -82,8 +82,7 @@
 	*pp = loc = (caddr_t) calloc (1, size);
 	if (loc == NULL)
 	  {
-	    (void) __fxprintf (NULL, "%s",
-			       _("xdr_reference: out of memory\n"));
+	    (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
 	    return FALSE;
 	  }
 	break;

Modified: fsf/trunk/libc/sysdeps/posix/tempname.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/tempname.c (original)
+++ fsf/trunk/libc/sysdeps/posix/tempname.c Sun Mar 30 00:04:44 2008
@@ -297,7 +297,7 @@
 	{
 	case __GT_FILE:
 	  fd = __open (tmpl,
-		       (flags & ~ACCESSPERMS)
+		       (flags & ~O_ACCMODE)
 		       | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
 	  break;