]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 16 Nov 1998 12:02:08 +0000 (12:02 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 16 Nov 1998 12:02:08 +0000 (12:02 +0000)
1998-11-16  Ulrich Drepper  <drepper@cygnus.com>

* sysdeps/unix/opendir.c: Use o_directory_works differently.  Treat
zero value as uninitialized so that variable can go into .bss.

* dirent/opendir-tst1.c: Print error strings to stdout.

* sysdeps/unix/sysv/linux/mmap64.c: New file.  Empty.
* sysdeps/unix/sysv/linux/syscalls.list: Add mmap with mmap64 alias.
* sysdeps/unix/sysv/linux/arm/mmap.S: Add mmap64 alias.
* sysdeps/unix/sysv/linux/i386/mmap.S: Likewise.
* sysdeps/unix/sysv/linux/m68k/mmap.S: Likewise.

1998-11-16  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

* time/tzfile.c (__tzfile_read): Check that types[i].isdst is in
range.

1998-11-16  Ulrich Drepper  <drepper@cygnus.com>

* libio/bits/stdio.h (fread_unlocked): Do handle zero size and number.
(fwrite_unlocked): Likewise.

1998-11-16  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

* libio/bits/stdio.h (fread_unlocked): Don't evaluate non-constant
twice.  Don't bother handling zero size.
(frwite_unlocked): Likewise.

1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

* configure.in: Fix regex for makeinfo version string.

1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

* sunrpc/rpc_sample.c (write_sample_server): Avoid -Wparentheses
warning.
* sunrpc/rpc_svcout.c (write_program): Likewise.

1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

* time/Makefile (CFLAGS-test_time.c): Add -Wno-format.

1998-11-16  Ulrich Drepper  <drepper@cygnus.com

* misc/sys/mman.h: Pretty print prototypes.

1998-11-15  Ulrich Drepper  <drepper@cygnus.com

* misc/error.c (error): Don't use result of strerror_r call directly
since at least DEC Unix has a wrong return type.
Patch by Johan Danielsson <joda@pdc.kth.se>.

1998-11-16  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

32 files changed:
ChangeLog
configure.in
dirent/opendir-tst1.c
libio/bits/stdio.h
linuxthreads/ChangeLog
linuxthreads/linuxthreads.texi
manual/arith.texi
manual/filesys.texi
manual/lang.texi
manual/llio.texi
manual/locale.texi
manual/memory.texi
manual/message.texi
manual/pattern.texi
manual/search.texi
manual/signal.texi
manual/startup.texi
manual/stdio.texi
manual/time.texi
manual/users.texi
misc/error.c
misc/sys/mman.h
sunrpc/rpc_sample.c
sunrpc/rpc_svcout.c
sysdeps/unix/opendir.c
sysdeps/unix/sysv/linux/arm/mmap.S
sysdeps/unix/sysv/linux/i386/mmap.S
sysdeps/unix/sysv/linux/m68k/mmap.S
sysdeps/unix/sysv/linux/mmap64.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/syscalls.list
time/Makefile
time/tzfile.c

index 4a2669dd16dc8d812f537549957370fe6636dcf5..7ff484ea5c83976a5ac7089b24a7d014e7f98a8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,57 @@
-Mon Nov 16 11:17:31 1998  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
+1998-11-16  Ulrich Drepper  <drepper@cygnus.com>
+
+       * sysdeps/unix/opendir.c: Use o_directory_works differently.  Treat
+       zero value as uninitialized so that variable can go into .bss.
+
+       * dirent/opendir-tst1.c: Print error strings to stdout.
+
+       * sysdeps/unix/sysv/linux/mmap64.c: New file.  Empty.
+       * sysdeps/unix/sysv/linux/syscalls.list: Add mmap with mmap64 alias.
+       * sysdeps/unix/sysv/linux/arm/mmap.S: Add mmap64 alias.
+       * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise.
+       * sysdeps/unix/sysv/linux/m68k/mmap.S: Likewise.
+
+1998-11-16  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
+
+       * time/tzfile.c (__tzfile_read): Check that types[i].isdst is in
+       range.
+
+1998-11-16  Ulrich Drepper  <drepper@cygnus.com>
+
+       * libio/bits/stdio.h (fread_unlocked): Do handle zero size and number.
+       (fwrite_unlocked): Likewise.
+
+1998-11-16  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
+
+       * libio/bits/stdio.h (fread_unlocked): Don't evaluate non-constant
+       twice.  Don't bother handling zero size.
+       (frwite_unlocked): Likewise.
+
+1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
+
+       * configure.in: Fix regex for makeinfo version string.
+
+1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
+
+       * sunrpc/rpc_sample.c (write_sample_server): Avoid -Wparentheses
+       warning.
+       * sunrpc/rpc_svcout.c (write_program): Likewise.
+
+1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
+
+       * time/Makefile (CFLAGS-test_time.c): Add -Wno-format.
+
+1998-11-16  Ulrich Drepper  <drepper@cygnus.com
+
+       * misc/sys/mman.h: Pretty print prototypes.
+
+1998-11-15  Ulrich Drepper  <drepper@cygnus.com
+
+       * misc/error.c (error): Don't use result of strerror_r call directly
+       since at least DEC Unix has a wrong return type.
+       Patch by Johan Danielsson <joda@pdc.kth.se>.
+
+1998-11-16  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
 
        * sysdeps/unix/sysv/linux/m68k/sysdep.h (INLINE_SYSCALL): Undo
        last change.
index 81d6a32cd37cec1ca2a6b0232c4b3aeba96e357a..c3a8e3a2b17406b88398c25f70f86341df9083c2 100644 (file)
@@ -450,7 +450,7 @@ AC_CHECK_PROG_VER(MSGFMT, msgfmt gmsgfmt, --version,
   [GNU gettext.* \([0-9]*\.[0-9.]*\)],
   [0.[1-9][0-9].* | [1-9].*], MSGFMT=: aux_missing=t)
 AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
-  [GNU texinfo \([0-9][0-9.]*\)],
+  [GNU texinfo.* \([0-9][0-9.]*\)],
   [3.1[1-9] | 3.[2-9][0-9]], MAKEINFO=: aux_missing=t)
 
 if test -n "$critic_missing"; then
