1997-07-06 23:36  Ulrich Drepper  <drepper@cygnus.com>

	* isomac.c (get_null_defines): Put NULL at end of list.

	* hurd/Makefile: Remove special handling of sunrpc code.
	* sysdeps/mach/hurd/Makefile: Likewise.
	Compile CThreads code.
	* sunrpc/rpc_main.c: Don't use MAXPATHLEN.
	* sysdeps/mach/bits/libc-lock.h: Add definitions for key handling
	functions.
	* sysdeps/stub/bits/libc-lock.h: Likewise.
	* sysdeps/mach/hurd/net/ethernet.h: New file.
	* sysdeps/mach/hurd/net/if.h: New file.
	* sysdeps/mach/hurd/net/if_arp.h: New file.
	* sysdeps/mach/hurd/net/if_ether.h: New file.
	* sysdeps/mach/hurd/net/if_ppp.h: New file.
	* sysdeps/mach/hurd/net/route.h: New file.
	Patches by  Fila Kolodny <fila@ibi.com>.

	* math/fenv-test.c: Add more tests.
	Patch by Andreas Jaeger <aj@arthur.rhein-neckar.de>.

	* sysdeps/wordsize-32/inttypes.h: Correct values for INTFAST_MIN,
	INTFAST_MAX, and UINTFAST_MAX.
	* sysdeps/wordsize-64/inttypes.h: Likewise.
	Correct intmax_t definition.

1997-07-04 15:33  H.J. Lu  <hjl@gnu.ai.mit.edu>

	* elf/rtld.c (dl_main): Add '\n' to _dl_sysdep_fatal ().

1997-07-01 09:18  H.J. Lu  <hjl@gnu.ai.mit.edu>

	* libc.map: Add missing symbol.

1997-07-04 18:04  H.J. Lu  <hjl@gnu.ai.mit.edu>

	* stdlib/tst-strtol.c: Don't assume cpp takes ~0UL as long
	in cc1.  Cpp in gcc doesn't do it.

1997-07-01 21:15  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* libio/libioP.h: Remove second definition of _IO_file_attach.

	* sysdeps/i386/fpu/fraiseexcpt.c (feraiseexcept): Correct comments.

	* sysdeps/sparc64/elf/start.S (_start): Update and reformat
	copyright.
	* manual/summary.awk: Likewise.
	* misc/bits/stab.def: Likewise.
	* posix/glob/Makefile.ami: Likewise.
	* posix/glob/Makefile.in: Likewise.
	* posix/glob/SMakefile: Likewise.
	* sysdeps/gnu/errlist.awk: Likewise.
	* sysdeps/mach/hurd/errnos.awk: Likewise.
	* sysdeps/standalone/i386/force_cpu386/target.ld: Likewise.
	* sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld: Likewise.
	* sysdeps/unix/snarf-ioctls: Likewise.
	* sysdeps/vax/setjmp.c: Likewise.

1997-07-05 11:56  Ulrich Drepper  <drepper@cygnus.com>

	* login/login.c (tty_name): Use newly allocated buffer.
	Patch by Jaakko Hyvtti <jaakko.hyvatti@iki.fi>.

	* time/asctime.c: Never translate week and month name according
	to LC_TIME.  Patch by Paul Eggert <eggert@twinsun.com>.

1997-07-03 22:50  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* locale/setlocale.c (setname): Do nothing when reusing the same
	name.

1997-07-03 20:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* libc.map: Add global variables of malloc.

1997-07-03 13:24  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/dl-version.c (find_needed): Look for needed objects also in
	the dependency list of the current object.  Added new parameter to
	find its link map, caller changed.

1997-07-03 12:33  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/fpu/fraiseexcpt.c: Correct the FE_INEXACT and
	FE_UNDERFLOW cases.

1997-07-01 13:36  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/link.h: Remove final comma from enumerator list, forbidden
	by ISO C.  Use __inline instead of inline.

1997-07-01 16:40  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* hurd/hurdsig.c: Include <hurd/id.h>.
	(reauth_proc): Call proc_setowner appropriately too.

1997-07-01 09:18  H.J. Lu  <hjl@gnu.ai.mit.edu>

	* libc.map: Add missing symbol.

1997-06-30 12:12  Fila Kolodny  <fila@ibi.com>

	* sysdeps/mach/hurd/fchdir.c: Make fchdir a weak alias of __fchdir.
	* sysdeps/mach/hurd/getpeername.c (getpeername): Remove spurious
	declaration of addr.

1997-06-29 17:56  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* manual/argp.texi (Argp Option Vectors): Fix use of @math to make
	it work in TeX.

1997-06-27 21:25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* Makeconfig (+includes): Add include directory to include path.
	* configure.in (sysnames): Don't add it here.
	* Makefile (subdir-dirs): Define and add it to vpath for headers.
	* Make-dist (all-headers): Look in include directory for
	indirection headers.  Filter out header names pointing outside the
	source directory.

	* Makefile (distribute): Remove ansidecl.h, add libc.map.
	* Make-dist (+tsrcs): Add version scripts for extra libraries.
	* Makerules (distinfo-vars): Add %-map for extra libraries.

	* sysdeps/unix/sysv/linux/alpha/Dist: Rename sys/kernel_termios.h
	to kernel_termios.h.
	* sysdeps/unix/sysv/linux/powerpc/Dist: Remove ioctl-types.h,
	termbits.h and sys/kernel_termios.h.
	* sysdeps/mips/mips64/Dist: New file.
	* sysdeps/unix/sysv/linux/Dist: Add stdio_lim.h.in.

1997-06-29 23:03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* math/test-fenv.c (feenv_nomask_test): New test for non masked
	exceptions.
	(feenv_mask_test): New test for masked exceptions
	(feenv_tests): New function calls feenv_nomask_test and
	feenv_mask_test.
	(main): Call new tests.
	(initial_tests): New test for initilisation.
This commit is contained in:
Ulrich Drepper 1997-07-06 22:02:42 +00:00
parent 5ae3e846b9
commit 762a2918ee
56 changed files with 1450 additions and 185 deletions

143
ChangeLog
View File

@ -1,3 +1,146 @@
1997-07-06 23:36 Ulrich Drepper <drepper@cygnus.com>
* isomac.c (get_null_defines): Put NULL at end of list.
* hurd/Makefile: Remove special handling of sunrpc code.
* sysdeps/mach/hurd/Makefile: Likewise.
Compile CThreads code.
* sunrpc/rpc_main.c: Don't use MAXPATHLEN.
* sysdeps/mach/bits/libc-lock.h: Add definitions for key handling
functions.
* sysdeps/stub/bits/libc-lock.h: Likewise.
* sysdeps/mach/hurd/net/ethernet.h: New file.
* sysdeps/mach/hurd/net/if.h: New file.
* sysdeps/mach/hurd/net/if_arp.h: New file.
* sysdeps/mach/hurd/net/if_ether.h: New file.
* sysdeps/mach/hurd/net/if_ppp.h: New file.
* sysdeps/mach/hurd/net/route.h: New file.
Patches by Fila Kolodny <fila@ibi.com>.
* math/fenv-test.c: Add more tests.
Patch by Andreas Jaeger <aj@arthur.rhein-neckar.de>.
* sysdeps/wordsize-32/inttypes.h: Correct values for INTFAST_MIN,
INTFAST_MAX, and UINTFAST_MAX.
* sysdeps/wordsize-64/inttypes.h: Likewise.
Correct intmax_t definition.
1997-07-04 15:33 H.J. Lu <hjl@gnu.ai.mit.edu>
* elf/rtld.c (dl_main): Add '\n' to _dl_sysdep_fatal ().
1997-07-01 09:18 H.J. Lu <hjl@gnu.ai.mit.edu>
* libc.map: Add missing symbol.
1997-07-04 18:04 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdlib/tst-strtol.c: Don't assume cpp takes ~0UL as long
in cc1. Cpp in gcc doesn't do it.
1997-07-01 21:15 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* libio/libioP.h: Remove second definition of _IO_file_attach.
* sysdeps/i386/fpu/fraiseexcpt.c (feraiseexcept): Correct comments.
* sysdeps/sparc64/elf/start.S (_start): Update and reformat
copyright.
* manual/summary.awk: Likewise.
* misc/bits/stab.def: Likewise.
* posix/glob/Makefile.ami: Likewise.
* posix/glob/Makefile.in: Likewise.
* posix/glob/SMakefile: Likewise.
* sysdeps/gnu/errlist.awk: Likewise.
* sysdeps/mach/hurd/errnos.awk: Likewise.
* sysdeps/standalone/i386/force_cpu386/target.ld: Likewise.
* sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld: Likewise.
* sysdeps/unix/snarf-ioctls: Likewise.
* sysdeps/vax/setjmp.c: Likewise.
1997-07-05 11:56 Ulrich Drepper <drepper@cygnus.com>
* login/login.c (tty_name): Use newly allocated buffer.
Patch by Jaakko Hyvätti <jaakko.hyvatti@iki.fi>.
* time/asctime.c: Never translate week and month name according
to LC_TIME. Patch by Paul Eggert <eggert@twinsun.com>.
1997-07-03 22:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* locale/setlocale.c (setname): Do nothing when reusing the same
name.
1997-07-03 20:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libc.map: Add global variables of malloc.
1997-07-03 13:24 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/dl-version.c (find_needed): Look for needed objects also in
the dependency list of the current object. Added new parameter to
find its link map, caller changed.
1997-07-03 12:33 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/fraiseexcpt.c: Correct the FE_INEXACT and
FE_UNDERFLOW cases.
1997-07-01 13:36 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/link.h: Remove final comma from enumerator list, forbidden
by ISO C. Use __inline instead of inline.
1997-07-01 16:40 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* hurd/hurdsig.c: Include <hurd/id.h>.
(reauth_proc): Call proc_setowner appropriately too.
1997-07-01 09:18 H.J. Lu <hjl@gnu.ai.mit.edu>
* libc.map: Add missing symbol.
1997-06-30 12:12 Fila Kolodny <fila@ibi.com>
* sysdeps/mach/hurd/fchdir.c: Make fchdir a weak alias of __fchdir.
* sysdeps/mach/hurd/getpeername.c (getpeername): Remove spurious
declaration of addr.
1997-06-29 17:56 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/argp.texi (Argp Option Vectors): Fix use of @math to make
it work in TeX.
1997-06-27 21:25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makeconfig (+includes): Add include directory to include path.
* configure.in (sysnames): Don't add it here.
* Makefile (subdir-dirs): Define and add it to vpath for headers.
* Make-dist (all-headers): Look in include directory for
indirection headers. Filter out header names pointing outside the
source directory.
* Makefile (distribute): Remove ansidecl.h, add libc.map.
* Make-dist (+tsrcs): Add version scripts for extra libraries.
* Makerules (distinfo-vars): Add %-map for extra libraries.
* sysdeps/unix/sysv/linux/alpha/Dist: Rename sys/kernel_termios.h
to kernel_termios.h.
* sysdeps/unix/sysv/linux/powerpc/Dist: Remove ioctl-types.h,
termbits.h and sys/kernel_termios.h.
* sysdeps/mips/mips64/Dist: New file.
* sysdeps/unix/sysv/linux/Dist: Add stdio_lim.h.in.
1997-06-29 23:03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* math/test-fenv.c (feenv_nomask_test): New test for non masked
exceptions.
(feenv_mask_test): New test for masked exceptions
(feenv_tests): New function calls feenv_nomask_test and
feenv_mask_test.
(main): Call new tests.
(initial_tests): New test for initilisation.
1997-06-29 23:43 Ulrich Drepper <drepper@cygnus.com>
* config.make.in: Define need-nopic-initfini.

