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

[commits] r13771 - in /fsf/trunk/libc: ./ manual/ misc/ nptl/ sysdeps/posix/



Author: eglibc
Date: Thu May 12 00:03:23 2011
New Revision: 13771

Log:
Import glibc-mainline for 2011-05-12

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/manual/stdio.texi
    fsf/trunk/libc/misc/mntent_r.c
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/allocatestack.c
    fsf/trunk/libc/sysdeps/posix/spawni.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu May 12 00:03:23 2011
@@ -1,4 +1,10 @@
 2011-05-11  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12052]
+	* sysdeps/posix/spawni.c (__spawni): Fix sched_setscheduler call.
+
+	[BZ #12625]
+	* misc/mntent_r.c (addmntent): Flush the stream after the output
 
 	[BZ #12393]
 	* elf/dl-load.c (is_trusted_path): Remove unnecessary test.
@@ -16,7 +22,7 @@
 	* grp/initgroups.c (internal_getgrouplist): When we found the service
 	list through the initgroups entry in nsswitch.conf do not always
 	continue on a successful lookup.  Don't always use the
-	__nss_group_data-ase value if it is set.
+	__nss_group_database value if it is set.
 	* nss/nsswitch.conf (initgroups): Change action for successful db
 	lookup to continue for compatibility.
 

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Thu May 12 00:03:23 2011
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-5-10
+GNU C Library NEWS -- history of user-visible changes.  2011-5-11
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -9,11 +9,11 @@
 
 * The following bugs are resolved with this release:
 
-  11257, 11258, 11487, 11532, 11578, 11653, 11668, 11724, 11945, 11947,
-  12158, 12178, 12200, 12346, 12393, 12420, 12445, 12449, 12454, 12460,
-  12469, 12489, 12509, 12510, 12518, 12541, 12545, 12551, 12583, 12587,
-  12597, 12611, 12631, 12650, 12653, 12655, 12660, 12681, 12685, 12711,
-  12713, 12714, 12717, 12723, 12734, 12738
+  386, 11257, 11258, 11487, 11532, 11578, 11653, 11668, 11724, 11945, 11947,
+  12052, 12158, 12178, 12200, 12346, 12393, 12420, 12445, 12449, 12454,
+  12460, 12469, 12489, 12509, 12510, 12518, 12527, 12541, 12545, 12551,
+  12583, 12587, 12597, 12611, 12625, 12631, 12650, 12653, 12655, 12660,
+  12681, 12685, 12711, 12713, 12714, 12717, 12723, 12734, 12738
 
 * The RPC implementation in libc is obsoleted.  Old programs keep working
   but new programs cannot be linked with the routines in libc anymore.

Modified: fsf/trunk/libc/manual/stdio.texi
==============================================================================
--- fsf/trunk/libc/manual/stdio.texi (original)
+++ fsf/trunk/libc/manual/stdio.texi Thu May 12 00:03:23 2011
@@ -14,7 +14,7 @@
 @menu
 * Streams::                     About the data type representing a stream.
 * Standard Streams::            Streams to the standard input and output
-                                 devices are created for you.
+				 devices are created for you.
 * Opening Streams::             How to create a stream to talk to a file.
 * Closing Streams::             Close a stream when you are finished with it.
 * Streams and Threads::         Issues with streams in threaded programs.
@@ -26,17 +26,17 @@
 * Block Input/Output::          Input and output operations on blocks of data.
 * Formatted Output::            @code{printf} and related functions.
 * Customizing Printf::          You can define new conversion specifiers for
-                                 @code{printf} and friends.
+				 @code{printf} and friends.
 * Formatted Input::             @code{scanf} and related functions.
 * EOF and Errors::              How you can tell if an I/O error happens.
 * Error Recovery::		What you can do about errors.
 * Binary Streams::              Some systems distinguish between text files
-                                 and binary files.
+				 and binary files.
 * File Positioning::            About random-access streams.
 * Portable Positioning::        Random access on peculiar ISO C systems.
 * Stream Buffering::            How to control buffering of streams.
 * Other Kinds of Streams::      Streams that do not necessarily correspond
-                                 to an open file.
+				 to an open file.
 * Formatted Messages::          Print strictly formatted messages.
 @end menu
 
@@ -186,13 +186,11 @@
 @end table
 
 As you can see, @samp{+} requests a stream that can do both input and
-output.  The ISO standard says that when using such a stream, you must
-call @code{fflush} (@pxref{Stream Buffering}) or a file positioning
-function such as @code{fseek} (@pxref{File Positioning}) when switching
-from reading to writing or vice versa.  Otherwise, internal buffers
-might not be emptied properly.  The GNU C library does not have this
-limitation; you can do arbitrary reading and writing operations on a
-stream in whatever order.
+output.  When using such a stream, you must call @code{fflush}
+(@pxref{Stream Buffering}) or a file positioning function such as
+@code{fseek} (@pxref{File Positioning}) when switching from reading
+to writing or vice versa.  Otherwise, internal buffers might not be
+emptied properly.
 
 Additional characters may appear after these to specify flags for the
 call.  Always put the mode (@samp{r}, @samp{w+}, etc.) first; that is
@@ -1109,17 +1107,17 @@
       /* @r{Write a space to separate answer from question.} */
       fputc (' ', stdout);
       /* @r{Read the first character of the line.}
-         @r{This should be the answer character, but might not be.} */
+	 @r{This should be the answer character, but might not be.} */
       c = tolower (fgetc (stdin));
       answer = c;
       /* @r{Discard rest of input line.} */
       while (c != '\n' && c != EOF)
-        c = fgetc (stdin);
+	c = fgetc (stdin);
       /* @r{Obey the answer if it was valid.} */
       if (answer == 'y')
-        return 1;
+	return 1;
       if (answer == 'n')
-        return 0;
+	return 0;
       /* @r{Answer was invalid: ask for valid answer.} */
       fputs ("Please answer y or n:", stdout);
     @}
@@ -1328,7 +1326,7 @@
 
 @smallexample
 f  o  o  b  a  r
-         ^
+	 ^
 @end smallexample
 
 @noindent
@@ -1340,7 +1338,7 @@
 
 @smallexample
 f  o  o  b  a  r
-         |
+	 |
       o--
       ^
 @end smallexample
@@ -1354,7 +1352,7 @@
 
 @smallexample
 f  o  o  b  a  r
-         |
+	 |
       9--
       ^
 @end smallexample
@@ -1527,19 +1525,19 @@
 @menu
 * Formatted Output Basics::     Some examples to get you started.
 * Output Conversion Syntax::    General syntax of conversion
-                                 specifications.
+				 specifications.
 * Table of Output Conversions:: Summary of output conversions and
-                                 what they do.
+				 what they do.
 * Integer Conversions::         Details about formatting of integers.
 * Floating-Point Conversions::  Details about formatting of
-                                 floating-point numbers.
+				 floating-point numbers.
 * Other Output Conversions::    Details about formatting of strings,
-                                 characters, pointers, and the like.
+				 characters, pointers, and the like.
 * Formatted Output Functions::  Descriptions of the actual functions.
 * Dynamic Output::		Functions that allocate memory for the output.
 * Variable Arguments Output::   @code{vprintf} and friends.
 * Parsing a Template String::   What kinds of args does a given template
-                                 call for?
+				 call for?
 * Example of Parsing::          Sample program using @code{parse_printf_format}.
 @end menu
 
@@ -1561,7 +1559,7 @@
 int pct = 37;
 char filename[] = "foo.txt";
 printf ("Processing of `%s' is %d%% finished.\nPlease be patient.\n",
-        filename, pct);
+	filename, pct);
 @end smallexample
 
 @noindent