index dfab1d9b3ddc272233a4823fbd7b8a0715fab560..4ecd5ae44647e0f192b96598fc35d1d0b9b18ebf 100644 (file)
@@ -41,14 +41,14 @@ real_test (void)
   if (dirp != NULL)
     {
       /* Oh, oh, how can this work?  */
-      fputs ("`opendir' succeeded on a FIFO???\n", stderr);
+      fputs ("`opendir' succeeded on a FIFO???\n", stdout);
       closedir (dirp);
       return 1;
     }
 
   if (errno != ENOTDIR)
     {
-      fprintf (stderr, "`opendir' return error `%s' instead of `%s'\n",
+      fprintf (stdout, "`opendir' return error `%s' instead of `%s'\n",
               strerror (errno), strerror (ENOTDIR));
       return 1;
     }
index a3e3d6fc8d997357ce2824c93463098aa111ffe7..8a15c6e6a6fd22effe9c158092a4264b02325c49 100644 (file)
@@ -127,48 +127,41 @@ ferror_unlocked (FILE *__stream) __THROW
 #if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__
 /* Perform some simple optimizations.  */
 # define fread_unlocked(ptr, size, n, stream) \
-  (__extension__ ((((__builtin_constant_p (size)                             \
-                    && ((size) == 0 || __builtin_constant_p (n)))            \
-                   || (__builtin_constant_p (n) && (n) == 0))                \
-                  && (size_t) ((size) * (n)) <= 8)                           \
+  (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n)    \
+                  && (size_t) ((size) * (n)) <= 8 && (size) != 0)            \
                  ? ({ char *__ptr = (char *) (ptr);                          \
                       FILE *__stream = (stream);                             \
-                      size_t __size = (size);                                \
-                      size_t __n = (n);                                      \
-                      size_t __readres = __n;                                \
-                      size_t __cnt = __size * __n + 1;                       \
-                      while (--__cnt > 0)                                    \
+                      size_t __cnt;                                          \
+                      for (__cnt = (size) * (n); __cnt > 0; --__cnt)         \
                         {                                                    \
                           int __c = _IO_getc_unlocked (__stream);            \
                           if (__c == EOF)                                    \
-                            {                                                \
-                              __readres = (__size * __n - __cnt) / __size;   \
-                              break;                                         \
-                            }                                                \
+                            break;                                           \
                           *__ptr++ = __c;                                    \
                         }                                                    \
-                      __readres; })                                          \
-                 : fread_unlocked (ptr, size, n, stream)))
+                      ((size_t) ((size) * (n)) - __cnt) / (size); })         \
+                 : (((__builtin_constant_p (size) && (size) == 0)            \
+                     || (__builtin_constant_p (n) && (n) == 0))              \
+                       /* Evaluate all parameters once.  */                  \
+                    ? ((void) (ptr), (void) (stream), (void) (size),         \
+                       (void) n, 0)                                          \
+                    : fread_unlocked (ptr, size, n, stream))))
 
 # define fwrite_unlocked(ptr, size, n, stream) \
