* mach/mach_syscalls.c: Obsolete file removed.
* mach/mach_syscalls.h: Likewise.
* mach/mach_traps.S: Likewise.
* mach/msg_destroy.c: Likewise.
* mach/vm_page_size.c: Likewise.
sysdep_dirs := $(addprefix $(..),$(sysdep_dirs))
endif
+# Make sure both stdio and libio get in, whichever is in use.
+subdirs += stdio libio
+
sysdep-Subdir-files := $(wildcard $(addsuffix /Subdirs,$(sysdep_dirs)))
ifdef sysdep-Subdir-files
subdirs := $(sort $(subdirs) \
subdirs := $(filter-out crypt,$(subdirs))
-+sysdep-tsrcs := $(wildcard $(foreach file,Makefile Implies \
++sysdep-tsrcs := $(wildcard $(foreach file,Makefile Implies syscalls.list\
configure configure.in,\
$(addsuffix /$(file),$(sysdep_dirs)))) \
$(+sysdep-dist)
# Make the distribution tarfile.
distribute := README INSTALL FAQ NOTES NEWS PROJECTS \
- COPYING.LIB COPYING ChangeLog ChangeLog.[0-9] \
+ COPYING.LIB COPYING ChangeLog ChangeLog.[0-9] \
Makefile Makeconfig Makerules Rules Make-dist MakeTAGS \
extra-lib.mk o-iterator.mk \
ansidecl.h mkinstalldirs move-if-change install-sh \
configure configure.in aclocal.m4 config.sub config.guess\
- config.make.in config-name.in Makefile.in \
- munch-tmpl.c munch.awk sysdep.h set-hooks.h libc-symbols.h
+ config.h.in config.make.in config-name.in Makefile.in \
+ munch-tmpl.c munch.awk \
+ sysdep.h set-hooks.h libc-symbols.h version.h shlib-versions
distribute := $(strip $(distribute))
generated := $(generated) stubs.h
$(csu-dummies))
install-lib = $(start-installed-name) g$(start-installed-name) \
$(csu-dummies)
-distribute = initfini.c
+distribute = initfini.c gmon-start.c start.c
all: # Make this the default target; it will be defined in Rules.
rtld-routines := rtld $(addprefix dl-,minimal load lookup object reloc \
deps runtime sysdep error init fini)
-distribute = $(rtld-routines:=.c) dynamic-link.h do-rel.h \
+distribute = $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
soinit.c sofini.c ldd.sh.in linux-compat.c
all: # Make this the default target; it will be defined in Rules.
subdir := gmon
headers := sys/gmon.h sys/gmon_out.h
-distribute := machine-gmon.h
+distribute := machine-gmon.h profil-counter.h
routines := gmon mcount profil bb_init_func bb_exit_func
include ../Rules
headers = hurd.h $(interface-headers) \
- $(addprefix hurd/,fd.h id.h port.h signal.h sigpreempt.h \
+ $(addprefix hurd/,fd.h id.h port.h signal.h sigpreempt.h ioctl.h\
userlink.h resource.h threadvar.h lookup.h)
distribute := hurdstartup.h hurdfault.h intr-rpc.defs STATUS
dtable = dtable port2fd new-fd alloc-fd intern-fd \
getdport openport \
fd-close fd-read fd-write hurdioctl ctty-input ctty-output
+distribute = intr-rpc.defs intr-rpc.h faultexc.defs
# XXX this is a temporary hack; see hurdmalloc.h
routines += hurdmalloc
$(lib-modules:=.c) config.h simple-hash.h iso-4217.def \
charmap-kw.gperf charmap-kw.h locfile-token.h \
locfile-kw.gperf locfile-kw.h linereader.h \
- locales.h locfile.h stringtrans.h
+ locales.h locfile.h stringtrans.h weight.h charset.h
routines = setlocale findlocale loadlocale localeconv nl_langinfo \
mb_cur_max
categories = ctype messages monetary numeric time collate
+++ /dev/null
-/* Aliases for basic Mach system calls:
- mach_task_self -> __mach_task_self, etc. */
-
-#include <gnu-stabs.h>
-
-#define SYSCALL(name, number, type, args, typed_args) \
- function_alias (name, __##name, type, args, \
- name typed_args)
-
-#include "mach_syscalls.h"
+++ /dev/null
-/* Traps for Mach basic system calls and kernel RPC shortcuts. */
-
-#include <sysdep.h>
-
-#define SYSCALL(name, number, type, args, typed_args) \
- SYSCALL_TRAP (__##name, number)
-
-/* Basic syscalls. */
-#include "mach_syscalls.h"
-
-/* RPC shortcuts. */
-#define SHORTCUT(name, number, args, typed_args) \
- SYSCALL_TRAP (__syscall_##name, number)
-
-#include "mach_shortcuts.h"
+++ /dev/null
-#include <gnu-stabs.h>
-
-#undef mach_msg_destroy
-symbol_alias (__mach_msg_destroy, mach_msg_destroy);
+++ /dev/null
-#include <gnu-stabs.h>
-
-symbol_alias (__vm_page_size, vm_page_size);
+++ /dev/null
-@node Consistency Checking, Mathematics, Low-Level Terminal Interface, Top
-@chapter Explicitly Checking Internal Consistency
-@cindex consistency checking
-@cindex impossible events
-@cindex assertions
-
-When you're writing a program, it's often a good idea to put in checks
-at strategic places for ``impossible'' errors or violations of basic
-assumptions. These kinds of checks are helpful in debugging problems
-with the interfaces between different parts of the program, for example.
-
-@pindex assert.h
-The @code{assert} macro, defined in the header file @file{assert.h},
-provides a convenient way to abort the program while printing some
-debugging information about where in the program the error was detected.
-
-@vindex NDEBUG
-Once you think your program is debugged, you can disable the error
-checks performed by the @code{assert} macro by recompiling with the
-macro @code{NDEBUG} defined. This means you don't actually have to
-change the program source code to disable these checks.
-
-But disabling these consistency checks is undesirable unless they make
-the program significantly slower. All else being equal, more error
-checking is good no matter who is running the program. A wise user
-would rather have a program crash, visibly, than have it return nonsense
-without indicating anything might be wrong.
-
-@comment assert.h
-@comment ANSI
-@deftypefn Macro void assert (int @var{expression})
-Verify the programmer's belief that @var{expression} should be nonzero
-at a certain point in the program.
-
-If @code{NDEBUG} is not defined, @code{assert} tests the value of
-@var{expression}. If it is false (zero), @code{assert} aborts the
-program (@pxref{Aborting a Program}) after printing a message of the
-form:
-
-@smallexample
-@file{@var{file}}:@var{linenum}: @var{function}: Assertion `@var{expression}' failed.
-@end smallexample
-
-@noindent
-on the standard error stream @code{stderr} (@pxref{Standard Streams}).
-The filename and line number are taken from the C preprocessor macros
-@code{__FILE__} and @code{__LINE__} and specify where the call to
-@code{assert} was written. When using the GNU C compiler, the name of
-the function which calls @code{assert} is taken from the built-in
-variable @code{__PRETTY_FUNCTION__}; with older compilers, the function
-name and following colon are omitted.
-
-If the preprocessor macro @code{NDEBUG} is defined before
-@file{assert.h} is included, the @code{assert} macro is defined to do
-absolutely nothing. Even the argument expression @var{expression} is
-not evaluated, so you should avoid calling @code{assert} with arguments
-that involve side effects.
-
-For example, @code{assert (++i > 0);} is a bad idea, because @code{i}
-will not be incremented if @code{NDEBUG} is defined.
-@end deftypefn
-
-Sometimes the ``impossible'' condition you want to check for is an error
-return from an operating system function. Then it is useful to display
-not only where the program crashes, but also what error was returned.
-The @code{assert_perror} macro makes this easy.
-
-@comment assert.h
-@comment GNU
-@deftypefn Macro void assert_perror (int @var{errnum})
-Similar to @code{assert}, but verifies that @var{errnum} is zero.
-
-If @code{NDEBUG} is defined, @code{assert_perror} tests the value of
-@var{errnum}. If it is nonzero, @code{assert_perror} aborts the program
-after a printing a message of the form:
-
-@smallexample
-@file{@var{file}}:@var{linenum}: @var{function}: @var{error text}
-@end smallexample
-
-@noindent
-on the standard error stream. The file name, line number, and function
-name are as for @code{assert}. The error text is the result of
-@w{@code{strerror (@var{errnum})}}. @xref{Error Messages}.
-
-Like @code{assert}, if @code{NDEBUG} is defined before @file{assert.h}
-is included, the @code{assert_perror} macro does absolutely nothing. It
-does not evaluate the argument, so @var{errnum} should not have any side
-effects. It is best for @var{errnum} to be a just simple variable
-reference; often it will be @code{errno}.
-
-This macro is a GNU extension.
-@end deftypefn
-
-@strong{Usage note:} The @code{assert} facility is designed for
-detecting @emph{internal inconsistency}; it is not suitable for
-reporting invalid input or improper usage.
-
-The information in the diagnostic messages provided by the @code{assert}
-macro is intended to to help you, the programmer, track down the cause
-of a bug, but is not really useful in telling a user of your program why
-his or her input was invalid or why a command could not be carried out.
-So you can't use @code{assert} to print the error messages for these
-eventualities.
-
-What's more, your program should not abort when given invalid input, as
-@code{assert} would do---it should exit with nonzero status after
-printing its error messages, or perhaps read another command or move
-on to the next input file.
-
-@xref{Error Messages}, for information on printing error messages for
-problems that @emph{do not} represent bugs in the program.
-
* Consistency Checking:: Using @code{assert} to abort if
something ``impossible'' happens.
* Variadic Functions:: Defining functions with varying numbers
- of args.
+ of args.
* Null Pointer Constant:: The macro @code{NULL}.
* Important Data Types:: Data types for object sizes.
* Data Type Measurements:: Parameters of data type representations.
When you're writing a program, it's often a good idea to put in checks
at strategic places for ``impossible'' errors or violations of basic
-assumptions. These checks are helpful in debugging problems due to
-misunderstandings between different parts of the program.
+assumptions. These kinds of checks are helpful in debugging problems
+with the interfaces between different parts of the program, for example.
@pindex assert.h
The @code{assert} macro, defined in the header file @file{assert.h},
form:
@smallexample
-@file{@var{file}}:@var{linenum}: Assertion `@var{expression}' failed.
+@file{@var{file}}:@var{linenum}: @var{function}: Assertion `@var{expression}' failed.
@end smallexample
@noindent
on the standard error stream @code{stderr} (@pxref{Standard Streams}).
The filename and line number are taken from the C preprocessor macros
@code{__FILE__} and @code{__LINE__} and specify where the call to
-@code{assert} was written.
+@code{assert} was written. When using the GNU C compiler, the name of
+the function which calls @code{assert} is taken from the built-in
+variable @code{__PRETTY_FUNCTION__}; with older compilers, the function
+name and following colon are omitted.
-If the preprocessor macro @code{NDEBUG} is defined at the point where
+If the preprocessor macro @code{NDEBUG} is defined before
@file{assert.h} is included, the @code{assert} macro is defined to do
absolutely nothing.
@code{NDEBUG} is defined.
@end deftypefn
+Sometimes the ``impossible'' condition you want to check for is an error
+return from an operating system function. Then it is useful to display
+not only where the program crashes, but also what error was returned.
+The @code{assert_perror} macro makes this easy.
+
+@comment assert.h
+@comment GNU
+@deftypefn Macro void assert_perror (int @var{errnum})
+Similar to @code{assert}, but verifies that @var{errnum} is zero.
+
+If @code{NDEBUG} is defined, @code{assert_perror} tests the value of
+@var{errnum}. If it is nonzero, @code{assert_perror} aborts the program
+after a printing a message of the form:
+
+@smallexample
+@file{@var{file}}:@var{linenum}: @var{function}: @var{error text}
+@end smallexample
+
+@noindent
+on the standard error stream. The file name, line number, and function
+name are as for @code{assert}. The error text is the result of
+@w{@code{strerror (@var{errnum})}}. @xref{Error Messages}.
+
+Like @code{assert}, if @code{NDEBUG} is defined before @file{assert.h}
+is included, the @code{assert_perror} macro does absolutely nothing. It
+does not evaluate the argument, so @var{errnum} should not have any side
+effects. It is best for @var{errnum} to be a just simple variable
+reference; often it will be @code{errno}.
+
+This macro is a GNU extension.
+@end deftypefn
+
@strong{Usage note:} The @code{assert} facility is designed for
detecting @emph{internal inconsistency}; it is not suitable for
reporting invalid input or improper usage by @emph{the user} of the
macro is intended to help you, the programmer, track down the cause of a
bug, but is not really useful for telling a user of your program why his
or her input was invalid or why a command could not be carried out. So
-you can't use @code{assert} to print the error messages for these
-eventualities.
+you can't use @code{assert} or @code{assert_perror} to print the error
+messages for these eventualities.
What's more, your program should not abort when given invalid input, as
@code{assert} would do---it should exit with nonzero status (@pxref{Exit
@menu
* Why Variadic:: Reasons for making functions take
- variable arguments.
+ variable arguments.
* How Variadic:: How to define and call variadic functions.
* Variadic Example:: A complete example.
@end menu
with variable arguments.
* Receiving Arguments:: Steps you must follow to access the
optional argument values.
-* How Many Arguments:: How to decide whether there are more arguments.
+* How Many Arguments:: How to decide whether there are more arguments.
* Calling Variadics:: Things you need to know about calling
variable arguments functions.
* Argument Macros:: Detailed specification of the macros
A function that accepts a variable number of arguments must be declared
with a prototype that says so. You write the fixed arguments as usual,
-and then tack on @samp{@dots{}} to indicate the possibility of
+and then tack on @samp{@dots{}} to indicate the possibility of
additional arguments. The syntax of ANSI C requires at least one fixed
argument before the @samp{@dots{}}. For example,
@smallexample
-int
+int
func (const char *a, int b, @dots{})
@{
@dots{}
-@}
+@}
@end smallexample
@noindent
program is someday compiled with a peculiar compiler.)
@end enumerate
-@xref{Argument Macros}, for the full definitions of @code{va_start},
+@xref{Argument Macros}, for the full definitions of @code{va_start},
@code{va_arg} and @code{va_end}.
Steps 1 and 3 must be performed in the function that accepts the
@deftypefn {Macro} @var{type} va_arg (va_list @var{ap}, @var{type})
The @code{va_arg} macro returns the value of the next optional argument,
and modifies the value of @var{ap} to point to the subsequent argument.
-Thus, successive uses of @code{va_arg} return successive optional
+Thus, successive uses of @code{va_arg} return successive optional
arguments.
The type of the value returned by @code{va_arg} is @var{type} as
@comment Unix
@deffn Macro va_alist
This macro stands for the argument name list required in a variadic
-function.
+function.
@end deffn
@comment varargs.h
precise data type varies from C compiler to C compiler. Likewise, the
data type of the result of @code{sizeof} also varies between compilers.
ANSI defines standard aliases for these two types, so you can refer to
-them in a portable fashion. They are defined in the header file
+them in a portable fashion. They are defined in the header file
@file{stddef.h}.
@pindex stddef.h
* Width of Type:: How many bits does an integer type hold?
* Range of Type:: What are the largest and smallest values
that an integer type can hold?
-* Floating Type Macros:: Parameters that measure the floating point types.
+* Floating Type Macros:: Parameters that measure the floating point types.
* Structure Measurement:: Getting measurements on structure types.
@end menu
* Floating Point Concepts:: Definitions of terminology.
* Floating Point Parameters:: Details of specific macros.
* IEEE Floating Point:: The measurements for one common
- representation.
+ representation.
@end menu
@node Floating Point Concepts
The @dfn{mantissa} or @dfn{significand}, an unsigned integer which is a
part of each floating point number.
-@item
+@item
@cindex precision (of floating point number)
The @dfn{precision} of the mantissa. If the base of the representation
is @var{b}, then the precision is the number of base-@var{b} digits in
@node IEEE Floating Point
@subsubsection IEEE Floating Point
-@cindex IEEE floating point representation
+@cindex IEEE floating point representation
@cindex floating point, IEEE
Here is an example showing how the floating type measurements come out
syslog syscall daemon \
mmap munmap mprotect msync madvise \
efgcvt efgcvt_r \
- hsearch hsearch_r tsearch \
+ hsearch hsearch_r tsearch lsearch \
err error
aux := init-misc
distribute := bsd-compat.c
install-others = $(LINGUAS:%=$(mo-installed))
# Files to distribute: all the source and compiled binary translation files.
-distribute = $(ALL_LINGUAS:=.po) $(ALL_LINGUAS:=.mo)
+distribute = $(ALL_LINGUAS:=.po) $(ALL_LINGUAS:=.mo) SYS_libc.pot
include ../Rules
argz.h envz.h
routines := strcat strchr strcmp strcoll strcpy strcspn strdup \
- strerror _strerror strlen strnlen \
+ strerror _strerror strerror_r strlen strnlen \
strncat strncmp strncpy \
strrchr strpbrk strsignal strspn strstr strtok \
strtok_r strxfrm memchr memcmp memmove memset \
#ifdef __USE_REENTRANT
/* Reentrant version of `strerror'. If a temporary buffer is required, at
most BUFLEN bytes of BUF will be used. */
-extern char *strerror_r __P ((int __errnum, char *__buf, int __buflen));
+extern char *strerror_r __P ((int __errnum, char *__buf, size_t __buflen));
#endif
#ifdef __USE_BSD
DEFS.h
divrem.h
divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S
+_mcount.S
# Cambridge, MA 02139, USA.
ifeq ($(subdir),gmon)
-sysdep_routines := bb_init_func _mcount
+sysdep_routines += _mcount
endif
ifeq ($(subdir),setjmp)
ioctls-tmpl.c ioctls.awk snarf-ioctls
make_errlist.c
mk-local_lim.c
+s-proto.S
+++ /dev/null
-/* Copyright (C) 1991, 1992 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sys/types.h>
-#include <sys/param.h>
-
-/* Generate local_limits.h from <sys/param.h> values for BSD. */
-
-struct param
- {
- char *name;
- int value;
- };
-
-static struct param params[] =
- {
- { "NGROUPS_MAX", NGROUPS },
-
- { "ARG_MAX", NCARGS },
-
-#ifdef MAXUPRC
- { "CHILD_MAX", MAXUPRC },
-#endif
-
- { "OPEN_MAX", NOFILE },
-
- /* Apparently, Ultrix's <sys/param.h> defines LINK_MAX and not MAXLINK. */
-#if defined (LINK_MAX) && !defined (MAXLINK)
-#define MAXLINK LINK_MAX
-#endif
-#ifdef MAXLINK
- { "LINK_MAX", MAXLINK },
-#endif
-
- { "MAX_CANON", CANBSIZ },
-
-#ifndef MAXNAMLEN
-#define MAXNAMLEN 255
-#endif
- { "NAME_MAX", MAXNAMLEN },
-
- { "PATH_MAX", MAXPATHLEN },
-
- { NULL, 0 }
- };
-
-int
-main()
-{
- extern char *ctime();
- extern time_t time();
- time_t now = time((time_t *) NULL);
- register struct param *p;
-
- printf("\
-/* Implementation-specific limits.\n\
- Generated at %.25s. */\n\n", ctime(&now));
-
- for (p = params; p->name != NULL; ++p)
- printf("#define %s %d\n", p->name, p->value);
-
- exit(0);
-}
--- /dev/null
+alpha/ptrace.h alpha/regdef.h
+ieee_get_fp_control.S ieee_set_fp_control.S
+ioperm.c