@@ -2350,20 +2348,20 @@
 
  /* @r{Try to print in the allocated space.} */
   nchars = snprintf (buffer, size, "value of %s is %s",
-                     name, value);
+		     name, value);
 @end group
 @group
   if (nchars >= size)
     @{
       /* @r{Reallocate buffer now that we know
-         how much space is needed.} */
+	 how much space is needed.} */
       size = nchars + 1;
       buffer = (char *) xrealloc (buffer, size);
 
       if (buffer != NULL)
-        /* @r{Try again.} */
-        snprintf (buffer, size, "value of %s is %s",
-                  name, value);
+	/* @r{Try again.} */
+	snprintf (buffer, size, "value of %s is %s",
+		  name, value);
     @}
   /* @r{The last call worked, return the string.} */
   return buffer;
@@ -2452,7 +2450,7 @@
 
 @smallexample
 #define myprintf(a, b, c, d, e, rest...) \
-            printf (mytemplate , ## rest)
+	    printf (mytemplate , ## rest)
 @end smallexample
 
 @noindent
@@ -2594,7 +2592,7 @@
 
 @smallexample
 void eprintf (const char *template, ...)
-        __attribute__ ((format (printf, 1, 2)));
+	__attribute__ ((format (printf, 1, 2)));
 @end smallexample
 
 @noindent
@@ -2781,30 +2779,30 @@
       int wanted;
 
       if (argtypes[i] & PA_FLAG_PTR)
-        wanted = STRUCTURE;
+	wanted = STRUCTURE;
       else
-        switch (argtypes[i] & ~PA_FLAG_MASK)
-          @{
-          case PA_INT:
-          case PA_FLOAT:
-          case PA_DOUBLE:
-            wanted = NUMBER;
-            break;
-          case PA_CHAR:
-            wanted = CHAR;
-            break;
-          case PA_STRING:
-            wanted = STRING;
-            break;
-          case PA_POINTER:
-            wanted = STRUCTURE;
-            break;
-          @}
+	switch (argtypes[i] & ~PA_FLAG_MASK)
+	  @{
+	  case PA_INT:
+	  case PA_FLOAT:
+	  case PA_DOUBLE:
+	    wanted = NUMBER;
+	    break;
+	  case PA_CHAR:
+	    wanted = CHAR;
+	    break;
+	  case PA_STRING:
+	    wanted = STRING;
+	    break;
+	  case PA_POINTER:
+	    wanted = STRUCTURE;
+	    break;
+	  @}
       if (TYPE (args[i]) != wanted)
-        @{
-          error ("type mismatch for arg number %d", i);
-          return 0;
-        @}
+	@{
+	  error ("type mismatch for arg number %d", i);
+	  return 0;
+	@}
     @}
   return 1;
 @}