View File

@ -66,7 +66,13 @@ else
foo:=$(shell echo>&2 '+distinfo=$(+distinfo)')
all-headers := $(patsubst +header+%,%,$(filter +header+%,$(+distinfo)))
# Ignore subdir headers without top-level indirections.
all-headers := $(sort $(headers) $(wildcard $(all-headers)))
all-headers := $(sort $(headers) \
$(patsubst include/%,%,\
$(wildcard $(addprefix include/,\
$(all-headers)))))
# Filter out names like ../conf/portability.h that would point outside
# the source directory.
all-headers := $(filter-out ../%,$(all-headers))
+subdir-nodist := $(patsubst +nodist+%,%,$(filter +nodist+%,$(+distinfo)))
+subdir-headers := $(filter-out $(headers),$(all-headers))
endif
@ -115,7 +121,7 @@ sources := $(filter-out $(addsuffix .c,$(basename $(.S.s))),$(sources)) $(.S.s)
$(+subdir-nodist) $(dont_distribute)
foo:=$(shell echo '+out=$(+out)' >&2; echo foofoo >&2)
+tsrcs := $(filter-out $(+out), $(sources) $(all-headers) $(distribute)) \
$(+sysdeps)
$(foreach l,$(extra-libs),$($l-map)) $(+sysdeps)
foo:=$(shell echo 'made +tsrcs=$(+tsrcs)'>&2)
foo:=$(shell echo generated='$(generated)' >&2)
#generated := $(sort $(generated) $(generated:.S=.c) $(generated:.s=.c))

View File

@ -487,14 +487,14 @@ endif # $(+cflags) == ""
# These are flags given to the C compiler to tell it to look for include
# files (including ones given in angle brackets) in the current directory
# and in the parent library source directory.
# files (including ones given in angle brackets) in the current directory,
# in the parent library source directory and in the include directory.
# `+sysdep-includes' will be defined by Makerules.
+includes = -I. $(filter-out -I,-I$(patsubst %/,%,$(..))) $($(stdio)-include) \
$(includes) $(+sysdep-includes) $(last-includes)
+includes = -I. $(patsubst %/,-I%,$(..)) -I$(..)include $($(stdio)-include) \
$(includes) $(+sysdep-includes) $(last-includes)
# Since libio has several internal header files, we use a -I instead
# of many little headers in the top level source directory.
# of many little headers in the include directory.
libio-include = -I$(..)libio
# These are the variables that the implicit compilation rules use.

View File

@ -89,6 +89,10 @@ before-compile += $(objpfx)version-info.h
echo-headers: subdir_echo-headers
# The headers are in the include directory.
subdir-dirs = include
vpath %.h $(subdir-dirs)
# What to install.
install-others = $(inst_includedir)/gnu/stubs.h
install-bin = glibcbug
@ -284,7 +288,7 @@ tests: parent-tests
# Run a test on the header files we use.
parent-tests: $(objpfx)isomac
$(dir $<)$(notdir $<) '$(CC)' '$(+sysdep-includes)' > $<.out
$(dir $<)$(notdir $<) '$(CC)' '-Iinclude $(+sysdep-includes)' > $<.out
$(objpfx)isomac: isomac.c
$(native-compile)
@ -295,7 +299,7 @@ distribute := README INSTALL FAQ NOTES NEWS PROJECTS BUGS \
COPYING.LIB COPYING ChangeLog ChangeLog.[0-9] \
Makefile Makeconfig Makerules Rules Make-dist MakeTAGS \
extra-lib.mk o-iterator.mk isomac.c \
ansidecl.h mkinstalldirs move-if-change install-sh \
libc.map mkinstalldirs move-if-change install-sh \
configure configure.in aclocal.m4 config.sub config.guess\
config.h.in config.make.in config-name.in Makefile.in \
autolock.sh rellns-sh munch-tmpl.c munch.awk interp.c \

View File

@ -933,7 +933,7 @@ echo > $@.new 'subdir := $(subdir)'
$(foreach var,subdir-dirs sources elided-routines sysdep_routines \
headers sysdep_headers distribute dont_distribute generated \
others tests test-srcs extra-libs $(extra-libs:%=%-routines) \
versioned \
$(extra-libs:%=%-map) versioned \
$(addprefix install-,lib lib.so data bin sbin others),
echo >> $@.new '$(subdir)-$(var) := $($(var))'
echo >> $@.new '$(var) = $$($(subdir)-$(var))')

4
configure vendored
View File

@ -1016,10 +1016,10 @@ while test $# -gt 0; do
done
# Add the default directories.
sysnames="$names sysdeps/generic sysdeps/stub include"
sysnames="$names sysdeps/generic sysdeps/stub"
# The other names were emitted during the scan.
echo "$ac_t""sysdeps/generic sysdeps/stub include" 1>&6
echo "$ac_t""sysdeps/generic sysdeps/stub" 1>&6
### Locate tools.

View File

@ -355,10 +355,10 @@ changequote([,])dnl
done
# Add the default directories.
sysnames="$names sysdeps/generic sysdeps/stub include"
sysnames="$names sysdeps/generic sysdeps/stub"
AC_SUBST(sysnames)
# The other names were emitted during the scan.
AC_MSG_RESULT(sysdeps/generic sysdeps/stub include)
AC_MSG_RESULT(sysdeps/generic sysdeps/stub)
### Locate tools.

View File