-  (__extension__ ((((__builtin_constant_p (size)                             \
-                    && ((size) == 0 || __builtin_constant_p (n)))            \
-                   || (__builtin_constant_p (n) && (n) == 0))                \
-                  && (size_t) ((size) * (n)) <= 8)                           \
+  (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n)    \
+                  && (size_t) ((size) * (n)) <= 8 && (size) != 0)            \
                  ? ({ const char *__ptr = (const char *) (ptr);              \
                       FILE *__stream = (stream);                             \
-                      size_t __size = (size);                                \
-                      size_t __n = (n);                                      \
-                      size_t __writeres = __n;                               \
-                      size_t __cnt = __size * __n + 1;                       \
-                      while (--__cnt > 0)                                    \
+                      size_t __cnt;                                          \
+                      for (__cnt = (size) * (n); __cnt > 0; --__cnt)         \
                         if (_IO_putc_unlocked (*__ptr++, __stream) == EOF)   \
-                          {                                                  \
-                            __writeres = (__size * __n - __cnt) / __size;    \
-                            break;                                           \
-                          }                                                  \
-                      __writeres; })                                         \
-                 : fwrite_unlocked (ptr, size, n, stream)))
+                          break;                                             \
+                      ((size_t) ((size) * (n)) - __cnt) / (size); })         \
+                 : (((__builtin_constant_p (size) && (size) == 0)            \
+                     || (__builtin_constant_p (n) && (n) == 0))              \
+                       /* Evaluate all parameters once.  */                  \
+                    ? ((void) (ptr), (void) (stream), (void) (size), n)      \
+                    : fwrite_unlocked (ptr, size, n, stream))))
 #endif
 
 /* Define helper macro.  */
index e09b59957ada9f4486d966c03b6b8e3e47ba7c04..a0790ceb4368e7b0b1c0a4cc2de23b8b859601b9 100644 (file)
@@ -1,3 +1,7 @@
+1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
+
+       * linuxthreads.texi: Fix punctuation after xref.
+
 1998-11-10  H.J. Lu  <hjl@gnu.org>
 
        * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
index dc1b14649af1777d0638613d00820fbc3f72dedd..5bab1a10d94aa406d5850cb1f92cbfc14ae3b8ae 100644 (file)
@@ -47,7 +47,7 @@ latter case is equivalent to calling @code{pthread_exit} with the result
 returned by @var{start_routine} as exit code.
 
 The @var{attr} argument specifies thread attributes to be applied to the
-new thread. @xref{Thread Attributes} for details. The @var{attr}
+new thread. @xref{Thread Attributes}, for details. The @var{attr}
 argument can also be @code{NULL}, in which case default attributes are
 used: the created thread is joinable (not detached) and has an ordinary
 (not realtime) scheduling policy.
index 79bbcfdce7a422b8dd04aa07698cc82070865490..3f78c11d1e5bdea6aa3f37954abce8fea726471d 100644 (file)
@@ -239,7 +239,7 @@ exceptions happened.
 Alternatively, you can enable @dfn{traps} for exceptions.  In that case,
 when an exception is raised, your program will receive the @code{SIGFPE}
 signal.  The default action for this signal is to terminate the
-program.  @xref{Signal Handling} for how you can change the effect of
+program.  @xref{Signal Handling}, for how you can change the effect of
 the signal.
 
 @findex matherr
@@ -851,7 +851,7 @@ sqrt (creal (@var{z}) * creal (@var{z}) + cimag (@var{z}) * cimag (@var{z}))
 This function should always be used instead of the direct formula
 because it takes special care to avoid losing precision.  It may also
 take advantage of hardware support for this operation. See @code{hypot}
-in @xref{Exponents and Logarithms}.
+in @ref{Exponents and Logarithms}.
 @end deftypefun
 
 @node Normalization Functions