@@ -2835,15 +2833,15 @@
 
 @menu
 * Registering New Conversions::         Using @code{register_printf_function}
-                                         to register a new output conversion.
+					 to register a new output conversion.
 * Conversion Specifier Options::        The handler must be able to get
-                                         the options specified in the
-                                         template when it is called.
+					 the options specified in the
+					 template when it is called.
 * Defining the Output Handler::         Defining the handler and arginfo
-                                         functions that are passed as arguments
-                                         to @code{register_printf_function}.
+					 functions that are passed as arguments
+					 to @code{register_printf_function}.
 * Printf Extension Example::            How to define a @code{printf}
-                                         handler function.
+					 handler function.
 * Predefined Printf Handlers::          Predefined @code{printf} handlers.
 @end menu
 
@@ -3010,7 +3008,7 @@
 
 @smallexample
 int @var{function} (FILE *stream, const struct printf_info *info,
-                    const void *const *args)
+		    const void *const *args)
 @end smallexample
 
 The @var{stream} argument passed to the handler function is the stream to
@@ -3058,7 +3056,7 @@
 
 @smallexample
 int @var{function} (const struct printf_info *info,
-                    size_t n, int *argtypes)
+		    size_t n, int *argtypes)
 @end smallexample
 
 The return value from the function should be the number of arguments the
@@ -3728,7 +3726,7 @@
   char *variable, *value;
 
   if (2 > scanf ("%a[a-zA-Z0-9] = %a[^\n]\n",
-                 &variable, &value))
+		 &variable, &value))
     @{
       invalid_input_error ();
       return 0;
@@ -4781,10 +4779,10 @@
 
 @menu
 * String Streams::              Streams that get data from or put data in
-                                 a string or memory buffer.
+				 a string or memory buffer.
 * Obstack Streams::		Streams that store data in an obstack.
 * Custom Streams::              Defining your own streams with an arbitrary
-                                 input data source and/or output data sink.
+				 input data source and/or output data sink.
 @end menu
 
 @node String Streams
@@ -4958,9 +4956,9 @@
 
 @menu
 * Streams and Cookies::         The @dfn{cookie} records where to fetch or
-                                 store data that is read or written.
+				 store data that is read or written.
 * Hook Functions::              How you should define the four @dfn{hook
-                                 functions} that a custom stream needs.
+				 functions} that a custom stream needs.
 @end menu
 
 @node Streams and Cookies

Modified: fsf/trunk/libc/misc/mntent_r.c
==============================================================================
--- fsf/trunk/libc/misc/mntent_r.c (original)
+++ fsf/trunk/libc/misc/mntent_r.c Thu May 12 00:03:23 2011
@@ -1,5 +1,5 @@
 /* Utilities for reading/writing fstab, mtab, etc.
-   Copyright (C) 1995-2000, 2001, 2002, 2003, 2006, 2010
+   Copyright (C) 1995-2000, 2001, 2002, 2003, 2006, 2010, 2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -263,8 +263,8 @@
 		   mntcopy.mnt_type,
 		   mntcopy.mnt_opts,
 		   mntcopy.mnt_freq,
-		   mntcopy.mnt_passno)
-	  < 0 ? 1 : 0);
+		   mntcopy.mnt_passno) < 0
+	  || fflush (stream) != 0);
 }
 weak_alias (__addmntent, addmntent)
 

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Thu May 12 00:03:23 2011
@@ -1,3 +1,8 @@
+2011-05-11  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #386]
+	* allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
+
 2011-04-10  Ulrich Drepper  <drepper@xxxxxxxxx>
 
 	[BZ #12650]

Modified: fsf/trunk/libc/nptl/allocatestack.c
==============================================================================
--- fsf/trunk/libc/nptl/allocatestack.c (original)
+++ fsf/trunk/libc/nptl/allocatestack.c Thu May 12 00:03:23 2011
@@ -637,7 +637,7 @@
 	    {
 	      int err;
 	    mprot_error:
-	      err = errno;
+	      err = errno == ENOMEM ? EAGAIN : errno;
 
 	      lll_lock (stack_cache_lock, LLL_PRIVATE);
 

Modified: fsf/trunk/libc/sysdeps/posix/spawni.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/spawni.c (original)
+++ fsf/trunk/libc/sysdeps/posix/spawni.c Thu May 12 00:03:23 2011
@@ -143,9 +143,7 @@
     }
   else if ((flags & POSIX_SPAWN_SETSCHEDULER) != 0)
     {
-      if (__sched_setscheduler (0, attrp->__policy,
-				(flags & POSIX_SPAWN_SETSCHEDPARAM) != 0
-				? &attrp->__sp : NULL) == -1)
+      if (__sched_setscheduler (0, attrp->__policy, &attrp->__sp) == -1)
 	_exit (SPAWN_ERROR);
     }
 #endif