aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-11-16 12:02:08 +0000
committerUlrich Drepper <drepper@redhat.com>1998-11-16 12:02:08 +0000
commit8b7fb5883bf50ab866f785b9cb36c8167f7a3286 (patch)
tree4f4b8ccad0fec4529b7876a9a5c646f9b28691d1
parentbe1d9d95b122ee20f8217e9263e088dec652543a (diff)
downloadglibc-8b7fb5883bf50ab866f785b9cb36c8167f7a3286.zip
glibc-8b7fb5883bf50ab866f785b9cb36c8167f7a3286.tar.gz
glibc-8b7fb5883bf50ab866f785b9cb36c8167f7a3286.tar.bz2
Update.
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>
-rw-r--r--ChangeLog55
-rw-r--r--configure.in2
-rw-r--r--dirent/opendir-tst1.c4
-rw-r--r--libio/bits/stdio.h53
-rw-r--r--linuxthreads/ChangeLog4
-rw-r--r--linuxthreads/linuxthreads.texi2
-rw-r--r--manual/arith.texi4
-rw-r--r--manual/filesys.texi9
-rw-r--r--manual/lang.texi4
-rw-r--r--manual/llio.texi2
-rw-r--r--manual/locale.texi6
-rw-r--r--manual/memory.texi2
-rw-r--r--manual/message.texi8
-rw-r--r--manual/pattern.texi2
-rw-r--r--manual/search.texi2
-rw-r--r--manual/signal.texi2
-rw-r--r--manual/startup.texi8
-rw-r--r--manual/stdio.texi6
-rw-r--r--manual/time.texi2
-rw-r--r--manual/users.texi10
-rw-r--r--misc/error.c5
-rw-r--r--misc/sys/mman.h8
-rw-r--r--sunrpc/rpc_sample.c10
-rw-r--r--sunrpc/rpc_svcout.c14
-rw-r--r--sysdeps/unix/opendir.c60
-rw-r--r--sysdeps/unix/sysv/linux/arm/mmap.S1
-rw-r--r--sysdeps/unix/sysv/linux/i386/mmap.S1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/mmap.S1
-rw-r--r--sysdeps/unix/sysv/linux/mmap64.c3
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list1
-rw-r--r--time/Makefile3
-rw-r--r--time/tzfile.c2
32 files changed, 182 insertions, 114 deletions
diff --git a/ChangeLog b/ChangeLog
index 4a2669d..7ff484e 100644
--- 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.
diff --git a/configure.in b/configure.in
index 81d6a32..c3a8e3a 100644
--- a/configure.in
+++ b/configure.in
@@ -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
diff --git a/dirent/opendir-tst1.c b/dirent/opendir-tst1.c
index dfab1d9..4ecd5ae 100644
--- a/dirent/opendir-tst1.c
+++ b/dirent/opendir-tst1.c
@@ -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;
}
diff --git a/libio/bits/stdio.h b/libio/bits/stdio.h
index a3e3d6f..8a15c6e 100644
--- a/libio/bits/stdio.h
+++ b/libio/bits/stdio.h
@@ -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. */
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index e09b599..a0790ce 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -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
diff --git a/linuxthreads/linuxthreads.texi b/linuxthreads/linuxthreads.texi
index dc1b146..5bab1a1 100644
--- a/linuxthreads/linuxthreads.texi
+++ b/linuxthreads/linuxthreads.texi
@@ -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.
diff --git a/manual/arith.texi b/manual/arith.texi
index 79bbcfd..3f78c11 100644
--- a/manual/arith.texi
+++ b/manual/arith.texi
@@ -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
diff --git a/manual/filesys.texi b/manual/filesys.texi
index 518b9e2..a473560 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -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
diff --git a/manual/lang.texi b/manual/lang.texi
index ff80e16..6e90bfd 100644
--- a/manual/lang.texi
+++ b/manual/lang.texi
@@ -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
diff --git a/manual/llio.texi b/manual/llio.texi
index cf3e1a7..eb78153 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -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}.
diff --git a/manual/locale.texi b/manual/locale.texi
index b4b7f4b..8b6f3fc 100644
--- a/manual/locale.texi
+++ b/manual/locale.texi
@@ -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
diff --git a/manual/memory.texi b/manual/memory.texi
index 563cd9c..d55a4d4 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -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
diff --git a/manual/message.texi b/manual/message.texi
index c0ab281..bfc7d28 100644
--- a/manual/message.texi
+++ b/manual/message.texi
@@ -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
diff --git a/manual/pattern.texi b/manual/pattern.texi
index ad0fe68..e06671d 100644
--- a/manual/pattern.texi
+++ b/manual/pattern.texi
@@ -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
diff --git a/manual/search.texi b/manual/search.texi
index ae6d5ef..0bcbc9b 100644
--- a/manual/search.texi
+++ b/manual/search.texi
@@ -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
diff --git a/manual/signal.texi b/manual/signal.texi
index 2961c4f..f07a748 100644
--- a/manual/signal.texi
+++ b/manual/signal.texi
@@ -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.
diff --git a/manual/startup.texi b/manual/startup.texi
index bea6c39..1d903b4 100644
--- a/manual/startup.texi
+++ b/manual/startup.texi
@@ -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
diff --git a/manual/stdio.texi b/manual/stdio.texi
index 531717c..99a7116 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -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
diff --git a/manual/time.texi b/manual/time.texi
index 09c3a9f..10ee147 100644
--- a/manual/time.texi
+++ b/manual/time.texi
@@ -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); @})
diff --git a/manual/users.texi b/manual/users.texi
index 28d390c..e1c0430 100644
--- a/manual/users.texi
+++ b/manual/users.texi
@@ -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
diff --git a/misc/error.c b/misc/error.c
index ca7f3b4..2af2cc5 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -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
diff --git a/misc/sys/mman.h b/misc/sys/mman.h
index 44d0d26..92b4bf8 100644
--- a/misc/sys/mman.h
+++ b/misc/sys/mman.h
@@ -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
diff --git a/sunrpc/rpc_sample.c b/sunrpc/rpc_sample.c
index 959f0a1..79214a6 100644
--- a/sunrpc/rpc_sample.c
+++ b/sunrpc/rpc_sample.c
@@ -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");
}
diff --git a/sunrpc/rpc_svcout.c b/sunrpc/rpc_svcout.c
index 9b5f1dd..2869d3d 100644
--- a/sunrpc/rpc_svcout.c
+++ b/sunrpc/rpc_svcout.c
@@ -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",
diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c
index 3cbd662..20b7b4e 100644
--- a/sysdeps/unix/opendir.c
+++ b/sysdeps/unix/opendir.c
@@ -29,37 +29,37 @@
#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
diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S
index 905303e..f9a773f 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap.S
@@ -37,3 +37,4 @@ ENTRY (__mmap)
PSEUDO_END (__mmap)
weak_alias (__mmap, mmap)
+weak_alias (__mmap, mmap64)
diff --git a/sysdeps/unix/sysv/linux/i386/mmap.S b/sysdeps/unix/sysv/linux/i386/mmap.S
index e0dde22..a9929c8 100644
--- a/sysdeps/unix/sysv/linux/i386/mmap.S
+++ b/sysdeps/unix/sysv/linux/i386/mmap.S
@@ -46,3 +46,4 @@ L(pseudo_end):
PSEUDO_END (__mmap)
weak_alias (__mmap, mmap)
+weak_alias (__mmap, mmap64)
diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S
index 9457831..c7015ae 100644
--- a/sysdeps/unix/sysv/linux/m68k/mmap.S
+++ b/sysdeps/unix/sysv/linux/m68k/mmap.S
@@ -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
index 0000000..fc7e416
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mmap64.c
@@ -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. */
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index a2ea5b8..ccec06a 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -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
diff --git a/time/Makefile b/time/Makefile
index 7620d62..80aff61 100644
--- a/time/Makefile
+++ b/time/Makefile
@@ -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
diff --git a/time/tzfile.c b/time/tzfile.c
index 1bce14c..2a1a953 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -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);