diff options
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | MakeTAGS | 28 | ||||
-rw-r--r-- | Makerules | 2 | ||||
-rw-r--r-- | db/Makefile | 4 | ||||
-rw-r--r-- | mach/msgserver.c | 25 | ||||
-rw-r--r-- | manual/stdio.texi | 82 | ||||
-rw-r--r-- | misc/error.h | 20 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/fcntlbits.h | 26 |
8 files changed, 104 insertions, 100 deletions
diff --git a/ChangeLog b/ChangeLog index 41a3f70018..d0a8531878 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Thu Jan 25 21:10:39 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * db/Makefile (subdir-dirs): Renamed from dbdirs. + + * Makerules (distinfo-vars): Add subdir-dirs. + + * MakeTAGS: Remove vpath directives. + (all-dirs): Prepend $(subdir-dirs). + (all-sources, all-headers): Use wildcard to find sources. + +Mon Jan 29 10:44:38 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * malloc/Makefile (CFLAGS-vm-limit.c, CFLAGS-ralloc.c): New + variables. + + * mach/msgserver.c: Declare DEMUX arg with prototype. + Sun Jan 28 17:25:38 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * setjmp/setjmp.h (jmp_buf): Give a tag in the struct defn, to diff --git a/MakeTAGS b/MakeTAGS index 186d5192e4..a442ce8d1e 100644 --- a/MakeTAGS +++ b/MakeTAGS @@ -49,16 +49,12 @@ endif # Find all sysdep dirs there are, but putting the ones # we are configured to use first and preserving their order. -all-dirs := $(objdir) \ +all-dirs := $(subdir-dirs) \ + $(objdir) \ $(sysdep-dirs) \ $(source_dirs) \ $(filter-out $(sysdep-dirs),$(sysdep_dirs)) -vpath %.h $(all-dirs) -vpath %.c $(all-dirs) -vpath %.S $(all-dirs) -vpath %.s $(all-dirs) - # Find all the subdirs there are, but putting the ones # we are configured to use first and preserving their order. ifndef subdir @@ -83,15 +79,17 @@ all-dist := $(filter-out %.h %.c %.s %.S,$(all-dist)) # All different versions of $(sources), preserving the configured sysdep # directory order. -all-sources = $(shell find . $(all-dirs) -maxdepth 1 \( -name fnord \ - $(foreach file,$(sort $(sources) $(sources:.c=.S) \ - $(sources:.c=.s)),\ - -o -name $(file)) \ - \) -print) - -all-headers = $(shell find . $(all-dirs) -maxdepth 1 \( -name fnord \ - $(foreach file,$(headers),-o -name $(file)) \ - \) -print) +all-sources = $(wildcard $(sort $(sources) $(sources:.c=.S) \ + $(sources:.c=.s))) \ + $(foreach dir,$(all-dirs),\ + $(wildcard \ + $(addprefix $(dir)/,\ + $(sort $(sources) $(sources:.c=.S) \ + $(sources:.c=.s))))) + +all-headers = $(wildcard $(headers)) \ + $(foreach dir,$(all-dirs),\ + $(wildcard $(addprefix $(dir)/,$(headers)))) tags_sources := $(strip $(tags_sources)) diff --git a/Makerules b/Makerules index 3fcf40328f..f6848b76d5 100644 --- a/Makerules +++ b/Makerules @@ -681,7 +681,7 @@ distinfo: Makefile $(..)Makerules define distinfo-vars rm -f $@.new -$(foreach var,subdir sources elided-routines headers distribute \ +$(foreach var,subdir subdir-dirs sources elided-routines headers distribute \ dont_distribute generated others tests, echo >> $@.new '$(var) := $($(var))') echo >> $@.new 'sources := $$(sources) $$(addsuffix .c,$$(elided-routines))' diff --git a/db/Makefile b/db/Makefile index c7a385a486..e41614af38 100644 --- a/db/Makefile +++ b/db/Makefile @@ -5,8 +5,8 @@ subdir = db -dbdirs = btree db hash mpool recno -vpath %.c $(dbdirs) +subdir-dirs = btree db hash mpool recno +vpath %.c $(subdir-dirs) routines := bt_close bt_conv bt_debug bt_delete bt_get bt_open bt_overflow \ bt_page bt_put bt_search bt_seq bt_split bt_utils \ diff --git a/mach/msgserver.c b/mach/msgserver.c index e0dc29b754..da64b89c94 100644 --- a/mach/msgserver.c +++ b/mach/msgserver.c @@ -21,35 +21,38 @@ Cambridge, MA 02139, USA. */ 93/12/06 to use stack space instead of malloc, and to handle large messages with MACH_RCV_LARGE. */ -/* +/* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ /* * HISTORY * $Log$ - * Revision 1.3 1995/01/21 15:00:57 roland + * Revision 1.4 1996/01/29 15:44:23 roland + * Declare DEMUX arg with prototype. + * + * Revision 1.3 1995/01/21 15:00:57 roland * Converted to use weak aliases with macros from libc-symbols.h. * * Revision 1.2 1994/10/10 07:20:14 roland @@ -60,14 +63,14 @@ Cambridge, MA 02139, USA. */ * * Revision 2.4 91/05/14 17:53:22 mrt * Correcting copyright - * + * * Revision 2.3 91/02/14 14:17:47 mrt * Added new Mach copyright * [91/02/13 12:44:20 mrt] - * + * * Revision 2.2 90/08/06 17:23:58 rpd * Created. - * + * */ @@ -183,7 +186,7 @@ weak_alias (__mach_msg_server_timeout, mach_msg_server_timeout) mach_msg_return_t __mach_msg_server (demux, max_size, rcv_name) - boolean_t (*demux) (); + boolean_t (*demux) (mach_msg_header_t *in, mach_msg_header_t *out); mach_msg_size_t max_size; mach_port_t rcv_name; { diff --git a/manual/stdio.texi b/manual/stdio.texi index 30157595e7..5ebc5c1781 100644 --- a/manual/stdio.texi +++ b/manual/stdio.texi @@ -8,7 +8,7 @@ representing a communications channel to a file, device, or process. @menu * Streams:: About the data type representing a stream. -* Standard Streams:: Streams to the standard input and output +* Standard Streams:: Streams to the standard input and output 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. @@ -28,7 +28,7 @@ representing a communications channel to a file, device, or process. * Portable Positioning:: Random access on peculiar ANSI 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. @end menu @node Streams @@ -127,7 +127,7 @@ reopening it. @xref{Opening Streams}. @cindex opening a stream Opening a file with the @code{fopen} function creates a new stream and establishes a connection between the stream and a file. This may -involve creating a new file. +involve creating a new file. @pindex stdio.h Everything described in this section is declared in the header file @@ -267,7 +267,7 @@ This function causes @var{stream} to be closed and the connection to the corresponding file to be broken. Any buffered output is written and any buffered input is discarded. The @code{fclose} function returns a value of @code{0} if the file was closed successfully, and @code{EOF} -if an error was detected. +if an error was detected. It is important to check for errors when you call @code{fclose} to close an output stream, because real, everyday errors can be detected at this @@ -302,7 +302,7 @@ These functions are declared in the header file @file{stdio.h}. @comment ANSI @deftypefun int fputc (int @var{c}, FILE *@var{stream}) The @code{fputc} function converts the character @var{c} to type -@code{unsigned char}, and writes it to the stream @var{stream}. +@code{unsigned char}, and writes it to the stream @var{stream}. @code{EOF} is returned if a write error occurs; otherwise the character @var{c} is returned. @end deftypefun @@ -397,7 +397,7 @@ variable without loss of information. This function reads the next character as an @code{unsigned char} from the stream @var{stream} and returns its value, converted to an @code{int}. If an end-of-file condition or read error occurs, -@code{EOF} is returned instead. +@code{EOF} is returned instead. @end deftypefun @comment stdio.h @@ -589,7 +589,7 @@ the input stream without removing it from the stream. This is called the input it will read next. Using stream I/O, you can peek ahead at input by first reading it and -then @dfn{unreading} it (also called @dfn{pushing it back} on the stream). +then @dfn{unreading} it (also called @dfn{pushing it back} on the stream). Unreading a character makes it available to be input again from the stream, by the next call to @code{fgetc} or other input function on that stream. @@ -645,7 +645,7 @@ so that the next input characters will be @samp{9} and @samp{b}. @node How Unread @subsection Using @code{ungetc} To Do Unreading - + The function to unread a character is called @code{ungetc}, because it reverses the action of @code{getc}. @@ -792,7 +792,7 @@ useful for printing error messages, tables of data, and the like. * 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 @@ -886,12 +886,12 @@ In more detail, output conversion specifications consist of an initial @samp{%} character followed in sequence by: @itemize @bullet -@item +@item Zero or more @dfn{flag characters} that modify the normal behavior of the conversion specification. @cindex flag character (@code{printf}) -@item +@item An optional decimal integer specifying the @dfn{minimum field width}. If the normal conversion produces fewer characters than this, the field is padded with spaces to the specified width. This is a @emph{minimum} @@ -906,7 +906,7 @@ printed) is used as the field width. The value must be an @code{int}. If the value is negative, this means to set the @samp{-} flag (see below) and to use the absolute value as the field width. -@item +@item An optional @dfn{precision} to specify the number of digits to be written for the numeric conversions. If the precision is specified, it consists of a period (@samp{.}) followed optionally by a decimal integer @@ -932,7 +932,7 @@ types.) A character that specifies the conversion to be applied. @end itemize -The exact options that are permitted and how they are interpreted vary +The exact options that are permitted and how they are interpreted vary between the different conversion specifiers. See the descriptions of the individual conversions for information about the particular options that they use. @@ -941,7 +941,7 @@ With the @samp{-Wformat} option, the GNU C compiler checks calls to @code{printf} and related functions. It examines the format string and verifies that the correct number and types of arguments are supplied. There is also a GNU C syntax to tell the compiler that a function you -write uses a @code{printf}-style format string. +write uses a @code{printf}-style format string. @xref{Function Attributes, , Declaring Attributes of Functions, gcc.info, Using GNU CC}, for more information. @@ -1355,7 +1355,7 @@ prints: @end smallexample @noindent -and sets @code{nchar} to @code{7}, because @samp{3 bears} is seven +and sets @code{nchar} to @code{7}, because @samp{3 bears} is seven characters. @@ -1521,7 +1521,7 @@ Since that method is impossible, we provide alternative functions, the @code{vprintf} series, which lets you pass a @code{va_list} to describe ``all of my arguments after the first five.'' -When it is sufficient to define a macro rather than a real function, +When it is sufficient to define a macro rather than a real function, the GNU C compiler provides a way to do this much more easily with macros. For example: @@ -1610,7 +1610,7 @@ as for @code{vprintf}.@refill Here's an example showing how you might use @code{vfprintf}. This is a function that prints error messages to the stream @code{stderr}, along with a prefix indicating the name of the program -(@pxref{Error Messages}, for a description of +(@pxref{Error Messages}, for a description of @code{program_invocation_short_name}). @smallexample @@ -1838,7 +1838,7 @@ validate_args (char *format, int nargs, OBJECT *args) error ("too few arguments (at least %d required)", nwanted); return 0; @} - + /* @r{Check the C type wanted for each argument} @r{and see if the object given is suitable.} */ for (i = 0; i < nwanted; i++) @@ -1899,16 +1899,16 @@ The facilities of this section are declared in the header file @file{printf.h}. @menu -* Registering New Conversions:: Using @code{register_printf_function} +* Registering New Conversions:: Using @code{register_printf_function} 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. + 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}. + to @code{register_printf_function}. * Printf Extension Example:: How to define a @code{printf} - handler function. + handler function. @end menu @strong{Portability Note:} The ability to extend the syntax of @@ -2063,7 +2063,7 @@ argument list containing the values to be printed to your handler. Unlike most other functions that can be passed an explicit variable argument list, this is a @emph{pointer} to a @code{va_list}, rather than the @code{va_list} itself. Thus, you should fetch arguments by -means of @code{va_arg (@var{type}, *ap_pointer)}. +means of @code{va_arg (*ap_pointer, @var{type})}. (Passing a pointer here allows the function that calls your handler function to update its own @code{va_list} variable to account for the @@ -2082,7 +2082,7 @@ This is the data type that a handler function should have. If you are going to use @w{@code{parse_printf_format}} in your application, you should also define a function to pass as the @var{arginfo-function} argument for each new conversion you install with -@code{register_printf_function}. +@code{register_printf_function}. You should define these functions with a prototype like: @@ -2109,7 +2109,7 @@ the number and type of arguments used by a conversion specifier. @subsection @code{printf} Extension Example Here is an example showing how to define a @code{printf} handler function. -This program defines a data structure called a @code{Widget} and +This program defines a data structure called a @code{Widget} and defines the @samp{%W} conversion to print information about @w{@code{Widget *}} arguments, including the pointer value and the name stored in the data structure. The @samp{%W} conversion supports the minimum field width and @@ -2279,7 +2279,7 @@ rather than a pointer to an @code{int}. A character that specifies the conversion to be applied. @end itemize -The exact options that are permitted and how they are interpreted vary +The exact options that are permitted and how they are interpreted vary between the different conversion specifiers. See the descriptions of the individual conversions for information about the particular options that they allow. @@ -2288,7 +2288,7 @@ With the @samp{-Wformat} option, the GNU C compiler checks calls to @code{scanf} and related functions. It examines the format string and verifies that the correct number and types of arguments are supplied. There is also a GNU C syntax to tell the compiler that a function you -write uses a @code{scanf}-style format string. +write uses a @code{scanf}-style format string. @xref{Function Attributes, , Declaring Attributes of Functions, gcc.info, Using GNU CC}, for more information. @@ -2442,7 +2442,7 @@ Specifies that the argument is of type @code{long double *}. @subsection String Input Conversions This section describes the @code{scanf} input conversions for reading -string and character values: @samp{%s}, @samp{%[}, and @samp{%c}. +string and character values: @samp{%s}, @samp{%[}, and @samp{%c}. You have two options for how to receive the input from these conversions: @@ -2503,15 +2503,15 @@ character and a following @samp{]} character, using the same syntax used in regular expressions. As special cases: @itemize @bullet -@item +@item A literal @samp{]} character can be specified as the first character of the set. -@item +@item An embedded @samp{-} character (that is, one that is not the first or last character of the set) is used to specify a range of characters. -@item +@item If a caret character @samp{^} immediately follows the initial @samp{[}, then the set of allowed input characters is the everything @emph{except} the characters listed. @@ -2536,7 +2536,7 @@ the standard whitespace characters. This is slightly different from @samp{%[} reports a matching failure while @samp{%s} simply discards the initial whitespace. -@item %25[a-z] +@item %25[a-z] Matches up to 25 lowercase characters. @end table @@ -2960,7 +2960,7 @@ thing you can rely on is that you can use it subsequently as the @var{offset} argument to @code{fseek} to move back to the same file position. -@item +@item In a call to @code{fseek} on a text stream, either the @var{offset} must either be zero; or @var{whence} must be @code{SEEK_SET} and the @var{offset} must be the result of an earlier call to @code{ftell} on @@ -3103,7 +3103,7 @@ When you try to do output and the output buffer is full. @item When the stream is closed. @xref{Closing Streams}. -@item +@item When the program terminates by calling @code{exit}. @xref{Normal Termination}. @@ -3212,7 +3212,7 @@ to use for the @var{size} argument to @code{setvbuf}. This value is guaranteed to be at least @code{256}. The value of @code{BUFSIZ} is chosen on each system so as to make stream -I/O efficient. So it is a good idea to use @code{BUFSIZ} as the size +I/O efficient. So it is a good idea to use @code{BUFSIZ} as the size for the buffer when you call @code{setvbuf}. Actually, you can get an even better value to use for the buffer size @@ -3281,7 +3281,7 @@ specific to GNU. Other systems or C implementations might or might not provide equivalent functionality. @menu -* String Streams:: Streams that get data from or put data in +* String Streams:: Streams that get data from or put data in a string or memory buffer. * Obstack Streams:: Streams that store data in an obstack. * Custom Streams:: Defining your own streams with an arbitrary @@ -3456,9 +3456,9 @@ programmed by you. We call these @dfn{custom streams}. @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 @@ -3481,7 +3481,7 @@ functions don't know what's inside the cookie, but your functions will know. When you create a custom stream, you must specify the cookie pointer, -and also the four hook functions stored in a structure of type +and also the four hook functions stored in a structure of type @code{cookie_io_functions_t}. These facilities are declared in @file{stdio.h}. @@ -3490,7 +3490,7 @@ These facilities are declared in @file{stdio.h}. @comment stdio.h @comment GNU @deftp {Data Type} {cookie_io_functions_t} -This is a structure type that holds the functions that define the +This is a structure type that holds the functions that define the communications protocol between the stream and its cookie. It has the following members: @@ -3576,7 +3576,7 @@ the GNU library, @code{fpos_t} is equivalent to @code{off_t} or @code{long int}, and simply represents the number of bytes from the beginning of the file. -After doing the seek operation, your function should store the resulting +After doing the seek operation, your function should store the resulting file position relative to the beginning of the file in @var{position}. Your function should return a value of @code{0} on success and @code{-1} to indicate an error. diff --git a/misc/error.h b/misc/error.h index 40b345b9fc..749dce429d 100644 --- a/misc/error.h +++ b/misc/error.h @@ -1,5 +1,5 @@ /* error.h -- declaration for error-reporting function - Copyright (C) 1995 Software Foundation, Inc. + Copyright (C) 1995, 1996 Software Foundation, Inc. This file is part of the GNU C Library. Its master source is NOT part of the C library, however. The master source lives in /gd/gnu/lib. @@ -35,11 +35,23 @@ Cambridge, MA 02139, USA. */ # endif #endif -#if __STDC__ -void error (int, int, const char *, ...) \ - __attribute__ ((__format__ (__printf__, 3, 4))); +#if defined (__STDC__) && __STDC__ + +/* Print a message with `fprintf (stderr, FORMAT, ...)'; + if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). + If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ + +extern void error (int status, int errnum, const char *format, ...) + __attribute__ ((__format__ (__printf__, 3, 4))); + +/* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +extern void (*error_print_progname) (void); + #else void error (); +extern void (*error_print_progname) (); #endif /* This variable is incremented each time `error' is called. */ diff --git a/sysdeps/unix/sysv/linux/i386/fcntlbits.h b/sysdeps/unix/sysv/linux/i386/fcntlbits.h deleted file mode 100644 index 8d92ac02b0..0000000000 --- a/sysdeps/unix/sysv/linux/i386/fcntlbits.h +++ /dev/null @@ -1,26 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux. -Copyright (C) 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#ifndef _FCNTLBITS_H -#define _FCNTLBITS_H 1 - -#include <sys/types.h> -#include <linux/fcntl.h> - -#endif /* fcntlbits.h */ |