@ -53,7 +53,7 @@ extern char **_dl_argv;
static inline struct link_map *
find_needed (const char *name)
find_needed (const char *name, struct link_map *map)
{
unsigned int n;
@ -61,6 +61,12 @@ find_needed (const char *name)
if (_dl_name_match_p (name, _dl_loaded->l_searchlist[n]))
return _dl_loaded->l_searchlist[n];
/* The required object is not in the global scope, look to see if it is
a dependency of the current object. */
for (n = 0; n < map->l_nsearchlist; n++)
if (_dl_name_match_p (name, map->l_searchlist[n]))
return map->l_searchlist[n];
/* Should never happen. */
return NULL;
}
@ -182,7 +188,7 @@ _dl_check_map_versions (struct link_map *map, int verbose)
while (1)
{
ElfW(Vernaux) *aux;
struct link_map *needed = find_needed (strtab + ent->vn_file);
struct link_map *needed = find_needed (strtab + ent->vn_file, map);
/* If NEEDED is NULL this means a dependency was not found
and no stub entry was created. This should never happen. */

View File

@ -62,7 +62,7 @@ struct r_debug
the `r_brk' address is called. */
RT_CONSISTENT, /* Mapping change is complete. */
RT_ADD, /* Beginning to add a new object. */
RT_DELETE, /* Beginning to remove an object mapping. */
RT_DELETE /* Beginning to remove an object mapping. */
} r_state;
ElfW(Addr) r_ldbase; /* Base address the linker is loaded at. */
@ -152,7 +152,7 @@ struct link_map
{
lt_executable, /* The main executable program. */
lt_library, /* Library needed by main executable. */
lt_loaded, /* Extra run-time loaded shared object. */
lt_loaded /* Extra run-time loaded shared object. */
} l_type:2;
unsigned int l_relocated:1; /* Nonzero if object's relocations done. */
unsigned int l_init_called:1; /* Nonzero if DT_INIT function called. */
@ -167,7 +167,7 @@ struct link_map
/* Test whether given NAME matches any of the names of the given object. */
static inline int
static __inline int
__attribute__ ((unused))
_dl_name_match_p (const char *__name, struct link_map *__map)
{

View File

@ -358,7 +358,7 @@ of this helper program; chances are you did not intend to run this program.\n",
This will be what dlopen on "" returns. */
main_map = _dl_new_object ((char *) "", "", lt_executable);
if (main_map == NULL)
_dl_sysdep_fatal ("cannot allocate memory for link map", NULL);
_dl_sysdep_fatal ("cannot allocate memory for link map\n", NULL);
main_map->l_phdr = phdr;
main_map->l_phnum = phent;
main_map->l_entry = *user_entry;

View File

@ -68,19 +68,6 @@ distribute += hurdmalloc.h
include ../mach/Machrules
include ../Rules
# XXX sunrpc doesn't build yet for Hurd, but its headers are
# crucial nontheless. So sysdeps/mach/hurd/Makefile elides sunrpc
# from $(subdirs), and this rule arranges for the headers in question
# to get installed.
sunrpc-headers = netdb.h pmap_prot.h xdr.h types.h auth.h \
rpc_msg.h auth_unix.h clnt.h
installed-sunrpc-headers = $(addprefix $(inst_includedir)/rpc/, \
$(sunrpc-headers))
install-headers-nosubdir: $(installed-sunrpc-headers)
$(installed-sunrpc-headers): $(inst_includedir)/%: $(..)sunrpc/%
$(do-install)
# intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC
# stubs import <hurd/signal.h> and #define __mach_msg to
# _hurd_intr_rpc_mach_msg.

View File

@ -22,6 +22,7 @@
#include <hurd/signal.h>
#include <cthreads.h> /* For `struct mutex'. */
#include <string.h>
#include <hurd/id.h>
#include "hurdfault.h"
#include "hurdmalloc.h" /* XXX */
@ -1239,6 +1240,16 @@ reauth_proc (mach_port_t new)
__mach_port_deallocate (__mach_task_self (), ignore);
__mach_port_destroy (__mach_task_self (), ref);
/* Set the owner of the process here too. */
mutex_lock (&_hurd_id.lock);
if (!_hurd_check_ids ())
HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC],
__proc_setowner (port,
(_hurd_id.gen.nuids
? _hurd_id.gen.uids[0] : 0),
!_hurd_id.gen.nuids));
mutex_unlock (&_hurd_id.lock);
(void) &reauth_proc; /* Silence compiler warning. */
}
text_set_element (_hurd_reauth_hook, reauth_proc);

View File

@ -294,6 +294,17 @@ get_null_defines (void)
}
puts (result[result_len - 1]);
}
if (result_len == result_max)
{
result_max += 1;
result = realloc (result, result_max * sizeof (char **));
if (result == NULL)
{
puts ("No more memory.");
exit (1);
}
}
result[result_len] = NULL;
fclose (input);
remove (TMPFILE);

View File

@ -30,6 +30,9 @@ GLIBC_2.0 {
__libc_calloc; __libc_free; __libc_mallinfo; __libc_malloc;
__libc_mallopt; __libc_memalign; __libc_pvalloc; __libc_realloc;
__libc_valloc;
__malloc_initialize_hook; __free_hook; __malloc_hook; __realloc_hook;
__memalign_hook; __after_morecore_hook;
__malloc_initialized; __default_morecore; __morecore;
# functions with required interface outside normal name space
_exit; __ivaliduser; __open_catalog;
@ -50,6 +53,7 @@ GLIBC_2.0 {
_IO_getc; _IO_peekc_unlocked; _IO_putc; _IO_feof; _IO_ferror;
__xstat; __fxstat; __lxstat; __xmknod; __dcgettext;
__uflow; __underflow; __overflow; __iswctype; __sigpause;
__ctype_get_mb_cur_max;
# functions used in other libraries
__printf_fp; __stpncpy;
@ -75,7 +79,7 @@ GLIBC_2.0 {
_IO_remove_marker; _IO_marker_difference; _IO_marker_delta;
_IO_seekmark; _IO_unsave_markers; _IO_str_overflow;
_IO_str_underflow; _IO_str_init_static; _IO_str_init_readonly;
_IO_str_seekoff; _IO_str_pbackfail; _IO_list_all;
_IO_str_seekoff; _IO_str_pbackfail; _IO_list_all; _IO_file_jumps;
_rpc_dtablesize;
# all functions and variables in the normal name space

View File

@ -354,9 +354,6 @@ extern int _IO_file_close_it __P((_IO_FILE*));
extern _IO_fpos_t _IO_file_seek __P((_IO_FILE *, _IO_off_t, int));
extern void _IO_file_finish __P((_IO_FILE*, int));
/* Other file functions. */
extern _IO_FILE* _IO_file_attach __P((_IO_FILE *, int));
/* Jumptable functions for proc_files. */
extern _IO_FILE* _IO_proc_open __P((_IO_FILE*, const char*, const char *));
extern int _IO_proc_close __P((_IO_FILE*));

View File

@ -204,6 +204,9 @@ new_composite_name (int category, const char *newnames[LC_ALL])
static inline void
setname (int category, const char *name)
{
if (_nl_current_names[category] == name)
return;
if (_nl_current_names[category] != _nl_C_name)
free ((void *) _nl_current_names[category]);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -66,6 +66,7 @@ tty_name (int fd, char **tty, size_t buf_len)
__set_errno (ENOMEM);
break;
}
buf = new_buf;
}
if (rv == 0)

View File

@ -271,13 +271,15 @@ group); in this usage, it's conventional to end the string with a
The group this option is in.
In a long help message, options are sorted alphabetically within each
group, and the groups presented in the order @math{0, 1, 2, @dots{}, @var{n},
-@var{m}, @dots{}, -2, -1}. Every entry in an options array with this
group, and the groups presented in the order @math{0, 1, 2,} @dots{},
@math{@var{n}, -@var{m},} @dots{}, @math{-2, -1}. Every entry in an
options array with this
field 0 will inherit the group number of the previous entry, or zero if
it's the first one, unless its a group header (@code{name} and
@code{key} fields both zero), in which case, the previous entry @math{+ 1} is
@code{key} fields both zero), in which case, the previous entry
@math{@w{} + 1} is
the default. Automagic options such as @samp{--help} are put into group
--1.
@math{-1}.
Note that because of C structure initialization rules, this field
often need not be specified, because 0 is the right value.

View File

@ -14,9 +14,9 @@
# 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.
# 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.
# This script recognizes sequences that look like:
# @comment HEADER.h

View File

@ -1,5 +1,5 @@
%% TeX macros to handle Texinfo files.
%% $Id: texinfo.tex,v 2.205 1997/06/28 10:26:38 drepper Exp $
%% $Id: texinfo.tex,v 2.206 1997/07/06 21:41:02 drepper Exp $
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
% 94, 95, 96, 97 Free Software Foundation, Inc.
@ -36,7 +36,7 @@
% This automatically updates the version number based on RCS.
\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
\deftexinfoversion$Revision: 2.205 $
\deftexinfoversion$Revision: 2.206 $
\message{Loading texinfo package [Version \texinfoversion]:}
% If in a .fmt file, print the version number
@ -189,7 +189,7 @@
% Only leave this space if the footline is nonempty.
% (We lessened \vsize for it in \oddfootingxxx.)
% The \baselineskip=24pt in plain's \makefootline has no effect.
\vskip 2\baselineskip
\vskip\baselineskip
\unvbox\footlinebox
\fi
%
@ -735,10 +735,11 @@ where each line of input produces a line of output.}
%
\def\ignore{\doignore{ignore}}
% Also ignore @ifinfo, @ifhtml, @html, @menu, and @direntry text.
% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
%
\def\ifinfo{\doignore{ifinfo}}
\def\ifhtml{\doignore{ifhtml}}
\def\ifnottex{\doignore{ifnottex}}
\def\html{\doignore{html}}
\def\menu{\doignore{menu}}
\def\direntry{\doignore{direntry}}
@ -765,6 +766,10 @@ where each line of input produces a line of output.}
% Make sure that spaces turn into tokens that match what \doignoretext wants.
\catcode32 = 10
%
% Ignore braces, too, so mismatched braces don't cause trouble.
\catcode`\{ = 9
\catcode`\} = 9
%
% And now expand that command.
\doignoretext
}
@ -856,7 +861,7 @@ where each line of input produces a line of output.}
\pretolerance = 10000
%
% Do not execute instructions in @tex
\def\tex{\doignore{tex}}
\def\tex{\doignore{tex}}%
}
% @set VAR sets the variable VAR to an empty value.
@ -932,11 +937,16 @@ where each line of input produces a line of output.}
\def\ifclearfail{\nestedignore{ifclear}}
\defineunmatchedend{ifclear}
% @iftex always succeeds; we read the text following, through @end
% iftex). But `@end iftex' should be valid only after an @iftex.
% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
% following, through the first @end iftex (etc.). Make `@end iftex'
% (etc.) valid only after an @iftex.
%
\def\iftex{\conditionalsucceed{iftex}}
\def\ifnothtml{\conditionalsucceed{ifnothtml}}
\def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
\defineunmatchedend{iftex}
\defineunmatchedend{ifnothtml}
\defineunmatchedend{ifnotinfo}
% We can't just want to start a group at @iftex (for example) and end it
% at @end iftex, since then @set commands inside the conditional have no
@ -1346,12 +1356,25 @@ where each line of input produces a line of output.}
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
%
% Font to use for @kbd, ordinarily.
\let\kbdfont\t
% Font to use for @kbd, when inside @example.
\let\kbdexamplefont\t
% If you use @setkbdinputdistinct, then @kbd produces slanted tty font.
\def\setkbdinputdistinct{\let\kbdfont\ttsl
\let\kbdexamplefont\ttsl}
% If you use @setkbdinputexample, then @kbd produces slanted tty font
% only inside of @example and friends.
\def\setkbdinputexample{\gdef\kbdexamplefont\ttsl}
\def\xkey{\key}
\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
\ifx\one\xkey\ifx\threex\three \key{#2}%
\else{\tclose{\ttsl\look}}\fi
\else{\tclose{\ttsl\look}}\fi}
\else{\tclose{\kbdfont\look}}\fi
\else{\tclose{\kbdfont\look}}\fi}
% @url, @email. Quotes do not seem necessary.
\let\url=\code % perhaps include a hypertex \special eventually
@ -1531,8 +1554,8 @@ where each line of input produces a line of output.}
%
% Leave some space for the footline. Hopefully ok to assume
% @evenfooting will not be used by itself.
\global\advance\pageheight by -3\baselineskip
\global\advance\vsize by -3\baselineskip
\global\advance\pageheight by -\baselineskip
\global\advance\vsize by -\baselineskip
}
\gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}}
@ -3604,11 +3627,12 @@ width0pt\relax} \fi
%
\def\nonfillfinish{\afterenvbreak\endgroup}%
% This macro is
\def\lisp{\begingroup
\nonfillstart
\let\Elisp = \nonfillfinish
\tt
% Make @kbd do something special, if requested.
\let\kbdfont\kbdexamplefont
\rawbackslash % have \ input char produce \ char from current font
\gobble
}
@ -4355,7 +4379,7 @@ width0pt\relax} \fi
\catcode`\ =\other
\catcode`\^^L=\other
\catcode`\=\other
\catcode`\=\other
\catcode`\=\other
\catcode`\=\other
\catcode`\=\other
\catcode`\=\other

