Remade for alpha-1.93
This commit is contained in:
parent
9ebb936d99
commit
e75154a665
16
Makeconfig
16
Makeconfig
|
@ -298,9 +298,9 @@ endif
|
||||||
ifndef +link
|
ifndef +link
|
||||||
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
|
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
|
||||||
$(addprefix $(csu-objpfx),start.o $(+preinit)) \
|
$(+preinit) \
|
||||||
$(filter-out $(common-objpfx)libc%,$^) $(link-libc) \
|
$(filter-out $(common-objpfx)libc%,$^) $(link-libc) \
|
||||||
$(addprefix $(csu-objpfx),$(+postinit))
|
$(+postinit)
|
||||||
endif
|
endif
|
||||||
ifndef config-LDFLAGS
|
ifndef config-LDFLAGS
|
||||||
ifeq (yes,$(build-shared))
|
ifeq (yes,$(build-shared))
|
||||||
|
@ -334,8 +334,8 @@ ifndef gnulib
|
||||||
gnulib := -lgcc
|
gnulib := -lgcc
|
||||||
endif
|
endif
|
||||||
ifeq ($(elf),yes)
|
ifeq ($(elf),yes)
|
||||||
+preinit = crti.o
|
+preinit = $(addprefix $(csu-objpfx),crti.o)
|
||||||
+postinit = crtn.o
|
+postinit = $(addprefix $(csu-objpfx),crtn.o)
|
||||||
endif
|
endif
|
||||||
ifdef objpfx
|
ifdef objpfx
|
||||||
csu-objpfx = $(objpfx)
|
csu-objpfx = $(objpfx)
|
||||||
|
@ -521,10 +521,12 @@ $(common-objpfx)soversions.mk: $(..)shlib-versions $(..)Makeconfig \
|
||||||
test -n "$$versions" || continue; \
|
test -n "$$versions" || continue; \
|
||||||
case '$(config-machine)-$(config-vendor)-$(config-os)' in $$conf)\
|
case '$(config-machine)-$(config-vendor)-$(config-os)' in $$conf)\
|
||||||
for v in $$versions; do \
|
for v in $$versions; do \
|
||||||
lib="$${v%%=*}"; if eval "test -z \"\$$vers_lib$$lib\""; then \
|
lib=`echo $$v | sed 's/=.*$$//'`; \
|
||||||
|
if eval "test -z \"\$$vers_lib$$lib\""; then \
|
||||||
eval vers_lib$${lib}=yes; \
|
eval vers_lib$${lib}=yes; \
|
||||||
echo $$lib.so-version=.$${v##$$lib=}; fi; \
|
echo $$v | sed "s/^.*=/$$lib.so-version=./"; \
|
||||||
done ;; esac; done > $@T
|
fi; \
|
||||||
|
done ;; esac; done > $@T; exit 0
|
||||||
mv -f $@T $@
|
mv -f $@T $@
|
||||||
|
|
||||||
# Get $(version) defined with the release version number.
|
# Get $(version) defined with the release version number.
|
||||||
|
|
|
@ -305,6 +305,7 @@ endif
|
||||||
|
|
||||||
define build-shlib
|
define build-shlib
|
||||||
$(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
|
$(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
|
||||||
|
-B$(csu-objpfx) \
|
||||||
-Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
|
-Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
|
||||||
$(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
|
$(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
|
||||||
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
|
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
|
||||||
|
|
4
README
4
README
|
@ -1,4 +1,4 @@
|
||||||
This directory contains the version 1.92 test release of the GNU C Library.
|
This directory contains the version 1.93 test release of the GNU C Library.
|
||||||
Many bugs have been fixed since the last release.
|
Many bugs have been fixed since the last release.
|
||||||
Some bugs surely remain.
|
Some bugs surely remain.
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ provides the Unix `crypt' function, plus some other entry points.
|
||||||
Because of the United States export restriction on DES implementations,
|
Because of the United States export restriction on DES implementations,
|
||||||
we are distributing this code separately from the rest of the C
|
we are distributing this code separately from the rest of the C
|
||||||
library. There is an extra distribution tar file just for crypt; it is
|
library. There is an extra distribution tar file just for crypt; it is
|
||||||
called `glibc-1.92-crypt.tar.gz'. You can just unpack the crypt
|
called `glibc-1.93-crypt.tar.gz'. You can just unpack the crypt
|
||||||
distribution along with the rest of the C library and build; you can
|
distribution along with the rest of the C library and build; you can
|
||||||
also build the library without getting crypt. Users outside the USA
|
also build the library without getting crypt. Users outside the USA
|
||||||
can get the crypt distribution via anonymous FTP from ftp.uni-c.dk
|
can get the crypt distribution via anonymous FTP from ftp.uni-c.dk
|
||||||
|
|
|
@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA. */
|
||||||
#include <error.h>
|
#include <error.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
#include <locale.h>
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <nl_types.h>
|
#include <nl_types.h>
|
||||||
|
|
|
@ -74,8 +74,8 @@ AC_ARG_ENABLE(omitfp, dnl
|
||||||
dnl Generic infrastructure for drop-in additions to libc.
|
dnl Generic infrastructure for drop-in additions to libc.
|
||||||
AC_ARG_ENABLE(add-ons, dnl
|
AC_ARG_ENABLE(add-ons, dnl
|
||||||
[ --enable-add-ons=DIR... configure and build named extra directories],
|
[ --enable-add-ons=DIR... configure and build named extra directories],
|
||||||
add_ons=`echo "$enableval" | sed 's/,/ /g'`,
|
[add_ons=`echo "$enableval" | sed 's/,/ /g'`],
|
||||||
add_ons=)
|
[add_ons=])
|
||||||
AC_CONFIG_SUBDIRS($add_ons)
|
AC_CONFIG_SUBDIRS($add_ons)
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
|
@ -18,6 +18,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
/* System-dependent function to read a file's whole contents
|
/* System-dependent function to read a file's whole contents
|
||||||
|
|
|
@ -18,6 +18,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
|
||||||
/* The global scope we will use for symbol lookups.
|
/* The global scope we will use for symbol lookups.
|
||||||
|
|
|
@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
/* Read the dynamic section at DYN and fill in INFO with indices DT_*. */
|
/* Read the dynamic section at DYN and fill in INFO with indices DT_*. */
|
||||||
|
|
||||||
static inline void
|
static inline void __attribute__ ((unused))
|
||||||
elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Dyn) *info[DT_NUM + DT_PROCNUM])
|
elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Dyn) *info[DT_NUM + DT_PROCNUM])
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
|
@ -245,7 +245,8 @@ of this helper program; chances are you did not intend to run this program.\n",
|
||||||
if (mode == verify)
|
if (mode == verify)
|
||||||
/* We were called just to verify that this is a dynamic executable
|
/* We were called just to verify that this is a dynamic executable
|
||||||
using us as the program interpreter. */
|
using us as the program interpreter. */
|
||||||
_exit (strcmp (_dl_rtld_map.l_libname, _dl_rtld_map.l_name)
|
_exit ((strcmp (_dl_rtld_map.l_libname, _dl_rtld_map.l_name) ||
|
||||||
|
l->l_ld == NULL)
|
||||||
? EXIT_FAILURE : EXIT_SUCCESS);
|
? EXIT_FAILURE : EXIT_SUCCESS);
|
||||||
|
|
||||||
/* Extract the contents of the dynamic section for easy access. */
|
/* Extract the contents of the dynamic section for easy access. */
|
||||||
|
|
|
@ -93,7 +93,9 @@ login (const struct utmp *ut)
|
||||||
#if _HAVE_UT_TYPE - 0
|
#if _HAVE_UT_TYPE - 0
|
||||||
copy.ut_type = USER_PROCESS;
|
copy.ut_type = USER_PROCESS;
|
||||||
#endif
|
#endif
|
||||||
|
#if _HAVE_UT_PID - 0
|
||||||
copy.ut_pid = getpid ();
|
copy.ut_pid = getpid ();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Seek tty. */
|
/* Seek tty. */
|
||||||
found_tty = tty_name (STDIN_FILENO, &tty, sizeof (_tty));
|
found_tty = tty_name (STDIN_FILENO, &tty, sizeof (_tty));
|
||||||
|
|
|
@ -39,7 +39,9 @@ logwtmp (const char *line, const char *name, const char *host)
|
||||||
|
|
||||||
/* Set information in new entry. */
|
/* Set information in new entry. */
|
||||||
memset (&ut, 0, sizeof (ut));
|
memset (&ut, 0, sizeof (ut));
|
||||||
|
#if _HAVE_UT_PID - 0
|
||||||
ut.ut_pid = getpid ();
|
ut.ut_pid = getpid ();
|
||||||
|
#endif
|
||||||
#if _HAVE_UT_TYPE - 0
|
#if _HAVE_UT_TYPE - 0
|
||||||
ut.ut_type = name[0] ? USER_PROCESS : DEAD_PROCESS;
|
ut.ut_type = name[0] ? USER_PROCESS : DEAD_PROCESS;
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +54,7 @@ logwtmp (const char *line, const char *name, const char *host)
|
||||||
#if _HAVE_UT_TV - 0
|
#if _HAVE_UT_TV - 0
|
||||||
__gettimeofday (&ut.ut_tv, NULL);
|
__gettimeofday (&ut.ut_tv, NULL);
|
||||||
#else
|
#else
|
||||||
__time (&ut.ut_time);
|
time (&ut.ut_time);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Try to lock the file. */
|
/* Try to lock the file. */
|
||||||
|
|
|
@ -32,7 +32,7 @@ include ../Makeconfig
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set chapters and chapters-incl.
|
# Set chapters and chapters-incl.
|
||||||
include chapters
|
-include chapters
|
||||||
chapters: libc.texinfo
|
chapters: libc.texinfo
|
||||||
$(find-includes)
|
$(find-includes)
|
||||||
ifdef chapters
|
ifdef chapters
|
||||||
|
|
|
@ -29,8 +29,9 @@ Cambridge, MA 02139, USA. */
|
||||||
extern char *_itoa __P ((unsigned long long int value, char *buflim,
|
extern char *_itoa __P ((unsigned long long int value, char *buflim,
|
||||||
unsigned int base, int upper_case));
|
unsigned int base, int upper_case));
|
||||||
|
|
||||||
static inline char *_itoa_word (unsigned long value, char *buflim,
|
static inline char * __attribute__ ((unused))
|
||||||
unsigned int base, int upper_case)
|
_itoa_word (unsigned long value, char *buflim,
|
||||||
|
unsigned int base, int upper_case)
|
||||||
{
|
{
|
||||||
extern const char _itoa_upper_digits[], _itoa_lower_digits[];
|
extern const char _itoa_upper_digits[], _itoa_lower_digits[];
|
||||||
const char *digits = upper_case ? _itoa_upper_digits : _itoa_lower_digits;
|
const char *digits = upper_case ? _itoa_upper_digits : _itoa_lower_digits;
|
||||||
|
|
|
@ -73,11 +73,18 @@ rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \
|
||||||
distribute := rpc_util.h rpc_parse.h rpc_scan.h $(rpcgen-objs:.o=.c) etc.rpc
|
distribute := rpc_util.h rpc_parse.h rpc_scan.h $(rpcgen-objs:.o=.c) etc.rpc
|
||||||
extra-objs = $(rpcgen-objs)
|
extra-objs = $(rpcgen-objs)
|
||||||
|
|
||||||
|
all: # Make this the default target; it will be defined in Rules.
|
||||||
|
|
||||||
|
include ../Makeconfig
|
||||||
|
|
||||||
|
ifeq (no,$(cross-compile))
|
||||||
|
# We can only build this library if we can run the rpcgen we build.
|
||||||
extra-libs := librpcsvc
|
extra-libs := librpcsvc
|
||||||
extra-libs-others := librpcsvc # Make it in `others' pass, not `lib' pass.
|
extra-libs-others := librpcsvc # Make it in `others' pass, not `lib' pass.
|
||||||
librpcsvc-routines = $(rpcsvc:%.x=x%)
|
librpcsvc-routines = $(rpcsvc:%.x=x%)
|
||||||
librpcsvc-inhibit-o = .so # Build no shared rpcsvc library.
|
librpcsvc-inhibit-o = .so # Build no shared rpcsvc library.
|
||||||
omit-deps = $(librpcsvc-routines)
|
omit-deps = $(librpcsvc-routines)
|
||||||
|
endif
|
||||||
|
|
||||||
# Sun's code is not too clean.
|
# Sun's code is not too clean.
|
||||||
override +gccwarn := -w
|
override +gccwarn := -w
|
||||||
|
|
|
@ -83,6 +83,11 @@ struct winsize
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (TIOCGSIZE) || defined (TIOCSSIZE)
|
#if defined (TIOCGSIZE) || defined (TIOCSSIZE)
|
||||||
|
/* The BSD-style ioctl constructor macros use `sizeof', which can't be used
|
||||||
|
in a preprocessor conditional. Since the commands are always unique
|
||||||
|
regardless of the size bits, we can safely define away `sizeof' for the
|
||||||
|
purpose of the conditional. */
|
||||||
|
# define sizeof(type) 0
|
||||||
# if defined (TIOCGWINSZ) && TIOCGSIZE == TIOCGWINSZ
|
# if defined (TIOCGWINSZ) && TIOCGSIZE == TIOCGWINSZ
|
||||||
/* Many systems that have TIOCGWINSZ define TIOCGSIZE for source
|
/* Many systems that have TIOCGWINSZ define TIOCGSIZE for source
|
||||||
compatibility with Sun; they define `struct ttysize' to have identical
|
compatibility with Sun; they define `struct ttysize' to have identical
|
||||||
|
@ -105,6 +110,7 @@ struct ttysize
|
||||||
int ts_lines, ts_cols; /* Lines and columns, in characters. */
|
int ts_lines, ts_cols; /* Lines and columns, in characters. */
|
||||||
};
|
};
|
||||||
# endif
|
# endif
|
||||||
|
# undef sizeof /* See above. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
37
sysdeps/generic/sysdep.h
Normal file
37
sysdeps/generic/sysdep.h
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/* Generic asm macros used on many machines.
|
||||||
|
Copyright (C) 1991, 92, 93, 96 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. */
|
||||||
|
|
||||||
|
#ifndef C_LABEL
|
||||||
|
|
||||||
|
/* Define a macro we can use to construct the asm name for a C symbol. */
|
||||||
|
#ifdef NO_UNDERSCORES
|
||||||
|
#ifdef __STDC__
|
||||||
|
#define C_LABEL(name) name##:
|
||||||
|
#else
|
||||||
|
#define C_LABEL(name) name/**/:
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef __STDC__
|
||||||
|
#define C_LABEL(name) _##name##:
|
||||||
|
#else
|
||||||
|
#define C_LABEL(name) _/**/name/**/:
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -71,9 +71,10 @@ struct utmp
|
||||||
|
|
||||||
#define ut_time ut_tv.tv_sec /* Backwards compatibility. */
|
#define ut_time ut_tv.tv_sec /* Backwards compatibility. */
|
||||||
|
|
||||||
/* Tell the user that we have a modern system with UT_HOST, UT_TYPE, UT_ID
|
/* Tell the user that we have a modern system with UT_HOST, UT_PID,
|
||||||
and UT_TV fields. */
|
UT_TYPE, UT_ID and UT_TV fields. */
|
||||||
#define _HAVE_UT_TYPE 1
|
#define _HAVE_UT_TYPE 1
|
||||||
|
#define _HAVE_UT_PID 1
|
||||||
#define _HAVE_UT_ID 1
|
#define _HAVE_UT_ID 1
|
||||||
#define _HAVE_UT_TV 1
|
#define _HAVE_UT_TV 1
|
||||||
#define _HAVE_UT_HOST 1
|
#define _HAVE_UT_HOST 1
|
||||||
|
|
|
@ -25,7 +25,7 @@ Cambridge, MA 02139, USA. */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
/* Return nonzero iff E_MACHINE is compatible with the running host. */
|
/* Return nonzero iff E_MACHINE is compatible with the running host. */
|
||||||
static inline int
|
static inline int __attribute__ ((unused))
|
||||||
elf_machine_matches_host (Elf32_Half e_machine)
|
elf_machine_matches_host (Elf32_Half e_machine)
|
||||||
{
|
{
|
||||||
switch (e_machine)
|
switch (e_machine)
|
||||||
|
@ -41,7 +41,7 @@ elf_machine_matches_host (Elf32_Half e_machine)
|
||||||
|
|
||||||
/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
|
/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
|
||||||
Must be inlined in a function which uses global data. */
|
Must be inlined in a function which uses global data. */
|
||||||
static inline Elf32_Addr *
|
static inline Elf32_Addr * __attribute__ ((unused))
|
||||||
elf_machine_got (void)
|
elf_machine_got (void)
|
||||||
{
|
{
|
||||||
register Elf32_Addr *got asm ("%ebx");
|
register Elf32_Addr *got asm ("%ebx");
|
||||||
|
@ -50,7 +50,7 @@ elf_machine_got (void)
|
||||||
|
|
||||||
|
|
||||||
/* Return the run-time load address of the shared object. */
|
/* Return the run-time load address of the shared object. */
|
||||||
static inline Elf32_Addr
|
static inline Elf32_Addr __attribute__ ((unused))
|
||||||
elf_machine_load_address (void)
|
elf_machine_load_address (void)
|
||||||
{
|
{
|
||||||
Elf32_Addr addr;
|
Elf32_Addr addr;
|
||||||
|
@ -72,7 +72,7 @@ elf_machine_load_address (void)
|
||||||
/* Set up the loaded object described by L so its unrelocated PLT
|
/* Set up the loaded object described by L so its unrelocated PLT
|
||||||
entries will jump to the on-demand fixup code in dl-runtime.c. */
|
entries will jump to the on-demand fixup code in dl-runtime.c. */
|
||||||
|
|
||||||
static inline void
|
static inline void __attribute__ ((unused))
|
||||||
elf_machine_runtime_setup (struct link_map *l, int lazy)
|
elf_machine_runtime_setup (struct link_map *l, int lazy)
|
||||||
{
|
{
|
||||||
Elf32_Addr *got;
|
Elf32_Addr *got;
|
||||||
|
|
91
sysdeps/i386/sysdep.h
Normal file
91
sysdeps/i386/sysdep.h
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
/* Assembler macros for i386.
|
||||||
|
Copyright (C) 1991, 92, 93, 95, 96 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 <sysdeps/generic/sysdep.h>
|
||||||
|
|
||||||
|
#ifdef ASSEMBLER
|
||||||
|
|
||||||
|
/* Syntactic details of assembler. */
|
||||||
|
|
||||||
|
#ifdef HAVE_ELF
|
||||||
|
|
||||||
|
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
|
||||||
|
#define ALIGNARG(log2) 1<<log2
|
||||||
|
/* For ELF we need the `.type' directive to make shared libs work right. */
|
||||||
|
#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
|
||||||
|
|
||||||
|
/* In ELF C symbols are asm symbols. */
|
||||||
|
#undef NO_UNDERSCORES
|
||||||
|
#define NO_UNDERSCORES
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define ALIGNARG(log2) log2
|
||||||
|
#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Define an entry point visible from C. */
|
||||||
|
#define ENTRY(name) \
|
||||||
|
ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
|
||||||
|
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
|
||||||
|
.align ALIGNARG(4); \
|
||||||
|
C_LABEL(name) \
|
||||||
|
CALL_MCOUNT
|
||||||
|
|
||||||
|
/* If compiled for profiling, call `mcount' at the start of each function. */
|
||||||
|
#ifdef PROF
|
||||||
|
/* The mcount code relies on a normal frame pointer being on the stack
|
||||||
|
to locate our caller, so push one just for its benefit. */
|
||||||
|
#define CALL_MCOUNT \
|
||||||
|
pushl %ebp; movl %esp, %ebp; call JUMPTARGET(mcount); popl %ebp;
|
||||||
|
#else
|
||||||
|
#define CALL_MCOUNT /* Do nothing. */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef NO_UNDERSCORES
|
||||||
|
/* Since C identifiers are not normally prefixed with an underscore
|
||||||
|
on this system, the asm identifier `syscall_error' intrudes on the
|
||||||
|
C name space. Make sure we use an innocuous name. */
|
||||||
|
#define syscall_error __syscall_error
|
||||||
|
#define mcount _mcount
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PSEUDO(name, syscall_name, args) \
|
||||||
|
lose: SYSCALL_PIC_SETUP \
|
||||||
|
jmp JUMPTARGET(syscall_error) \
|
||||||
|
.globl syscall_error; \
|
||||||
|
ENTRY (name) \
|
||||||
|
DO_CALL (syscall_name, args); \
|
||||||
|
jb lose
|
||||||
|
|
||||||
|
#ifdef PIC
|
||||||
|
#define JUMPTARGET(name) name##@PLT
|
||||||
|
#define SYSCALL_PIC_SETUP \
|
||||||
|
pushl %ebx; \
|
||||||
|
call 0f; \
|
||||||
|
0: popl %ebx; \
|
||||||
|
addl $_GLOBAL_OFFSET_TABLE+[.-0b], %ebx;
|
||||||
|
#else
|
||||||
|
#define JUMPTARGET(name) name
|
||||||
|
#define SYSCALL_PIC_SETUP /* Nothing. */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ASSEMBLER */
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 94, 95, 96 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -23,12 +23,12 @@ Cambridge, MA 02139, USA. */
|
||||||
/* The function `_exit' should take a status argument and simply
|
/* The function `_exit' should take a status argument and simply
|
||||||
terminate program execution, using the low-order 8 bits of the
|
terminate program execution, using the low-order 8 bits of the
|
||||||
given integer as status. */
|
given integer as status. */
|
||||||
__NORETURN void
|
void
|
||||||
DEFUN(_exit, (status), int status)
|
_exit (status)
|
||||||
|
int status;
|
||||||
{
|
{
|
||||||
status &= 0xff;
|
status &= 0xff;
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
stub_warning (_exit)
|
stub_warning (_exit)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -25,7 +25,7 @@ Cambridge, MA 02139, USA. */
|
||||||
Returns a file descriptor for the new socket, or -1 for errors. */
|
Returns a file descriptor for the new socket, or -1 for errors. */
|
||||||
int
|
int
|
||||||
DEFUN(socket, (domain, type, protocol),
|
DEFUN(socket, (domain, type, protocol),
|
||||||
int domain AND enum __socket_type type AND int protocol)
|
int domain AND int type AND int protocol)
|
||||||
{
|
{
|
||||||
errno = ENOSYS;
|
errno = ENOSYS;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -26,7 +26,7 @@ Cambridge, MA 02139, USA. */
|
||||||
one will be chosen automatically. Returns 0 on success, -1 for errors. */
|
one will be chosen automatically. Returns 0 on success, -1 for errors. */
|
||||||
int
|
int
|
||||||
DEFUN(socketpair, (domain, type, protocol, fds),
|
DEFUN(socketpair, (domain, type, protocol, fds),
|
||||||
int domain AND enum __socket_type type AND int protocol AND int fds[2])
|
int domain AND int type AND int protocol AND int fds[2])
|
||||||
{
|
{
|
||||||
errno = ENOSYS;
|
errno = ENOSYS;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#define L_tmpnam 1
|
#define L_tmpnam 1
|
||||||
#define TMPMAX 0
|
#define TMPMAX 0
|
||||||
#define L_ctermid 1
|
|
||||||
#define L_cuserid 1
|
|
||||||
#define FOPEN_MAX 16
|
#define FOPEN_MAX 16
|
||||||
#define FILENAME_MAX 14
|
#define FILENAME_MAX 14
|
||||||
|
|
|
@ -17,76 +17,10 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <sysdeps/unix/sysdep.h>
|
#include <sysdeps/unix/sysdep.h>
|
||||||
|
#include <sysdeps/i386/sysdep.h>
|
||||||
|
|
||||||
#ifdef ASSEMBLER
|
#ifdef ASSEMBLER
|
||||||
|
|
||||||
/* Syntactic details of assembler. */
|
|
||||||
|
|
||||||
#ifdef HAVE_ELF
|
|
||||||
|
|
||||||
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
|
|
||||||
#define ALIGNARG(log2) 1<<log2
|
|
||||||
/* For ELF we need the `.type' directive to make shared libs work right. */
|
|
||||||
#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
|
|
||||||
|
|
||||||
/* In ELF C symbols are asm symbols. */
|
|
||||||
#undef NO_UNDERSCORES
|
|
||||||
#define NO_UNDERSCORES
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define ALIGNARG(log2) log2
|
|
||||||
#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Define an entry point visible from C. */
|
|
||||||
#define ENTRY(name) \
|
|
||||||
ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
|
|
||||||
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
|
|
||||||
.align ALIGNARG(4); \
|
|
||||||
C_LABEL(name) \
|
|
||||||
CALL_MCOUNT
|
|
||||||
|
|
||||||
/* If compiled for profiling, call `mcount' at the start of each function. */
|
|
||||||
#ifdef PROF
|
|
||||||
/* The mcount code relies on a normal frame pointer being on the stack
|
|
||||||
to locate our caller, so push one just for its benefit. */
|
|
||||||
#define CALL_MCOUNT \
|
|
||||||
pushl %ebp; movl %esp, %ebp; call JUMPTARGET(mcount); popl %ebp;
|
|
||||||
#else
|
|
||||||
#define CALL_MCOUNT /* Do nothing. */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NO_UNDERSCORES
|
|
||||||
/* Since C identifiers are not normally prefixed with an underscore
|
|
||||||
on this system, the asm identifier `syscall_error' intrudes on the
|
|
||||||
C name space. Make sure we use an innocuous name. */
|
|
||||||
#define syscall_error __syscall_error
|
|
||||||
#define mcount _mcount
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define PSEUDO(name, syscall_name, args) \
|
|
||||||
lose: SYSCALL_PIC_SETUP \
|
|
||||||
jmp JUMPTARGET(syscall_error) \
|
|
||||||
.globl syscall_error; \
|
|
||||||
ENTRY (name) \
|
|
||||||
DO_CALL (syscall_name, args); \
|
|
||||||
jb lose
|
|
||||||
|
|
||||||
#ifdef PIC
|
|
||||||
#define JUMPTARGET(name) name##@PLT
|
|
||||||
#define SYSCALL_PIC_SETUP \
|
|
||||||
pushl %ebx; \
|
|
||||||
call 0f; \
|
|
||||||
0: popl %ebx; \
|
|
||||||
addl $_GLOBAL_OFFSET_TABLE+[.-0b], %ebx;
|
|
||||||
#else
|
|
||||||
#define JUMPTARGET(name) name
|
|
||||||
#define SYSCALL_PIC_SETUP /* Nothing. */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This is defined as a separate macro so that other sysdep.h files
|
/* This is defined as a separate macro so that other sysdep.h files
|
||||||
can include this one and then redefine DO_CALL. */
|
can include this one and then redefine DO_CALL. */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1993 Free Software Foundation, Inc.
|
/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -92,6 +92,13 @@ static struct param params[] =
|
||||||
{ "PATH_MAX", PATH_MAX },
|
{ "PATH_MAX", PATH_MAX },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined (SYMLOOP_MAX) && defined (MAXSYMLINKS)
|
||||||
|
#define SYMLOOP_MAX MAXSYMLINKS
|
||||||
|
#endif
|
||||||
|
#ifdef SYMLOOP_MAX
|
||||||
|
{ "SYMLOOP_MAX", SYMLOOP_MAX },
|
||||||
|
#endif
|
||||||
|
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 92, 93, 96 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -16,6 +16,8 @@ License along with the GNU C Library; see the file COPYING.LIB. If
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
|
#include <sysdeps/generic/sysdep.h>
|
||||||
|
|
||||||
#include <syscall.h>
|
#include <syscall.h>
|
||||||
#define HAVE_SYSCALLS
|
#define HAVE_SYSCALLS
|
||||||
|
|
||||||
|
@ -34,21 +36,6 @@ Cambridge, MA 02139, USA. */
|
||||||
an instruction such that "MOVE(r1, r0)" works. ret should be defined
|
an instruction such that "MOVE(r1, r0)" works. ret should be defined
|
||||||
as the return instruction. */
|
as the return instruction. */
|
||||||
|
|
||||||
/* Define a macro we can use to construct the asm name for a C symbol. */
|
|
||||||
#ifdef NO_UNDERSCORES
|
|
||||||
#ifdef __STDC__
|
|
||||||
#define C_LABEL(name) name##:
|
|
||||||
#else
|
|
||||||
#define C_LABEL(name) name/**/:
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#ifdef __STDC__
|
|
||||||
#define C_LABEL(name) _##name##:
|
|
||||||
#else
|
|
||||||
#define C_LABEL(name) _/**/name/**/:
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#define SYS_ify(syscall_name) SYS_##syscall_name
|
#define SYS_ify(syscall_name) SYS_##syscall_name
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -3,7 +3,7 @@ sysdep_routines += sysctl
|
||||||
|
|
||||||
sysdep_headers += sys/mount.h sys/sysinfo.h sys/acct.h sys/sysctl.h \
|
sysdep_headers += sys/mount.h sys/sysinfo.h sys/acct.h sys/sysctl.h \
|
||||||
sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \
|
sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \
|
||||||
sys/user.h syscall-list.h
|
sys/user.h syscall-list.h sys/sysmacros.h
|
||||||
|
|
||||||
# Generate the list of SYS_* macros for the system calls (__NR_* macros).
|
# Generate the list of SYS_* macros for the system calls (__NR_* macros).
|
||||||
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/syscall.h
|
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/syscall.h
|
||||||
|
|
31
sysdeps/unix/sysv/linux/sys/sysmacros.h
Normal file
31
sysdeps/unix/sysv/linux/sys/sysmacros.h
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/* Definitions of macros to access `dev_t' values.
|
||||||
|
Copyright (C) 1996 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 _SYS_SYSMACROS_H
|
||||||
|
#define _SYS_SYSMACROS_H 1
|
||||||
|
|
||||||
|
/* Get definition from kernel header. */
|
||||||
|
#include <linux/kdev_t.h>
|
||||||
|
|
||||||
|
/* For compatibility we provide alternative names. */
|
||||||
|
#define major(dev) MAJOR ((unsigned int) (dev))
|
||||||
|
#define minor(dev) MINOR ((unsigned int) (dev))
|
||||||
|
#define makedev(major, minor) MKDEV (major, minor)
|
||||||
|
|
||||||
|
#endif /* sys/sysmacros.h */
|
Loading…
Reference in a new issue