index 518b9e2f5a7ca8e2a2eb7cfdd6b9b5a121f5f268..a473560bf5c9bdc9f90a9e870e907b769acfaa0a 100644 (file)
@@ -3,10 +3,9 @@
 @chapter File System Interface
 
 This chapter describes the GNU C library's functions for manipulating
-files.  Unlike the input and output functions described in
-@ref{I/O on Streams} and @ref{Low-Level I/O}, these
-functions are concerned with operating on the files themselves, rather
-than on their contents.
+files.  Unlike the input and output functions (@pxref{I/O on Streams};
+@pxref{Low-Level I/O}), these functions are concerned with operating
+on the files themselves, rather than on their contents.
 
 Among the facilities described in this chapter are functions for
 examining or modifying directories, functions for renaming and deleting
@@ -396,7 +395,7 @@ the current working directory:
 The order in which files appear in a directory tends to be fairly
 random.  A more useful program would sort the entries (perhaps by
 alphabetizing them) before printing them; see
-@ref{Scanning Directory Content} and @ref{Array Sort Function}.
+@ref{Scanning Directory Content}, and @ref{Array Sort Function}.
 
 
 @node Random Access Directory
index ff80e164a0810cf37b5f87a18970ddcf5393bd7c..6e90bfd305a3665a49173396457223ef4691b1d4 100644 (file)
@@ -528,7 +528,7 @@ old-fashioned variadic facility is called @file{varargs.h}.
 
 Using @file{varargs.h} is almost the same as using @file{stdarg.h}.
 There is no difference in how you call a variadic function;
-@xref{Calling Variadics}.  The only difference is in how you define
+see @ref{Calling Variadics}.  The only difference is in how you define
 them.  First of all, you must use old-style non-prototype syntax, like
 this:
 
@@ -572,7 +572,7 @@ function.
 @end deftypefn
 
 The other argument macros, @code{va_arg} and @code{va_end}, are the same
-in @file{varargs.h} as in @file{stdarg.h}; see @ref{Argument Macros} for
+in @file{varargs.h} as in @file{stdarg.h}; see @ref{Argument Macros}, for
 details.
 
 It does not work to include both @file{varargs.h} and @file{stdarg.h} in
index cf3e1a7c895cb625ce8bc3a2cab1de205ee48828..eb78153af5549492165cca3dc58a1144f6de438f 100644 (file)
@@ -3625,4 +3625,4 @@ unknown device.
 
 Most IOCTLs are OS-specific and/or only used in special system utilities,
 and are thus beyond the scope of this document.  For an example of the use
-of an IOCTL, @xref{Out-of-Band Data}.
+of an IOCTL, see @ref{Out-of-Band Data}.
index b4b7f4b24f54a7e44465cc8d97a2cd204277242d..8b6f3fc2350b9b54aaf74784cabf84d4300c5a7a 100644 (file)
@@ -140,7 +140,7 @@ and @code{strxfrm}); see @ref{Collation Functions}.
 @item LC_CTYPE
 This category applies to classification and conversion of characters,
 and to multibyte and wide characters;
-see @ref{Character Handling} and @ref{Extended Characters}.
+see @ref{Character Handling}, and @ref{Extended Characters}.
 
 @comment locale.h
 @comment ISO
@@ -163,8 +163,8 @@ This category applies to formatting date and time values; see
 @comment XOPEN
 @item LC_MESSAGES
 This category applies to selecting the language used in the user
-interface for message translation (@ref{The Uniforum approach} and
-@ref{Message catalogs a la X/Open}).
+interface for message translation (@pxref{The Uniforum approach};
+@pxref{Message catalogs a la X/Open}).
 
 @comment locale.h
 @comment ISO
index 563cd9c265785d9d15909480866dc24bb090ae2a..d55a4d4fc34414a7f4bec06594bd7e6e539b5265 100644 (file)
@@ -896,7 +896,7 @@ Allocate a block of @var{size} bytes, starting on an address that is a
 multiple of @var{boundary}.  @xref{Aligned Memory Blocks}.
 
 @item int mallopt (int @var{param}, int @var{value})
-Adjust a tunable parameter.  @xref{Malloc Tunable Parameters}
+Adjust a tunable parameter.  @xref{Malloc Tunable Parameters}.
 
 @item int mcheck (void (*@var{abortfn}) (void))
 Tell @code{malloc} to perform occasional consistency checks on
