aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog78
-rw-r--r--manual/arith.texi14
-rw-r--r--manual/conf.texi4
-rw-r--r--manual/errno.texi2
-rw-r--r--manual/filesys.texi22
-rw-r--r--manual/getopt.texi2
-rw-r--r--manual/llio.texi30
-rw-r--r--manual/math.texi8
-rw-r--r--manual/resource.texi14
-rw-r--r--manual/search.texi2
-rw-r--r--manual/signal.texi4
-rw-r--r--manual/socket.texi22
-rw-r--r--manual/startup.texi2
-rw-r--r--manual/stdio.texi4
-rw-r--r--manual/string.texi14
-rw-r--r--manual/sysinfo.texi8
-rw-r--r--manual/syslog.texi4
-rw-r--r--manual/terminal.texi8
-rw-r--r--manual/time.texi4
-rw-r--r--manual/users.texi6
20 files changed, 164 insertions, 88 deletions
diff --git a/ChangeLog b/ChangeLog
index 449755fb15..e6a7fdf491 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,81 @@
+2013-02-11 Roland McGrath <roland@hack.frob.com>
+
+ * manual/conf.texi (General Limits): Fix SSIZE_MAX type to ssize_t.
+ * manual/errno.texi (Error Messages): Fix typo in error_print_progname
+ declaration.
+ * manual/search.texi (Array Search Function): Add missing const in
+ lfind prototype.
+ * manual/resource.texi (Limits on Resources): Fix RLIM_INFINITY
+ declaration to use rlim_t.
+ (Basic Scheduling Functions): Remove erroneous const from
+ sched_getparam prototype. Remove erroneous * from
+ sched_get_priority_max and sched_get_priority_min prototypes.
+ (Resource Usage): Fix summary @comment on vtimes to refer to
+ sys/vtimes.h rather than vtimes.h.
+ Add missing *s in vtimes prototype.
+ (Limits on Resources): Fix ulimit prototype to return long int.
+ * manual/math.texi (SVID Random): Fix lrand48_r and mrand48_r
+ prototypes to use long int rather than double.
+ (BSD Random): Fix initstate and setstate to use char *, not void *.
+ * manual/llio.texi (Asynchronous Reads/Writes): Fix lio_listio64
+ prototype to make second argument 'struct aiocb64 *const[]'.
+ Fix aio_read64 and aio_write64 prototypes to use struct aiocb64.
+ (Status of AIO Operations): Remove erroneous const in aio_return and
+ aio_return64 prototypes.
+ (Synchronizing I/O): Fix sync prototype to return void.
+ * manual/startup.texi (Suboptions): Remove an erroneous const in
+ getsubopt prototype.
+ * manual/getopt.texi (Using Getopt): Add a const in getopt prototype.
+ * manual/users.texi (Lookup Netgroup): Fix getnetgrent_r prototype to
+ use size_t rather than int.
+ (Scanning All Users): Likewise for getpwent_r.
+ (Setting Groups): Add missing const to setgroups prototype.
+ * manual/sysinfo.texi (mtab): Fix typo in getmntent_r prototype.
+ * manual/socket.texi (Host Names): Fix gethostbyaddr and
+ gethostbyaddr_r prototypes to use socklen_t rather than size_t and
+ 'const void *' rather than 'const char *'.
+ (Host Address Functions): Likewise for inet_ntop.
+ (Networks Database): Fix getnetbyaddr prototype to use uint32_t.
+ (Receiving Data): Fix recv, recvfrom, recvmsg prototypes to use
+ ssize_t for return value.
+ (Sending Data): Likewise for send, sendto, sendmsg.
+ (Socket Option Functions): Add a missing const in setsockopt prototype.
+ * manual/stdio.texi (Simple Output): Fix fputwc_unlocked prototype to
+ use wchar_t for the argument.
+ (Formatted Input Functions): Fix swscanf prototype to use wchar_t *.
+ * manual/arith.texi (Control Functions): Fix fegetexcept prototype to
+ take no arguments.
+ (Normalization Functions): Fix scalb, scalbf, scalbl prototypes to use
+ double/float/long double for second argument.
+ Fix return types of significand, significandf, significandl.
+ * manual/filesys.texi (Setting Permissions): Use mode_t for second
+ argument in fchmod prototype.
+ (File Owner): Use uid_t and gid_t in fchown prototype.
+ (File Times): Add const to utimes, futimes, and lutimes prototypes.
+ (Making Special Files): Use mode_t and dev_t in mknod prototype.
+ (Scanning Directory Content): Fix scandir and scandir64 prototypes to
+ use 'const struct dirent **' as argument types to CMP function pointer
+ argument.
+ (Symbolic Links): Fix readlink prototype with ssize_t as return value.
+ (File Times): Fix summary magic @comment for struct utimbuf and utime
+ to refer to utime.h, not time.h.
+ * manual/string.texi (Argz Functions): Add missing const in
+ argz_extract and argz_next prototypes.
+ (Finding Tokens in a String): Likewise for basename.
+ (String/Array Comparison): Fix typo in wcscasecmp prototype.
+ (Copying and Concatenation): Fix typo in wmemmove prototype.
+ * manual/signal.texi (Using Pause): Use (void) in pause prototype.
+ (Signal Stack): Remove erroneous const in sigstack prototype.
+ * manual/time.texi (Setting an Alarm): Add missing const in setitimer
+ prototype.
+ (Simple Calendar Time): Likewise for stime.
+ * manual/terminal.texi (BSD Terminal Modes): Add missing const in stty
+ prototype.
+ * manual/sysinfo.texi (System Parameters): Fix mentions of sysctl.h to
+ say sys/sysctl.h instead.
+ * manual/syslog.texi (syslog; vsyslog): Add missing const in syslog
+ and vsyslog prototypes.
+
2013-02-11 Tom de Vries <tom@codesourcery.com>
* string/Makefile (CFLAGS-bug-strstr1.c, CFLAGS-bug-strcasestr1.c):
diff --git a/manual/arith.texi b/manual/arith.texi
index f387c8f1ad..faf25cc42a 100644
--- a/manual/arith.texi
+++ b/manual/arith.texi
@@ -1086,7 +1086,7 @@ operation was successful, @code{-1} otherwise.
@comment fenv.h
@comment GNU
-@deftypefun int fegetexcept (int @var{excepts})
+@deftypefun int fegetexcept (void)
The function returns a bitmask of all currently enabled exceptions. It
returns @code{-1} in case of failure.
@end deftypefun
@@ -1248,13 +1248,13 @@ equivalent to those of @code{ldexp} and @code{frexp}. See also the
@comment math.h
@comment BSD
-@deftypefun double scalb (double @var{value}, int @var{exponent})
+@deftypefun double scalb (double @var{value}, double @var{exponent})
@comment math.h
@comment BSD
-@deftypefunx float scalbf (float @var{value}, int @var{exponent})
+@deftypefunx float scalbf (float @var{value}, float @var{exponent})
@comment math.h
@comment BSD
-@deftypefunx {long double} scalbl (long double @var{value}, int @var{exponent})
+@deftypefunx {long double} scalbl (long double @var{value}, long double @var{exponent})
The @code{scalb} function is the BSD name for @code{ldexp}.
@end deftypefun
@@ -1286,13 +1286,13 @@ The @code{scalb} function is the BSD name for @code{ldexp}.
@comment math.h
@comment BSD
-@deftypefun {long long int} significand (double @var{x})
+@deftypefun double significand (double @var{x})
@comment math.h
@comment BSD
-@deftypefunx {long long int} significandf (float @var{x})
+@deftypefunx float significandf (float @var{x})
@comment math.h
@comment BSD
-@deftypefunx {long long int} significandl (long double @var{x})
+@deftypefunx {long double} significandl (long double @var{x})
@code{significand} returns the mantissa of @var{x} scaled to the range
@math{[1, 2)}.
It is equivalent to @w{@code{scalb (@var{x}, (double) -ilogb (@var{x}))}}.
diff --git a/manual/conf.texi b/manual/conf.texi
index 55ca4d10cd..7eb8b3625a 100644
--- a/manual/conf.texi
+++ b/manual/conf.texi
@@ -114,7 +114,7 @@ more (@pxref{Sysconf}).
@comment limits.h
@comment POSIX.1
-@deftypevr Macro int SSIZE_MAX
+@deftypevr Macro ssize_t SSIZE_MAX
The largest value that can fit in an object of type @code{ssize_t}.
Effectively, this is the limit on the number of bytes that can be read
or written in a single operation.
@@ -1121,7 +1121,7 @@ Each parameter also has another macro, with a name starting with
have on @emph{any} POSIX system. @xref{File Minimums}.
@cindex limits, link count of files
-@comment limits.h
+@comment limits.h (optional)
@comment POSIX.1
@deftypevr Macro int LINK_MAX
The uniform system limit (if any) for the number of names for a given
diff --git a/manual/errno.texi b/manual/errno.texi
index fa88b1e8a1..2a3c004b2a 100644
--- a/manual/errno.texi
+++ b/manual/errno.texi
@@ -1507,7 +1507,7 @@ can be customized by defining a variable named
@comment error.h
@comment GNU
-@deftypevar {void (*) error_print_progname } (void)
+@deftypevar {void (*error_print_progname)} (void)
If the @code{error_print_progname} variable is defined to a non-zero
value the function pointed to is called by @code{error} or
@code{error_at_line}. It is expected to print the program name or do
diff --git a/manual/filesys.texi b/manual/filesys.texi
index 1b77f069e6..1df9cf2b34 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -615,7 +615,7 @@ the result.
@comment dirent.h
@comment BSD/SVID
-@deftypefun int scandir (const char *@var{dir}, struct dirent ***@var{namelist}, int (*@var{selector}) (const struct dirent *), int (*@var{cmp}) (const void *, const void *))
+@deftypefun int scandir (const char *@var{dir}, struct dirent ***@var{namelist}, int (*@var{selector}) (const struct dirent *), int (*@var{cmp}) (const struct dirent **, const struct dirent **))
The @code{scandir} function scans the contents of the directory selected
by @var{dir}. The result in *@var{namelist} is an array of pointers to
@@ -669,7 +669,7 @@ dirent64}}. To use this we need a new function.
@comment dirent.h
@comment GNU
-@deftypefun int scandir64 (const char *@var{dir}, struct dirent64 ***@var{namelist}, int (*@var{selector}) (const struct dirent64 *), int (*@var{cmp}) (const void *, const void *))
+@deftypefun int scandir64 (const char *@var{dir}, struct dirent64 ***@var{namelist}, int (*@var{selector}) (const struct dirent64 *), int (*@var{cmp}) (const struct dirent64 **, const struct dirent64 **))
The @code{scandir64} function works like the @code{scandir} function
except that the directory entries it returns are described by elements
of type @w{@code{struct dirent64}}. The function pointed to by
@@ -1189,7 +1189,7 @@ exceeded.
@comment unistd.h
@comment BSD
-@deftypefun int readlink (const char *@var{filename}, char *@var{buffer}, size_t @var{size})
+@deftypefun ssize_t readlink (const char *@var{filename}, char *@var{buffer}, size_t @var{size})
The @code{readlink} function gets the value of the symbolic link
@var{filename}. The file name that the link points to is copied into
@var{buffer}. This file name string is @emph{not} null-terminated;
@@ -2189,7 +2189,7 @@ The file is on a read-only file system.
@comment unistd.h
@comment BSD
-@deftypefun int fchown (int @var{filedes}, int @var{owner}, int @var{group})
+@deftypefun int fchown (int @var{filedes}, uid_t @var{owner}, gid_t @var{group})
This is like @code{chown}, except that it changes the owner of the open
file with descriptor @var{filedes}.
@@ -2541,7 +2541,7 @@ for full details on the sticky bit.
@comment sys/stat.h
@comment BSD
-@deftypefun int fchmod (int @var{filedes}, int @var{mode})
+@deftypefun int fchmod (int @var{filedes}, mode_t @var{mode})
This is like @code{chmod}, except that it changes the permissions of the
currently open file given by @var{filedes}.
@@ -2713,7 +2713,7 @@ the @code{utime} function---all except the attribute change time. You
need to include the header file @file{utime.h} to use this facility.
@pindex utime.h
-@comment time.h
+@comment utime.h
@comment POSIX.1
@deftp {Data Type} {struct utimbuf}
The @code{utimbuf} structure is used with the @code{utime} function to
@@ -2729,7 +2729,7 @@ This is the modification time for the file.
@end table
@end deftp
-@comment time.h
+@comment utime.h
@comment POSIX.1
@deftypefun int utime (const char *@var{filename}, const struct utimbuf *@var{times})
This function is used to modify the file times associated with the file
@@ -2782,7 +2782,7 @@ in the header file @file{sys/time.h}.
@comment sys/time.h
@comment BSD
-@deftypefun int utimes (const char *@var{filename}, struct timeval @var{tvp}@t{[2]})
+@deftypefun int utimes (const char *@var{filename}, const struct timeval @var{tvp}@t{[2]})
This function sets the file access and modification times of the file
@var{filename}. The new file access time is specified by
@code{@var{tvp}[0]}, and the new modification time by
@@ -2796,7 +2796,7 @@ function.
@comment sys/time.h
@comment BSD
-@deftypefun int lutimes (const char *@var{filename}, struct timeval @var{tvp}@t{[2]})
+@deftypefun int lutimes (const char *@var{filename}, const struct timeval @var{tvp}@t{[2]})
This function is like @code{utimes}, except that it does not follow
symbolic links. If @var{filename} is the name of a symbolic link,
@code{lutimes} sets the file access and modification times of the
@@ -2812,7 +2812,7 @@ function.
@comment sys/time.h
@comment BSD
-@deftypefun int futimes (int @var{fd}, struct timeval @var{tvp}@t{[2]})
+@deftypefun int futimes (int @var{fd}, const struct timeval @var{tvp}@t{[2]})
This function is like @code{utimes}, except that it takes an open file
descriptor as an argument instead of a file name. @xref{Low-Level
I/O}. This function comes from FreeBSD, and is not available on all
@@ -3049,7 +3049,7 @@ The prototype for @code{mknod} is declared in @file{sys/stat.h}.
@comment sys/stat.h
@comment BSD
-@deftypefun int mknod (const char *@var{filename}, int @var{mode}, int @var{dev})
+@deftypefun int mknod (const char *@var{filename}, mode_t @var{mode}, dev_t @var{dev})
The @code{mknod} function makes a special file with name @var{filename}.
The @var{mode} specifies the mode of the file, and may include the various
special file bits, such as @code{S_IFCHR} (for a character special file)
diff --git a/manual/getopt.texi b/manual/getopt.texi
index 77045157ef..f0b7283c8e 100644
--- a/manual/getopt.texi
+++ b/manual/getopt.texi
@@ -59,7 +59,7 @@ option argument, for those options that accept arguments.
@comment unistd.h
@comment POSIX.2
-@deftypefun int getopt (int @var{argc}, char **@var{argv}, const char *@var{options})
+@deftypefun int getopt (int @var{argc}, char *const *@var{argv}, const char *@var{options})
The @code{getopt} function gets the next option argument from the
argument list specified by the @var{argv} and @var{argc} arguments.
Normally these values come directly from the arguments received by
diff --git a/manual/llio.texi b/manual/llio.texi
index acafed315e..90bd2d71f7 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -1669,15 +1669,13 @@ they return.
@comment unistd.h
@comment X/Open
-@deftypefun int sync (void)
+@deftypefun void sync (void)
A call to this function will not return as long as there is data which
has not been written to the device. All dirty buffers in the kernel will
be written and so an overall consistent system can be achieved (if no
other process in parallel writes data).
A prototype for @code{sync} can be found in @file{unistd.h}.
-
-The return value is zero to indicate no error.
@end deftypefun
Programs more often want to ensure that data written to a given file is
@@ -1989,7 +1987,7 @@ replaces the normal implementation.
@comment aio.h
@comment Unix98
-@deftypefun int aio_read64 (struct aiocb *@var{aiocbp})
+@deftypefun int aio_read64 (struct aiocb64 *@var{aiocbp})
This function is similar to the @code{aio_read} function. The only
difference is that on @w{32 bit} machines, the file descriptor should
be opened in the large file mode. Internally, @code{aio_read64} uses
@@ -2073,7 +2071,7 @@ replaces the normal implementation.
@comment aio.h
@comment Unix98
-@deftypefun int aio_write64 (struct aiocb *@var{aiocbp})
+@deftypefun int aio_write64 (struct aiocb64 *@var{aiocbp})
This function is similar to the @code{aio_write} function. The only
difference is that on @w{32 bit} machines the file descriptor should
be opened in the large file mode. Internally @code{aio_write64} uses
@@ -2177,7 +2175,7 @@ transparently replaces the normal implementation.
@comment aio.h
@comment Unix98
-@deftypefun int lio_listio64 (int @var{mode}, struct aiocb *const @var{list}, int @var{nent}, struct sigevent *@var{sig})
+@deftypefun int lio_listio64 (int @var{mode}, struct aiocb64 *const @var{list}[], int @var{nent}, struct sigevent *@var{sig})
This function is similar to the @code{lio_listio} function. The only
difference is that on @w{32 bit} machines, the file descriptor should
be opened in the large file mode. Internally, @code{lio_listio64} uses
@@ -2239,7 +2237,7 @@ machines.
@comment aio.h
@comment POSIX.1b
-@deftypefun ssize_t aio_return (const struct aiocb *@var{aiocbp})
+@deftypefun ssize_t aio_return (struct aiocb *@var{aiocbp})
This function can be used to retrieve the return status of the operation
carried out by the request described in the variable pointed to by
@var{aiocbp}. As long as the error status of this request as returned
@@ -2262,7 +2260,7 @@ transparently replaces the normal implementation.
@comment aio.h
@comment Unix98
-@deftypefun int aio_return64 (const struct aiocb64 *@var{aiocbp})
+@deftypefun ssize_t aio_return64 (struct aiocb64 *@var{aiocbp})
This function is similar to @code{aio_return} with the only difference
that the argument is a reference to a variable of type @code{struct
aiocb64}.
@@ -2929,19 +2927,19 @@ access modes. These names are preferred when writing GNU-specific code.
But most programs will want to be portable to other POSIX.1 systems and
should use the POSIX.1 names above instead.
-@comment fcntl.h
+@comment fcntl.h (optional)
@comment GNU
@deftypevr Macro int O_READ
Open the file for reading. Same as @code{O_RDONLY}; only defined on GNU.
@end deftypevr
-@comment fcntl.h
+@comment fcntl.h (optional)
@comment GNU
@deftypevr Macro int O_WRITE
Open the file for writing. Same as @code{O_WRONLY}; only defined on GNU.
@end deftypevr
-@comment fcntl.h
+@comment fcntl.h (optional)
@comment GNU
@deftypevr Macro int O_EXEC
Open the file for executing. Only defined on GNU.
@@ -3045,7 +3043,7 @@ to be portable, use @code{O_NOCTTY} when it is important to avoid this.
The following three file name translation flags exist only on
@gnuhurdsystems{}.
-@comment fcntl.h
+@comment fcntl.h (optional)
@comment GNU
@deftypevr Macro int O_IGNORE_CTTY
Do not recognize the named file as the controlling terminal, even if it
@@ -3054,7 +3052,7 @@ on the new file descriptor will never induce job control signals.
@xref{Job Control}.
@end deftypevr
-@comment fcntl.h
+@comment fcntl.h (optional)
@comment GNU
@deftypevr Macro int O_NOLINK
If the named file is a symbolic link, open the link itself instead of
@@ -3063,7 +3061,7 @@ return the information returned by @code{lstat} on the link's name.)
@cindex symbolic link, opening
@end deftypevr
-@comment fcntl.h
+@comment fcntl.h (optional)
@comment GNU
@deftypevr Macro int O_NOTRANS
If the named file is specially translated, do not invoke the translator.
@@ -3095,7 +3093,7 @@ compatibility.
The remaining operating modes are BSD extensions. They exist only
on some systems. On other systems, these macros are not defined.
-@comment fcntl.h
+@comment fcntl.h (optional)
@comment BSD
@deftypevr Macro int O_SHLOCK
Acquire a shared lock on the file, as with @code{flock}.
@@ -3106,7 +3104,7 @@ creating the file. You are guaranteed that no other process will get
the lock on the new file first.
@end deftypevr
-@comment fcntl.h
+@comment fcntl.h (optional)
@comment BSD
@deftypevr Macro int O_EXLOCK
Acquire an exclusive lock on the file, as with @code{flock}.
diff --git a/manual/math.texi b/manual/math.texi
index 9242b539ad..193d415fba 100644
--- a/manual/math.texi
+++ b/manual/math.texi
@@ -1387,7 +1387,7 @@ program runs, do @code{srandom (time (0))}.
@comment stdlib.h
@comment BSD
-@deftypefun {void *} initstate (unsigned int @var{seed}, void *@var{state}, size_t @var{size})
+@deftypefun {char *} initstate (unsigned int @var{seed}, char *@var{state}, size_t @var{size})
The @code{initstate} function is used to initialize the random number
generator state. The argument @var{state} is an array of @var{size}
bytes, used to hold the state information. It is initialized based on
@@ -1401,7 +1401,7 @@ restore that state.
@comment stdlib.h
@comment BSD
-@deftypefun {void *} setstate (void *@var{state})
+@deftypefun {char *} setstate (char *@var{state})
The @code{setstate} function restores the random number state
information @var{state}. The argument must have been the result of
a previous call to @var{initstate} or @var{setstate}.
@@ -1692,7 +1692,7 @@ programs.
@comment stdlib.h
@comment GNU
-@deftypefun int lrand48_r (struct drand48_data *@var{buffer}, double *@var{result})
+@deftypefun int lrand48_r (struct drand48_data *@var{buffer}, long int *@var{result})
This function is similar to @code{lrand48}, but in addition it takes a
pointer to a buffer describing the state of the random number generator
just like @code{drand48}.
@@ -1722,7 +1722,7 @@ programs.
@comment stdlib.h
@comment GNU
-@deftypefun int mrand48_r (struct drand48_data *@var{buffer}, double *@var{result})
+@deftypefun int mrand48_r (struct drand48_data *@var{buffer}, long int *@var{result})
This function is similar to @code{mrand48} but like the other reentrant
functions it uses the random number generator described by the value in
the buffer pointed to by @var{buffer}.
diff --git a/manual/resource.texi b/manual/resource.texi
index cb25d2440c..1ec7af29f0 100644
--- a/manual/resource.texi
+++ b/manual/resource.texi
@@ -129,9 +129,9 @@ scheduled).
@code{vtimes} and its @code{vtimes} data structure are declared in
@file{sys/vtimes.h}.
@pindex sys/vtimes.h
-@comment vtimes.h
-@deftypefun int vtimes (struct vtimes @var{current}, struct vtimes @var{child})
+@comment sys/vtimes.h
+@deftypefun int vtimes (struct vtimes *@var{current}, struct vtimes *@var{child})
@code{vtimes} reports resource usage totals for a process.
@@ -419,7 +419,7 @@ operand must be less than @code{RLIM_NLIMITS}.
@comment sys/resource.h
@comment BSD
-@deftypevr Constant int RLIM_INFINITY
+@deftypevr Constant rlim_t RLIM_INFINITY
This constant stands for a value of ``infinity'' when supplied as
the limit value in @code{setrlimit}.
@end deftypevr
@@ -433,7 +433,7 @@ above do. The functions above are better choices.
@comment ulimit.h
@comment BSD
-@deftypefun int ulimit (int @var{cmd}, @dots{})
+@deftypefun {long int} ulimit (int @var{cmd}, @dots{})
@code{ulim