mirror of git://sourceware.org/git/glibc.git
update from main archive 961119
Wed Nov 20 02:04:11 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/sigsuspend.c: Make sigsuspend a weak alias of __sigsuspend. * grp/grp.h: Correct comment about POSIX compliance. * pwd/pwd.h: Likewise. * login/utmp.h: Update copyright and pretty-print prototypes. * sysdeps/generic/paths.h: Add _PATH_LASTLOG, _PATH_UTMP and _PATH_WTMP from utmpbits.h. * sysdeps/unix/sysv/linux/paths.h: Likewise. * sysdeps/generic/utmpbits.h: Remove here. * sysdeps/gnu/utmpbits.h: Likewise. * misc/sys/uio.h: Place __BEGIN_DECLS correctly. Pretty-print prototypes. * sysdeps/unix/sysv/linux/sparc/clone.S: New file. Taken from LinuxThreads-0.5. Tue Nov 19 13:43:07 1996 Richard Henderson <rth@tamu.edu> * inet/ether_hton.c: Include <string.h>. * inet/ether_ntoh.c: Likewise. * inet/rexec.c: Get errno, index, getpass, getlogin from headers. * misc/search.h: Fix hcreate_r argument type (unsigned -> size_t). * misc/sys/cdefs.h: Change __long_double_t definition from typedef to define. Jim Nance reports problems building XEmacs otherwise. * resolv/gethnamaddr.c: Protect h_errno redefinition. * resolv/getnetnamadr.c: Likewise. * resolv/herror.c: Likewise. * sysdeps/generic/sigset.h (__SIGSETFN): Operator ## doesn't work with -traditional. Reported by Eric Youngdale. While we're at this, don't do error checking in the __ functions. This is consistent with the sysv4 definitions and seems Right. * signal/signal.h: Don't __OPTIMIZE__ sigops to __ versions. Add prototype for __sigsuspend. * sysdeps/posix/sigblock.c: Optimize sigmask <-> sigset_t conversions for sigset_t == unsigned long. De-ansidecl-ify. Reformat copyright. * sysdeps/posix/sigpause.c: Likewise. * sysdeps/posix/sigsetmask.c: Likewise. * sysdeps/posix/sigvec.c: Likewise. * sysdeps/posix/sigintr.c: Reformat copyright. * sysdeps/posix/signal.c: Check signal number out of range since __sigismember doesn't anymore. Reformat copyright. * sysdeps/posix/sigwait.c: Use __ versions of sigfillset, sigismember, sigdelset, sigaction, and sigsuspend. * stdlib/drand48-iter.c (__drand48_iterate): Cast state fragments to the wider type before shifting. * sysdeps/alpha/bsd-_setjmp.S: Silence assembler warning "$at used without .set noat" in profiling hook. * sysdeps/alpha/bsd-setjmp.S: Likewise. * sysdeps/alpha/htonl.S: Likewise. * sysdeps/alpha/htons.S: Likewise. * sysdeps/alpha/s_copysign.S: Likewise. * sysdeps/alpha/setjmp.S: Likewise. * sysdeps/alpha/stpcpy.S: Likewise. * sysdeps/alpha/strcat.S: Likewise. * sysdeps/alpha/strcpy.S: Likewise. * sysdeps/alpha/strncat.S: Likewise. * sysdeps/unix/sysv/linux/alpha/brk.S: Likewise. * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/llseek.S: Likewise. * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise. Rename function to __sigsuspend and add weak alias. * sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise. Add missing END. * sysdeps/alpha/w_sqrt.S: Define _ERRNO_H so <errnos.h> defines EDOM. * sysdeps/unix/execve.S: Match PSEUDO_END symbol with the symbol SYSCALL__ actually generated. * sysdeps/unix/sysv/linux/errnos.h [_LIBC_REENTRANT]: Reflexively #define __set_errno, as several imported subsystems (eg. BIND) check that the symbol is defined. * sysdeps/unix/sysv/linux/getsysstats.c: Include <alloca.h>. * sysdeps/alpha/memcpy.S: Temporarily remove until I can find a bug that manifests in GCC. Tue Nov 19 11:10:05 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * sysdeps/posix/writev.c (writev): COUNT parm is now int. * sysdeps/posix/readv.c (readv): Likewise. Tue Nov 19 15:28:29 1996 Ulrich Drepper <drepper@cygnus.com> * nss/nss_dns/dns-network.c: Change return type of all functions to enum nss_status. Reported by NIIBE Yutaka. * nss/nss_dns/dns-host.c: Update copyright. Fri Nov 15 20:16:38 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * config.make.in: Remove definition of top_absdir. * configure.in: Likewise. Use $(..) instead. * Makerules (make-link): Use $(..) to find rellns-sh script. Sat Nov 16 15:52:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/nss.texi (Name Service Switch): Fix reference to `frobnicate'. Fri Nov 15 22:08:33 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add sys/mtio.h. Mon Nov 18 05:51:13 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/generic/waitstatus.h (__WIFSIGNALED): Rename local variable from __stat to __status to prevent shadowing. * sunrpc/rpc/clnt.h (clntudp_create, clntudp_bufcreate): Likewise for parameter __wait. Reported by NIIBE Yutaka. Mon Nov 18 02:05:38 1996 Ulrich Drepper <drepper@cygnus.com> * misc/regexp.c: New file. Implementation of obsolete interface to regular expression matcher (required in XPG4.2). * misc/regexp.h: New file. Header for above. * misc/Makefile (headers): Add regexp.h. (routines): Add regexp.c. Update copyright. Sun Nov 17 21:50:24 1996 Andreas Jaeger <aj@arthur.pfalz.de> * stdlib/tst-strtod.c (main): Add arguments for main. * stdlib/tst-strtol.c (main): Likewise. Sun Nov 17 21:15:05 1996 Ulrich Drepper <drepper@cygnus.com> * configure.in: Substitute libc_cv_slibdir and libc_cv_sysconfdir in output files. * sysdepes/unix/sysv/linux/configure: Define libc_cv_slibdir to /lib and sysconfdir to /etc if $prefix is /usr. * config.make.in: Add slibdir, sysconfdir and BASH to be replaced. * elf/Makefile ($(objpfx)ldd): Install ldd.bash.in if $(have-bash2) is yes. * elf/ldd.bash.in: Add copyright and various cleanups. * elf/ldd.sh.in: Likewise. Implement RTLD_NEXT. * elf/dlfcn.h: Define RTLD_NEXT. * elf/dl-deps.c: Build second searchlist which contains duplicates. * elf/dl-lookup.c (_dl_lookup_symbol_skip): New function. Used for RTLD_NEXT lookup. Rewrite _dl_lookup_symbol to put common parts for both lookup functions in a separate function. * elf/dlsym.c: Handle RTLD_NEXT by calling _dl_lookup_symbol_skip. * elf/link.h (struct link_map): Add l_dupsearchlist and l_ndupsearchlist. Add prototype for _dl_lookup_symbol_skip. * sunrpc/Makefile (rpcsvc): Add rusers. * sunrpc/rpcsvc/rnusers.x: Remove. Obsolteted by rusers.x. * sunrpc/rpcsvc/rusers.x: New file. Sun Nov 17 04:24:35 1996 Ulrich Drepper <drepper@cygnus.com> * stdio-common/vfprintf.c [USE_IN_LIBIO] (buffered_vfprintf): Call __libc_lock_init for local lock. Reported by a sun <asun@zoology.washington.edu>. [!USE_IN_LIBIO] (PAD): Optimize a bit.
This commit is contained in:
parent
c44db1b198
commit
84384f5b6a
175
ChangeLog
175
ChangeLog
|
@ -1,3 +1,178 @@
|
|||
Wed Nov 20 02:04:11 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/sigsuspend.c: Make sigsuspend a weak
|
||||
alias of __sigsuspend.
|
||||
|
||||
* grp/grp.h: Correct comment about POSIX compliance.
|
||||
* pwd/pwd.h: Likewise.
|
||||
|
||||
* login/utmp.h: Update copyright and pretty-print prototypes.
|
||||
* sysdeps/generic/paths.h: Add _PATH_LASTLOG, _PATH_UTMP and
|
||||
_PATH_WTMP from utmpbits.h.
|
||||
* sysdeps/unix/sysv/linux/paths.h: Likewise.
|
||||
* sysdeps/generic/utmpbits.h: Remove here.
|
||||
* sysdeps/gnu/utmpbits.h: Likewise.
|
||||
|
||||
* misc/sys/uio.h: Place __BEGIN_DECLS correctly.
|
||||
Pretty-print prototypes.
|
||||
|
||||
* sysdeps/unix/sysv/linux/sparc/clone.S: New file. Taken from
|
||||
LinuxThreads-0.5.
|
||||
|
||||
Tue Nov 19 13:43:07 1996 Richard Henderson <rth@tamu.edu>
|
||||
|
||||
* inet/ether_hton.c: Include <string.h>.
|
||||
* inet/ether_ntoh.c: Likewise.
|
||||
* inet/rexec.c: Get errno, index, getpass, getlogin from headers.
|
||||
* misc/search.h: Fix hcreate_r argument type (unsigned -> size_t).
|
||||
|
||||
* misc/sys/cdefs.h: Change __long_double_t definition from typedef
|
||||
to define. Jim Nance reports problems building XEmacs otherwise.
|
||||
|
||||
* resolv/gethnamaddr.c: Protect h_errno redefinition.
|
||||
* resolv/getnetnamadr.c: Likewise.
|
||||
* resolv/herror.c: Likewise.
|
||||
|
||||
* sysdeps/generic/sigset.h (__SIGSETFN): Operator ## doesn't work
|
||||
with -traditional. Reported by Eric Youngdale. While we're at this,
|
||||
don't do error checking in the __ functions. This is consistent
|
||||
with the sysv4 definitions and seems Right.
|
||||
* signal/signal.h: Don't __OPTIMIZE__ sigops to __ versions. Add
|
||||
prototype for __sigsuspend.
|
||||
* sysdeps/posix/sigblock.c: Optimize sigmask <-> sigset_t conversions
|
||||
for sigset_t == unsigned long. De-ansidecl-ify. Reformat copyright.
|
||||
* sysdeps/posix/sigpause.c: Likewise.
|
||||
* sysdeps/posix/sigsetmask.c: Likewise.
|
||||
* sysdeps/posix/sigvec.c: Likewise.
|
||||
* sysdeps/posix/sigintr.c: Reformat copyright.
|
||||
* sysdeps/posix/signal.c: Check signal number out of range since
|
||||
__sigismember doesn't anymore. Reformat copyright.
|
||||
* sysdeps/posix/sigwait.c: Use __ versions of sigfillset, sigismember,
|
||||
sigdelset, sigaction, and sigsuspend.
|
||||
|
||||
* stdlib/drand48-iter.c (__drand48_iterate): Cast state fragments
|
||||
to the wider type before shifting.
|
||||
|
||||
* sysdeps/alpha/bsd-_setjmp.S: Silence assembler warning "$at used
|
||||
without .set noat" in profiling hook.
|
||||
* sysdeps/alpha/bsd-setjmp.S: Likewise.
|
||||
* sysdeps/alpha/htonl.S: Likewise.
|
||||
* sysdeps/alpha/htons.S: Likewise.
|
||||
* sysdeps/alpha/s_copysign.S: Likewise.
|
||||
* sysdeps/alpha/setjmp.S: Likewise.
|
||||
* sysdeps/alpha/stpcpy.S: Likewise.
|
||||
* sysdeps/alpha/strcat.S: Likewise.
|
||||
* sysdeps/alpha/strcpy.S: Likewise.
|
||||
* sysdeps/alpha/strncat.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/alpha/brk.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/alpha/llseek.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise. Rename
|
||||
function to __sigsuspend and add weak alias.
|
||||
* sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise. Add missing END.
|
||||
|
||||
* sysdeps/alpha/w_sqrt.S: Define _ERRNO_H so <errnos.h> defines EDOM.
|
||||
|
||||
* sysdeps/unix/execve.S: Match PSEUDO_END symbol with the symbol
|
||||
SYSCALL__ actually generated.
|
||||
|
||||
* sysdeps/unix/sysv/linux/errnos.h [_LIBC_REENTRANT]: Reflexively
|
||||
#define __set_errno, as several imported subsystems (eg. BIND) check
|
||||
that the symbol is defined.
|
||||
|
||||
* sysdeps/unix/sysv/linux/getsysstats.c: Include <alloca.h>.
|
||||
|
||||
* sysdeps/alpha/memcpy.S: Temporarily remove until I can find a bug
|
||||
that manifests in GCC.
|
||||
|
||||
Tue Nov 19 11:10:05 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
|
||||
|
||||
* sysdeps/posix/writev.c (writev): COUNT parm is now int.
|
||||
* sysdeps/posix/readv.c (readv): Likewise.
|
||||
|
||||
Tue Nov 19 15:28:29 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* nss/nss_dns/dns-network.c: Change return type of all functions
|
||||
to enum nss_status.
|
||||
Reported by NIIBE Yutaka.
|
||||
* nss/nss_dns/dns-host.c: Update copyright.
|
||||
|
||||
Fri Nov 15 20:16:38 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* config.make.in: Remove definition of top_absdir.
|
||||
* configure.in: Likewise. Use $(..) instead.
|
||||
* Makerules (make-link): Use $(..) to find rellns-sh script.
|
||||
|
||||
Sat Nov 16 15:52:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* manual/nss.texi (Name Service Switch): Fix reference to
|
||||
`frobnicate'.
|
||||
|
||||
Fri Nov 15 22:08:33 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
|
||||
sys/mtio.h.
|
||||
|
||||
Mon Nov 18 05:51:13 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* sysdeps/generic/waitstatus.h (__WIFSIGNALED): Rename local
|
||||
variable from __stat to __status to prevent shadowing.
|
||||
* sunrpc/rpc/clnt.h (clntudp_create, clntudp_bufcreate): Likewise
|
||||
for parameter __wait.
|
||||
Reported by NIIBE Yutaka.
|
||||
|
||||
Mon Nov 18 02:05:38 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* misc/regexp.c: New file. Implementation of obsolete interface
|
||||
to regular expression matcher (required in XPG4.2).
|
||||
* misc/regexp.h: New file. Header for above.
|
||||
* misc/Makefile (headers): Add regexp.h.
|
||||
(routines): Add regexp.c.
|
||||
Update copyright.
|
||||
|
||||
Sun Nov 17 21:50:24 1996 Andreas Jaeger <aj@arthur.pfalz.de>
|
||||
|
||||
* stdlib/tst-strtod.c (main): Add arguments for main.
|
||||
* stdlib/tst-strtol.c (main): Likewise.
|
||||
|
||||
Sun Nov 17 21:15:05 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* configure.in: Substitute libc_cv_slibdir and libc_cv_sysconfdir
|
||||
in output files.
|
||||
* sysdepes/unix/sysv/linux/configure: Define libc_cv_slibdir to /lib
|
||||
and sysconfdir to /etc if $prefix is /usr.
|
||||
* config.make.in: Add slibdir, sysconfdir and BASH to be replaced.
|
||||
|
||||
* elf/Makefile ($(objpfx)ldd): Install ldd.bash.in if
|
||||
$(have-bash2) is yes.
|
||||
* elf/ldd.bash.in: Add copyright and various cleanups.
|
||||
* elf/ldd.sh.in: Likewise.
|
||||
|
||||
Implement RTLD_NEXT.
|
||||
* elf/dlfcn.h: Define RTLD_NEXT.
|
||||
* elf/dl-deps.c: Build second searchlist which contains duplicates.
|
||||
* elf/dl-lookup.c (_dl_lookup_symbol_skip): New function. Used
|
||||
for RTLD_NEXT lookup.
|
||||
Rewrite _dl_lookup_symbol to put common parts for both lookup
|
||||
functions in a separate function.
|
||||
* elf/dlsym.c: Handle RTLD_NEXT by calling _dl_lookup_symbol_skip.
|
||||
* elf/link.h (struct link_map): Add l_dupsearchlist and
|
||||
l_ndupsearchlist.
|
||||
Add prototype for _dl_lookup_symbol_skip.
|
||||
|
||||
* sunrpc/Makefile (rpcsvc): Add rusers.
|
||||
* sunrpc/rpcsvc/rnusers.x: Remove. Obsolteted by rusers.x.
|
||||
* sunrpc/rpcsvc/rusers.x: New file.
|
||||
|
||||
Sun Nov 17 04:24:35 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* stdio-common/vfprintf.c [USE_IN_LIBIO] (buffered_vfprintf): Call
|
||||
__libc_lock_init for local lock.
|
||||
Reported by a sun <asun@zoology.washington.edu>.
|
||||
[!USE_IN_LIBIO] (PAD): Optimize a bit.
|
||||
|
||||
Sun Nov 17 03:13:57 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* db/makedb.c: Update and reformat copyright.
|
||||
|
|
|
@ -601,12 +601,12 @@ $(addprefix $(slibdir)/,$(filter-out $(versioned),$(install-lib.so))): \
|
|||
$(slibdir)/%.so: $(objpfx)%.so; $(do-install-program)
|
||||
|
||||
define make-link
|
||||
cd $(@D); \
|
||||
here=`pwd`; cd $(@D); \
|
||||
rm -f $(@F).new; \
|
||||
if test '$(@D)' = '$(<D)'; then \
|
||||
$(LN_S) $(<F) $(@F).new; \
|
||||
else \
|
||||
$(SHELL) $(top_absdir)/rellns-sh $< $(@F).new; \
|
||||
$(SHELL) $$here/$(..)rellns-sh $< $(@F).new; \
|
||||
fi; \
|
||||
mv -f $(@F).new $(@F)
|
||||
endef
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
# Don't edit this file. Put configuration parameters in configparms instead.
|
||||
|
||||
# Installation prefixes.
|
||||
top_absdir = @top_absdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
slibdir = @libc_cv_slibdir@
|
||||
sysconfdir = @libc_cv_sysconfdir@
|
||||
|
||||
# System configuration.
|
||||
config-machine = @host_cpu@
|
||||
|
@ -21,6 +22,7 @@ have-initfini = @libc_cv_have_initfini@
|
|||
|
||||
have-no-whole-archive = @libc_cv_ld_no_whole_archive@
|
||||
have-no-exceptions = @libc_cv_gcc_no_exceptions@
|
||||
have-bash2 = @libc_cv_have_bash2@
|
||||
|
||||
# Configuration options.
|
||||
gnu-as = @gnu_as@
|
||||
|
@ -45,5 +47,6 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|||
INSTALL_DATA = @INSTALL_DATA@
|
||||
LN_S = @LN_S@
|
||||
MSGFMT = @MSGFMT@
|
||||
BASH = @BASH@
|
||||
|
||||
# More variables may be inserted below by configure.
|
||||
|
|
|
@ -550,10 +550,6 @@ fi
|
|||
# This will get text that should go into config.make.
|
||||
config_vars=
|
||||
|
||||
# We need a variable with the absolute path to the toplevel build directory.
|
||||
top_absdir=`cd $srcdir; pwd`
|
||||
|
||||
|
||||
# Check for a --with-gmp argument and set gmp-srcdir in config.make.
|
||||
# Check whether --with-gmp or --without-gmp was given.
|
||||
if test "${with_gmp+set}" = set; then
|
||||
|
@ -706,7 +702,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
|||
fi
|
||||
|
||||
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||
echo "configure:710: checking host system type" >&5
|
||||
echo "configure:706: checking host system type" >&5
|
||||
|
||||
host_alias=$host
|
||||
case "$host_alias" in
|
||||
|
@ -772,7 +768,7 @@ esac
|
|||
# This can take a while to compute.
|
||||
sysdep_dir=$srcdir/sysdeps
|
||||
echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6
|
||||
echo "configure:776: checking sysdep dirs" >&5
|
||||
echo "configure:772: checking sysdep dirs" >&5
|
||||
# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
|
||||
os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
|
||||
|
||||
|
@ -973,7 +969,7 @@ echo "$ac_t""sysdeps/generic sysdeps/stub" 1>&6
|
|||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||
# ./install, which can be erroneously created by make from ./install.sh.
|
||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||
echo "configure:977: checking for a BSD compatible install" >&5
|
||||
echo "configure:973: checking for a BSD compatible install" >&5
|
||||
if test -z "$INSTALL"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -1024,10 +1020,10 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
|||
|
||||
if test "$INSTALL" = "${srcdir}/install-sh -c"; then
|
||||
# The makefiles need to use a different form to find it in $srcdir.
|
||||
INSTALL="$top_absdir/install-sh -c"
|
||||
INSTALL="$(..)./install-sh -c"
|
||||
fi
|
||||
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
|
||||
echo "configure:1031: checking whether ln -s works" >&5
|
||||
echo "configure:1027: checking whether ln -s works" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1052,7 +1048,7 @@ do
|
|||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1056: checking for $ac_word" >&5
|
||||
echo "configure:1052: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1083,7 +1079,7 @@ test -n "$MSGFMT" || MSGFMT=":"
|
|||
|
||||
|
||||
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||
echo "configure:1087: checking build system type" >&5
|
||||
echo "configure:1083: checking build system type" >&5
|
||||
|
||||
build_alias=$build
|
||||
case "$build_alias" in
|
||||
|
@ -1109,7 +1105,7 @@ fi
|
|||
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1113: checking for $ac_word" >&5
|
||||
echo "configure:1109: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1141,7 +1137,7 @@ if test $host != $build; then
|
|||
# Extract the first word of "gcc cc", so it can be a program name with args.
|
||||
set dummy gcc cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1145: checking for $ac_word" >&5
|
||||
echo "configure:1141: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1168,7 +1164,7 @@ fi
|
|||
|
||||
fi
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:1172: checking how to run the C preprocessor" >&5
|
||||
echo "configure:1168: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
|
@ -1183,13 +1179,13 @@ else
|
|||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1187 "configure"
|
||||
#line 1183 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -1200,13 +1196,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1204 "configure"
|
||||
#line 1200 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -1231,7 +1227,7 @@ echo "$ac_t""$CPP" 1>&6
|
|||
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ar; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1235: checking for $ac_word" >&5
|
||||
echo "configure:1231: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1262,7 +1258,7 @@ fi
|
|||
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1266: checking for $ac_word" >&5
|
||||
echo "configure:1262: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1293,7 +1289,7 @@ if test -n "$ac_tool_prefix"; then
|
|||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1297: checking for $ac_word" >&5
|
||||
echo "configure:1293: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1325,8 +1321,47 @@ fi
|
|||
fi
|
||||
|
||||
|
||||
# Extract the first word of "bash", so it can be a program name with args.
|
||||
set dummy bash; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1328: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
case "$BASH" in
|
||||
/*)
|
||||
ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_path_BASH="$ac_dir/$ac_word"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_BASH" && ac_cv_path_BASH="no"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
BASH="$ac_cv_path_BASH"
|
||||
if test -n "$BASH"; then
|
||||
echo "$ac_t""$BASH" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
if test "$BASH" != no && $BASH -c 'test "$BASH_VERSINFO" -ge 2'; then
|
||||
libc_cv_have_bash2=yes
|
||||
else
|
||||
libc_cv_have_bash2=no
|
||||
fi
|
||||
|
||||
|
||||
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
|
||||
echo "configure:1330: checking for signed size_t type" >&5
|
||||
echo "configure:1365: checking for signed size_t type" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1350,12 +1385,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
|
||||
echo "configure:1354: checking for libc-friendly stddef.h" >&5
|
||||
echo "configure:1389: checking for libc-friendly stddef.h" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1359 "configure"
|
||||
#line 1394 "configure"
|
||||
#include "confdefs.h"
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
|
@ -1370,7 +1405,7 @@ size_t size; wchar_t wchar;
|
|||
if (&size == NULL || &wchar == NULL) abort ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_friendly_stddef=yes
|
||||
else
|
||||
|
@ -1390,7 +1425,7 @@ override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
|
||||
echo "configure:1394: checking whether we need to use -P to assemble .S files" >&5
|
||||
echo "configure:1429: checking whether we need to use -P to assemble .S files" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1413,7 +1448,7 @@ asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
|
||||
echo "configure:1417: checking for assembler global-symbol directive" >&5
|
||||
echo "configure:1452: checking for assembler global-symbol directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1443,7 +1478,7 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1447: checking for .set assembler directive" >&5
|
||||
echo "configure:1482: checking for .set assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1478,12 +1513,12 @@ fi
|
|||
|
||||
if test $elf != yes; then
|
||||
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
|
||||
echo "configure:1482: checking for .init and .fini sections" >&5
|
||||
echo "configure:1517: checking for .init and .fini sections" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1487 "configure"
|
||||
#line 1522 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
@ -1492,7 +1527,7 @@ asm (".section .init");
|
|||
asm (".text");
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_have_initfini=yes
|
||||
else
|
||||
|
@ -1518,19 +1553,19 @@ if test $elf = yes; then
|
|||
libc_cv_asm_underscores=no
|
||||
else
|
||||
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
|
||||
echo "configure:1522: checking for _ prefix on C symbol names" >&5
|
||||
echo "configure:1557: checking for _ prefix on C symbol names" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1527 "configure"
|
||||
#line 1562 "configure"
|
||||
#include "confdefs.h"
|
||||
asm ("_glibc_foobar:");
|
||||
int main() {
|
||||
glibc_foobar ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
libc_cv_asm_underscores=yes
|
||||
else
|
||||
|
@ -1558,7 +1593,7 @@ if test $elf = yes; then
|
|||
libc_cv_asm_weakext_directive=no
|
||||
else
|
||||
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
|
||||
echo "configure:1562: checking for assembler .weak directive" >&5
|
||||
echo "configure:1597: checking for assembler .weak directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1581,7 +1616,7 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6
|
|||
|
||||
if test $libc_cv_asm_weak_directive = no; then
|
||||
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
|
||||
echo "configure:1585: checking for assembler .weakext directive" >&5
|
||||
echo "configure:1620: checking for assembler .weakext directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1618,7 +1653,7 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
|
||||
echo "configure:1622: checking for ld --no-whole-archive" >&5
|
||||
echo "configure:1657: checking for ld --no-whole-archive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1629,7 +1664,7 @@ __throw () {}
|
|||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -Wl,--no-whole-archive
|
||||
-o conftest conftest.c'; { (eval echo configure:1633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c'; { (eval echo configure:1668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_ld_no_whole_archive=yes
|
||||
else
|
||||
libc_cv_ld_no_whole_archive=no
|
||||
|
@ -1640,7 +1675,7 @@ fi
|
|||
echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6
|
||||
|
||||
echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6
|
||||
echo "configure:1644: checking for gcc -fno-exceptions" >&5
|
||||
echo "configure:1679: checking for gcc -fno-exceptions" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1651,7 +1686,7 @@ __throw () {}
|
|||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -fno-exceptions
|
||||
-o conftest conftest.c'; { (eval echo configure:1655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c'; { (eval echo configure:1690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_gcc_no_exceptions=yes
|
||||
else
|
||||
libc_cv_gcc_no_exceptions=no
|
||||
|
@ -1703,7 +1738,7 @@ if test "$uname" = generic; then
|
|||
fi
|
||||
|
||||
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
|
||||
echo "configure:1707: checking OS release for uname" >&5
|
||||
echo "configure:1742: checking OS release for uname" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1725,7 +1760,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6
|
|||
uname_release="$libc_cv_uname_release"
|
||||
|
||||
echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
|
||||
echo "configure:1729: checking OS version for uname" >&5
|
||||
echo "configure:1764: checking OS version for uname" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1747,7 +1782,7 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
|
||||
echo "configure:1751: checking stdio selection" >&5
|
||||
echo "configure:1786: checking stdio selection" >&5
|
||||
|
||||
case $stdio in
|
||||
libio) cat >> confdefs.h <<\EOF
|
||||
|
@ -1758,6 +1793,9 @@ default) stdio=stdio ;;
|
|||
esac
|
||||
echo "$ac_t""$stdio" 1>&6
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test $gnu_ld = yes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
|
@ -1913,7 +1951,6 @@ s%@includedir@%$includedir%g
|
|||
s%@oldincludedir@%$oldincludedir%g
|
||||
s%@infodir@%$infodir%g
|
||||
s%@mandir@%$mandir%g
|
||||
s%@top_absdir@%$top_absdir%g
|
||||
s%@subdirs@%$subdirs%g
|
||||
s%@host@%$host%g
|
||||
s%@host_alias@%$host_alias%g
|
||||
|
@ -1936,6 +1973,8 @@ s%@BUILD_CC@%$BUILD_CC%g
|
|||
s%@CPP@%$CPP%g
|
||||
s%@AR@%$AR%g
|
||||
s%@RANLIB@%$RANLIB%g
|
||||
s%@BASH@%$BASH%g
|
||||
s%@libc_cv_have_bash2@%$libc_cv_have_bash2%g
|
||||
s%@libc_cv_have_initfini@%$libc_cv_have_initfini%g
|
||||
s%@libc_cv_ld_no_whole_archive@%$libc_cv_ld_no_whole_archive%g
|
||||
s%@libc_cv_gcc_no_exceptions@%$libc_cv_gcc_no_exceptions%g
|
||||
|
@ -1943,6 +1982,8 @@ s%@uname_sysname@%$uname_sysname%g
|
|||
s%@uname_release@%$uname_release%g
|
||||
s%@uname_version@%$uname_version%g
|
||||
s%@stdio@%$stdio%g
|
||||
s%@libc_cv_slibdir@%$libc_cv_slibdir%g
|
||||
s%@libc_cv_sysconfdir@%$libc_cv_sysconfdir%g
|
||||
s%@gnu_ld@%$gnu_ld%g
|
||||
s%@gnu_as@%$gnu_as%g
|
||||
s%@elf@%$elf%g
|
||||
|
|
17
configure.in
17
configure.in
|
@ -7,10 +7,6 @@ AC_CONFIG_HEADER(config.h)
|
|||
# This will get text that should go into config.make.
|
||||
config_vars=
|
||||
|
||||
# We need a variable with the absolute path to the toplevel build directory.
|
||||
top_absdir=`cd $srcdir; pwd`
|
||||
AC_SUBST(top_absdir)
|
||||
|
||||
# Check for a --with-gmp argument and set gmp-srcdir in config.make.
|
||||
AC_ARG_WITH(gmp, dnl
|
||||
--with-gmp=DIRECTORY find GMP source code in DIRECTORY (not needed),
|
||||
|
@ -336,7 +332,7 @@ AC_MSG_RESULT(sysdeps/generic sysdeps/stub)
|
|||
AC_PROG_INSTALL
|
||||
if test "$INSTALL" = "${srcdir}/install-sh -c"; then
|
||||
# The makefiles need to use a different form to find it in $srcdir.
|
||||
INSTALL="$top_absdir/install-sh -c"
|
||||
INSTALL="$(..)./install-sh -c"
|
||||
fi
|
||||
AC_PROG_LN_S
|
||||
AC_CHECK_PROGS(MSGFMT, msgfmt gmsgfmt, :)
|
||||
|
@ -349,6 +345,14 @@ AC_PROG_CPP
|
|||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
||||
AC_PATH_PROG(BASH, bash, no)
|
||||
if test "$BASH" != no && $BASH -c 'test "$BASH_VERSINFO" -ge 2'; then
|
||||
libc_cv_have_bash2=yes
|
||||
else
|
||||
libc_cv_have_bash2=no
|
||||
fi
|
||||
AC_SUBST(libc_cv_have_bash2)
|
||||
|
||||
AC_CACHE_CHECK(for signed size_t type, libc_cv_signed_size_t, [dnl
|
||||
echo '#include <stddef.h>
|
||||
FOOBAR __SIZE_TYPE__ FOOBAR' > conftest.c
|
||||
|
@ -653,6 +657,9 @@ default) stdio=stdio ;;
|
|||
esac
|
||||
AC_MSG_RESULT($stdio)
|
||||
|
||||
AC_SUBST(libc_cv_slibdir)
|
||||
AC_SUBST(libc_cv_sysconfdir)
|
||||
|
||||
AC_SUBST(gnu_ld) AC_SUBST(gnu_as) AC_SUBST(elf)
|
||||
if test $gnu_ld = yes; then
|
||||
AC_DEFINE(HAVE_GNU_LD)
|
||||
|
|
10
elf/Makefile
10
elf/Makefile
|
@ -99,11 +99,21 @@ $(objpfx)libdl.so: $(objpfx)libdl_pic.a $(common-objpfx)libc.so $(objpfx)ld.so
|
|||
|
||||
$(slibdir)/$(rtld-installed-name): $(objpfx)ld.so; $(do-install-program)
|
||||
|
||||
ifneq ($(have-bash2),yes)
|
||||
$(objpfx)ldd: ldd.sh.in Makefile
|
||||
sed -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
|
||||
-e 's%@VERSION@%$(version)%g' < $< > $@.new
|
||||
chmod 555 $@.new
|
||||
mv -f $@.new $@
|
||||
else
|
||||
$(objpfx)ldd: ldd.bash.in Makefile
|
||||
sed -e 's%@BASH@%$(BASH)%g' \
|
||||
-e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
|
||||
-e 's%@VERSION@%$(version)%g' \
|
||||
-e 's%@TEXTDOMAINDIR@%$(localedir)%g' < $< > $@.new
|
||||
chmod 555 $@.new
|
||||
mv -f $@.new $@
|
||||
endif
|
||||
|
||||
# muwahaha
|
||||
|
||||
|
|
|
@ -33,16 +33,24 @@ _dl_map_object_deps (struct link_map *map,
|
|||
struct list *next;
|
||||
};
|
||||
struct list head[1 + npreloads], *tailp, *scanp;
|
||||
struct list duphead, *duptailp;
|
||||
unsigned int nlist;
|
||||
unsigned int nduplist;
|
||||
|
||||
/* Start the search list with one element: MAP itself. */
|
||||
head[0].map = map;
|
||||
|
||||
/* We use `l_reserved' as a mark bit to detect objects we have already
|
||||
put in the search list and avoid adding duplicate elements later in
|
||||
the list. */
|
||||
map->l_reserved = 1;
|
||||
|
||||
/* Add the preloaded items after MAP but before any of its dependencies. */
|
||||
for (nlist = 0; nlist < npreloads; ++nlist)
|
||||
{
|
||||
head[nlist].next = &head[nlist + 1];
|
||||
head[nlist + 1].map = preloads[nlist];
|
||||
preloads[nlist]->l_reserved = 1;
|
||||
}
|
||||
|
||||
/* Terminate the list. */
|
||||
|
@ -51,10 +59,10 @@ _dl_map_object_deps (struct link_map *map,
|
|||
/* Start here for adding dependencies to the list. */
|
||||
tailp = &head[nlist++];
|
||||
|
||||
/* We use `l_reserved' as a mark bit to detect objects we have already
|
||||
put in the search list and avoid adding duplicate elements later in
|
||||
the list. */
|
||||
map->l_reserved = 1;
|
||||
/* Until now we have the same number of libraries in the normal and
|
||||
the list with duplicates. */
|
||||
nduplist = nlist;
|
||||
duptailp = &duphead;
|
||||
|
||||
/* Process each element of the search list, loading each of its immediate
|
||||
dependencies and appending them to the list as we step through it.
|
||||
|
@ -94,6 +102,13 @@ _dl_map_object_deps (struct link_map *map,
|
|||
/* Set the mark bit that says it's already in the list. */
|
||||
dep->l_reserved = 1;
|
||||
}
|
||||
|
||||
/* In any case Append DEP to the duplicates search list. */
|
||||
duptailp->next = alloca (sizeof *duptailp);
|
||||
duptailp = duptailp->next;
|
||||
duptailp->map = dep;
|
||||
duptailp->next = NULL;
|
||||
++nduplist;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -112,4 +127,12 @@ _dl_map_object_deps (struct link_map *map,
|
|||
to avoid duplicates, so the next call starts fresh. */
|
||||
scanp->map->l_reserved = 0;
|
||||
}
|
||||
|
||||
map->l_dupsearchlist = malloc (nduplist * sizeof (struct link_map *));
|
||||
map->l_ndupsearchlist = nduplist;
|
||||
|
||||
for (nlist = 0; nlist < npreloads + 1; ++nlist)
|
||||
map->l_dupsearchlist[nlist] = head[nlist].map;
|
||||
for (scanp = duphead.next; scanp; scanp = scanp->next)
|
||||
map->l_dupsearchlist[nlist++] = scanp->map;
|
||||
}
|
||||
|
|
211
elf/dl-lookup.c
211
elf/dl-lookup.c
|
@ -23,6 +23,13 @@
|
|||
#include <string.h>
|
||||
|
||||
|
||||
struct sym_val
|
||||
{
|
||||
ElfW(Addr) a;
|
||||
const ElfW(Sym) *s;
|
||||
};
|
||||
|
||||
|
||||
/* This is the hashing function specified by the ELF ABI. */
|
||||
static inline unsigned
|
||||
_dl_elf_hash (const char *name)
|
||||
|
@ -44,6 +51,90 @@ _dl_elf_hash (const char *name)
|
|||
return hash;
|
||||
}
|
||||
|
||||
|
||||
/* Inner part of the lookup functions. */
|
||||
static inline ElfW(Addr)
|
||||
do_lookup (const char *undef_name, unsigned long int hash,
|
||||
const ElfW(Sym) **ref, struct sym_val *result,
|
||||
struct link_map *list[], size_t i, size_t n,
|
||||
const char *reference_name, struct link_map *skip, int flags)
|
||||
{
|
||||
struct link_map *map;
|
||||
|
||||
for (; i < n; ++i)
|
||||
{
|
||||
const ElfW(Sym) *symtab;
|
||||
const char *strtab;
|
||||
ElfW(Symndx) symidx;
|
||||
|
||||
map = list[i];
|
||||
|
||||
/* Here come the extra test needed for `_dl_lookup_symbol_skip'. */
|
||||
if (skip != NULL && map == skip)
|
||||
continue;
|
||||
|
||||
/* Don't search the executable when resolving a copy reloc. */
|
||||
if (flags & DL_LOOKUP_NOEXEC && map->l_type == lt_executable)
|
||||
continue;
|
||||
|
||||
symtab = ((void *) map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr);
|
||||
strtab = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
|
||||
|
||||
/* Search the appropriate hash bucket in this object's symbol table
|
||||
for a definition for the same symbol name. */
|
||||
for (symidx = map->l_buckets[hash % map->l_nbuckets];
|
||||
symidx != STN_UNDEF;
|
||||
symidx = map->l_chain[symidx])
|
||||
{
|
||||
const ElfW(Sym) *sym = &symtab[symidx];
|
||||
|
||||
if (sym->st_value == 0 || /* No value. */
|
||||
((flags & DL_LOOKUP_NOPLT) != 0 /* Reject PLT entry. */
|
||||
&& sym->st_shndx == SHN_UNDEF))
|
||||
continue;
|
||||
|
||||
switch (ELFW(ST_TYPE) (sym->st_info))
|
||||
{
|
||||
case STT_NOTYPE:
|
||||
case STT_FUNC:
|
||||
case STT_OBJECT:
|
||||
break;
|
||||
default:
|
||||
/* Not a code/data definition. */
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sym != *ref && strcmp (strtab + sym->st_name, undef_name))
|
||||
/* Not the symbol we are looking for. */
|
||||
continue;
|
||||
|
||||
switch (ELFW(ST_BIND) (sym->st_info))
|
||||
{
|
||||
case STB_GLOBAL:
|
||||
/* Global definition. Just what we need. */
|
||||
result->s = sym;
|
||||
result->a = map->l_addr;
|
||||
return 1;
|
||||
case STB_WEAK:
|
||||
/* Weak definition. Use this value if we don't find
|
||||
another. */
|
||||
if (! result->s)
|
||||
{
|
||||
result->s = sym;
|
||||
result->a = map->l_addr;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* Local symbols are ignored. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* We have not found anything until now. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Search loaded objects' symbol tables for a definition of the symbol
|
||||
UNDEF_NAME. FLAGS is a set of flags. If DL_LOOKUP_NOEXEC is set,
|
||||
then don't search the executable for a definition; this used for
|
||||
|
@ -57,82 +148,17 @@ _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
|
|||
int flags)
|
||||
{
|
||||
const unsigned long int hash = _dl_elf_hash (undef_name);
|
||||
struct
|
||||
{
|
||||
ElfW(Addr) a;
|
||||
const ElfW(Sym) *s;
|
||||
} weak_value = { 0, NULL };
|
||||
size_t i;
|
||||
struct link_map **scope, *map;
|
||||
struct sym_val current_value = { 0, NULL };
|
||||
struct link_map **scope;
|
||||
|
||||
/* Search the relevant loaded objects for a definition. */
|
||||
for (scope = symbol_scope; *scope; ++scope)
|
||||
for (i = 0; i < (*scope)->l_nsearchlist; ++i)
|
||||
{
|
||||
const ElfW(Sym) *symtab;
|
||||
const char *strtab;
|
||||
ElfW(Symndx) symidx;
|
||||
if (do_lookup (undef_name, hash, ref, ¤t_value,
|
||||
(*scope)->l_searchlist, 0, (*scope)->l_nsearchlist,
|
||||
reference_name, NULL, flags))
|
||||
break;
|
||||
|
||||
map = (*scope)->l_searchlist[i];
|
||||
|
||||
/* Don't search the executable when resolving a copy reloc. */
|
||||
if (flags & DL_LOOKUP_NOEXEC && map->l_type == lt_executable)
|
||||
continue;
|
||||
|
||||
symtab = ((void *) map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr);
|
||||
strtab = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
|
||||
|
||||
/* Search the appropriate hash bucket in this object's symbol table
|
||||
for a definition for the same symbol name. */
|
||||
for (symidx = map->l_buckets[hash % map->l_nbuckets];
|
||||
symidx != STN_UNDEF;
|
||||
symidx = map->l_chain[symidx])
|
||||
{
|
||||
const ElfW(Sym) *sym = &symtab[symidx];
|
||||
|
||||
if (sym->st_value == 0 || /* No value. */
|
||||
((flags & DL_LOOKUP_NOPLT) != 0 /* Reject PLT entry. */
|
||||
&& sym->st_shndx == SHN_UNDEF))
|
||||
continue;
|
||||
|
||||
switch (ELFW(ST_TYPE) (sym->st_info))
|
||||
{
|
||||
case STT_NOTYPE:
|
||||
case STT_FUNC:
|
||||
case STT_OBJECT:
|
||||
break;
|
||||
default:
|
||||
/* Not a code/data definition. */
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sym != *ref && strcmp (strtab + sym->st_name, undef_name))
|
||||
/* Not the symbol we are looking for. */
|
||||
continue;
|
||||
|
||||
switch (ELFW(ST_BIND) (sym->st_info))
|
||||
{
|
||||
case STB_GLOBAL:
|
||||
/* Global definition. Just what we need. */
|
||||
*ref = sym;
|
||||
return map->l_addr;
|
||||
case STB_WEAK:
|
||||
/* Weak definition. Use this value if we don't find
|
||||
another. */
|
||||
if (! weak_value.s)
|
||||
{
|
||||
weak_value.s = sym;
|
||||
weak_value.a = map->l_addr;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* Local symbols are ignored. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (weak_value.s == NULL &&
|
||||
if (current_value.s == NULL &&
|
||||
(*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
|
||||
{
|
||||
/* We could find no value for a strong reference. */
|
||||
|
@ -144,8 +170,45 @@ _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
|
|||
_dl_signal_error (0, reference_name, buf);
|
||||
}
|
||||
|
||||
*ref = weak_value.s;
|
||||
return weak_value.a;
|
||||
*ref = current_value.s;
|
||||
return current_value.a;
|
||||
}
|
||||
|
||||
|
||||
/* This function is nearly the same as `_dl_lookup_symbol' but it
|
||||
skips in the first list all objects until SKIP_MAP is found. I.e.,
|
||||
it only considers objects which were loaded after the described
|
||||
object. If there are more search lists the object described by
|
||||
SKIP_MAP is only skipped. */
|
||||
ElfW(Addr)
|
||||
_dl_lookup_symbol_skip (const char *undef_name, const ElfW(Sym) **ref,
|
||||
struct link_map *symbol_scope[],
|
||||
const char *reference_name,
|
||||
struct link_map *skip_map,
|
||||
int flags)
|
||||
{
|
||||
int found_entry = 0;
|
||||
const unsigned long int hash = _dl_elf_hash (undef_name);
|
||||
struct sym_val current_value = { 0, NULL };
|
||||
struct link_map **scope;
|
||||
size_t i;
|
||||
|
||||
/* Search the relevant loaded objects for a definition. */
|
||||
scope = symbol_scope;
|
||||
for (i = 0; (*scope)->l_dupsearchlist[i] != skip_map; ++i)
|
||||
assert (i < (*scope)->l_ndupsearchlist);
|
||||
|
||||
if (! do_lookup (undef_name, hash, ref, ¤t_value,
|
||||
(*scope)->l_dupsearchlist, i, (*scope)->l_ndupsearchlist,
|
||||
reference_name, skip_map, flags))
|
||||
while (*++scope)
|
||||
if (do_lookup (undef_name, hash, ref, ¤t_value,
|
||||
(*scope)->l_dupsearchlist, 0, (*scope)->l_ndupsearchlist,
|
||||
reference_name, skip_map, flags))
|
||||
break;
|
||||
|
||||
*ref = current_value.s;
|
||||
return current_value.a;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,6 +32,12 @@
|
|||
visible as if the object were linked directly into the program. */
|
||||
#define RTLD_GLOBAL 0x100
|
||||
|
||||
/* If the first argument of `dlsym' is set to RTLD_NEXT the run-time
|
||||
address of the symbol called NAME in the next shared object is
|
||||
returned. The "next" relation is defined by the order the shared
|
||||
objects were loaded. */
|
||||
#define RTLD_NEXT ((void *) -1l)
|
||||
|
||||
/* Open the shared object FILE and map it in; return a handle that can be
|
||||
passed to `dlsym' to get symbol values from it. */
|
||||
extern void *dlopen __P ((__const char *__file, int __mode));
|
||||
|
|
38
elf/dlsym.c
38
elf/dlsym.c
|
@ -26,25 +26,43 @@
|
|||
void *
|
||||
dlsym (void *handle, const char *name)
|
||||
{
|
||||
ElfW(Addr) caller = (ElfW(Addr)) __builtin_return_address (0);
|
||||
ElfW(Addr) loadbase;
|
||||
const ElfW(Sym) *ref = NULL;
|
||||
void doit (void)
|
||||
{
|
||||
struct link_map *map = handle, **scope, *mapscope[2] = { map, NULL };
|
||||
const char *owner;
|
||||
|
||||
if (map)
|
||||
if (handle == NULL)
|
||||
/* Search the global scope. */
|
||||
loadbase = _dl_lookup_symbol
|
||||
(name, &ref, &(_dl_global_scope ?: _dl_default_scope)[2], NULL, 0);
|
||||
else if (handle == RTLD_NEXT)
|
||||
{
|
||||
/* Search the scope of the given object. */
|
||||
scope = mapscope;
|
||||
owner = map->l_name;
|
||||
struct link_map *l, *match;
|
||||
|
||||
/* Find the highest-addressed object that CALLER is not below. */
|
||||
match = NULL;
|
||||
for (l = _dl_loaded; l; l = l->l_next)
|
||||
if (caller >= l->l_addr && (!match || match->l_addr < l->l_addr))
|
||||
match = l;
|
||||
|
||||
if (! match)
|
||||
_dl_signal_error (0, NULL, _("\
|
||||
RTLD_NEXT used in code not dynamically loaded"));
|
||||
|
||||
l = match;
|
||||
while (l->l_loader)
|
||||
l = l->l_loader;
|
||||
|
||||
loadbase = _dl_lookup_symbol_skip
|
||||
(name, &ref, &_dl_loaded, NULL, l, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
scope = &(_dl_global_scope ?: _dl_default_scope)[2];
|
||||
owner = NULL;
|
||||
/* Search the scope of the given object. */
|
||||
struct link_map *map = handle;
|
||||
struct link_map *mapscope[2] = { map, NULL };
|
||||
loadbase = _dl_lookup_symbol (name, &ref, mapscope, map->l_name, 0);
|
||||
}
|
||||
loadbase = _dl_lookup_symbol (name, &ref, scope, owner, 0);
|
||||
}
|
||||
|
||||
return _dlerror_run (doit) ? NULL : (void *) (loadbase + ref->st_value);
|
||||
|
|
|
@ -1,24 +1,50 @@
|
|||
#! @BASH@
|
||||
|
||||
# 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.
|
||||
|
||||
|
||||
# This is the `ldd' command, which lists what shared libraries are
|
||||
# used by given dynamically-linked executables. It works by invoking the
|
||||
# run-time dynamic linker as a command and setting the environment
|
||||
# variable LD_TRACE_LOADED_OBJECTS to a non-empty value.
|
||||
|
||||
# We should be able to find the translation right at the beginning.
|
||||
TEXTDOMAIN=libc
|
||||
TEXTDOMAINDIR=@TEXTDOMAINDIR@
|
||||
|
||||
RTLD=@RTLD@
|
||||
usage=$"\
|
||||
ldd [OPTION]... FILE...
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
Report bugs to <bug-glibc@prep.ai.mit.edu>."
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--v*)
|
||||
echo 'ldd (GNU libc) @VERSION@'; exit 0 ;;
|
||||
echo $"ldd (GNU libc) @VERSION@
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
exit 0 ;;
|
||||
--h*)
|
||||
echo "$usage"; exit 0 ;;
|
||||
--) # Stop option prcessing
|
||||
echo $"ldd [OPTION]... FILE...
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
Report bugs to <bug-glibc@prep.ai.mit.edu>."
|
||||
exit 0 ;;
|
||||
--) # Stop option prcessing.
|
||||
shift; break ;;
|
||||
*)
|
||||
break ;;
|
||||
|
@ -64,3 +90,6 @@ Try \`ldd --help' for more information."
|
|||
esac
|
||||
|
||||
exit 0
|
||||
# Local Variables:
|
||||
# mode:ksh
|
||||
# End:
|
||||
|
|
|
@ -1,24 +1,46 @@
|
|||
#! /bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
|
||||
# This is the `ldd' command, which lists what shared libraries are
|
||||
# used by given dynamically-linked executables. It works by invoking the
|
||||
# run-time dynamic linker as a command and setting the environment
|
||||
# variable LD_TRACE_LOADED_OBJECTS to a non-empty value.
|
||||
|
||||
RTLD=@RTLD@
|
||||
usage="\
|
||||
ldd [OPTION]... FILE...
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
Report bugs to <bug-glibc@prep.ai.mit.edu>."
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--v*)
|
||||
echo 'ldd (GNU libc) @VERSION@'; exit 0 ;;
|
||||
echo 'ldd (GNU libc) @VERSION@
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.'
|
||||
exit 0 ;;
|
||||
--h*)
|
||||
echo "$usage"; exit 0 ;;
|
||||
--) # Stop option prcessing
|
||||
echo 'ldd [OPTION]... FILE...
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
Report bugs to <bug-glibc@prep.ai.mit.edu>.'
|
||||
exit 0 ;;
|
||||
--) # Stop option prcessing.
|
||||
shift; break ;;
|
||||
*)
|
||||
break ;;
|
||||
|
|
13
elf/link.h
13
elf/link.h
|
@ -109,6 +109,11 @@ struct link_map
|
|||
struct link_map **l_searchlist;
|
||||
unsigned int l_nsearchlist;
|
||||
|
||||
/* We keep another list in which we keep duplicates. This is
|
||||
needed in _dl_lookup_symbol_skip to implemented RTLD_NEXT. */
|
||||
struct link_map **l_dupsearchlist;
|
||||
unsigned int l_ndupsearchlist;
|
||||
|
||||
/* Dependent object that first caused this object to be loaded. */
|
||||
struct link_map *l_loader;
|
||||
|
||||
|
@ -239,6 +244,14 @@ extern ElfW(Addr) _dl_lookup_symbol (const char *undef,
|
|||
const char *reference_name,
|
||||
int flags);
|
||||
|
||||
/* For handling RTLD_NEXT we must be able to skip shared objects. */
|
||||
extern ElfW(Addr) _dl_lookup_symbol_skip (const char *undef,
|
||||
const ElfW(Sym) **sym,
|
||||
struct link_map *symbol_scope[],
|
||||
const char *reference_name,
|
||||
struct link_map *skip_this,
|
||||
int flags);
|
||||
|
||||
/* Look up symbol NAME in MAP's scope and return its run-time address. */
|
||||
extern ElfW(Addr) _dl_symbol_value (struct link_map *map, const char *name);
|
||||
|
||||
|
|
10
grp/grp.h
10
grp/grp.h
|
@ -98,8 +98,11 @@ extern struct group *getgrnam __P ((__const char *__name));
|
|||
|
||||
/* Reentrant versions of some of the functions above.
|
||||
|
||||
PLEASE NOTE: these functions are not yet standardized. The interface
|
||||
may change in later versions of this library. */
|
||||
PLEASE NOTE: the `getgrent_r' function is not (yet) standardized.
|
||||
The interface may change in later versions of this library. But
|
||||
the interface is designed following the principals used for the
|
||||
other reentrant functions so the chances are good this is what the
|
||||
POSIX people would choose. */
|
||||
|
||||
#if defined(__USE_SVID) || defined (__USE_BSD) || defined(__USE_XOPEN_EXTENDED)
|
||||
extern int getgrent_r __P ((struct group *__resultbuf, char *buffer,
|
||||
|
@ -117,7 +120,8 @@ extern int getgrnam_r __P ((__const char *__name, struct group *__resultbuf,
|
|||
struct group **__result));
|
||||
|
||||
#ifdef __USE_SVID
|
||||
/* Read a group entry from STREAM. */
|
||||
/* Read a group entry from STREAM. This function is not standardized
|
||||
an probably never will. */
|
||||
extern int __fgetgrent_r __P ((FILE * __stream, struct group *__resultbuf,
|
||||
char *buffer, size_t __buflen,
|
||||
struct group **__result));
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <netinet/ether.h>
|
||||
#include <netinet/if_ether.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../nss/nsswitch.h"
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <netinet/ether.h>
|
||||
#include <netinet/if_ether.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../nss/nsswitch.h"
|
||||
|
||||
|
|
|
@ -43,12 +43,12 @@ static char sccsid[] = "@(#)rexec.c 8.1 (Berkeley) 6/4/93";
|
|||
#include <stdio.h>
|
||||
#include <netdb.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern errno;
|
||||
char *index();
|
||||
int rexecoptions;
|
||||
char *getpass(), *getlogin();
|
||||
|
||||
int
|
||||
rexec(ahost, rport, name, pass, cmd, fd2p)
|
||||
char **ahost;
|
||||
int rport;
|
||||
|
|
36
login/utmp.h
36
login/utmp.h
|
@ -1,20 +1,20 @@
|
|||
/* 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
|
||||
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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, 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. */
|
||||
|
||||
|
||||
#ifndef _UTMP_H_
|
||||
|
@ -38,18 +38,18 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
/* Make FD be the controlling terminal, stdin, stdout, and stderr;
|
||||
then close FD. Returns 0 on success, nonzero on error. */
|
||||
extern int login_tty __P ((int fd));
|
||||
extern int login_tty __P ((int __fd));
|
||||
|
||||
|
||||
/* Write the given entry into utmp and wtmp. */
|
||||
extern void login __P ((__const struct utmp *));
|
||||
extern void login __P ((__const struct utmp *__entry));
|
||||
|
||||
/* Write the utmp entry to say the user on UT_LINE has logged out. */
|
||||
extern int logout __P ((__const char *ut_line));
|
||||
extern int logout __P ((__const char *__ut_line));
|
||||
|
||||
/* Append to wtmp an entry for the current time and the given info. */
|
||||
extern void logwtmp __P ((__const char *ut_line, __const char *ut_name,
|
||||
__const char *ut_host));
|
||||
extern void logwtmp __P ((__const char *__ut_line, __const char *__ut_name,
|
||||
__const char *__ut_host));
|
||||
|
||||
/* Change name of the utmp file to be examined. */
|
||||
extern int utmpname __P ((__const char *__file));
|
||||
|
|
|
@ -11,7 +11,7 @@ correctly in the local environment. Traditionally, this was done by
|
|||
using files (e.g., @file{/etc/passwd}), but other nameservices (line the
|
||||
Network Information Service (NIS) and the Domain Name Service (DNS))
|
||||
became popular, and were hacked into the C library, usually with a fixed
|
||||
search order @pxref{frobnicate, frobnicate, ,jargon}.
|
||||
search order (@pxref{frobnicate, , ,jargon, The Jargon File}).
|
||||
|
||||
The GNU C Library contains a cleaner solution of this problem. It is
|
||||
designed after a method used by Sun Microsystems in the C library of
|
||||
|
|
|
@ -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.
|
||||
|
||||
#
|
||||
# Sub-makefile for misc portion of the library.
|
||||
|
@ -28,7 +28,8 @@ headers := sys/uio.h iovec.h sys/ioctl.h ioctls.h ioctl-types.h \
|
|||
ttyent.h syslog.h sys/syslog.h paths.h sys/reboot.h \
|
||||
sys/mman.h sys/param.h fstab.h mntent.h search.h err.h error.h\
|
||||
sys/queue.h sysexits.h syscall.h sys/syscall.h sys/swap.h \
|
||||
sys/select.h ustat.h sys/ustat.h ustatbits.h sys/sysinfo.h
|
||||
sys/select.h ustat.h sys/ustat.h ustatbits.h sys/sysinfo.h \
|
||||
regexp.h
|
||||
|
||||
routines := brk sbrk sstk ioctl \
|
||||
readv writev \
|
||||
|
@ -55,7 +56,7 @@ routines := brk sbrk sstk ioctl \
|
|||
efgcvt efgcvt_r qefgcvt qefgcvt_r \
|
||||
hsearch hsearch_r tsearch lsearch \
|
||||
err error ustat \
|
||||
getsysstats dirname
|
||||
getsysstats dirname regexp
|
||||
aux := init-misc
|
||||
distribute := bsd-compat.c
|
||||
extra-objs := bsd-compat.o
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
/* Define function and variables for the obsolete <regexp.h> interface.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
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. */
|
||||
|
||||
#define __DO_NOT_DEFINE_COMPILE
|
||||
#include <regexp.h>
|
||||
|
||||
/* Define the variables used for the interface. */
|
||||
char *loc1;
|
||||
char *loc2;
|
||||
|
||||
/* Although we do not support the use we define this variable as well. */
|
||||
char *locs;
|
||||
|
||||
|
||||
/* Find the next match in STRING. The compiled regular expression is
|
||||
found in the buffer starting at EXPBUF. `loc1' will return the
|
||||
first character matched and `loc2' points to the next unmatched
|
||||
character. */
|
||||
int
|
||||
__step (const char *string, const char *expbuf)
|
||||
{
|
||||
regmatch_t match; /* We only need info about the full match. */
|
||||
|
||||
expbuf += __alignof (regex_t *);
|
||||
expbuf -= (expbuf - ((const char *) 0)) % __alignof__ (regex_t *);
|
||||
|
||||
if (regexec ((regex_t *) expbuf, string, 1, &match, REG_NOTEOL)
|
||||
== REG_NOMATCH)
|
||||
return 0;
|
||||
|
||||
loc1 = (char *) string + match.rm_so;
|
||||
loc2 = (char *) string + match.rm_eo;
|
||||
return 1;
|
||||
}
|
||||
weak_alias (__step, step)
|
||||
|
||||
|
||||
/* Match the beginning of STRING with the compiled regular expression
|
||||
in EXPBUF. If the match is successful `loc2' will contain the
|
||||
position of the first unmatched character. */
|
||||
int
|
||||
__advance (const char *string, const char *expbuf)
|
||||
{
|
||||
regmatch_t match; /* We only need info about the full match. */
|
||||
|
||||
expbuf += __alignof__ (regex_t *);
|
||||
expbuf -= (expbuf - ((const char *) 0)) % __alignof__ (regex_t *);
|
||||
|
||||
if (regexec ((regex_t *) expbuf, string, 1, &match, REG_NOTEOL)
|
||||
== REG_NOMATCH
|
||||
/* We have to check whether the check is at the beginning of the
|
||||
buffer. */
|
||||
|| match.rm_so != 0)
|
||||
return 0;
|
||||
|
||||
loc2 = (char *) string + match.rm_eo;
|
||||
return 1;
|
||||
}
|
||||
weak_alias (__advance, advance)
|
|
@ -0,0 +1,213 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
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 _REGEXP_H
|
||||
#define _REGEXP_H 1
|
||||
|
||||
/* The contents of this header file was first standardized in X/Open
|
||||
System Interface and Headers Issue 2, originally coming from SysV.
|
||||
In issue 4, version 2, it is marked as TO BE WITDRAWN.
|
||||
|
||||
This code shouldn't be used in any newly written code. It is
|
||||
included only for compatibility reasons. Use the POSIX definition
|
||||
in <regex.h> for portable applications and a reasonable interface. */
|
||||
|
||||
#include <alloca.h>
|
||||
#include <regex.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* The implementation provided here emulates the needed functionality
|
||||
by mapping to the POSIX regular expression matcher. The interface
|
||||
for the here included function is weird (this really is a harmless
|
||||
word).
|
||||
|
||||
The user has to provide five macros before this header file can be
|
||||
included:
|
||||
|
||||
GETC() Return the value of the next character in the regular
|
||||
expression pattern. Successive calls should return
|
||||
successive characters.
|
||||
|
||||
PEEKC() Return the value of the next character in the regular
|
||||
expression pattern. Immediately successive calls to
|
||||
PEEKC() should return the same character which should
|
||||
also be the next character returned by GETC().
|
||||
|
||||
UNGETC(c) Cause `c' to be returned by the next call to GETC() and
|
||||
PEEKC().
|
||||
|
||||
RETURN(ptr) Used for normal exit of the `compile' function. `ptr'
|
||||
is a pointer to the character after the last character of
|
||||
the compiled regular expression.
|
||||
|
||||
ERROR(val) Used for abnormal return from `compile'. `val' is the
|
||||
error number. The error codes are:
|
||||
11 Range endpoint too large.
|
||||
16 Bad number.
|
||||
25 \digit out of range.
|
||||
36 Illegal or missing delimiter.
|
||||
41 No remembered search string.
|
||||
42 \( \) imbalance.
|
||||
43 Too many \(.
|
||||
44 More tan two numbers given in \{ \}.
|
||||
45 } expected after \.
|
||||
46 First number exceeds second in \{ \}.
|
||||
49 [ ] imbalance.
|
||||
50 Regular expression overflow.
|
||||
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Interface variables. They contain the results of the successful
|
||||
calls to `setp' and `advance'. */
|
||||
extern char *loc1;
|
||||
extern char *loc2;
|
||||
|
||||
/* The use of this variable in the `advance' function is not
|
||||
supported. */
|
||||
extern char *locs;
|
||||
|
||||
|
||||
#ifndef __DO_NOT_DEFINE_COMPILE
|
||||
/* Get and compile the user supplied pattern up to end of line or
|
||||
string or until EOF is seen, whatever happens first. The result is
|
||||
placed in the buffer starting at EXPBUG and delimited by ENDBUF.
|
||||
|
||||
This function cannot be defined in the libc itself since it depends
|
||||
on the macros. */
|
||||
char *
|
||||
compile (char *__instring, char *__expbuf, __const char *__endbuf, int __eof)
|
||||
{
|
||||
char *__input_buffer = NULL;
|
||||
size_t __input_size = 0;
|
||||
size_t __current_size;
|
||||
int __ch;
|
||||
int __result;
|
||||
|
||||
/* Align the expression buffer according to the needs for an object
|
||||
of type `regex_t'. Then check for minimum size of the buffer for
|
||||
the compiled regular expression. */
|
||||
regex_t *__expr_ptr;
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
const size_t __req = __alignof__ (regex_t *);
|
||||
#else
|
||||
/* How shall we find out? We simply guess it and can change it is
|
||||
this really proofs to be wrong. */
|
||||
const size_t __req = 8;
|
||||
#endif
|
||||
__expbuf += __req;
|
||||
__expbuf -= (__expbuf - ((char *) 0)) % __req;
|
||||
if (__endbuf < __expbuf + sizeof (regex_t))
|
||||
{
|
||||
ERROR (50);
|
||||
}
|
||||
__expr_ptr = (regex_t *) __expbuf;
|
||||
/* The remaining space in the buffer can be used for the compiled
|
||||
pattern. */
|
||||
__expr_ptr->buffer = __expbuf + sizeof (regex_t);
|
||||
__expr_ptr->allocated = __endbuf - (char *) __expr_ptr->buffer;
|
||||
|
||||
while ((__ch = (GETC ())) != __eof)
|
||||
{
|
||||
if (__ch == '\0' || __ch == 'n')
|
||||
{
|
||||
UNGETC (__ch);
|
||||
break;
|
||||
}
|
||||
|
||||
if (__current_size + 1 >= __input_size)
|
||||
{
|
||||
size_t __new_size = __input_size ? 2 * __input_size : 128;
|
||||
char *__new_room = __alloca (__new_size);
|
||||
/* See whether we can use the old buffer. */
|
||||
if (__new_room + __new_size == __input_buffer)
|
||||
{
|
||||
__input_size += __new_size;
|
||||
__input_buffer = memcpy (__new_room, __input_buffer,
|
||||
__current_size);
|
||||
}
|
||||
else if (__input_buffer + __input_size == __new_room)
|
||||
__input_size += __new_size;
|
||||
else
|
||||
{
|
||||
__input_size = __new_size;
|
||||
__input_buffer = memcpy (__new_room, __input_buffer,
|
||||
__current_size);
|
||||
}
|
||||
}
|
||||
__input_buffer[__current_size++] = __ch;
|
||||
}
|
||||
__input_buffer[__current_size++] = '\0';
|
||||
|
||||
/* Now compile the pattern. */
|
||||
__error = regcomp (__expr_ptr, __input_buffer, REG_NEWLINE);
|
||||
if (__error != 0)
|
||||
/* Oh well, we have to translate POSIX error codes. */
|
||||
switch (__error)
|
||||
{
|
||||
case REG_BADPAT:
|
||||
case REG_ECOLLATE:
|
||||
case REG_ECTYPE:
|
||||
case REG_EESCAPE:
|
||||
case REG_BADRPT:
|
||||
case REG_EEND:
|
||||
case REG_RPAREN:
|
||||
default:
|
||||
/* There is no matching error code. */
|
||||
RETURN (36);
|
||||
case REG_ESUBREG:
|
||||
RETURN (25);
|
||||
case REG_EBRACK:
|
||||
RETURN (49);
|
||||
case REG_EPAREN:
|
||||
RETURN (42);
|
||||
case REG_EBRACE:
|
||||
RETURN (44);
|
||||
case REG_BADBR:
|
||||
RETURN (46);
|
||||
case REG_ERANGE:
|
||||
RETURN (11);
|
||||
case REG_ESPACE:
|
||||
case REG_ESIZE:
|
||||
ERROR (50);
|
||||
}
|
||||
|
||||
/* Everything is ok. */
|
||||
RETURN ((char *) (__expr_ptr->buffer + __expr->used));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Find the next match in STRING. The compiled regular expression is
|
||||
found in the buffer starting at EXPBUF. `loc1' will return the
|
||||
first character matched and `loc2' points to the next unmatched
|
||||
character. */
|
||||
extern int step __P ((__const char *__string, __const char *__expbuf));
|
||||
|
||||
/* Match the beginning of STRING with the compiled regular expression
|
||||
in EXPBUF. If the match is successful `loc2' will contain the
|
||||
position of the first unmatched character. */
|
||||
extern int advance __P ((__const char *__string, __const char *__expbuf));
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* regexp.h */
|
|
@ -88,7 +88,7 @@ extern void hdestroy __P ((void));
|
|||
|
||||
extern int hsearch_r __P ((ENTRY __item, ACTION __action, ENTRY **__retval,
|
||||
struct hsearch_data *__htab));
|
||||
extern int hcreate_r __P ((unsigned int __nel, struct hsearch_data *htab));
|
||||
extern int hcreate_r __P ((size_t __nel, struct hsearch_data *htab));
|
||||
extern void hdestroy_r __P ((struct hsearch_data *htab));
|
||||
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
/* This is not a typedef so `const __ptr_t' does the right thing. */
|
||||
#define __ptr_t void *
|
||||
typedef long double __long_double_t;
|
||||
#define __long_double_t long double
|
||||
|
||||
#else
|
||||
|
||||
|
@ -71,7 +71,7 @@ typedef long double __long_double_t;
|
|||
#define __STRING(x) "x"
|
||||
|
||||
#define __ptr_t char *
|
||||
typedef double __long_double_t;
|
||||
#define __long_double_t long double
|
||||
|
||||
/* The BSD header files use the ANSI keywords unmodified (this means that
|
||||
old programs may lose if they use the new keywords as identifiers), but
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
#define _SYS_UIO_H 1
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* This file defines `struct iovec'. */
|
||||
#include <iovec.h>
|
||||
|
||||
|
@ -34,7 +34,7 @@ __BEGIN_DECLS
|
|||
The buffers are filled in the order specified.
|
||||
Operates just like `read' (see <unistd.h>) except that data are
|
||||
put in VECTOR instead of a contiguous buffer. */
|
||||
extern ssize_t readv __P ((int __fd, __const struct iovec * __vector,
|
||||
extern ssize_t readv __P ((int __fd, __const struct iovec *__vector,
|
||||
int __count));
|
||||
|
||||
/* Write data pointed by the buffers described by VECTOR, which
|
||||
|
@ -42,7 +42,7 @@ extern ssize_t readv __P ((int __fd, __const struct iovec * __vector,
|
|||
The data is written in the order specified.
|
||||
Operates just like `write' (see <unistd.h>) except that the data
|
||||
are taken from VECTOR instead of a contiguous buffer. */
|
||||
extern ssize_t writev __P ((int __fd, __const struct iovec * __vector,
|
||||
extern ssize_t writev __P ((int __fd, __const struct iovec *__vector,
|
||||
int __count));
|
||||
|
||||
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
This file is part of the GNU C Library.
|
||||
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, 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. */
|
||||
|
||||
/* Parts of this file are plain copies of the file `gethtnamadr.c' from
|
||||
the bind package and it has the following copyright. */
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
This file is part of the GNU C Library.
|
||||
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, 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. */
|
||||
|
||||
/* Parts of this file are plain copies of the file `getnetnamadr.c' from
|
||||
the bind package and it has the following copyright. */
|
||||
|
@ -97,12 +97,12 @@ typedef union querybuf
|
|||
|
||||
|
||||
/* Protortypes for local functions. */
|
||||
static int getanswer_r (const querybuf *answer, int anslen,
|
||||
struct netent *result, char *buffer, int buflen,
|
||||
lookup_method net_i);
|
||||
static enum nss_status getanswer_r (const querybuf *answer, int anslen,
|
||||
struct netent *result, char *buffer,
|
||||
int buflen, lookup_method net_i);
|
||||
|
||||
|
||||
int
|
||||
enum nss_status
|
||||
_nss_dns_getnetbyname_r (const char *name, struct netent *result,
|
||||
char *buffer, int buflen)
|
||||
{
|
||||
|
@ -125,12 +125,12 @@ _nss_dns_getnetbyname_r (const char *name, struct netent *result,
|
|||
}
|
||||
|
||||
|
||||
int
|
||||
enum nss_status
|
||||
_nss_dns_getnetbyaddr_r (long net, int type, struct netent *result,
|
||||
char *buffer, int buflen)
|
||||
{
|
||||
/* Return entry for network with NAME. */
|
||||
int status;
|
||||
enum nss_status status;
|
||||
querybuf net_buffer;
|
||||
unsigned int net_bytes[4];
|
||||
char qbuf[MAXDNAME];
|
||||
|
@ -194,7 +194,7 @@ _nss_dns_getnetbyaddr_r (long net, int type, struct netent *result,
|
|||
#undef offsetof
|
||||
#define offsetof(Type, Member) ((size_t) &((Type *) NULL)->Member)
|
||||
|
||||
static int
|
||||
static enum nss_status
|
||||
getanswer_r (const querybuf *answer, int anslen, struct netent *result,
|
||||
char *buffer, int buflen, lookup_method net_i)
|
||||
{
|
||||
|
|
10
pwd/pwd.h
10
pwd/pwd.h
|
@ -101,8 +101,11 @@ extern struct passwd *getpwnam __P ((__const char *__name));
|
|||
|
||||
/* Reentrant versions of some of the functions above.
|
||||
|
||||
PLEASE NOTE: these functions are not yet standardized. The interface
|
||||
may change in later versions of this library. */
|
||||
PLEASE NOTE: the `getpwent_r' function is not (yet) standardized.
|
||||
The interface may change in later versions of this library. But
|
||||
the interface is designed following the principals used for the
|
||||
other reentrant functions so the chances are good this is what the
|
||||
POSIX people would choose. */
|
||||
|
||||
#if defined(__USE_SVID) || defined(__USE_MISC) || defined(__USE_XOPEN_EXTENDED)
|
||||
extern int __getpwent_r __P ((struct passwd *__resultbuf, char *__buffer,
|
||||
|
@ -127,7 +130,8 @@ extern int getpwnam_r __P ((__const char *__name, struct passwd *__resultbuf,
|
|||
|
||||
|
||||
#ifdef __USE_SVID
|
||||
/* Read an entry from STREAM. */
|
||||
/* Read an entry from STREAM. This function is not standardized and
|
||||
probably never will. */
|
||||
extern int __fgetpwent_r __P ((FILE * __stream, struct passwd *__resultbuf,
|
||||
char *__buffer, size_t __buflen,
|
||||
struct passwd **__result));
|
||||
|
|
|
@ -133,7 +133,9 @@ typedef union {
|
|||
char ac;
|
||||
} align;
|
||||
|
||||
#ifndef h_errno
|
||||
extern int h_errno;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
static void
|
||||
|
|
|
@ -58,9 +58,11 @@ static char rcsid[] = "$Id$";
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef h_errno
|
||||
extern int h_errno;
|
||||
#endif
|
||||
|
||||
#if defined(mips) && defined(SYSTYPE_BSD43)
|
||||
#if defined(mips) && defined(SYSTYPE_BSD43) && !defined(errno)
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -78,7 +78,9 @@ const char *h_errlist[] = {
|
|||
};
|
||||
int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
|
||||
|
||||
#ifndef h_errno
|
||||
extern int h_errno;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* herror --
|
||||
|
|
|
@ -149,15 +149,6 @@ extern int sigdelset __P ((sigset_t *__set, int __signo));
|
|||
/* Return 1 if SIGNO is in SET, 0 if not. */
|
||||
extern int sigismember __P ((__const sigset_t *__set, int signo));
|
||||
|
||||
#ifdef __OPTIMIZE__
|
||||
/* <sigset.h> defines the __ versions as macros that do the work. */
|
||||
#define sigemptyset(set) __sigemptyset(set)
|
||||
#define sigfillset(set) __sigfillset(set)
|
||||
#define sigaddset(set, signo) __sigaddset(set, signo)
|
||||
#define sigdelset(set, signo) __sigdelset(set, signo)
|
||||
#define sigismember(set, signo) __sigismember(set, signo)
|
||||
#endif
|
||||
|
||||
/* Get the system-specific definitions of `struct sigaction'
|
||||
and the `SA_*' and `SIG_*'. constants. */
|
||||
#include <sigaction.h>
|
||||
|
@ -170,6 +161,7 @@ extern int sigprocmask __P ((int __how,
|
|||
|
||||
/* Change the set of blocked signals to SET,
|
||||
wait until a signal arrives, and restore the set of blocked signals. */
|
||||
extern int __sigsuspend __P ((__const sigset_t *__set));
|
||||
extern int sigsuspend __P ((__const sigset_t *__set));
|
||||
|
||||
/* Get and/or set the action for signal SIG. */
|
||||
|
|
|
@ -42,17 +42,18 @@
|
|||
# define ISDIGIT(Ch) isdigit (Ch)
|
||||
|
||||
# ifdef USE_IN_LIBIO
|
||||
# define PUT(F, S, N) _IO_sputn (F, S, N)
|
||||
# define PUT(F, S, N) _IO_sputn ((F), (S), (N))
|
||||
# define PAD(Padchar) \
|
||||
if (width > 0) \
|
||||
done += _IO_padn (s, Padchar, width)
|
||||
done += _IO_padn (s, (Padchar), width)
|
||||
# else
|
||||
# define PUTC(C, F) putc (C, F)
|
||||
ssize_t __printf_pad __P ((FILE *, char pad, size_t n));
|
||||
# define PAD(Padchar) \
|
||||
if (width > 0) \
|
||||
{ if (__printf_pad (s, Padchar, width) == -1) \
|
||||
return -1; else done += width; }
|
||||
{ ssize_t __res = __printf_pad (s, (Padchar), width); \
|
||||
if (__res == -1) return -1; \
|
||||
done += __res; }
|
||||
# endif
|
||||
#else
|
||||
# define vfprintf vfwprintf
|
||||
|
@ -63,17 +64,18 @@ ssize_t __printf_pad __P ((FILE *, char pad, size_t n));
|
|||
# define ISDIGIT(Ch) iswdigit (Ch)
|
||||
|
||||
# ifdef USE_IN_LIBIO
|
||||
# define PUT(F, S, N) _IO_sputn (F, S, N)
|
||||
# define PUT(F, S, N) _IO_sputn ((F), (S), (N))
|
||||
# define PAD(Padchar) \
|
||||
if (width > 0) \
|
||||
done += _IO_wpadn (s, Padchar, width)
|
||||
done += _IO_wpadn (s, (Padchar), width)
|
||||
# else
|
||||
# define PUTC(C, F) wputc (C, F)
|
||||
ssize_t __wprintf_pad __P ((FILE *, wchar_t pad, size_t n));
|
||||
# define PAD(Padchar) \
|
||||
if (width > 0) \
|
||||
{ if (__wprintf_pad (s, Padchar, width) == -1) \
|
||||
return -1; else done += width; }
|
||||
{ ssize_t __res = __wprintf_pad (s, (Padchar), width); \
|
||||
if (__res == -1) return -1; \
|
||||
done += __res; }
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -1515,6 +1517,7 @@ buffered_vfprintf (register _IO_FILE *s, const CHAR_T *format,
|
|||
hp->_IO_file_flags = _IO_MAGIC|_IO_NO_READS;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
hp->_lock = &helper.lock;
|
||||
__libc_lock_init (*hp->_lock);
|
||||
#endif
|
||||
_IO_JUMPS (hp) = (struct _IO_jump_t *) &_IO_helper_jumps;
|
||||
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
|
||||
|
||||
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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, 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 <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -55,21 +55,20 @@ __drand48_iterate (xsubi, buffer)
|
|||
|
||||
if (sizeof (unsigned short int) == 2)
|
||||
{
|
||||
X = (xsubi[2] << 16 | xsubi[1]) << 16 | xsubi[0];
|
||||
a = (buffer->a[2] << 16 | buffer->a[1]) << 16 | buffer->a[0];
|
||||
X = (u_int64_t)xsubi[2] << 32 | (u_int64_t)xsubi[1] << 16 | xsubi[0];
|
||||
a = ((u_int64_t)buffer->a[2] << 32 | (u_int64_t)buffer->a[1] << 16
|
||||
| buffer->a[0]);
|
||||
|
||||
result = X * a + buffer->c;
|
||||
|
||||
xsubi[0] = result & 0xffff;
|
||||
result >>= 16;
|
||||
xsubi[1] = result & 0xffff;
|
||||
result >>= 16;
|
||||
xsubi[2] = result & 0xffff;
|
||||
xsubi[1] = (result >> 16) & 0xffff;
|
||||
xsubi[2] = (result >> 32) & 0xffff;
|
||||
}
|
||||
else
|
||||
{
|
||||
X = xsubi[2] << 16 | xsubi[1] >> 16;
|
||||
a = buffer->a[2] << 16 | buffer->a[1] >> 16;
|
||||
X = (u_int64_t)xsubi[2] << 16 | xsubi[1] >> 16;
|
||||
a = (u_int64_t)buffer->a[2] << 16 | buffer->a[1] >> 16;
|
||||
|
||||
result = X * a + buffer->c;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ static const struct ltest tests[] =
|
|||
static void expand __P ((char *dst, int c));
|
||||
|
||||
int
|
||||
main ()
|
||||
main (int argc, char ** argv)
|
||||
{
|
||||
register const struct ltest *lt;
|
||||
char *ep;
|
||||
|
|
|
@ -74,7 +74,7 @@ static const struct ltest tests[] =
|
|||
static void expand __P ((char *dst, int c));
|
||||
|
||||
int
|
||||
main ()
|
||||
main (int argc, char ** argv)
|
||||
{
|
||||
register const struct ltest *lt;
|
||||
char *ep;
|
||||
|
|
|
@ -52,7 +52,7 @@ headers = $(addprefix rpc/,auth.h auth_unix.h clnt.h netdb.h pmap_clnt.h \
|
|||
$(rpcsvc:%=rpcsvc/%) $(rpcsvc:%.x=rpcsvc/%.h)
|
||||
rpcsvc = bootparam.x nlm_prot.x rstat.x \
|
||||
yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
|
||||
rnusers.x spray.x nfs_prot.x rquota.x
|
||||
rusers.x spray.x nfs_prot.x rquota.x
|
||||
install-others = $(includedir)/rpcsvc/bootparam_prot.h \
|
||||
$(sysconfdir)/rpc
|
||||
generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c)
|
||||
|
|
|
@ -278,7 +278,7 @@ extern CLIENT *clnttcp_create __P ((struct sockaddr_in *__raddr,
|
|||
* struct sockaddr_in *raddr;
|
||||
* u_long program;
|
||||
* u_long version;
|
||||
* struct timeval wait;
|
||||
* struct timeval wait_resend;
|
||||
* int *sockp;
|
||||
*
|
||||
* Same as above, but you specify max packet sizes.
|
||||
|
@ -287,35 +287,37 @@ extern CLIENT *clnttcp_create __P ((struct sockaddr_in *__raddr,
|
|||
* struct sockaddr_in *raddr;
|
||||
* u_long program;
|
||||
* u_long version;
|
||||
* struct timeval wait;
|
||||
* struct timeval wait_resend;
|
||||
* int *sockp;
|
||||
* u_int sendsz;
|
||||
* u_int recvsz;
|
||||
*/
|
||||
extern CLIENT *clntudp_create __P ((struct sockaddr_in *__raddr,
|
||||
u_long __program, u_long __version,
|
||||
struct timeval __wait, int *__sockp));
|
||||
struct timeval __wait_resend,
|
||||
int *__sockp));
|
||||
extern CLIENT *clntudp_bufcreate __P ((struct sockaddr_in *__raddr,
|
||||
u_long __program, u_long __version,
|
||||
struct timeval __wait, int *__sockp,
|
||||
u_int __sendsz, u_int __recvsz));
|
||||
struct timeval __wait_resend,
|
||||
int *__sockp, u_int __sendsz,
|
||||
u_int __recvsz));
|
||||
|
||||
/*
|
||||
* Print why creation failed
|
||||
*/
|
||||
void clnt_pcreateerror __P ((char *__msg)); /* stderr */
|
||||
char *clnt_spcreateerror __P ((char *__msg)); /* string */
|
||||
extern void clnt_pcreateerror __P ((char *__msg)); /* stderr */
|
||||
extern char *clnt_spcreateerror __P ((char *__msg)); /* string */
|
||||
|
||||
/*
|
||||
* Like clnt_perror(), but is more verbose in its output
|
||||
*/
|
||||
void clnt_perrno __P ((enum clnt_stat __num)); /* stderr */
|
||||
extern void clnt_perrno __P ((enum clnt_stat __num)); /* stderr */
|
||||
|
||||
/*
|
||||
* Print an English error message, given the client error code
|
||||
*/
|
||||
void clnt_perror __P ((CLIENT *__clnt, char *__msg)); /* stderr */
|
||||
char *clnt_sperror __P ((CLIENT *__clnt, char *__msg)); /* string */
|
||||
extern void clnt_perror __P ((CLIENT *__clnt, char *__msg)); /* stderr */
|
||||
extern char *clnt_sperror __P ((CLIENT *__clnt, char *__msg)); /* string */
|
||||
|
||||
/*
|
||||
* If a creation fails, the following allows the user to figure out why.
|
||||
|
@ -332,7 +334,7 @@ extern struct rpc_createerr rpc_createerr;
|
|||
/*
|
||||
* Copy error message to buffer.
|
||||
*/
|
||||
char *clnt_sperrno __P ((enum clnt_stat __num)); /* string */
|
||||
extern char *clnt_sperrno __P ((enum clnt_stat __num)); /* string */
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
/* @(#)rnusers.x 2.1 88/08/01 4.0 RPCSRC */
|
||||
/* @(#)rnusers.x 1.2 87/09/20 Copyr 1987 Sun Micro */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* Find out about remote users
|
||||
*/
|
||||
|
||||
const MAXUSERS = 100;
|
||||
const MAXUTLEN = 256;
|
||||
|
||||
struct utmp {
|
||||
string ut_line<MAXUTLEN>;
|
||||
string ut_name<MAXUTLEN>;
|
||||
string ut_host<MAXUTLEN>;
|
||||
int ut_time;
|
||||
};
|
||||
|
||||
|
||||
struct utmpidle {
|
||||
utmp ui_utmp;
|
||||
unsigned int ui_idle;
|
||||
};
|
||||
|
||||
typedef utmp utmparr<MAXUSERS>;
|
||||
|
||||
typedef utmpidle utmpidlearr<MAXUSERS>;
|
||||
|
||||
program RUSERSPROG {
|
||||
/*
|
||||
* Includes idle information
|
||||
*/
|
||||
version RUSERSVERS_IDLE {
|
||||
int
|
||||
RUSERSPROC_NUM(void) = 1;
|
||||
|
||||
utmpidlearr
|
||||
RUSERSPROC_NAMES(void) = 2;
|
||||
|
||||
utmpidlearr
|
||||
RUSERSPROC_ALLNAMES(void) = 3;
|
||||
} = 1;
|
||||
|
||||
/*
|
||||
* Old version does not include idle information
|
||||
*/
|
||||
version RUSERSVERS_ORIG {
|
||||
int
|
||||
RUSERSPROC_NUM(void) = 1;
|
||||
|
||||
utmparr
|
||||
RUSERSPROC_NAMES(void) = 2;
|
||||
|
||||
utmparr
|
||||
RUSERSPROC_ALLNAMES(void) = 3;
|
||||
} = 2;
|
||||
} = 100002;
|
||||
|
|
@ -0,0 +1,223 @@
|
|||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
%/*
|
||||
% * Find out about remote users
|
||||
% */
|
||||
|
||||
const RUSERS_MAXUSERLEN = 32;
|
||||
const RUSERS_MAXLINELEN = 32;
|
||||
const RUSERS_MAXHOSTLEN = 257;
|
||||
|
||||
struct rusers_utmp {
|
||||
string ut_user<RUSERS_MAXUSERLEN>; /* aka ut_name */
|
||||
string ut_line<RUSERS_MAXLINELEN>; /* device */
|
||||
string ut_host<RUSERS_MAXHOSTLEN>; /* host user logged on from */
|
||||
int ut_type; /* type of entry */
|
||||
int ut_time; /* time entry was made */
|
||||
unsigned int ut_idle; /* minutes idle */
|
||||
};
|
||||
|
||||
typedef rusers_utmp utmp_array<>;
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%
|
||||
%/*
|
||||
% * Values for ut_type field above.
|
||||
% */
|
||||
#endif
|
||||
const RUSERS_EMPTY = 0;
|
||||
const RUSERS_RUN_LVL = 1;
|
||||
const RUSERS_BOOT_TIME = 2;
|
||||
const RUSERS_OLD_TIME = 3;
|
||||
const RUSERS_NEW_TIME = 4;
|
||||
const RUSERS_INIT_PROCESS = 5;
|
||||
const RUSERS_LOGIN_PROCESS = 6;
|
||||
const RUSERS_USER_PROCESS = 7;
|
||||
const RUSERS_DEAD_PROCESS = 8;
|
||||
const RUSERS_ACCOUNTING = 9;
|
||||
|
||||
program RUSERSPROG {
|
||||
|
||||
version RUSERSVERS_3 {
|
||||
int
|
||||
RUSERSPROC_NUM(void) = 1;
|
||||
|
||||
utmp_array
|
||||
RUSERSPROC_NAMES(void) = 2;
|
||||
|
||||
utmp_array
|
||||
RUSERSPROC_ALLNAMES(void) = 3;
|
||||
} = 3;
|
||||
|
||||
} = 100002;
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%
|
||||
%
|
||||
%#ifdef __cplusplus
|
||||
%extern "C" {
|
||||
%#endif
|
||||
%
|
||||
%/*
|
||||
% * The following structures are used by version 2 of the rusersd protocol.
|
||||
% * They were not developed with rpcgen, so they do not appear as RPCL.
|
||||
% */
|
||||
%
|
||||
%#define RUSERSVERS_IDLE 2
|
||||
%#define RUSERSVERS 3 /* current version */
|
||||
%#define MAXUSERS 100
|
||||
%
|
||||
%/*
|
||||
% * This is the structure used in version 2 of the rusersd RPC service.
|
||||
% * It corresponds to the utmp structure for BSD sytems.
|
||||
% */
|
||||
%struct ru_utmp {
|
||||
% char ut_line[8]; /* tty name */
|
||||
% char ut_name[8]; /* user id */
|
||||
% char ut_host[16]; /* host name, if remote */
|
||||
% long ut_time; /* time on */
|
||||
%};
|
||||
%
|
||||
%struct utmparr {
|
||||
% struct ru_utmp **uta_arr;
|
||||
% int uta_cnt;
|
||||
%};
|
||||
%typedef struct utmparr utmparr;
|
||||
%int xdr_utmparr();
|
||||
%
|
||||
%struct utmpidle {
|
||||
% struct ru_utmp ui_utmp;
|
||||
% unsigned ui_idle;
|
||||
%};
|
||||
%
|
||||
%struct utmpidlearr {
|
||||
% struct utmpidle **uia_arr;
|
||||
% int uia_cnt;
|
||||
%};
|
||||
%
|
||||
%int xdr_utmpidlearr();
|
||||
%
|
||||
%#ifdef __cplusplus
|
||||
%}
|
||||
%#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef RPC_XDR
|
||||
%bool_t
|
||||
%xdr_utmp(xdrs, objp)
|
||||
% XDR *xdrs;
|
||||
% struct ru_utmp *objp;
|
||||
%{
|
||||
% /* Since the fields are char foo [xxx], we should not free them. */
|
||||
% if (xdrs->x_op != XDR_FREE)
|
||||
% {
|
||||
% char *ptr;
|
||||
% ptr = objp->ut_line;
|
||||
% if (!xdr_string (xdrs, &ptr, sizeof (objp->ut_line))) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% ptr = objp->ut_name;
|
||||
% if (!xdr_string (xdrs, &ptr, sizeof (objp->ut_name))) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% ptr = objp->ut_host;
|
||||
% if (!xdr_string (xdrs, &ptr, sizeof (objp->ut_host))) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% }
|
||||
% if (!xdr_long(xdrs, &objp->ut_time)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpptr(xdrs, objpp)
|
||||
% XDR *xdrs;
|
||||
% struct ru_utmp **objpp;
|
||||
%{
|
||||
% if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct ru_utmp),
|
||||
% xdr_utmp)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmparr(xdrs, objp)
|
||||
% XDR *xdrs;
|
||||
% struct utmparr *objp;
|
||||
%{
|
||||
% if (!xdr_array(xdrs, (char **)&objp->uta_arr, (u_int *)&objp->uta_cnt,
|
||||
% MAXUSERS, sizeof(struct ru_utmp *), xdr_utmpptr)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpidle(xdrs, objp)
|
||||
% XDR *xdrs;
|
||||
% struct utmpidle *objp;
|
||||
%{
|
||||
% if (!xdr_utmp(xdrs, &objp->ui_utmp)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% if (!xdr_u_int(xdrs, &objp->ui_idle)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpidleptr(xdrs, objpp)
|
||||
% XDR *xdrs;
|
||||
% struct utmpidle **objpp;
|
||||
%{
|
||||
% if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct utmpidle),
|
||||
% xdr_utmpidle)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpidlearr(xdrs, objp)
|
||||
% XDR *xdrs;
|
||||
% struct utmpidlearr *objp;
|
||||
%{
|
||||
% if (!xdr_array(xdrs, (char **)&objp->uia_arr, (u_int *)&objp->uia_cnt,
|
||||
% MAXUSERS, sizeof(struct utmpidle *), xdr_utmpidleptr)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
#endif
|
|
@ -1,21 +1,21 @@
|
|||
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Alpha version.
|
||||
Copyright (C) 1994, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1994, 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 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. */
|
||||
|
||||
/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
|
||||
We cannot do it in C because it must be a tail-call, so frame-unwinding
|
||||
|
@ -26,8 +26,10 @@ Cambridge, MA 02139, USA. */
|
|||
ENTRY(_setjmp)
|
||||
ldgp $29,0($27)
|
||||
#ifdef PROF
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
#endif
|
||||
.prologue 1
|
||||
bis $31, $31, $17 /* Pass a second argument of zero. */
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Alpha version.
|
||||
Copyright (C) 1994, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1994, 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 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. */
|
||||
|
||||
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
|
||||
We cannot do it in C because it must be a tail-call, so frame-unwinding
|
||||
|
@ -26,8 +26,10 @@ Cambridge, MA 02139, USA. */
|
|||
ENTRY(setjmp)
|
||||
ldgp $29, 0($27)
|
||||
#ifdef PROF
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
#endif
|
||||
.prologue 1
|
||||
bis $31, 1, $17 /* Pass a second argument of one. */
|
||||
|
|
|
@ -1,28 +1,30 @@
|
|||
/* Copyright (C) 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
|
||||
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 <sysdep.h>
|
||||
|
||||
ENTRY(__htonl)
|
||||
#ifdef PROF
|
||||
ldgp gp, 0(pv)
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
.prologue 1
|
||||
#else
|
||||
.prologue 0
|
||||
|
|
|
@ -1,28 +1,30 @@
|
|||
/* Copyright (C) 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
|
||||
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 <sysdep.h>
|
||||
|
||||
ENTRY(__htons)
|
||||
#ifdef PROF
|
||||
ldgp gp, 0(pv)
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
.prologue 1
|
||||
#else
|
||||
.prologue 0
|
||||
|
|
|
@ -1,276 +0,0 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson (rth@tamu.edu)
|
||||
|
||||
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 is the child of the C-with-inline-assembly memcpy posted by
|
||||
Martin Ostermann (ost@comnets.rwth-aachen.de).
|
||||
|
||||
This is generally scheduled for the EV5, but whenever necessary and
|
||||
possible, the autoswap slotting feature of the EV5 is used so that the
|
||||
code lays out nicely for the EV4 as well. */
|
||||
|
||||
#include <alpha/regdef.h>
|
||||
|
||||
.set noreorder
|
||||
|
||||
.text
|
||||
|
||||
.ent copy_fwd_aligned
|
||||
copy_fwd_aligned:
|
||||
.frame sp, 0, ra, 0
|
||||
.prologue 0
|
||||
|
||||
/* Aligned forward copy main loop. On entry to this basic block:
|
||||
t0 == source word waiting to be stored
|
||||
t2 == loop counter
|
||||
a0 == destination pointer
|
||||
a1 == source pointer
|
||||
a2 mod 8 == byte count in final word */
|
||||
.align 4
|
||||
$fa_loop:
|
||||
and t2, 7, t1 # e0 :
|
||||
beq t1, 1f # .. e1 :
|
||||
|
||||
0: stq_u t0, 0(a0) # e0 :
|
||||
subq t1, 1, t1 # .. e1 :
|
||||
ldq_u t0, 8(a1) # e0 : copy up to seven words
|
||||
addq a0, 8, a0 # .. e1 :
|
||||
addq a1, 8, a1 # e0 :
|
||||
bne t1, 0b # .. e1 :
|
||||
|
||||
1: bic t2, 7, t2 # e0 :
|
||||
beq t2, $fa_tail # .. e1 :
|
||||
|
||||
2: stq_u t0, 0(a0) # e0 :
|
||||
addq a0, 64, a0 # .. e1 :
|
||||
ldq_u t3, 8(a1) # e0 : copy eight words as fast as we can
|
||||
ldq_u t4, 16(a1) # .. e1 :
|
||||
ldq_u t5, 24(a1) # e0 :
|
||||
ldq_u t6, 32(a1) # .. e1 :
|
||||
ldq_u t7, 40(a1) # e0 :
|
||||
ldq_u t8, 48(a1) # .. e1 :
|
||||
ldq_u t9, 56(a1) # e0 :
|
||||
ldq_u t0, 64(a1) # .. e1 :
|
||||
stq_u t3, -56(a0) # e0 :
|
||||
subq t2, 8, t2 # .. e1 :
|
||||
stq_u t4, -48(a0) # e0 :
|
||||
addq a1, 64, a1 # .. e1 :
|
||||
stq_u t5, -40(a0) # e0 :
|
||||
stq_u t6, -32(a0) # e0 :
|
||||
stq_u t7, -24(a0) # e0 :
|
||||
stq_u t8, -16(a0) # e0 :
|
||||
stq_u t9, -8(a0) # e0 :
|
||||
bne t2, 2b # .. e1 :
|
||||
|
||||
/* Take care of a partial word tail. */
|
||||
$fa_tail:
|
||||
and a2, 7, t3 # e0 :
|
||||
bne t3, 1f # .. e1 (zdb)
|
||||
|
||||
/* Aligned copy, aligned tail, final store. */
|
||||
stq_u t0, 0(a0)
|
||||
ret
|
||||
|
||||
1: ldq_u t1, 0(a0) # e1 :
|
||||
mskql t0, a2, t0 # .. e1 :
|
||||
mskqh t1, a2, t1 # e0 (stall)
|
||||
bis t0, t1, t0 # e1 :
|
||||
stq_u t0, 0(a0) # e0 :
|
||||
ret # .. e1 :
|
||||
|
||||
/* This is the actual entry point to this function. */
|
||||
.align 3
|
||||
$fwd_aligned:
|
||||
ldq_u t0, 0(a1) # e0 :
|
||||
and a0, 7, t3 # .. e1 :
|
||||
addq a2, t3, a2 # e0 :
|
||||
subq a2, 1, t2 # e1 :
|
||||
sra t2, 3, t2 # e0 :
|
||||
beq t3, $fa_loop # .. e1 :
|
||||
|
||||
ldq_u t1, 0(a0) # e0 :
|
||||
beq t2, $fa_small # .. e1 :
|
||||
mskqh t0, a0, t0 # e0 :
|
||||
mskql t1, a0, t3 # e0 :
|
||||
bis t0, t3, t0 # e0 :
|
||||
br $fa_loop # .. e1 :
|
||||
|
||||
/* The move affects exactly one destination word. */
|
||||
$fa_small:
|
||||
mskqh t0, a0, t0 # e0 :
|
||||
and a2, 7, t4 # .. e1 :
|
||||
mskql t1, a0, t3 # e0 :
|
||||
bne t4, 1f # .. e1 :
|
||||
|
||||
or t0, t3, t0 # e0 :
|
||||
unop # :
|
||||
stq_u t0, 0(a0) # e0 :
|
||||
ret # .. e1 :
|
||||
|
||||
1: mskql t0, a2, t0 # e0 :
|
||||
mskqh t1, a2, t1 # e0 :
|
||||
or t0, t3, t0 # e0 :
|
||||
or t0, t1, t0 # e1 :
|
||||
stq_u t0, 0(a0) # e0 :
|
||||
ret # .. e1 :
|
||||
|
||||
.end copy_fwd_aligned
|
||||
|
||||
.ent memcpy
|
||||
.globl memcpy
|
||||
.align 3
|
||||
memcpy:
|
||||
.frame sp, 0, ra, 0
|
||||
#ifdef PROF
|
||||
ldgp gp, 0(ra)
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.prologue 1
|
||||
#else
|
||||
.prologue 0
|
||||
#endif
|
||||
|
||||
mov a0, v0
|
||||
beq a2, $zero_length
|
||||
|
||||
/* Are source and destination co-aligned? */
|
||||
xor a0, a1, t0
|
||||
unop
|
||||
and t0, 7, t0
|
||||
beq t0, $fwd_aligned
|
||||
br $fwd_unaligned
|
||||
|
||||
.end memcpy
|
||||
|
||||
.ent copy_fwd_unaligned
|
||||
copy_fwd_unaligned:
|
||||
.frame sp, 0, ra, 0
|
||||
.prologue 0
|
||||
|
||||
/* Unaligned forward copy main loop. On entry to this basic block:
|
||||
t0 == source low word, unshifted
|
||||
t2 == loop counter
|
||||
t7 == last source byte + 1
|
||||
a0 == destination pointer
|
||||
a1 == source pointer
|
||||
a2 mod 8 == byte count in final word */
|
||||
.align 4
|
||||
$fu_loop:
|
||||
beq t2, $fu_tail # e1 :
|
||||
blbc t2, 0f # e1 :
|
||||
|
||||
ldq_u t1, 8(a1) # e1 : copy one unaligned word
|
||||
extql t0, a1, t3 # .. e0 :
|
||||
addq a1, 8, a1 # e0 :
|
||||
addq a0, 8, a0 # .. e1 :
|
||||
extqh t1, a1, t4 # e0 :
|
||||
subq t2, 1, t2 # .. e1 :
|
||||
mov t1, t0 # e0 :
|
||||
or t3, t4, t3 # .. e1 :
|
||||
stq_u t3, -8(a0) # e0 :
|
||||
beq t2, $fu_tail # .. e1 :
|
||||
|
||||
0: ldq_u t1, 8(a1) # e1 : copy two unaligned words
|
||||
extql t0, a1, t3 # .. e0 :
|
||||
ldq_u t0, 16(a1) # e0 :
|
||||
subq t2, 2, t2 # .. e1 :
|
||||
extqh t1, a1, t4 # e0 :
|
||||
addq a0, 16, a0 # .. e1 :
|
||||
extql t1, a1, t5 # e0 :
|
||||
or t3, t4, t3 # .. e1 :
|
||||
extqh t0, a1, t6 # e0 :
|
||||
addq a1, 16, a1 # .. e1 :
|
||||
stq_u t3, -16(a0) # e0 :
|
||||
or t5, t6, t5 # .. e1 :
|
||||
stq_u t5, -8(a0) # e0 :
|
||||
bne t2, 0b # .. e1 :
|
||||
|
||||
/* Take care of a partial words tail. */
|
||||
$fu_tail:
|
||||
ldq_u t4, -1(t7) # e1 :
|
||||
extql t0, a1, t3 # .. e0 :
|
||||
extqh t4, a1, t4 # e0 (stall)
|
||||
and a2, 7, t5 # .. e1 :
|
||||
or t3, t4, t3 # e0 :
|
||||
beq t5, 1f # .. e1 :
|
||||
|
||||
ldq_u t1, 0(a0) # e1 :
|
||||
mskql t3, a2, t3 # .. e0 :
|
||||
mskqh t1, a2, t1 # e0 (stall)
|
||||
or t1, t3, t3 # e1 :
|
||||
|
||||
1: stq_u t3, 0(a0) # e0 :
|
||||
ret # .. e1 :
|
||||
|
||||
/* The entry point to the unaligned forward copy. */
|
||||
.align 3
|
||||
$fwd_unaligned:
|
||||
ldq_u t0, 0(a1) # e0 : load initial bits of src
|
||||
addq a1, a2, t7 # .. e1 : record last byte + 1 of src
|
||||
and a0, 7, t3 # e0 : find dst misalignment
|
||||
addq a2, t3, a2 # e1 : find number of words affected
|
||||
subq a2, 1, t2 # e0 :
|
||||
cmple a2, 8, t4 # .. e1 : are we dealing with a small block?
|
||||
subq a1, t3, a1 # e0 :
|
||||
bne t4, $fu_small # .. e1 :
|
||||
srl t2, 3, t2 # e0 :
|
||||
beq t3, $fu_loop # .. e1 :
|
||||
|
||||
/* Take care of an unaligned dst head. */
|
||||
ldq_u t5, 0(a0) # e0 :
|
||||
ldq_u t1, 8(a1) # .. e1 :
|
||||
extql t0, a1, t3 # e0 :
|
||||
addq a0, 8, a0 # .. e1 :
|
||||
extqh t1, a1, t4 # e0 :
|
||||
addq a1, 8, a1 # .. e1 :
|
||||
mskql t5, a0, t5 # e0 :
|
||||
or t3, t4, t3 # .. e1 :
|
||||
mskqh t3, a0, t3 # e0 :
|
||||
subq t2, 1, t2 # .. e1 :
|
||||
or t3, t5, t3 # e0 :
|
||||
mov t1, t0 # .. e1 :
|
||||
stq_u t3, -8(a0) # e0 :
|
||||
br $fu_loop # .. e1 :
|
||||
|
||||
/* The move affects exactly one destination word. */
|
||||
.align 3
|
||||
$fu_small:
|
||||
ldq_u t2, 0(a0) # e1 :
|
||||
extql t0, a1, t3 # .. e0 :
|
||||
ldq_u t1, -1(t7) # e0 :
|
||||
and a2, 7, t8 # .. e1 :
|
||||
mskqh t2, a2, t6 # e0 :
|
||||
mskql t2, a0, t5 # e0 :
|
||||
extqh t1, a1, t4 # e0 :
|
||||
cmovne t8, t6, t8 # .. e1 :
|
||||
or t3, t4, t3 # e0 :
|
||||
or t5, t8, t5 # .. e1 :
|
||||
mskqh t3, a0, t3 # e0 :
|
||||
and a2, 7, t8 # .. e1 :
|
||||
mskql t3, a2, t6 # e0 :
|
||||
cmovne t8, t6, t8 # e1 :
|
||||
or t3, t5, t3 # e0 :
|
||||
unop # :
|
||||
stq_u t3, 0(a0) # e0 :
|
||||
|
||||
$zero_length:
|
||||
ret # .. e1 :
|
||||
|
||||
.end copy_fwd_unaligned
|
|
@ -1,29 +1,31 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger <davidm@azstarnet.com>
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger <davidm@azstarnet.com>, 1996.
|
||||
|
||||
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 <sysdep.h>
|
||||
|
||||
ENTRY(__copysign)
|
||||
#ifdef PROF
|
||||
ldgp gp, 0(pv)
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
.prologue 1
|
||||
#else
|
||||
.prologue 0
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1992, 1994, 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
|
||||
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 <sysdep.h>
|
||||
|
||||
|
@ -24,8 +24,10 @@ Cambridge, MA 02139, USA. */
|
|||
ENTRY (__sigsetjmp)
|
||||
ldgp $29, 0($27)
|
||||
#ifdef PROF
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
#endif
|
||||
.prologue 1
|
||||
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson (rth@tamu.edu)
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
|
||||
|
||||
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 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. */
|
||||
|
||||
/* Copy a null-terminated string from SRC to DST. Return a pointer
|
||||
to the null-terminator in the source. */
|
||||
|
@ -28,8 +27,10 @@ Cambridge, MA 02139, USA. */
|
|||
ENTRY(__stpcpy)
|
||||
ldgp gp, 0(pv)
|
||||
#ifdef PROF
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
#endif
|
||||
.prologue 1
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson (rth@tamu.edu)
|
||||
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
|
||||
|
||||
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
|
||||
|
@ -26,8 +26,10 @@
|
|||
ENTRY(strcat)
|
||||
ldgp gp, 0(pv)
|
||||
#ifdef PROF
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
#endif
|
||||
.prologue 1
|
||||
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson (rth@tamu.edu)
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
|
||||
|
||||
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 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. */
|
||||
|
||||
/* Copy a null-terminated string from SRC to DST. Return a pointer
|
||||
to the null-terminator in the source. */
|
||||
|
@ -28,8 +27,10 @@ Cambridge, MA 02139, USA. */
|
|||
ENTRY(strcpy)
|
||||
ldgp gp, 0(pv)
|
||||
#ifdef PROF
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
#endif
|
||||
.prologue 1
|
||||
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson (rth@tamu.edu)
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
|
||||
|
||||
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 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. */
|
||||
|
||||
/* Append no more than COUNT characters from the null-terminated string SRC
|
||||
to the null-terminated string DST. Always null-terminate the new DST. */
|
||||
|
@ -28,8 +27,10 @@ Cambridge, MA 02139, USA. */
|
|||
ENTRY(strncat)
|
||||
ldgp gp, 0(pv)
|
||||
#ifdef PROF
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
#endif
|
||||
.prologue 1
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger (davidm@cs.arizona.edu).
|
||||
Based on public-domain C source by Linus Torvalds.
|
||||
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger <davidm@cs.arizona.edu>, 1996.
|
||||
Based on public-domain C source by Linus Torvalds.
|
||||
|
||||
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
|
||||
|
@ -15,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 version is much faster than generic sqrt implementation, but
|
||||
it doesn't handle exceptional values or the inexact flag. Don't use
|
||||
|
@ -25,6 +24,7 @@
|
|||
|
||||
#ifndef _IEEE_FP
|
||||
|
||||
#define _ERRNO_H
|
||||
#include <errnos.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#define _PATH_DRUM "/dev/drum"
|
||||
#define _PATH_KMEM "/dev/kmem"
|
||||
#define _PATH_MAILDIR "/var/mail"
|
||||
#define _PATH_LASTLOG "/var/log/lastlog"
|
||||
#define _PATH_MAN "/usr/man"
|
||||
#define _PATH_MEM "/dev/mem"
|
||||
#define _PATH_MNTTAB "/etc/fstab"
|
||||
|
@ -60,7 +61,9 @@
|
|||
#define _PATH_SHELLS "/etc/shells"
|
||||
#define _PATH_TTY "/dev/tty"
|
||||
#define _PATH_UNIX "/vmunix"
|
||||
#define _PATH_UTMP "/var/run/utmp"
|
||||
#define _PATH_VI "/usr/bin/vi"
|
||||
#define _PATH_WTMP "/var/log/wtmp"
|
||||
|
||||
/* Provide trailing slash, since mostly used for building pathnames. */
|
||||
#define _PATH_DEV "/dev/"
|
||||
|
|
|
@ -37,6 +37,10 @@ typedef unsigned long int __sigset_t;
|
|||
#if !defined (_SIGSET_H_fns) && defined (_SIGNAL_H)
|
||||
#define _SIGSET_H_fns 1
|
||||
|
||||
#ifndef _EXTERN_INLINE
|
||||
#define _EXTERN_INLINE extern __inline
|
||||
#endif
|
||||
|
||||
/* Return a mask that includes SIG only. The cast to `sigset_t' avoids
|
||||
overflow if `sigset_t' is wider than `int'. */
|
||||
#define __sigmask(sig) (((__sigset_t) 1) << ((sig) - 1))
|
||||
|
@ -44,38 +48,24 @@ typedef unsigned long int __sigset_t;
|
|||
#define __sigemptyset(set) ((*(set) = (__sigset_t) 0), 0)
|
||||
#define __sigfillset(set) ((*(set) = ~(__sigset_t) 0), 0)
|
||||
|
||||
/* These functions must check for a bogus signal number. We detect it by a
|
||||
zero sigmask, since a number too low or too high will have shifted the 1
|
||||
off the high end of the mask. If we find an error, we punt to a random
|
||||
call we know fails with EINVAL (kludge city!), so as to avoid referring
|
||||
to `errno' in this file (sigh). */
|
||||
/* These functions needn't check for a bogus signal number -- error
|
||||
checking is done in the non __ versions. */
|
||||
|
||||
extern int __sigismember (__const __sigset_t *, int);
|
||||
extern int __sigaddset (__sigset_t *, int);
|
||||
extern int __sigdelset (__sigset_t *, int);
|
||||
|
||||
#ifndef _EXTERN_INLINE
|
||||
#define _EXTERN_INLINE extern __inline
|
||||
#endif
|
||||
#define __SIGSETFN(NAME, BODY, CONST) \
|
||||
_EXTERN_INLINE int \
|
||||
__##NAME (CONST __sigset_t *__set, int __sig) \
|
||||
NAME (CONST __sigset_t *__set, int __sig) \
|
||||
{ \
|
||||
if (__sig < 1 || __sig > (int) sizeof (__sigset_t) * 8) \
|
||||
{ \
|
||||
extern int raise (int); \
|
||||
return raise (-1); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
__sigset_t __mask = __sigmask (__sig); \
|
||||
return BODY; \
|
||||
} \
|
||||
__sigset_t __mask = __sigmask (__sig); \
|
||||
return BODY; \
|
||||
}
|
||||
|
||||
__SIGSETFN (sigismember, (*__set & __mask) ? 1 : 0, __const)
|
||||
__SIGSETFN (sigaddset, ((*__set |= __mask), 0), )
|
||||
__SIGSETFN (sigdelset, ((*__set &= ~__mask), 0), )
|
||||
__SIGSETFN (__sigismember, (*__set & __mask) ? 1 : 0, __const)
|
||||
__SIGSETFN (__sigaddset, ((*__set |= __mask), 0), )
|
||||
__SIGSETFN (__sigdelset, ((*__set &= ~__mask), 0), )
|
||||
|
||||
#undef __SIGSETFN
|
||||
|
||||
|
|
|
@ -1,31 +1,29 @@
|
|||
/* The `struct utmp' type, describing entries in the utmp file. Generic/BSDish
|
||||
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
|
||||
|
||||
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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, 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. */
|
||||
|
||||
#ifndef _UTMPBITS_H
|
||||
|
||||
#define _UTMPBITS_H 1
|
||||
#include <features.h>
|
||||
|
||||
#include <paths.h>
|
||||
#include <time.h>
|
||||
|
||||
#define _PATH_UTMP "/var/run/utmp"
|
||||
#define _PATH_WTMP "/var/log/wtmp"
|
||||
#define _PATH_LASTLOG "/var/log/lastlog"
|
||||
|
||||
#define UT_NAMESIZE 8
|
||||
#define UT_LINESIZE 8
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
/* Nonzero if STATUS indicates termination by a signal. */
|
||||
#ifdef __GNUC__
|
||||
#define __WIFSIGNALED(status) \
|
||||
(__extension__ ({ int __stat = (status); \
|
||||
!__WIFSTOPPED(__stat) && !__WIFEXITED(__stat); }))
|
||||
(__extension__ ({ int __status = (status); \
|
||||
!__WIFSTOPPED(__status) && !__WIFEXITED(__status); }))
|
||||
#else /* Not GCC. */
|
||||
#define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status))
|
||||
#endif /* GCC. */
|
||||
|
|
|
@ -1,32 +1,30 @@
|
|||
/* The `struct utmp' type, describing entries in the utmp file. GNU version.
|
||||
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
|
||||
|
||||
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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, 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. */
|
||||
|
||||
#ifndef _UTMPBITS_H
|
||||
|
||||
#define _UTMPBITS_H 1
|
||||
#include <features.h>
|
||||
|
||||
#include <paths.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define _PATH_UTMP "/var/run/utmp"
|
||||
#define _PATH_WTMP "/var/log/wtmp"
|
||||
#define _PATH_LASTLOG "/var/log/lastlog"
|
||||
|
||||
#define UT_UNKNOWN 0 /* for ut_type field */
|
||||
|
||||
|
@ -39,6 +37,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#define LOGIN_PROCESS 6
|
||||
#define USER_PROCESS 7
|
||||
#define DEAD_PROCESS 8
|
||||
#define ACCOUNTING 9
|
||||
|
||||
#define UT_LINESIZE 32
|
||||
#define UT_NAMESIZE 32
|
||||
|
|
|
@ -30,12 +30,12 @@ ssize_t
|
|||
readv (fd, vector, count)
|
||||
int fd;
|
||||
const struct iovec *vector;
|
||||
size_t count;
|
||||
int count;
|
||||
{
|
||||
char *buffer;
|
||||
size_t bytes;
|
||||
int bytes_read;
|
||||
register size_t i;
|
||||
int i;
|
||||
|
||||
/* Find the total number of bytes to be read. */
|
||||
bytes = 0;
|
||||
|
|
|
@ -1,53 +1,55 @@
|
|||
/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1994, 1995, 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 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 <ansidecl.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
/* Block signals in MASK, returning the old mask. */
|
||||
int
|
||||
DEFUN(__sigblock, (mask), int mask)
|
||||
__sigblock (mask)
|
||||
int mask;
|
||||
{
|
||||
register int sig;
|
||||
sigset_t set, oset;
|
||||
|
||||
if (__sigemptyset(&set) < 0)
|
||||
if (__sigemptyset (&set) < 0)
|
||||
return -1;
|
||||
|
||||
|
||||
if (sizeof (mask) == sizeof (set))
|
||||
*(int *) &set = mask;
|
||||
else if (sizeof (unsigned long int) == sizeof (set))
|
||||
*(unsigned long int *) &set = (unsigned int) mask;
|
||||
else
|
||||
for (sig = 1; sig < NSIG; ++sig)
|
||||
if ((mask & sigmask(sig)) &&
|
||||
__sigaddset(&set, sig) < 0)
|
||||
if ((mask & sigmask (sig)) && __sigaddset (&set, sig) < 0)
|
||||
return -1;
|
||||
|
||||
if (sigprocmask(SIG_BLOCK, &set, &oset) < 0)
|
||||
if (sigprocmask (SIG_BLOCK, &set, &oset) < 0)
|
||||
return -1;
|
||||
|
||||
mask = 0;
|
||||
if (sizeof (mask) == sizeof (oset))
|
||||
mask = *(int *) &oset;
|
||||
else if (sizeof (unsigned long int) == sizeof (oset))
|
||||
mask = *(unsigned long int*) &oset;
|
||||
else
|
||||
for (sig = 1; sig < NSIG; ++sig)
|
||||
if (__sigismember(&oset, sig))
|
||||
mask |= sigmask(sig);
|
||||
for (sig = 1, mask = 0; sig < NSIG; ++sig)
|
||||
if (__sigismember (&oset, sig))
|
||||
mask |= sigmask (sig);
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1992, 1994, 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
|
||||
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 <stddef.h>
|
||||
#include <signal.h>
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1991, 1992, 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
|
||||
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 <errno.h>
|
||||
#include <signal.h>
|
||||
|
@ -31,7 +31,8 @@ signal (sig, handler)
|
|||
{
|
||||
struct sigaction act, oact;
|
||||
|
||||
if (handler == SIG_ERR)
|
||||
/* Check signal extents to protect __sigismember. */
|
||||
if (handler == SIG_ERR || sig < 1 || sig >= NSIG)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
return SIG_ERR;
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 92, 94, 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 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 <ansidecl.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
/* Set the mask of blocked signals to MASK,
|
||||
wait for a signal to arrive, and then restore the mask. */
|
||||
int
|
||||
DEFUN(__sigpause, (mask), int mask)
|
||||
__sigpause (mask)
|
||||
int mask;
|
||||
{
|
||||
sigset_t set;
|
||||
int sig;
|
||||
|
@ -33,10 +33,11 @@ DEFUN(__sigpause, (mask), int mask)
|
|||
|
||||
if (sizeof (mask) == sizeof (set))
|
||||
*(int *) &set = mask;
|
||||
else if (sizeof (unsigned long int) == sizeof (set))
|
||||
*(unsigned long int *) &set = (unsigned int) mask;
|
||||
else
|
||||
for (sig = 1; sig < NSIG; ++sig)
|
||||
if ((mask & sigmask(sig)) &&
|
||||
__sigaddset(&set, sig) < 0)
|
||||
if ((mask & sigmask (sig)) && __sigaddset (&set, sig) < 0)
|
||||
return -1;
|
||||
|
||||
return sigsuspend (&set);
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1991, 1994, 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
|
||||
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 <errno.h>
|
||||
#include <signal.h>
|
||||
|
@ -31,20 +31,22 @@ __sigsetmask (int mask)
|
|||
|
||||
if (sizeof (mask) == sizeof (set))
|
||||
*(int *) &set = mask;
|
||||
else if (sizeof (unsigned long int) == sizeof (set))
|
||||
*(unsigned long int *) &set = (unsigned int) mask;
|
||||
else
|
||||
for (sig = 1; sig < NSIG; ++sig)
|
||||
if ((mask & sigmask(sig)) &&
|
||||
__sigaddset (&set, sig) < 0)
|
||||
if ((mask & sigmask (sig)) && __sigaddset (&set, sig) < 0)
|
||||
return -1;
|
||||
|
||||
if (__sigprocmask (SIG_SETMASK, &set, &oset) < 0)
|
||||
return -1;
|
||||
|
||||
mask = 0;
|
||||
if (sizeof (mask) == sizeof (oset))
|
||||
mask = *(int *) &oset;
|
||||
else if (sizeof (unsigned long int) == sizeof (oset))
|
||||
mask = *(unsigned long int *) &oset;
|
||||
else
|
||||
for (sig = 1; sig < NSIG; ++sig)
|
||||
for (sig = 1, mask = 0; sig < NSIG; ++sig)
|
||||
if (__sigismember (&oset, sig))
|
||||
mask |= sigmask (sig);
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1991, 92, 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
|
||||
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 <signal.h>
|
||||
#include <errno.h>
|
||||
|
@ -54,19 +54,19 @@ convert_mask (set, mask)
|
|||
register int sig;
|
||||
|
||||
if (sizeof (*set) == sizeof (mask))
|
||||
*(int *) set = mask;
|
||||
else if (sizeof (*set) == sizeof (unsigned long int))
|
||||
*(unsigned long int *) set = (unsigned int) mask;
|
||||
else
|
||||
{
|
||||
*(int *) set = mask;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (__sigemptyset (set) < 0)
|
||||
return -1;
|
||||
|
||||
for (sig = 1; sig < NSIG; ++sig)
|
||||
if (mask & sigmask (sig))
|
||||
if (__sigaddset (set, sig) < 0)
|
||||
if (__sigemptyset (set) < 0)
|
||||
return -1;
|
||||
|
||||
for (sig = 1; sig < NSIG; ++sig)
|
||||
if ((mask & sigmask (sig)) && __sigaddset (set, sig) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -135,6 +135,8 @@ __sigvec (sig, vec, ovec)
|
|||
|
||||
if (sizeof (int) == sizeof (sigset_t))
|
||||
mask = *(int *) &old.sa_mask;
|
||||
else if (sizeof (unsigned long int) == sizeof (sigset_t))
|
||||
mask = *(unsigned long int *) &old.sa_mask;
|
||||
else
|
||||
for (i = 1; i < NSIG; ++i)
|
||||
if (__sigismember(&old.sa_mask, i))
|
||||
|
|
|
@ -42,38 +42,38 @@ __sigwait (const sigset_t *set, int *sig)
|
|||
int this;
|
||||
|
||||
/* Prepare set. */
|
||||
sigfillset (&tmp_mask);
|
||||
__sigfillset (&tmp_mask);
|
||||
|
||||
/* Unblock all signals in the SET and register our nice handler. */
|
||||
action.sa_handler = ignore_signal;
|
||||
action.sa_flags = 0;
|
||||
sigfillset (&action.sa_mask); /* Block all signals for handler. */
|
||||
__sigfillset (&action.sa_mask); /* Block all signals for handler. */
|
||||
|
||||
/* Make sure we recognize error conditions by setting WAS_SIG to a
|
||||
value which does not describe a legal signal number. */
|
||||
was_sig = -1;
|
||||
|
||||
for (this = 0; this < NSIG; ++this)
|
||||
if (sigismember (set, this))
|
||||
if (__sigismember (set, this))
|
||||
{
|
||||
/* Unblock this signal. */
|
||||
sigdelset (&tmp_mask, this);
|
||||
__sigdelset (&tmp_mask, this);
|
||||
|
||||
/* Register temporary action handler. */
|
||||
if (sigaction (this, &action, &saved[this]) != 0)
|
||||
if (__sigaction (this, &action, &saved[this]) != 0)
|
||||
goto restore_handler;
|
||||
}
|
||||
|
||||
/* Now we can wait for signals. */
|
||||
sigsuspend (&tmp_mask);
|
||||
__sigsuspend (&tmp_mask);
|
||||
|
||||
restore_handler:
|
||||
save_errno = errno;
|
||||
|
||||
while (--this >= 0)
|
||||
if (sigismember (set, this))
|
||||
if (__sigismember (set, this))
|
||||
/* We ignore errors here since we must restore all handlers. */
|
||||
sigaction (this, &saved[this], NULL);
|
||||
__sigaction (this, &saved[this], NULL);
|
||||
|
||||
__set_errno (save_errno);
|
||||
|
||||
|
|
|
@ -30,12 +30,12 @@ ssize_t
|
|||
writev (fd, vector, count)
|
||||
int fd;
|
||||
const struct iovec *vector;
|
||||
size_t count;
|
||||
int count;
|
||||
{
|
||||
char *buffer;
|
||||
register char *bp;
|
||||
size_t bytes, to_copy;
|
||||
register size_t i;
|
||||
int i;
|
||||
|
||||
/* Find the total number of bytes to be written. */
|
||||
bytes = 0;
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* 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 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 <sysdep.h>
|
||||
|
||||
|
@ -28,6 +28,6 @@ Cambridge, MA 02139, USA. */
|
|||
|
||||
SYSCALL__ (execve, 3)
|
||||
ret
|
||||
PSEUDO_END(execve)
|
||||
PSEUDO_END(__execve)
|
||||
|
||||
weak_alias (__execve, execve)
|
||||
|
|
|
@ -5,7 +5,7 @@ endif
|
|||
ifeq ($(subdir), misc)
|
||||
sysdep_routines += sysctl clone
|
||||
|
||||
sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
|
||||
sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \
|
||||
sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \
|
||||
sys/user.h syscall-list.h sys/sysmacros.h sys/procfs.h \
|
||||
sys/debugreg.h sys/kd.h sys/soundcard.h sys/vt.h
|
||||
|
|
|
@ -1,24 +1,25 @@
|
|||
/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
Contributed by Brendan Kehoe (brendan@zen.org).
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Brendan Kehoe <brendan@zen.org>, 1993.
|
||||
|
||||
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. */
|
||||
|
||||
/* __brk is a special syscall under Linux since it never returns an
|
||||
error. Instead, the error condition is indicated by returning the old
|
||||
break value (instead of the new, requested one). */
|
||||
error. Instead, the error condition is indicated by returning the old
|
||||
break value (instead of the new, requested one). */
|
||||
|
||||
#include <sysdep.h>
|
||||
#define _ERRNO_H
|
||||
|
@ -39,8 +40,10 @@ __curbrk: .skip 8
|
|||
LEAF(__brk, 0)
|
||||
ldgp gp, 0(t12)
|
||||
#ifdef PROF
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
#endif
|
||||
.prologue 1
|
||||
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson (rth@tamu.edu)
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
|
||||
|
||||
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. */
|
||||
|
||||
/* clone() is even more special than fork() as it mucks with stacks
|
||||
and invokes a function in the right context after its all over. */
|
||||
|
@ -33,8 +34,10 @@ ENTRY(__clone)
|
|||
stq a4,0(sp)
|
||||
stq a5,8(sp)
|
||||
#ifdef PROF
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
#endif
|
||||
.prologue 1
|
||||
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger (davidm@azstarnet.com).
|
||||
/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
|
||||
|
||||
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 <sysdep.h>
|
||||
|
||||
|
@ -26,8 +27,10 @@ LEAF(__ieee_get_fp_control, 16)
|
|||
#ifdef PROF
|
||||
ldgp gp, 0(pv)
|
||||
lda sp, -16(sp)
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
.prologue 1
|
||||
#else
|
||||
lda sp, -16(sp)
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger (davidm@azstarnet.com).
|
||||
/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
|
||||
|
||||
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 <sysdep.h>
|
||||
|
||||
|
@ -24,8 +25,10 @@ LEAF(__ieee_set_fp_control, 16)
|
|||
#ifdef PROF
|
||||
ldgp gp, 0(sp)
|
||||
lda sp, -16(sp)
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
.prologue 1
|
||||
#else
|
||||
lda sp, -16(sp)
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger (davidm@cs.arizona.edu).
|
||||
/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
|
||||
|
||||
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. */
|
||||
|
||||
/* For compatibility only: a "long" is 64 bits on the Alpha, so
|
||||
llseek() isn't really needed. But there are some programs out
|
||||
|
@ -26,8 +27,10 @@ Cambridge, MA 02139, USA. */
|
|||
ENTRY(llseek)
|
||||
#ifdef PROF
|
||||
ldgp gp, 0(pv)
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
.prologue 1
|
||||
#else
|
||||
.prologue 0
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger (davidm@cs.arizona.edu).
|
||||
/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
|
||||
|
||||
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. */
|
||||
|
||||
/* sigsuspend is a special syscall since it needs to dereference the
|
||||
sigset. */
|
||||
|
@ -23,11 +24,13 @@ Cambridge, MA 02139, USA. */
|
|||
|
||||
.text
|
||||
|
||||
LEAF(sigsuspend, 0)
|
||||
LEAF(__sigsuspend, 0)
|
||||
#ifdef PROF
|
||||
ldgp gp, 0(pv)
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
.prologue 1
|
||||
#else
|
||||
.prologue 0
|
||||
|
@ -46,4 +49,6 @@ error:
|
|||
#endif
|
||||
jmp zero, __syscall_error
|
||||
|
||||
END(sigsuspend)
|
||||
END(__sigsuspend)
|
||||
|
||||
weak_alias(__sigsuspend, sigsuspend)
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger (davidm@azstarnet.com).
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger <davidm@azstarnet.com>, 1996.
|
||||
|
||||
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 <sysdep.h>
|
||||
|
||||
|
@ -44,8 +45,10 @@ Cambridge, MA 02139, USA. */
|
|||
LEAF(__syscall, 0)
|
||||
#ifdef PROF
|
||||
ldgp gp, 0(pv)
|
||||
.set noat
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.set at
|
||||
.prologue 1
|
||||
#else
|
||||
.prologue 0
|
||||
|
@ -69,4 +72,6 @@ error:
|
|||
#endif
|
||||
jmp zero, __syscall_error
|
||||
|
||||
END(__syscall)
|
||||
|
||||
weak_alias(__syscall, syscall)
|
||||
|
|
|
@ -43,3 +43,12 @@ Linux 2.0.10 or later. This check uses <linux/version.h>, so
|
|||
make sure that file was built correctly when installing the kernel header
|
||||
files." 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
# The Linux filesystem standard prescribes where to place "essential"
|
||||
# files. I.e., when the installation prefix is "/usr" we have to place
|
||||
# shared library objects and the configuation files on the root partition
|
||||
# in /lib and /etc.
|
||||
if test "$prefix" = "/usr"; then
|
||||
libc_cv_slibdir="/lib"
|
||||
libc_cv_sysconfdir="/etc"
|
||||
fi
|
||||
|
|
|
@ -37,6 +37,7 @@ __set_errno (int __err)
|
|||
{
|
||||
return *__errno_location () = errno = __err;
|
||||
}
|
||||
# define __set_errno __set_errno
|
||||
# else /* !_LIBC_REENTRANT */
|
||||
# define __set_errno(val) errno = (val)
|
||||
# endif /* _LIBC_REENTRANT */
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
/* getsysstats - Determine various system internal values, Linux version.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, 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 <alloca.h>
|
||||
#include <errno.h>
|
||||
#include <mntent.h>
|
||||
#include <paths.h>
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#define _PATH_DEVNULL "/dev/null"
|
||||
#define _PATH_DRUM "/dev/drum"
|
||||
#define _PATH_KMEM "/dev/kmem"
|
||||
#define _PATH_LASTLOG "/var/log/lastlog"
|
||||
#define _PATH_MAILDIR "/var/spool/mail"
|
||||
#define _PATH_MAN "/usr/man"
|
||||
#define _PATH_MEM "/dev/mem"
|
||||
|
@ -60,7 +61,9 @@
|
|||
#define _PATH_SHELLS "/etc/shells"
|
||||
#define _PATH_TTY "/dev/tty"
|
||||
#define _PATH_UNIX "/vmlinux"
|
||||
#define _PATH_UTMP "/var/run/utmp"
|
||||
#define _PATH_VI "/usr/bin/vi"
|
||||
#define _PATH_WTMP "/var/log/wtmp"
|
||||
|
||||
/* Provide trailing slash, since mostly used for building pathnames. */
|
||||
#define _PATH_DEV "/dev/"
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 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
|
||||
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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, 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 <signal.h>
|
||||
#include <stddef.h>
|
||||
|
@ -25,8 +25,9 @@ extern int __syscall_sigsuspend (int, unsigned long, unsigned long);
|
|||
/* Change the set of blocked signals to SET,
|
||||
wait until a signal arrives, and restore the set of blocked signals. */
|
||||
int
|
||||
sigsuspend (set)
|
||||
__sigsuspend (set)
|
||||
const sigset_t *set;
|
||||
{
|
||||
return __syscall_sigsuspend (0, 0, *set);
|
||||
}
|
||||
weak_alias (__sigsuspend, sigsuspend)
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Contributed by Miguel de Icaza (miguel@nuclecu.unam.mx)
|
||||
|
||||
FIXME: Currently only 6 parameters can be passsed
|
||||
to the clone function.
|
||||
|
||||
based on code written for the Intel by Richard
|
||||
Henderson (rth@tamu.edu)
|
||||
|
||||
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. */
|
||||
|
||||
/* clone() is even more special than fork() as it mucks with stacks
|
||||
and invokes a function in the right context after its all over. */
|
||||
|
||||
#include <asm/errno.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
/* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */
|
||||
|
||||
.text
|
||||
.align 4
|
||||
.globl __libc_clone
|
||||
.type __libc_clone,@function
|
||||
.weak clone
|
||||
__clone = __libc_clone
|
||||
clone = __libc_clone
|
||||
__libc_clone:
|
||||
save %sp,-96,%sp
|
||||
/* sanity check arguments */
|
||||
tst %i0
|
||||
be __clone_syscall_error
|
||||
tst %i1
|
||||
be __clone_syscall_error
|
||||
cmp %i3,0
|
||||
bl __clone_syscall_error
|
||||
nop
|
||||
|
||||
/* Flush the register windows */
|
||||
ta 3
|
||||
|
||||
/* Parameters for system call */
|
||||
mov %i1,%o1
|
||||
mov %i2,%o0
|
||||
|
||||
/* parameters that are on the stack for routine */
|
||||
#define P(x) 0x5c+(x*4)
|
||||
ld [%fp+P(0)],%o2
|
||||
ld [%fp+P(1)],%o3
|
||||
ld [%fp+P(2)],%o4
|
||||
ld [%fp+P(3)],%o5
|
||||
/* Do the system call */
|
||||
set __NR_clone,%g1
|
||||
ta 0x10
|
||||
bcs __clone_syscall_error
|
||||
tst %o1
|
||||
bne __thread_start
|
||||
nop
|
||||
mov %o0,%i0
|
||||
ret
|
||||
restore
|
||||
|
||||
__clone_syscall_error:
|
||||
call __errno_location
|
||||
set EINVAL,%i0
|
||||
st %i0,[%o0]
|
||||
mov -1,%i0
|
||||
ret
|
||||
restore
|
||||
|
||||
__thread_start:
|
||||
mov %i5,%o1
|
||||
call %i0
|
||||
mov %i4,%o0
|
||||
call _exit,0
|
||||
nop
|
Loading…
Reference in New Issue