index c0ab28161c009965d3cc833887fa720dcd5d1b2d..bfc7d282d37227993c6418bed87c6a48bd8482fc 100644 (file)
@@ -279,8 +279,8 @@ functions if no supporting functionality is available.  Since each
 set/message number tuple must be unique the programmer must keep lists
 of the messages at the same time the code is written.  And the work
 between several people working on the same project must be coordinated.
-In @ref{Common Usage} we will see some how these problems can be relaxed
-a bit.
+We will see some how these problems can be relaxed a bit (@pxref{Common
+Usage}).
 
 @deftypefun int catclose (nl_catd @var{catalog_desc})
 The @code{catclose} function can be used to free the resources
@@ -817,8 +817,8 @@ be used.
 
 Please note that above we wrote ``message catalogs'' (plural).  This is
 a speciality of the GNU implementation of these functions and we will
-say more about this in section @xref{Locating gettext catalog} when we
-talk about the ways message catalogs are selected.
+say more about this when we talk about the ways message catalogs are
+selected (@pxref{Locating gettext catalog}).
 
 The @code{gettext} function does not modify the value of the global
 @var{errno} variable.  This is necessary to make it possible to write
index ad0fe68db20e292f986860aa669378d2c039276e..e06671d99995d1dc43ea934b7af2cd48bff6ca45 100644 (file)
@@ -393,7 +393,7 @@ Instead of the using the using the normal functions for accessing the
 filesystem the @code{glob} implementation uses the user-supplied
 functions specified in the structure pointed to by @var{pglob}
 parameter.  For more information about the functions refer to the
-sections about directory handling @ref{Accessing Directories} and
+sections about directory handling see @ref{Accessing Directories}, and
 @ref{Reading Attributes}.
 
 @comment glob.h
index ae6d5ef4092ec227b8c554a108cac931d63c28eb..0bcbc9b4d3b90d1c6d9e4837e6f2f992abeb41c1 100644 (file)
@@ -429,7 +429,7 @@ extended or searched.
 The @code{tsearch} function searches in the tree pointed to by
 @code{*@var{rootp}} for an element matching @var{key}.  The function
 pointed to by @var{compar} is used to determine whether two elements
-match.  @xref{Comparison Functions} for a specification of the functions
+match.  @xref{Comparison Functions}, for a specification of the functions
 which can be used for the @var{compar} parameter.
 
 If the tree does not contain a matching entry the @var{key} value will
index 2961c4f6ada0aecf0cb3b6a851d54bef9f8233b9..f07a748b959c4081cc3020558f77e0e4913158fc 100644 (file)
@@ -978,7 +978,7 @@ the signal @var{signum}.
 The first argument, @var{signum}, identifies the signal whose behavior
 you want to control, and should be a signal number.  The proper way to
 specify a signal number is with one of the symbolic signal names
-described in @ref{Standard Signals}---don't use an explicit number, because
+(@pxref{Standard Signals})---don't use an explicit number, because
 the numerical code for a given kind of signal may vary from operating
 system to operating system.
 
index bea6c3967600dda11e4f192adfffffdedf30b6e2..1d903b49d7c1fb7e1ead40849c3a4ab33fd0db18 100644 (file)
@@ -103,7 +103,7 @@ the options do not take arguments.  Thus, @samp{-abc} is equivalent to
 
 @item
 Option names are single alphanumeric characters (as for @code{isalnum};
-see @ref{Classification of Characters}).
+@pxref{Classification of Characters}).
 
 @item
 Certain options require an argument.  For example, the @samp{-o} command
@@ -376,8 +376,8 @@ value is nonzero.
 
 You can deal directly with the underlying representation of environment
 objects to add more variables to the environment (for example, to
-communicate with another program you are about to execute; see
-@ref{Executing a File}).
+communicate with another program you are about to execute;
+@pxref{Executing a File}).
 
 @comment unistd.h
 @comment POSIX.1
@@ -784,7 +784,7 @@ following things happen:
 @item
 All open file descriptors in the process are closed.  @xref{Low-Level I/O}.
 Note that streams are not flushed automatically when the process
-terminates; @xref{I/O on Streams}.
+terminates; see @ref{I/O on Streams}.
 
 @item
 The low-order 8 bits of the return status code are saved to be reported
index 531717c81ff16fd9fcd5c0dd501c950175ff6769..99a711668050b4743e7a8423e1782b1aaeeab23e 100644 (file)
@@ -3749,7 +3749,7 @@ buffer (for this, try @code{open_memstream}, below).  The buffer is
 freed when the stream is open.
 
 The argument @var{opentype} is the same as in @code{fopen}