View File

@ -1,4 +1,24 @@
/* Test for exception handling functions of libm */
/* Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de> and
Ulrich Drepper <drepper@cygnus.com>, 1997.
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. */
/* Tests for ISO C 9X 7.6: Floating-point environment */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
@ -10,9 +30,12 @@
#include <fenv.h>
#include <errno.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/wait.h>
/*
Since not all architectures might define all exceptions, we define
@ -87,6 +110,54 @@ test_exceptions (const char *test_name, short int exception)
#endif
}
static void
print_rounding (int rounding)
{
switch (rounding) {
#ifdef FE_TONEAREST
case FE_TONEAREST:
printf ("TONEAREST");
break;
#endif
#ifdef FE_UPWARD
case FE_UPWARD:
printf ("UPWARD");
break;
#endif
#ifdef FE_DOWNWARD
case FE_DOWNWARD:
printf ("DOWNWARD");
break;
#endif
#ifdef FE_TOWARDZERO
case FE_TOWARDZERO:
printf ("TOWARDZERO");
break;
#endif
}
printf (".\n");
}
static void
test_rounding (const char *test_name, int rounding_mode)
{
int curr_rounding = fegetround ();
printf ("Test: %s\n", test_name);
if (curr_rounding == rounding_mode)
{
printf (" Pass: Rounding mode is ");
print_rounding (curr_rounding);
}
else {
++count_errors;
printf (" Fail: Rounding mode is ");
print_rounding (curr_rounding);
}
}
static void
set_single_exc (const char *test_name, int fe_exc, fexcept_t exception)
@ -130,7 +201,6 @@ fe_tests (void)
ALL_EXC);
feclearexcept (FE_ALL_EXCEPT);
#ifdef FE_DIVBYZERO
set_single_exc ("Set/Clear FE_DIVBYZERO", DIVBYZERO_EXC, FE_DIVBYZERO);
#endif
@ -148,11 +218,138 @@ fe_tests (void)
#endif
}
/* Test that program aborts with no masked interrupts */
static void
feenv_nomask_test (const char *flag_name, int fe_exc)
{
int status;
pid_t pid;
printf ("Test: after fesetenv (FE_NOMASK_ENV) processes will abort\n");
printf (" when feraiseexcept (%s) is called.\n", flag_name);
fesetenv (FE_NOMASK_ENV);
pid = fork ();
if (pid == 0)
{
feraiseexcept (fe_exc);
exit (2);
}
else if (pid < 0)
{
if (errno != ENOSYS)
{
printf (" Fail: Could not fork.\n");
++count_errors;
}
else
printf (" `fork' not implemented, test ignored.\n");
}
else {
if (waitpid (pid, &status, 0) != pid)
{
printf (" Fail: waitpid call failed.\n");
++count_errors;
}
else if (WIFSIGNALED (status) && WTERMSIG (status) == SIGFPE)
printf (" Pass: Process received SIGFPE.\n");
else
{
printf (" Fail: Process didn't receive signal and exited with status %d.\n",
status);
++count_errors;
}
}
}
/* Test that program doesn't abort with default environment */
static void
feenv_mask_test (const char *flag_name, int fe_exc)
{
int status;
pid_t pid;
printf ("Test: after fesetenv (FE_DFL_ENV) processes will not abort\n");
printf (" when feraiseexcept (%s) is called.\n", flag_name);
fesetenv (FE_DFL_ENV);
pid = fork ();
if (pid == 0)
{
feraiseexcept (fe_exc);
exit (2);
}
else if (pid < 0)
{
if (errno != ENOSYS)
{
printf (" Fail: Could not fork.\n");
++count_errors;
}
else
printf (" `fork' not implemented, test ignored.\n");
}
else {
if (waitpid (pid, &status, 0) != pid)
{
printf (" Fail: waitpid call failed.\n");
++count_errors;
}
else if (WIFEXITED (status) && WEXITSTATUS (status) == 2)
printf (" Pass: Process exited normally.\n");
else
{
printf (" Fail: Process exited abnormally with status %d.\n",
status);
++count_errors;
}
}
}
static void
feenv_tests (void)
{
#ifdef FE_DIVBYZERO
feenv_nomask_test ("FE_DIVBYZERO", FE_DIVBYZERO);
feenv_mask_test ("FE_DIVBYZERO", FE_DIVBYZERO);
#endif
#ifdef FE_INVALID
feenv_nomask_test ("FE_INVALID", FE_INVALID);
feenv_mask_test ("FE_INVALID", FE_INVALID);
#endif
#ifdef FE_INEXACT
feenv_nomask_test ("FE_INEXACT", FE_INEXACT);
feenv_mask_test ("FE_INEXACT", FE_INEXACT);
#endif
#ifdef FE_UNDERFLOW
feenv_nomask_test ("FE_UNDERFLOW", FE_UNDERFLOW);
feenv_mask_test ("FE_UNDERFLOW", FE_UNDERFLOW);
#endif
#ifdef FE_OVERFLOW
feenv_nomask_test ("FE_OVERFLOW", FE_OVERFLOW);
feenv_mask_test ("FE_OVERFLOW", FE_OVERFLOW);
#endif
fesetenv (FE_DFL_ENV);
}
/* IEC 559 and ISO C 9X define a default startup environment */
static void
initial_tests (void)
{
test_exceptions ("Initially all exceptions should be cleared",
NO_EXC);
test_rounding ("Rounding direction should be initalized to nearest",
FE_TONEAREST);
}
int
main (void)
{
initial_tests ();
fe_tests ();
/* _LIB_VERSION = _SVID;*/
feenv_tests ();
if (count_errors)
{

View File

@ -1,19 +1,21 @@
/* Table of DBX symbol codes for the GNU system.
Copyright (C) 1988 Free Software Foundation, Inc.
Copyright (C) 1988, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
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.
This program is distributed in the hope that it will be useful,
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 General Public License for more details.
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 General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
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. */
/* This contains contribution from Cygnus Support. */

View File

@ -1,6 +1,6 @@
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
# Copyright (C) 1991, 92, 93, 94, 95 Free Software Foundation, Inc.
# Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# This library is free software; you can redistribute it and/or
@ -14,9 +14,9 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
# License along with this library; see the file COPYING.LIB. If
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
# Cambridge, MA 02139, USA.
# 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.
# Ultrix 2.2 make doesn't expand the value of VPATH.
VPATH = /glob/

View File

@ -1,6 +1,6 @@
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
# Copyright (C) 1991, 92, 93, 94, 95 Free Software Foundation, Inc.
# Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# This library is free software; you can redistribute it and/or
@ -14,9 +14,9 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
# License along with this library; see the file COPYING.LIB. If
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
# Cambridge, MA 02139, USA.
# 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.
# Ultrix 2.2 make doesn't expand the value of VPATH.
VPATH = /glob/

View File

@ -6,6 +6,7 @@
#include <errno.h>
#include <stdlib.h>
#include <strings.h>
#include <limits.h>
struct ltest
{
@ -17,7 +18,7 @@ struct ltest
};
static const struct ltest tests[] =
{
#if ~0UL == 0xffffffff
#if LONG_MAX == 0x7fffffff
/* First, signed numbers. */
{ " -17", -17, 0, 0, 0 },
{ " +0x123fg", 0x123f, 0, 'g', 0 },

View File

@ -79,7 +79,7 @@ static const char *cmdname;
static const char *svcclosetime = "120";
static const char *CPP = SVR4_CPP;
static char CPPFLAGS[] = "-C";
static char pathbuf[MAXPATHLEN + 1];
static char pathbuf[FILENAME_MAX + 1];
static const char *allv[] = {
"rpcgen", "-s", "udp", "-s", "tcp",
};

View File

@ -1,4 +1,4 @@
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
@ -12,9 +12,9 @@
# 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.
# 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.
# errno.texi contains lines like:
# @comment errno.h

View File

@ -70,7 +70,7 @@ feraiseexcept (int excepts)
/* Next: underflow. */
if ((FE_UNDERFLOW & excepts) != 0)
{
/* There is no way to raise only the overflow flag. Do it the
/* There is no way to raise only the underflow flag. Do it the
hard way. */
fenv_t temp;
@ -91,7 +91,7 @@ feraiseexcept (int excepts)
/* Last: inexact. */
if ((FE_INEXACT & excepts) != 0)
{
/* There is no way to raise only the overflow flag. Do it the
/* There is no way to raise only the inexact flag. Do it the
hard way. */
fenv_t temp;

View File

@ -48,15 +48,43 @@ feraiseexcept (int excepts)
/* Next: overflow. */
if (excepts & FE_OVERFLOW)
{
/* We cannot raise the overflow exception without also setting the
inexact flag. Restore it after the operation, unless it should
be set anyway. */
long double d = LDBL_MAX;
__asm__ __volatile__ ("fmul%.x %0,%0; fnop" : "=f" (d) : "0" (d));
fexcept_t fpsr;
__asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
__asm__ __volatile__ ("fmul%.x %0,%0" : "=f" (d) : "0" (d));
if (!((excepts | fpsr) & FE_INEXACT))
{
__asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
fpsr &= ~FE_INEXACT;
__asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
}
else
__asm__ ("fnop");
}
/* Next: underflow. */
if (excepts & FE_UNDERFLOW)
{
long double d = LDBL_MIN;
__asm__ __volatile__ ("fdiv%.s %#0r16,%0; fnop" : "=f" (d) : "0" (d));
/* We cannot raise the underflow exception without also setting the
inexact flag. Restore it after the operation, unless it should
be set anyway. */
long double d = -LDBL_MAX;
fexcept_t fpsr;
__asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
__asm__ __volatile__ ("fetox%.x %0" : "=f" (d) : "0" (d));
if (!((excepts | fpsr) & FE_INEXACT))
{
__asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
fpsr &= ~FE_INEXACT;
__asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
}
else
__asm__ ("fnop");
}
/* Last: inexact. */

View File

@ -82,6 +82,10 @@ typedef cthread_key_t __libc_key_t;
#define __libc_mutex_unlock __mutex_unlock
#endif
#define __libc_key_create(KEY,DEST) cthread_keycreate (KEY)
#define __libc_setspecific(KEY,VAL) cthread_setspecific (KEY, VAL)
void *__libc_getspecific (__libc_key_t key);
/* XXX until cthreads supports recursive locks */
#define __libc_lock_define_initialized_recursive __libc_lock_define_initialized
#define __libc_lock_init_recursive __libc_lock_init

View File

@ -18,9 +18,6 @@
ifdef in-Makerules
subdirs := $(filter-out sunrpc,$(subdirs)) # XXX skip broken dirs
# See hurd/Makefile for commands that install some crucial sunrpc headers.
# Look for header files in hurd/ under the top-level library source directory.
# Look for generated header files where they get created.
includes += -I$(..)hurd -I$(common-objpfx)hurd/
@ -118,6 +115,11 @@ $(inst_libdir)/libc.so: $(rpcuserlibs)
ifeq (elf,$(subdir))
$(objpfx)librtld.so: $(rpcuserlibs:.so=_pic.a)
endif
# We need the CThreads interface.
ifeq (misc,$(subdir))
sysdep_routines += cthreads
endif
endif # in-Makerules

View File

@ -0,0 +1,48 @@
#include <bits/libc-lock.h>
#include <errno.h>
#include <stdlib.h>
/* Placeholder for key creation routine from Hurd cthreads library. */
int
weak_function
cthread_keycreate (key)
cthread_key_t *key;
{
__set_errno (ENOSYS);
*key = -1;
return -1;
}
/* Placeholder for key retrieval routine from Hurd cthreads library. */
int
weak_function
cthread_getspecific (key, pval)
cthread_key_t key;
void **pval;
{
*pval = NULL;
__set_errno (ENOSYS);
return -1;
}
/* Placeholder for key setting routine from Hurd cthreads library. */
int
weak_function
cthread_setspecific (key, val)
cthread_key_t key;
void *val;
{
__set_errno (ENOSYS);
return -1;
}
/* Call cthread_getspecific which gets a pointer to the return value instead
of just returning it. */
void *
__libc_getspecific (key)
cthread_key_t key;
{
void *val;
cthread_getspecific (key, &val);
return val;
}

View File

@ -1,4 +1,4 @@
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
@ -12,9 +12,9 @@
# 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.
# 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.
# errno.texinfo contains lines like:
# @comment errno.h

View File

@ -25,9 +25,8 @@
/* Change the current directory to FD. */
/* XXX should be __fchdir? */
int
fchdir (fd)
__fchdir (fd)
int fd;
{
error_t err;
@ -44,3 +43,4 @@ fchdir (fd)
return err ? __hurd_fail (err) : 0;
}
weak_alias (__fchdir, fchdir)

View File

@ -30,7 +30,6 @@
int
getpeername (fd, addrarg, len)
int fd;
struct sockaddr *addr;
__SOCKADDR_ARG addrarg;
size_t *len;
{

View File

@ -0,0 +1,76 @@
/* Copyright (C) 1997 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. */
/* Based on the FreeBSD version of this file. Curiously, that file
lacks a copyright in the header. */
#ifndef __NET_ETHERNET_H
#define __NET_ETHERNET_H 1
#include <sys/cdefs.h>
#include <sys/types.h>
#include <net/if_ether.h> /* IEEE 802.3 Ethernet constants */
__BEGIN_DECLS
/* This is a name for the 48 bit ethernet address available on many
systems. */
struct ether_addr
{
u_int8_t ether_addr_octet[ETH_ALEN];
};
/* 10Mb/s ethernet header */
struct ether_header
{
u_int8_t ether_dhost[ETH_ALEN]; /* destination eth addr */
u_int8_t ether_shost[ETH_ALEN]; /* source ether addr */
u_int16_t ether_type; /* packet type ID field */
};
/* Ethernet protocol ID's */
#define ETHERTYPE_PUP 0x0200 /* Xerox PUP */
#define ETHERTYPE_IP 0x0800 /* IP */
#define ETHERTYPE_ARP 0x0806 /* Address resolution */
#define ETHERTYPE_REVARP 0x8035 /* Reverse ARP */
#define ETHER_ADDR_LEN ETH_ALEN /* size of ethernet addr */
#define ETHER_TYPE_LEN 2 /* bytes in type field */
#define ETHER_CRC_LEN 4 /* bytes in CRC field */
#define ETHER_HDR_LEN ETH_HLEN /* total octets in header */
#define ETHER_MIN_LEN (ETH_ZLEN + ETH_CRC_LEN) /* min packet length */
#define ETHER_MAX_LEN (ETH_FRAME_LEN + ETH_CRC_LEN) /* max packet length */
/* make sure ethenet length is valid */
#define ETHER_IS_VALID_LEN(foo) \
((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
/*
* The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
* (type-ETHERTYPE_TRAIL)*512 bytes of data followed
* by an ETHER type (as given above) and then the (variable-length) header.
*/
#define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */
#define ETHERTYPE_NTRAILER 16
#define ETHERMTU ETH_DATA_LEN
#define ETHERMIN (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
__END_DECLS
#endif /* net/ethernet.h */

169
sysdeps/mach/hurd/net/if.h Normal file
View File

@ -0,0 +1,169 @@
/* Copyright (C) 1997 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 _NET_IF_H
#define _NET_IF_H 1
#include <features.h>
#include <sys/types.h>
#include <sys/socket.h>
/* Standard interface flags. */
enum
{
IFF_UP = 0x1, /* Interface is up. */
IFF_BROADCAST = 0x2, /* Broadcast address valid. */
IFF_DEBUG = 0x4, /* Turn on debugging. */
IFF_LOOPBACK = 0x8, /* Is a loopback net. */
IFF_POINTOPOINT = 0x10, /* Interface is point-to-point link. */
IFF_NOTRAILERS = 0x20, /* Avoid use of trailers. */
IFF_RUNNING = 0x40, /* Resources allocated. */
IFF_NOARP = 0x80, /* No address resolution protocol. */
IFF_PROMISC = 0x100, /* Receive all packets. */
/* Not supported */
IFF_ALLMULTI = 0x200, /* Receive all multicast packets. */
IFF_MASTER = 0x400, /* Master of a load balancer. */
IFF_SLAVE = 0x800, /* Slave of a load balancer. */
IFF_MULTICAST = 0x1000 /* Supports multicast. */
};
/* The ifaddr structure contains information about one address of an
interface. They are maintained by the different address families,
are allocated and attached when an address is set, and are linked
together so all addresses for an interface can be located. */
struct ifaddr
{
struct sockaddr ifa_addr; /* Address of interface. */
union
{
struct sockaddr ifu_broadaddr;
struct sockaddr ifu_dstaddr;
} ifa_ifu;
struct iface *ifa_ifp; /* Back-pointer to interface. */
struct ifaddr *ifa_next; /* Next address for interface. */
};
#define ifa_broadaddr ifa_ifu.ifu_broadaddr /* broadcast address */
#define ifa_dstaddr ifa_ifu.ifu_dstaddr /* other end of link */
/* Device mapping structure. I'd just gone off and designed a
beautiful scheme using only loadable modules with arguments for
driver options and along come the PCMCIA people 8)
Ah well. The get() side of this is good for WDSETUP, and it'll be
handy for debugging things. The set side is fine for now and being
very small might be worth keeping for clean configuration. */
struct ifmap
{
unsigned long int mem_start;
unsigned long int mem_end;
unsigned short int base_addr;
unsigned char irq;
unsigned char dma;
unsigned char port;
/* 3 bytes spare */
};
/* Interface request structure used for socket ioctl's. All interface
ioctl's must have parameter definitions which begin with ifr_name.
The remainder may be interface specific. */
struct ifreq
{
#define IFHWADDRLEN 6
#define IFNAMSIZ 16
union
{
char ifrn_name[IFNAMSIZ]; /* Interface name, e.g. "en0". */
} ifr_ifrn;
union
{
struct sockaddr ifru_addr;
struct sockaddr ifru_dstaddr;
struct sockaddr ifru_broadaddr;
struct sockaddr ifru_netmask;
struct sockaddr ifru_hwaddr;
short int ifru_flags;
int ifru_ivalue;
int ifru_mtu;
struct ifmap ifru_map;
char ifru_slave[IFNAMSIZ]; /* Just fits the size */
__caddr_t ifru_data;
} ifr_ifru;
};
#define ifr_name ifr_ifrn.ifrn_name /* interface name */
#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
#define ifr_addr ifr_ifru.ifru_addr /* address */
#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */
#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */
#define ifr_flags ifr_ifru.ifru_flags /* flags */
#define ifr_metric ifr_ifru.ifru_ivalue /* metric */
#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
#define ifr_map ifr_ifru.ifru_map /* device map */
#define ifr_slave ifr_ifru.ifru_slave /* slave device */
#define ifr_data ifr_ifru.ifru_data /* for use by interface */
#define ifr_ifindex ifr_ifru..ifru_ivalue /* interface index */
#define _IOT_ifreq \
_IOT(_IOTS(struct ifreq),1,0,0,0,0)
/* Structure used in SIOCGIFCONF request. Used to retrieve interface
configuration for machine (useful for programs which must know all
networks accessible). */
struct ifconf
{
int ifc_len; /* Size of buffer. */
union
{
__caddr_t ifcu_buf;
struct ifreq *ifcu_req;
} ifc_ifcu;
};
#define ifc_buf ifc_ifcu.ifcu_buf /* Buffer address. */
#define ifc_req ifc_ifcu.ifcu_req /* Array of structures. */
#define _IOT_ifconf \
_IOT(_IOTS(struct ifconf),1,0,0,0,0)
/* Convert an interface name to an index, and vice versa. */
unsigned int if_nametoindex(const char *ifname);
char *if_indextoname(unsigned int ifindex, char *ifname);
/* Return a list of all interfaces and their indices. */
struct if_nameindex {
unsigned int if_index; /* 1, 2, ... */
char *if_name; /* null terminated name: "eth0", .... */
};
struct if_nameindex *if_nameindex(void);
/* Free the data returned from if_nameindex. */
void if_freenameindex(struct if_nameindex *ptr);
#endif /* net/if.h */

View File

@ -0,0 +1,145 @@
/* Definitions for Address Resolution Protocol.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
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. */
/* Based on the 4.4BSD and Linux version of this file. */
#ifndef _NET_IF_ARP_H
#define _NET_IF_ARP_H 1
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>
__BEGIN_DECLS
/* Some internals from deep down in the kernel. */
#define MAX_ADDR_LEN 7
/* This structure defines an ethernet arp header. */
/* ARP protocol opcodes. */
#define ARPOP_REQUEST 1 /* ARP request. */
#define ARPOP_REPLY 2 /* ARP reply. */
#define ARPOP_RREQUEST 3 /* RARP request. */
#define ARPOP_RREPLY 4 /* RARP reply. */
/* See RFC 826 for protocol description. ARP packets are variable
in size; the arphdr structure defines the fixed-length portion.
Protocol type values are the same as those for 10 Mb/s Ethernet.
It is followed by the variable-sized fields ar_sha, arp_spa,
arp_tha and arp_tpa in that order, according to the lengths
specified. Field names used correspond to RFC 826. */
struct arphdr
{
unsigned short int ar_hrd; /* Format of hardware address. */
unsigned short int ar_pro; /* Format of protocol address. */
unsigned char ar_hln; /* Length of hardware address. */
unsigned char ar_pln; /* Length of protocol address. */
unsigned short int ar_op; /* ARP opcode (command). */
#if 0
/* Ethernet looks like this : This bit is variable sized
however... */
unsigned char __ar_sha[ETH_ALEN]; /* Sender hardware address. */
unsigned char __ar_sip[4]; /* Sender IP address. */
unsigned char __ar_tha[ETH_ALEN]; /* Target hardware address. */
unsigned char __ar_tip[4]; /* Target IP address. */
#endif
};
/* ARP protocol HARDWARE identifiers. */
#define ARPHRD_NETROM 0 /* From KA9Q: NET/ROM pseudo. */
#define ARPHRD_ETHER 1 /* Ethernet 10Mbps. */
#define ARPHRD_EETHER 2 /* Experimental Ethernet. */
#define ARPHRD_AX25 3 /* AX.25 Level 2. */
#define ARPHRD_PRONET 4 /* PROnet token ring. */
#define ARPHRD_CHAOS 5 /* Chaosnet. */
#define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB. */
#define ARPHRD_ARCNET 7 /* ARCnet. */
#define ARPHRD_APPLETLK 8 /* APPLEtalk. */
#define ARPHRD_DLCI 15 /* Frame Relay DLCI. */
#define ARPHRD_METRICOM 23 /* Metricom STRIP (new IANA id). */
/* Dummy types for non ARP hardware */
#define ARPHRD_SLIP 256
#define ARPHRD_CSLIP 257
#define ARPHRD_SLIP6 258
#define ARPHRD_CSLIP6 259
#define ARPHRD_RSRVD 260 /* Notional KISS type. */
#define ARPHRD_ADAPT 264
#define ARPHRD_ROSE 270
#define ARPHRD_X25 271 /* CCITT X.25. */
#define ARPHRD_PPP 512
#define ARPHRD_HDLC 513 /* (Cisco) HDLC. */
#define ARPHRD_LAPB 516 /* LAPB. */
#define ARPHRD_TUNNEL 768 /* IPIP tunnel. */
#define ARPHRD_TUNNEL6 769 /* IPIP6 tunnel. */
#define ARPHRD_FRAD 770 /* Frame Relay Access Device. */
#define ARPHRD_SKIP 771 /* SKIP vif. */
#define ARPHRD_LOOPBACK 772 /* Loopback device. */
#define ARPHRD_LOCALTLK 773 /* Localtalk device. */
#define ARPHRD_FDDI 774 /* Fiber Distributed Data Interface. */
#define ARPHRD_BIF 775 /* AP1000 BIF. */
#define ARPHRD_SIT 776 /* sit0 device - IPv6-in-IPv4. */
/* ARP ioctl request. */
struct arpreq
{
struct sockaddr arp_pa; /* Protocol address. */
struct sockaddr arp_ha; /* Hardware address. */
int arp_flags; /* Flags. */
struct sockaddr arp_netmask; /* Netmask (only for proxy arps). */
char arp_dev[16];
};
/* ARP Flag values. */
#define ATF_COM 0x02 /* Completed entry (ha valid). */
#define ATF_PERM 0x04 /* Permanent entry. */
#define ATF_PUBL 0x08 /* Publish entry. */
#define ATF_USETRAILERS 0x10 /* Has requested trailers. */
#define ATF_NETMASK 0x20 /* Want to use a netmask (only
for proxy entries). */
#define ATF_DONTPUB 0x40 /* Don't answer this addresses. */
#define ATF_MAGIC 0x80 /* Automatically added entry. */
/* Support for the user space arp daemon, arpd. */
#define ARPD_UPDATE 0x01
#define ARPD_LOOKUP 0x02
#define ARPD_FLUSH 0x03
struct arpd_request
{
unsigned short int req; /* Request type. */
u_int32_t ip; /* IP address of entry. */
unsigned long int dev; /* Device entry is tied to. */
unsigned long int stamp;
unsigned long int updated;
unsigned char ha[MAX_ADDR_LEN]; /* Hardware address. */
};
__END_DECLS
#endif /* net/if_arp.h */

View File

@ -0,0 +1,85 @@
/* Copyright (C) 1997 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 _NET_IF_ETHER_H
#define _NET_IF_ETHER_H 1
/*
* IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
* and FCS/CRC (frame check sequence).
*/
#define ETH_ALEN 6 /* Octets in one ethernet addr */
#define ETH_HLEN 14 /* Total octets in header. */
#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */
#define ETH_DATA_LEN 1500 /* Max. octets in payload */
#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */
/*
* These are the defined Ethernet Protocol ID's.
*/
#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */
#define ETH_P_ECHO 0x0200 /* Ethernet Echo packet */
#define ETH_P_PUP 0x0400 /* Xerox PUP packet */
#define ETH_P_IP 0x0800 /* Internet Protocol packet */
#define ETH_P_X25 0x0805 /* CCITT X.25 */
#define ETH_P_ARP 0x0806 /* Address Resolution packet */
#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */
#define ETH_P_DEC 0x6000 /* DEC Assigned proto */
#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */
#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */
#define ETH_P_DNA_RT 0x6003 /* DEC DNA Routing */
#define ETH_P_LAT 0x6004 /* DEC LAT */
#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */
#define ETH_P_CUST 0x6006 /* DEC Customer use */
#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */
#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */
#define ETH_P_ATALK 0x809B /* Appletalk DDP */
#define ETH_P_AARP 0x80F3 /* Appletalk AARP */
#define ETH_P_IPX 0x8137 /* IPX over DIX */
#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */
/*
* Non DIX types. Won't clash for 1500 types.
*/
#define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */
#define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */
#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */
#define ETH_P_802_2 0x0004 /* 802.2 frames */
#define ETH_P_SNAP 0x0005 /* Internal only */
#define ETH_P_DDCMP 0x0006 /* DEC DDCMP: Internal only */
#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/
#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */
#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */
#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/
#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */
/*
* This is an Ethernet frame header.
*/
struct ethhdr
{
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
unsigned char h_source[ETH_ALEN]; /* source ether addr */
unsigned short int h_proto; /* packet type ID field */
};
#endif /* net/if_ether.h */

View File

@ -0,0 +1,157 @@
/* From: if_ppp.h,v 1.3 1995/06/12 11:36:50 paulus Exp */
/*
* if_ppp.h - Point-to-Point Protocol definitions.
*
* Copyright (c) 1989 Carnegie Mellon University.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by Carnegie Mellon University. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
*/
/*
* ==FILEVERSION 960926==
*
* NOTE TO MAINTAINERS:
* If you modify this file at all, please set the above date.
* if_ppp.h is shipped with a PPP distribution as well as with the kernel;
* if everyone increases the FILEVERSION number above, then scripts
* can do the right thing when deciding whether to install a new if_ppp.h
* file. Don't change the format of that line otherwise, so the
* installation script can recognize it.
*/
#ifndef __NET_IF_PPP_H
#define __NET_IF_PPP_H 1
#include <sys/types.h>
#include <sys/cdefs.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <net/ppp_defs.h>
__BEGIN_DECLS
/*
* Packet sizes
*/
#define PPP_MTU 1500 /* Default MTU (size of Info field) */
#define PPP_MAXMRU 65000 /* Largest MRU we allow */
#define PPP_VERSION "2.2.0"
#define PPP_MAGIC 0x5002 /* Magic value for the ppp structure */
#define PROTO_IPX 0x002b /* protocol numbers */
#define PROTO_DNA_RT 0x0027 /* DNA Routing */
/*
* Bit definitions for flags.
*/
#define SC_COMP_PROT 0x00000001 /* protocol compression (output) */
#define SC_COMP_AC 0x00000002 /* header compression (output) */
#define SC_COMP_TCP 0x00000004 /* TCP (VJ) compression (output) */
#define SC_NO_TCP_CCID 0x00000008 /* disable VJ connection-id comp. */
#define SC_REJ_COMP_AC 0x00000010 /* reject adrs/ctrl comp. on input */
#define SC_REJ_COMP_TCP 0x00000020 /* reject TCP (VJ) comp. on input */
#define SC_CCP_OPEN 0x00000040 /* Look at CCP packets */
#define SC_CCP_UP 0x00000080 /* May send/recv compressed packets */
#define SC_ENABLE_IP 0x00000100 /* IP packets may be exchanged */
#define SC_COMP_RUN 0x00001000 /* compressor has been inited */
#define SC_DECOMP_RUN 0x00002000 /* decompressor has been inited */
#define SC_DEBUG 0x00010000 /* enable debug messages */
#define SC_LOG_INPKT 0x00020000 /* log contents of good pkts recvd */
#define SC_LOG_OUTPKT 0x00040000 /* log contents of pkts sent */
#define SC_LOG_RAWIN 0x00080000 /* log all chars received */
#define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */
#define SC_MASK 0x0fE0ffff /* bits that user can change */
/* state bits */
#define SC_ESCAPED 0x80000000 /* saw a PPP_ESCAPE */
#define SC_FLUSH 0x40000000 /* flush input until next PPP_FLAG */
#define SC_VJ_RESET 0x20000000 /* Need to reset the VJ decompressor */
#define SC_XMIT_BUSY 0x10000000 /* ppp_write_wakeup is active */
#define SC_RCV_ODDP 0x08000000 /* have rcvd char with odd parity */
#define SC_RCV_EVNP 0x04000000 /* have rcvd char with even parity */
#define SC_RCV_B7_1 0x02000000 /* have rcvd char with bit 7 = 1 */
#define SC_RCV_B7_0 0x01000000 /* have rcvd char with bit 7 = 0 */
#define SC_DC_FERROR 0x00800000 /* fatal decomp error detected */
#define SC_DC_ERROR 0x00400000 /* non-fatal decomp error detected */
/*
* Ioctl definitions.
*/
struct npioctl {
int protocol; /* PPP protocol, e.g. PPP_IP */
enum NPmode mode;
};
/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */
struct ppp_option_data {
u_int8_t *ptr;
u_int32_t length;
int transmit;
};
struct ifpppstatsreq {
struct ifreq b;
struct ppp_stats stats; /* statistic information */
};
struct ifpppcstatsreq {
struct ifreq b;
struct ppp_comp_stats stats;
};
#define ifr__name b.ifr_ifrn.ifrn_name
#define stats_ptr b.ifr_ifru.ifru_data
/*
* Ioctl definitions.
*/
#define PPPIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */
#define PPPIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */
#define PPPIOCGASYNCMAP _IOR('t', 88, int) /* get async map */
#define PPPIOCSASYNCMAP _IOW('t', 87, int) /* set async map */
#define PPPIOCGUNIT _IOR('t', 86, int) /* get ppp unit number */
#define PPPIOCGRASYNCMAP _IOR('t', 85, int) /* get receive async map */
#define PPPIOCSRASYNCMAP _IOW('t', 84, int) /* set receive async map */
#define PPPIOCGMRU _IOR('t', 83, int) /* get max receive unit */
#define PPPIOCSMRU _IOW('t', 82, int) /* set max receive unit */
#define PPPIOCSMAXCID _IOW('t', 81, int) /* set VJ max slot ID */
#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */
#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */
#define PPPIOCXFERUNIT _IO('t', 78) /* transfer PPP unit */
#define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data)
#define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl) /* get NP mode */
#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl) /* set NP mode */
#define PPPIOCGDEBUG _IOR('t', 65, int) /* Read debug level */
#define PPPIOCSDEBUG _IOW('t', 64, int) /* Set debug level */
#define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle) /* get idle time */
#define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0)
#define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */
#define SIOCGPPPCSTATS (SIOCDEVPRIVATE + 2)
#if !defined(ifr_mtu)
#define ifr_mtu ifr_ifru.ifru_metric
#endif
__END_DECLS
#endif /* net/if_ppp.h */

View File

@ -0,0 +1,141 @@
/* Copyright (C) 1997 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. */
/* Based on the 4.4BSD and Linux version of this file. */
#ifndef _NET_ROUTE_H
#define _NET_ROUTE_H 1
#include <features.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
struct rtentry
{
unsigned long int rt_pad1;
struct sockaddr rt_dst; /* Target address. */
struct sockaddr rt_gateway; /* Gateway addr (RTF_GATEWAY). */
struct sockaddr rt_genmask; /* Target network mask (IP). */
unsigned short int rt_flags;
short int rt_pad2;
unsigned long int rt_pad3;
unsigned char rt_tos;
unsigned char rt_class;
short int rt_pad4;
short int rt_metric; /* +1 for binary compatibility! */
char *rt_dev; /* Forcing the device at add. */
unsigned long int rt_mtu; /* Per route MTU/Window. */
unsigned long int rt_window; /* Window clamping. */
unsigned short int rt_irtt; /* Initial RTT. */
};
/* Compatibility hack. */
#define rt_mss rt_mtu
struct in6_rtmsg
{
struct in6_addr rtmsg_dst;
struct in6_addr rtmsg_src;
struct in6_addr rtmsg_gateway;
u_int32_t rtmsg_type;
u_int16_t rtmsg_dst_len;
u_int16_t rtmsg_src_len;
u_int32_t rtmsg_metric;
unsigned long int rtmsg_info;
u_int32_t rtmsg_flags;
int rtmsg_ifindex;
};
#define RTF_UP 0x0001 /* Route usable. */
#define RTF_GATEWAY 0x0002 /* Destination is a gateway. */
#define RTF_HOST 0x0004 /* Host entry (net otherwise). */
#define RTF_REINSTATE 0x0008 /* Reinstate route after timeout. */
#define RTF_DYNAMIC 0x0010 /* Created dyn. (by redirect). */
#define RTF_MODIFIED 0x0020 /* Modified dyn. (by redirect). */
#define RTF_MTU 0x0040 /* Specific MTU for this route. */
#define RTF_MSS RTF_MTU /* Compatibility. */
#define RTF_WINDOW 0x0080 /* Per route window clamping. */
#define RTF_IRTT 0x0100 /* Initial round trip time. */
#define RTF_REJECT 0x0200 /* Reject route. */
#define RTF_STATIC 0x0400 /* Manually injected route. */
#define RTF_XRESOLVE 0x0800 /* External resolver. */
#define RTF_NOFORWARD 0x1000 /* Forwarding inhibited. */
#define RTF_THROW 0x2000 /* Go to next class. */
#define RTF_NOPMTUDISC 0x4000 /* Do not send packets with DF. */
/* for IPv6 */
#define RTF_DEFAULT 0x00010000 /* default - learned via ND */
#define RTF_ALLONLINK 0x00020000 /* fallback, no routers on link */
#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */
#define RTF_LINKRT 0x00100000 /* link specific - device match */
#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */
#define RTF_CACHE 0x01000000 /* cache entry */
#define RTF_FLOW 0x02000000 /* flow significant route */
#define RTF_POLICY 0x04000000 /* policy route */
#define RTCF_VALVE 0x00200000
#define RTCF_MASQ 0x00400000
#define RTCF_NAT 0x00800000
#define RTCF_DOREDIRECT 0x01000000
#define RTCF_LOG 0x02000000
#define RTCF_DIRECTSRC 0x04000000
#define RTF_LOCAL 0x80000000
#define RTF_INTERFACE 0x40000000
#define RTF_MULTICAST 0x20000000
#define RTF_BROADCAST 0x10000000
#define RTF_NAT 0x08000000
#define RTF_ADDRCLASSMASK 0xF8000000
#define RT_ADDRCLASS(flags) ((__u_int32_t) flags >> 23)
#define RT_TOS(tos) ((tos) & IPTOS_TOS_MASK)
#define RT_LOCALADDR(flags) ((flags & RTF_ADDRCLASSMASK) \
== (RTF_LOCAL|RTF_INTERFACE))
#define RT_CLASS_UNSPEC 0
#define RT_CLASS_DEFAULT 253
#define RT_CLASS_MAIN 254
#define RT_CLASS_LOCAL 255
#define RT_CLASS_MAX 255
#define RTMSG_ACK NLMSG_ACK
#define RTMSG_OVERRUN NLMSG_OVERRUN
#define RTMSG_NEWDEVICE 0x11
#define RTMSG_DELDEVICE 0x12
#define RTMSG_NEWROUTE 0x21
#define RTMSG_DELROUTE 0x22
#define RTMSG_NEWRULE 0x31
#define RTMSG_DELRULE 0x32
#define RTMSG_CONTROL 0x40
#define RTMSG_AR_FAILED 0x51 /* Address Resolution failed. */
#endif /* net/route.h */

1
sysdeps/mips/mips64/Dist Normal file
View File

@ -0,0 +1 @@
setjmp_aux.c

View File

@ -4,4 +4,4 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
dnl We need to have separate crt? files for static linking which does
dnl not use PIC.
nopic_initfini=yes
nopic_initfini=yes

View File

@ -13,9 +13,9 @@
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. */
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. */
#include <sysdep.h>

View File

@ -1,28 +1,27 @@
/* Copyright (C) 1994 Free Software Foundation, Inc.
/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
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. */
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. */
/* This file contains directives for the GNU linker which are specific
to the FORCE CPU386 board. */
MEMORY
MEMORY
{
ram : org = 0x0, l = 1M
}
@ -34,19 +33,19 @@ heap_size = 0x20000;
SECTIONS
{
.text 0x0 :
.text 0x0 :
{
_text_start = ABSOLUTE(.) ;
*(.text)
_etext = ALIGN( 0x10 ) ;
}
.data ADDR( .text ) + SIZEOF( .text ):
.data ADDR( .text ) + SIZEOF( .text ):
{
_data_start = . ;
*(.data)
_edata = ALIGN( 0x10 ) ;
}
.bss ADDR( .data ) + SIZEOF( .data ):
.bss ADDR( .data ) + SIZEOF( .data ):
{
_bss_start = . ;
*(.bss)

View File

@ -1,28 +1,27 @@
/* Copyright (C) 1994 Free Software Foundation, Inc.
/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
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. */
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. */
/* This file contains directives for the GNU linker which are specific
to the Motorola MVME136/MVME135 boards. */
MEMORY
MEMORY
{
ram : org = 0x3000, l = 1M
}
@ -34,21 +33,21 @@ heap_size = 0x20000;
SECTIONS
{
.text 0x3000 :
.text 0x3000 :
{
text_start = ABSOLUTE(.) ;
*(.text)
etext = ALIGN( 0x10 ) ;
}
}
.data ADDR( .text ) + SIZEOF( .text ):
.data ADDR( .text ) + SIZEOF( .text ):
{
data_start = . ;
*(.data)
edata = ALIGN( 0x10 ) ;
}
.bss ADDR( .data ) + SIZEOF( .data ):
.bss ADDR( .data ) + SIZEOF( .data ):
{
bss_start = . ;
_bss_start = . ;
@ -58,5 +57,5 @@ SECTIONS
. += 0x20000;
end = . ;
_end = . ;
}
}
}

View File

@ -83,4 +83,13 @@
/* Type for key of thread specific data. */
typedef int __libc_key_t;
/* Create key for thread specific data. */
#define __libc_key_create(KEY,DEST)
/* Set thread-specific data associated with KEY to VAL. */
#define __libc_setspecific(KEY,VAL)
/* Get thread-specific data associated with KEY. */
#define __libc_getspecific(KEY) 0
#endif /* bits/libc-lock.h */

View File

@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
# Copyright (C) 1991, 1992, 1995, 1997 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
@ -12,9 +12,10 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with the GNU C Library; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# 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.
sysincludedir=${sysincludedir-/usr/include}

View File

@ -1,3 +1,4 @@
stdio_lim.h.in
cmsg_nxthdr.c
init-first.h
kernel_sigaction.h

View File

@ -5,7 +5,7 @@ init-first.h
clone.S
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
sys/io.h
sys/acct.h
sys/kernel_termios.h
sys/procfs.h

View File

@ -1,8 +1,5 @@
clone.S
ioctl-types.h
termbits.h
kernel_stat.h
kernel_termios.h
sys/kernel_termios.h
init-first.h
syscall.h

View File

@ -13,9 +13,9 @@
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. */
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. */
#include <sysdep.h>

View File

@ -1,21 +1,22 @@
/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
Copyright (c) 1980 Regents of the University of California.
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 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.
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. */
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. */
#include <setjmp.h>

View File

@ -147,12 +147,12 @@ typedef unsigned long long int uint_fast64_t;
/* Minimum for most efficient signed integral types. */
#define INTFAST_MIN (-128)
#define INTFAST_MIN (-2147483647-1)
/* Maximum for most efficient signed integral types. */
#define INTFAST_MAX (127)
#define INTFAST_MAX (2147483647)
/* Maximum for most efficient unsigned integral types. */
#define UINTFAST_MAX (255)
#define UINTFAST_MAX (4294967295U)
/* Minimum for largest signed integral type. */

View File

@ -46,7 +46,7 @@ typedef unsigned long int uint64_t;
/* Largest integral types. */
typedef long long int intmax_t;
typedef long int intmax_t;
typedef unsigned long int uintmax_t;
@ -147,12 +147,12 @@ typedef unsigned long int uint_fast64_t;
/* Minimum for most efficient signed integral types. */
#define INTFAST_MIN (-128)
#define INTFAST_MIN (-9223372036854775807L-1)
/* Maximum for most efficient signed integral types. */
#define INTFAST_MAX (127)
#define INTFAST_MAX (9223372036854775807L)
/* Maximum for most efficient unsigned integral types. */
#define UINTFAST_MAX (255)
#define UINTFAST_MAX (18446744073709551615uL)
/* Minimum for largest signed integral type. */

View File

@ -21,6 +21,10 @@
#include <stdio.h>
#include <time.h>
/* This is defined in locale/C-time.c in the GNU libc. */
extern const struct locale_data _nl_C_LC_TIME;
#define ab_day_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABDAY_1)].string)
#define ab_month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABMON_1)].string)
static const char format[] = "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n";
static char result[ 3+1+ 3+1+20+1+20+1+20+1+20+1+20+1 + 1];
@ -45,9 +49,9 @@ __asctime_r (const struct tm *tp, char *buf)
if (sprintf (buf, format,
(tp->tm_wday < 0 || tp->tm_wday >= 7 ?
"???" : _NL_CURRENT (LC_TIME, ABDAY_1 + tp->tm_wday)),
"???" : ab_day_name[tp->tm_wday]),
(tp->tm_mon < 0 || tp->tm_mon >= 12 ?
"???" : _NL_CURRENT (LC_TIME, ABMON_1 + tp->tm_mon)),
"???" : ab_month_name[tp->tm_mon]),
tp->tm_mday, tp->tm_hour, tp->tm_min,
tp->tm_sec, 1900 + tp->tm_year) < 0)
return NULL;