-(@xref{Opening Streams}).  If the @var{opentype} specifies
+(@pxref{Opening Streams}).  If the @var{opentype} specifies
 append mode, then the initial file position is set to the first null
 character in the buffer.  Otherwise the initial file position is at the
 beginning of the buffer.
@@ -4342,8 +4342,8 @@ We see the different fields of the message and how the extra glue (the
 colons and the @code{TO FIX} string) are printed.  But only one of the
 three calls to @code{fmtmsg} produced output.  The first call does not
 print anything because the @var{label} parameter is not in the correct
-form.  As specified in @ref{Printing Formatted Messages} the string must
-contain two fields, separated by a colon.  The third @code{fmtmsg} call
+form.  The string must contain two fields, separated by a colon
+(@pxref{Printing Formatted Messages}).  The third @code{fmtmsg} call
 produced no output since the class with the numeric value @code{6} is
 not defined.  Although a class with numeric value @code{5} is also not
 defined by default, the call the @code{addseverity} introduces it and
index 09c3a9fd2e4c256143ffacc1442b6851feae9a4c..10ee147b3a1d8d05f7294168dde377de7dfa18d9 100644 (file)
@@ -675,7 +675,7 @@ does so.  @xref{Time Zone Functions}.
 @deftypefun {char *} ctime_r (const time_t *@var{time}, char *@var{buffer})
 This function is similar to @code{ctime}, only that it places the result
 in the string pointed to by @var{buffer}.  It is equivalent to (written
-using gcc extensions, @xref{Statement Exprs,,,gcc,Porting and Using gcc}.):
+using gcc extensions, @pxref{Statement Exprs,,,gcc,Porting and Using gcc}):
 
 @smallexample
 (@{ struct tm tm; asctime_r (localtime_r (time, &tm), buf); @})
index 28d390c1261d01d9ab25bd534e7877f2b56c9f80..e1c04302799f403a39289ec9c8d32606f17f2298 100644 (file)
@@ -778,7 +778,7 @@ store a user name.
 
 These functions let your program identify positively the user who is
 running or the user who logged in this session.  (These can differ when
-setuid programs are involved; @xref{Process Persona}.)  The user cannot
+setuid programs are involved; see @ref{Process Persona}.)  The user cannot
 do anything to fool these functions.
 
 For most purposes, it is more useful to use the environment variable
@@ -1843,10 +1843,10 @@ The members of this group are:
 @subsection Netgroup Data
 
 @cindex Netgroup
-Sometimes it is useful group users according to other criteria like the
-ones used in the @xref{Group Database}.  E.g., it is useful to associate
-a certain group of users with a certain machine.  On the other hand
-grouping of host names is not supported so far.
+Sometimes it is useful to group users according to other criteria
+(@pxref{Group Database}).  E.g., it is useful to associate a certain
+group of users with a certain machine.  On the other hand grouping of
+host names is not supported so far.
 
 In Sun Microsystems SunOS appeared a new kind of database, the netgroup
 database.  It allows to group hosts, users, and domain freely, giving
index ca7f3b47b8896d296a889058f43fc38e80002ef3..2af2cc5b90e4ad735711fc24c546df4ce3055f2d 100644 (file)
@@ -157,7 +157,10 @@ error (status, errnum, message, va_alist)
     {
 #if defined HAVE_STRERROR_R || defined _LIBC
       char errbuf[1024];
-      fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
+      /* Don't use __strerror_r's return value because on some systems
+        (at least DEC UNIX 4.0[A-D]) strerror_r returns `int'.  */
+      __strerror_r (errnum, errbuf, sizeof errbuf);
+      fprintf (stderr, ": %s", errbuf);
 #else
       fprintf (stderr, ": %s", strerror (errnum));
 #endif
index 44d0d263402e569183da4a773191fe94bd6b14cf..92b4bf85a068a14debb7ffcb474ede551ead1e94 100644 (file)
@@ -42,15 +42,15 @@ __BEGIN_DECLS
 
 #ifndef __USE_FILE_OFFSET64
 extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
-                       int __flags, int __fd, __off_t __offset));
+                         int __flags, int __fd, __off_t __offset));
 #else
 extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
-                       int __flags, int __fd, __off_t __offset))
+                         int __flags, int __fd, __off_t __offset))
      __asm__ ("mmap64");
 #endif
 #ifdef __USE_LARGEFILE64
 extern __ptr_t mmap64 __P ((__ptr_t __addr, size_t __len, int __prot,
-                         int __flags, int __fd, __off64_t __offset));
+                           int __flags, int __fd, __off64_t __offset));
 #endif
 
 /* Deallocate any mapping for the region starting at ADDR and extending LEN
@@ -94,7 +94,7 @@ extern int munlockall __P ((void));
    NEW_LEN.  If MAY_MOVE is MREMAP_MAYMOVE the returned address may
    differ from ADDR.  */
 extern __ptr_t mremap __P ((__ptr_t __addr, size_t __old_len,
-                         size_t __new_len, int __may_move));
+                           size_t __new_len, int __may_move));
 #endif
 
 __END_DECLS
index 959f0a178065ce8146fd4a5544ff624d4d7d85b3..79214a6a8323472e8598f53fd3f781da5438fa87 100644 (file)
@@ -252,10 +252,12 @@ write_sample_server (definition * def)
          fprintf (fout, "\n\t/*\n\t * insert server code here\n\t */\n\n");
 
          if (!mtflag)
-           if(!streq(proc->res_type, "void"))
-             f_print(fout, "\treturn &result;\n}\n");
-           else /* cast back to void * */
-             f_print(fout, "\treturn (void *) &result;\n}\n");
+           {
+             if (!streq(proc->res_type, "void"))
+               f_print(fout, "\treturn &result;\n}\n");
+             else /* cast back to void * */
+               f_print(fout, "\treturn (void *) &result;\n}\n");
+           }
          else
            f_print(fout, "\treturn retval;\n}\n");
        }
index 9b5f1dd0f56625ddd9e4dea53d3082b347395f17..2869d3d844c5c07be0d26ddb69859d713e85b4a0 100644 (file)
@@ -602,12 +602,14 @@ write_program (const definition * def, const char *storage)
       f_print (fout, "\t}\n");
 
       if (!mtflag)
-       if (Cflag)
-         f_print (fout, "\t%s = (*%s)((char *)&%s, %s);\n",
-                  RESULT, ROUTINE, ARG, RQSTP);
-       else
-         f_print (fout, "\t%s = (*%s)(&%s, %s);\n",
-                  RESULT, ROUTINE, ARG, RQSTP);
+       {
+         if (Cflag)
+           f_print (fout, "\t%s = (*%s)((char *)&%s, %s);\n",
+                    RESULT, ROUTINE, ARG, RQSTP);
+         else
+           f_print (fout, "\t%s = (*%s)(&%s, %s);\n",
+                    RESULT, ROUTINE, ARG, RQSTP);
+       }
       else
        if (Cflag)
          f_print(fout, "\t%s = (bool_t) (*%s)((char *)&%s, (void *)&%s, %s);\n",
index 3cbd6628a3dbf7eba20a99229543b5da8d9ce909..20b7b4ef98e319449b0ab873978d57552989f227 100644 (file)
 
 #include <dirstream.h>
 
-/* opendir() must not accidentally open something other than a directory. 
-   Some OS's have kernel support for that, some don't.  In the worst 
-   case we have to stat() before the open() AND fstat() after. 
-   We have to test at runtime for kernel support since libc may have 
-   been compiled with different headers to the kernel it's running on. 
-   This test can't be done reliably in the general case.  We'll use 
-   /dev/null, which if it's not a device lots of stuff will break, as 
-   a guinea pig.  It may be missing in chroot environments, so we 
-   make sure to fail safe. */ 
+/* opendir() must not accidentally open something other than a directory.
+   Some OS's have kernel support for that, some don't.  In the worst
+   case we have to stat() before the open() AND fstat() after.
+
+   We have to test at runtime for kernel support since libc may have
+   been compiled with different headers to the kernel it's running on.
+   This test can't be done reliably in the general case.  We'll use
+   /dev/null, which if it's not a device lots of stuff will break, as
+   a guinea pig.  It may be missing in chroot environments, so we
+   make sure to fail safe. */
 #ifdef O_DIRECTORY
-static int o_directory_works = -1; 
+static int o_directory_works;
 
 static void
-tryopen_o_directory (void) 
-{ 
-  int serrno = errno; 
-  int x = __open ("/dev/null", O_RDONLY|O_NDELAY|O_DIRECTORY); 
-  if (x >= 0) 
-    { 
-      __close (x); 
-      o_directory_works = 0; 
-    } 
-  else if (errno != ENOTDIR) 
-    o_directory_works = 0; 
-  else 
-    o_directory_works = 1; 
-  __set_errno (serrno); 
-} 
+tryopen_o_directory (void)
+{
+  int serrno = errno;
+  int x = __open ("/dev/null", O_RDONLY|O_NDELAY|O_DIRECTORY);
+
+  if (x >= 0)
+    {
+      __close (x);
+      o_directory_works = -1;
+    }
+  else if (errno != ENOTDIR)
+    o_directory_works = -1;
+  else
+    o_directory_works = 1;
+
+  __set_errno (serrno);
+}
 # define EXTRA_FLAGS O_DIRECTORY
 #else
 # define EXTRA_FLAGS 0
@@ -86,11 +86,11 @@ __opendir (const char *name)
 
 #ifdef O_DIRECTORY
   /* Test whether O_DIRECTORY works.  */
-  if (o_directory_works == -1)
+  if (o_directory_works == 0)
     tryopen_o_directory ();
 
   /* We can skip the expensive `stat' call if O_DIRECTORY works.  */
-  if (o_directory_works == 0)
+  if (o_directory_works < 0)
 #endif
     {
       /* We first have to check whether the name is for a directory.  We
index 905303e8e3a553d912d551cb3002efcd4887d594..f9a773fc6892614866a5b1d6489f97b405d362fc 100644 (file)
@@ -37,3 +37,4 @@ ENTRY (__mmap)
 PSEUDO_END (__mmap)
 
 weak_alias (__mmap, mmap)
+weak_alias (__mmap, mmap64)
index e0dde22a9fb61fac13ac7a6275dcb4286e0d3fb5..a9929c8be1a639b0a65db4462183171e5d1020a2 100644 (file)
@@ -46,3 +46,4 @@ L(pseudo_end):
 PSEUDO_END (__mmap)
 
 weak_alias (__mmap, mmap)
+weak_alias (__mmap, mmap64)
index 94578311b3c0d00692366aa7e3dfbd697fc442e5..c7015ae8b06fa59b216b360cc454731b8388766f 100644 (file)
@@ -41,3 +41,4 @@ ENTRY (__mmap)
 PSEUDO_END (__mmap)
 
 weak_alias (__mmap, mmap)
+weak_alias (__mmap, mmap64)
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c
new file mode 100644 (file)
index 0000000..fc7e416
--- /dev/null
@@ -0,0 +1,3 @@
+/* At least for now mmap64 is the same as mmap on all platforms.
+   When/If the 32 bit platforms get a >32 bit VFS we'll have to
+   change it for these platforms.  */
index a2ea5b8d99783212cfcd7d92bea5557efbead7a1..ccec06a861cef3d5b50915468e9ccfe563d3e356 100644 (file)
@@ -24,6 +24,7 @@ klogctl               EXTRA   syslog          3       klogctl
 lchown         -       lchown          3       __lchown        lchown
 mlock          EXTRA   mlock           2       __mlock mlock
 mlockall       EXTRA   mlockall        1       __mlockall      mlockall
+mmap           -       mmap            6       __mmap          mmap mmap64
 mount          EXTRA   mount           5       __mount mount
 mremap         EXTRA   mremap          4       __mremap        mremap
 munlock                EXTRA   munlock         2       __munlock       munlock
index 7620d622a1a09d6106613b24d259fbaba5b03e5c..80aff61e991868f912dc84c43b9f653afe084682 100644 (file)
@@ -40,3 +40,6 @@ tz-cflags = -DTZDIR='"$(zonedir)"' \
 
 CFLAGS-tzfile.c = $(tz-cflags)
 CFLAGS-tzset.c = $(tz-cflags)
+
+# Don't warn about Y2k problem in strftime format string.
+CFLAGS-test_time.c = -Wno-format
index 1bce14c3f0a853d9b4aa80658ab6d0baf2efef46..2a1a953962e0b9d756be9f7db9114c9cfc458f28 100644 (file)
@@ -230,6 +230,8 @@ __tzfile_read (const char *file)
          || fread_unlocked (&types[i].isdst, 1, 1, f) != 1
          || fread_unlocked (&types[i].idx, 1, 1, f) != 1)
        goto lose;
+      if (types[i].isdst > 1)
+       goto lose;
       if (types[i].idx >= chars) /* Bogus index in data file.  */
        goto lose;
       types[i].offset = (long int) decode (x);