aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-02-26 17:17:05 +0000
committerUlrich Drepper <drepper@redhat.com>1998-02-26 17:17:05 +0000
commitef030f7f43b87b4bb553fd33e526f5cda6777c7f (patch)
treeb325fa413a93222995979e9997369252baf67f58
parenta588b67da48d54f30ae101cf5d2e9fb0778f95a4 (diff)
downloadglibc-ef030f7f43b87b4bb553fd33e526f5cda6777c7f.tar
glibc-ef030f7f43b87b4bb553fd33e526f5cda6777c7f.tar.gz
glibc-ef030f7f43b87b4bb553fd33e526f5cda6777c7f.tar.bz2
glibc-ef030f7f43b87b4bb553fd33e526f5cda6777c7f.zip
1998-02-24 08:10 H.J. Lu <hjl@gnu.org> * sysdeps/unix/sysv/linux/alpha/bits/signum.h (_NSIG): Changed to 64. * sysdeps/unix/alpha/sysdep.S (_errno): Add in addition to __errno. * sysdeps/alpha/s_fabs.S: Added ".set noat"/".set at". * sysdeps/unix/sysv/linux/alpha/wait4.S: Ditto. * sysdeps/unix/make-syscalls.sh: Make versioned symbols only for shared library. * libc.map (adjtime, __adjtimex, adjtimex): Added for GLIBC_2.1. * sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines): Added adjtimex and old_adjtimex. * sysdeps/unix/sysv/linux/alpha/syscalls.list (old_adjtimex): New. (osf_settimeofday, osf_getitimer, osf_setitimer, osf_utimes, osf_getrusage, osf_wait4): Added __xxxx symbol for GLIBC_2.0. * sysdeps/unix/sysv/linux/alpha/getitimer.S: Make versioned symbols only for shared library. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. * sysdeps/unix/sysv/linux/alpha/getitimer.S: Fix ENOSYS branch. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. * sysdeps/unix/sysv/linux/alpha/wait4.S: Check the correct rusage pointer. * sysdeps/unix/sysv/linux/adjtime.c (TIMEVAL, TIMEX, ADJTIMEX): New macros. (__adjtime): Use TIMEVAL, TIMEX and ADJTIMEX instead of timeval, timex and __adjtimex, respectively. * sysdeps/unix/sysv/linux/alpha/adjtime.c: New. * sysdeps/unix/sysv/linux/alpha/adjtimex.S: New.
-rw-r--r--ChangeLog54
-rw-r--r--libc.map1
-rw-r--r--misc/fstab.h19
-rw-r--r--sysdeps/alpha/s_fabs.S4
-rw-r--r--sysdeps/unix/alpha/sysdep.S4
-rw-r--r--sysdeps/unix/make-syscalls.sh35
-rw-r--r--sysdeps/unix/sysv/linux/adjtime.c38
-rw-r--r--sysdeps/unix/sysv/linux/alpha/Makefile3
-rw-r--r--sysdeps/unix/sysv/linux/alpha/adjtime.c202
-rw-r--r--sysdeps/unix/sysv/linux/alpha/adjtimex.S59
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/signum.h2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/getitimer.S14
-rw-r--r--sysdeps/unix/sysv/linux/alpha/getrusage.S14
-rw-r--r--sysdeps/unix/sysv/linux/alpha/gettimeofday.S16
-rw-r--r--sysdeps/unix/sysv/linux/alpha/select.S16
-rw-r--r--sysdeps/unix/sysv/linux/alpha/setitimer.S16
-rw-r--r--sysdeps/unix/sysv/linux/alpha/settimeofday.S16
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscalls.list13
-rw-r--r--sysdeps/unix/sysv/linux/alpha/utimes.S16
-rw-r--r--sysdeps/unix/sysv/linux/alpha/wait4.S20
20 files changed, 506 insertions, 56 deletions
diff --git a/ChangeLog b/ChangeLog
index b327254c53..b362358ee1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,57 @@
+1998-02-24 08:10 H.J. Lu <hjl@gnu.org>
+
+ * sysdeps/unix/sysv/linux/alpha/bits/signum.h (_NSIG): Changed
+ to 64.
+
+ * sysdeps/unix/alpha/sysdep.S (_errno): Add in addition to __errno.
+
+ * sysdeps/alpha/s_fabs.S: Added ".set noat"/".set at".
+ * sysdeps/unix/sysv/linux/alpha/wait4.S: Ditto.
+
+ * sysdeps/unix/make-syscalls.sh: Make versioned symbols only
+ for shared library.
+
+ * libc.map (adjtime, __adjtimex, adjtimex): Added for GLIBC_2.1.
+
+ * sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines):
+ Added adjtimex and old_adjtimex.
+
+ * sysdeps/unix/sysv/linux/alpha/syscalls.list (old_adjtimex):
+ New.
+ (osf_settimeofday, osf_getitimer, osf_setitimer, osf_utimes,
+ osf_getrusage, osf_wait4): Added __xxxx symbol for GLIBC_2.0.
+
+ * sysdeps/unix/sysv/linux/alpha/getitimer.S: Make versioned
+ symbols only for shared library.
+ * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
+
+ * sysdeps/unix/sysv/linux/alpha/getitimer.S: Fix ENOSYS branch.
+ * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
+
+ * sysdeps/unix/sysv/linux/alpha/wait4.S: Check the correct
+ rusage pointer.
+
+ * sysdeps/unix/sysv/linux/adjtime.c (TIMEVAL, TIMEX, ADJTIMEX):
+ New macros.
+ (__adjtime): Use TIMEVAL, TIMEX and ADJTIMEX instead of timeval,
+ timex and __adjtimex, respectively.
+
+ * sysdeps/unix/sysv/linux/alpha/adjtime.c: New.
+
+ * sysdeps/unix/sysv/linux/alpha/adjtimex.S: New.
+
1998-02-25 08:28 H.J. Lu <hjl@gnu.org>
* math/test-fenv.c (print_rounding): Fix a typo in
diff --git a/libc.map b/libc.map
index d2e63ec80e..ce367acd56 100644
--- a/libc.map
+++ b/libc.map
@@ -445,6 +445,7 @@ GLIBC_2.1 {
# Linux/Alpha 64-bit timeval functions.
__select; select;
+ adjtime; adjtimex;
__gettimeofday;
# New errlist.
diff --git a/misc/fstab.h b/misc/fstab.h
index d2e27d9711..274f23aae9 100644
--- a/misc/fstab.h
+++ b/misc/fstab.h
@@ -58,15 +58,16 @@
#define FSTAB_SW "sw" /* swap device */
#define FSTAB_XX "xx" /* ignore totally */
-struct fstab {
- char *fs_spec; /* block special device name */
- char *fs_file; /* file system path prefix */
- char *fs_vfstype; /* File system type, ufs, nfs */
- char *fs_mntops; /* Mount options ala -o */
- char *fs_type; /* FSTAB_* from fs_mntops */
- int fs_freq; /* dump frequency, in days */
- int fs_passno; /* pass number on parallel dump */
-};
+struct fstab
+ {
+ char *fs_spec; /* block special device name */
+ char *fs_file; /* file system path prefix */
+ char *fs_vfstype; /* File system type, ufs, nfs */
+ char *fs_mntops; /* Mount options ala -o */
+ const char *fs_type; /* FSTAB_* from fs_mntops */
+ int fs_freq; /* dump frequency, in days */
+ int fs_passno; /* pass number on parallel dump */
+ };
__BEGIN_DECLS
diff --git a/sysdeps/alpha/s_fabs.S b/sysdeps/alpha/s_fabs.S
index e5992ad90c..00698d6bd5 100644
--- a/sysdeps/alpha/s_fabs.S
+++ b/sysdeps/alpha/s_fabs.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@azstarnet.com>
@@ -21,9 +21,11 @@
ENTRY(__fabs)
#ifdef PROF
+ .set noat
ldgp gp, 0(pv)
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
.prologue 0
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index fc5cc0436b..d79c48a9bf 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1998 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -29,6 +29,8 @@ errno: .space 4
#endif
.globl __errno
__errno = errno
+ .globl _errno
+_errno = errno
.text
.align 2
diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh
index e9d0f508b4..c7ddb88999 100644
--- a/sysdeps/unix/make-syscalls.sh
+++ b/sysdeps/unix/make-syscalls.sh
@@ -47,6 +47,13 @@ echo "$calls" | while read file caller syscall nargs strong weak; do
@@@ SYS_ify ($syscall)
EOF
+ case $weak in
+ *@*)
+ # The versioned symbols are only in the shared library.
+ echo "ifneq (,\$(filter .os,\$(object-suffixes)))"
+ ;;
+ esac
+
# Make sure only the first syscall rule is used, if multiple dirs
# define the same syscall.
echo "ifeq (,\$(filter $file,\$(unix-syscalls)))"
@@ -56,9 +63,24 @@ EOF
test x$caller = x- || echo "unix-extra-syscalls += $file"
# Emit a compilation rule for this syscall.
- echo "\
-\$(foreach o,\$(object-suffixes),\$(objpfx)$file\$o): \\
-\$(common-objpfx)s-proto.d
+ case $weak in
+ *@*)
+ # The versioned symbols are only in the shared library.
+ echo "\
+\$(objpfx)${file}.o: \$(common-objpfx)empty.o
+ rm -f \$@
+ ln \$< \$@
+\$(objpfx)${file}.op: \$(common-objpfx)empty.op
+ rm -f \$@
+ ln \$< \$@
+\$(objpfx)${file}.os: \\"
+ ;;
+ *)
+ echo "\
+\$(foreach o,\$(object-suffixes),\$(objpfx)$file\$o): \\"
+ ;;
+ esac
+ echo "\$(common-objpfx)s-proto.d
(echo '#include <sysdep.h>'; \\
echo 'PSEUDO ($strong, $syscall, $nargs)'; \\
echo ' ret'; \\
@@ -109,4 +131,11 @@ EOF
echo endif
+ case $weak in
+ *@*)
+ # The versioned symbols are only in the shared library.
+ echo endif
+ ;;
+ esac
+
done
diff --git a/sysdeps/unix/sysv/linux/adjtime.c b/sysdeps/unix/sysv/linux/adjtime.c
index 748788c972..7e8d90b71e 100644
--- a/sysdeps/unix/sysv/linux/adjtime.c
+++ b/sysdeps/unix/sysv/linux/adjtime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 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
@@ -28,16 +28,36 @@
#define modes mode
#endif
-int
-__adjtime (itv, otv)
- const struct timeval *itv;
- struct timeval *otv;
+#ifndef TIMEVAL
+#define TIMEVAL timeval
+#endif
+
+#ifndef TIMEX
+#define TIMEX timex
+#endif
+
+#ifndef ADJTIME
+#define ADJTIME __adjtime
+#endif
+
+#ifndef ADJTIMEX
+#define ADJTIMEX(x) __adjtimex (x)
+#endif
+
+#ifndef LINKAGE
+#define LINKAGE
+#endif
+
+LINKAGE int
+ADJTIME (itv, otv)
+ const struct TIMEVAL *itv;
+ struct TIMEVAL *otv;
{
- struct timex tntx;
+ struct TIMEX tntx;
if (itv)
{
- struct timeval tmp;
+ struct TIMEVAL tmp;
/* We will do some check here. */
tmp.tv_sec = itv->tv_sec + itv->tv_usec / 1000000L;
@@ -53,7 +73,7 @@ __adjtime (itv, otv)
else
tntx.modes = 0;
- if (__adjtimex (&tntx) < 0) return -1;
+ if (ADJTIMEX (&tntx) < 0) return -1;
if (otv)
{
@@ -71,4 +91,6 @@ __adjtime (itv, otv)
return 0;
}
+#ifndef ADJTIME
weak_alias (__adjtime, adjtime)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 48f5562d29..7821e46deb 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -7,6 +7,5 @@ sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
# Support old timeval32 entry points
sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
osf_getitimer osf_setitimer osf_utimes \
- osf_getrusage osf_wait4
-
+ osf_getrusage osf_wait4 old_adjtimex
endif
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
new file mode 100644
index 0000000000..f7df5fcc80
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -0,0 +1,202 @@
+/* Copyright (C) 1998 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. */
+
+struct timeval32
+{
+ int tv_sec, tv_usec;
+};
+
+struct timex32 {
+ unsigned int modes; /* mode selector */
+ long offset; /* time offset (usec) */
+ long freq; /* frequency offset (scaled ppm) */
+ long maxerror; /* maximum error (usec) */
+ long esterror; /* estimated error (usec) */
+ int status; /* clock command/status */
+ long constant; /* pll time constant */
+ long precision; /* clock precision (usec) (read only) */
+ long tolerance; /* clock frequency tolerance (ppm)
+ * (read only)
+ */
+ struct timeval32 time; /* (read only) */
+ long tick; /* (modified) usecs between clock ticks */
+
+ long ppsfreq; /* pps frequency (scaled ppm) (ro) */
+ long jitter; /* pps jitter (us) (ro) */
+ int shift; /* interval duration (s) (shift) (ro) */
+ long stabil; /* pps stability (scaled ppm) (ro) */
+ long jitcnt; /* jitter limit exceeded (ro) */
+ long calcnt; /* calibration intervals (ro) */
+ long errcnt; /* calibration errors (ro) */
+ long stbcnt; /* stability limit exceeded (ro) */
+
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+};
+
+#define TIMEVAL timeval32
+#define TIMEX timex32
+#define ADJTIME __adjtime_tv32
+#define ADJTIMEX(x) __adjtimex_tv32 (x)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define LINKAGE
+#else
+#define LINKAGE static
+#endif
+
+LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
+extern int ADJTIMEX (struct TIMEX *);
+
+#include <sysdeps/unix/sysv/linux/adjtime.c>
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+symbol_version (__adjtime_tv32, adjtime, GLIBC_2.0);
+#endif
+
+#undef TIMEVAL
+#define TIMEVAL timeval
+#undef TIMEX
+#define TIMEX timex
+#undef ADJTIME
+#define ADJTIME __adjtime_tv64
+#undef ADJTIMEX
+#define ADJTIMEX(x) __syscall_adjtimex_tv64 (x)
+#undef LINKAGE
+#define LINKAGE static
+
+LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
+extern int ADJTIMEX (struct TIMEX *);
+
+#include <sysdeps/unix/sysv/linux/adjtime.c>
+static int missing_adjtimex = 0;
+
+int
+__adjtime (itv, otv)
+ const struct timeval *itv;
+ struct timeval *otv;
+{
+ int ret;
+
+ if (!missing_adjtimex)
+ {
+ ret = __adjtime_tv64 (itv, otv);
+ if (ret && errno == ENOSYS)
+ missing_adjtimex = 1;
+ }
+
+ if (missing_adjtimex)
+ {
+ struct timeval32 itv32, otv32;
+
+ itv32.tv_sec = itv->tv_sec;
+ itv32.tv_usec = itv->tv_usec;
+ ret = __adjtime_tv32 (&itv32, &otv32);
+ if (ret == 0)
+ {
+ otv->tv_sec = otv32.tv_sec;
+ otv->tv_usec = otv32.tv_usec;
+ }
+ }
+
+ return ret;
+}
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+default_symbol_version (__adjtime, adjtime, GLIBC_2.1);
+#else
+weak_alias (__adjtime, adjtime);
+#endif
+
+extern int __syscall_adjtimex_tv64 (struct timex *tx);
+
+int
+__adjtimex_tv64 (tx)
+ struct timex *tx;
+{
+ int ret;
+
+ if (!missing_adjtimex)
+ {
+ ret = __syscall_adjtimex_tv64 (tx);
+ if (ret && errno == ENOSYS)
+ missing_adjtimex = 1;
+ }
+
+ if (missing_adjtimex)
+ {
+ struct timex32 tx32;
+
+ tx32.modes = tx->modes;
+ tx32.offset = tx->offset;
+ tx32.freq = tx->freq;
+ tx32.maxerror = tx->maxerror;
+ tx32.esterror = tx->esterror;
+ tx32.status = tx->status;
+ tx32.constant = tx->constant;
+ tx32.precision = tx->precision;
+ tx32.tolerance = tx->tolerance;
+ tx32.time.tv_sec = tx->time.tv_sec;
+ tx32.time.tv_sec = tx->time.tv_usec;
+ tx32.tick = tx->tick;
+ tx32.ppsfreq = tx->ppsfreq;
+ tx32.jitter = tx->jitter;
+ tx32.shift = tx->shift;
+ tx32.stabil = tx->stabil;
+ tx32.jitcnt = tx->jitcnt;
+ tx32.calcnt = tx->calcnt;
+ tx32.errcnt = tx->errcnt;
+ tx32.stbcnt = tx->stbcnt;
+
+ ret = __adjtimex_tv32 (&tx32);
+ if (ret == 0)
+ {
+ tx->modes = tx32.modes;
+ tx->offset = tx32.offset;
+ tx->freq = tx32.freq;
+ tx->maxerror = tx32.maxerror;
+ tx->esterror = tx32.esterror;
+ tx->status = tx32.status;
+ tx->constant = tx32.constant;
+ tx->precision = tx32.precision;
+ tx->tolerance = tx32.tolerance;
+ tx->time.tv_sec = tx32.time.tv_sec;
+ tx->time.tv_usec = tx32.time.tv_sec;
+ tx->tick = tx32.tick;
+ tx->ppsfreq = tx32.ppsfreq;
+ tx->jitter = tx32.jitter;
+ tx->shift = tx32.shift;
+ tx->stabil = tx32.stabil;
+ tx->jitcnt = tx32.jitcnt;
+ tx->calcnt = tx32.calcnt;
+ tx->errcnt = tx32.errcnt;
+ tx->stbcnt = tx32.stbcnt;
+ }
+ }
+
+ return ret;
+}
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+strong_alias (__adjtimex_tv64, __adjtimex_tv64p);
+default_symbol_version (__adjtimex_tv64, __adjtimex, GLIBC_2.1);
+default_symbol_version (__adjtimex_tv64p, adjtimex, GLIBC_2.1);
+#else
+weak_alias (__adjtimex_tv64, __adjtimex);
+weak_alias (__adjtimex_tv64, adjtimex);
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtimex.S b/sysdeps/unix/sysv/linux/alpha/adjtimex.S
new file mode 100644
index 0000000000..367b7358e6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/adjtimex.S
@@ -0,0 +1,59 @@
+/* Copyright (C) 1998 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. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* The problem here is that initially we made struct timeval compatible with
+ OSF/1, using int32. But we defined time_t with uint64, and later found
+ that POSIX requires tv_sec to be time_t.
+
+ So now we have to do compatibility stuff. */
+
+.text
+
+LEAF(__syscall_adjtimex_tv64, 0)
+ ldgp gp, 0(pv)
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+#ifdef __NR_adjtimex
+ ldi v0, SYS_ify(adjtimex)
+ callsys
+ bne a3, $err64
+
+ /* Everything ok. */
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$err64:
+#else
+ /* ENOSYS. */
+ ldi v0, ENOSYS
+#endif
+ lda pv, __syscall_error
+ jmp zero, (pv), __syscall_error
+
+END(__syscall_adjtimex_tv64)
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
index 6b1399eb12..05ffbae550 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
@@ -68,6 +68,6 @@
#define SIGPWR SIGINFO
#define SIGIOT SIGABRT
-#define _NSIG 32 /* Biggest signal number + 1. */
+#define _NSIG 64 /* Biggest signal number + 1. */
#endif /* <signal.h> included. */
diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S
index 03ae6ea491..9ba849fcac 100644
--- a/sysdeps/unix/sysv/linux/alpha/getitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S
@@ -32,7 +32,13 @@
.text
-LEAF(__getitimer_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETITIMER __getitimer_tv64
+#else
+#define GETITIMER getitimer
+#endif
+
+LEAF(GETITIMER, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__getitimer_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -94,6 +100,8 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__getitimer_tv64)
+END(GETITIMER)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
index d875c83771..fbbe6f7931 100644
--- a/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -32,7 +32,13 @@
.text
-LEAF(__getrusage_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETRUSAGE __getrusage_tv64
+#else
+#define GETRUSAGE getrusage
+#endif
+
+LEAF(GETRUSAGE, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__getrusage_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -122,6 +128,8 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__getrusage_tv64)
+END(GETRUSAGE)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
index bceeefc0a7..6f7082f1b0 100644
--- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -32,7 +32,13 @@
.text
-LEAF(__gettimeofday_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETTIMEOFDAY __gettimeofday_tv64
+#else
+#define GETTIMEOFDAY __gettimeofday
+#endif
+
+LEAF(GETTIMEOFDAY, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__gettimeofday_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -91,8 +97,9 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__gettimeofday_tv64)
+END(GETTIMEOFDAY)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -100,3 +107,6 @@ default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__gettimeofday_tv64, __gettimeofday_tv64p)
default_symbol_version (__gettimeofday_tv64p, gettimeofday, GLIBC_2.1)
+#else
+weak_alias (__gettimeofday, gettimeofday)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index 73076b9158..c854f7fd30 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -32,7 +32,13 @@
.text
-LEAF(__select_tv64, 64)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SELECT __select_tv64
+#else
+#define SELECT __select
+#endif
+
+LEAF(SELECT, 64)
ldgp gp, 0(pv)
subq sp, 64, sp
#ifdef PROF
@@ -64,7 +70,7 @@ LEAF(__select_tv64, 64)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -105,8 +111,9 @@ $error:
addq sp, 64, sp
jmp zero, (pv), __syscall_error
-END(__select_tv64)
+END(SELECT)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__select_tv64, __select, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -114,3 +121,6 @@ default_symbol_version (__select_tv64, __select, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__select_tv64, __select_tv64p)
default_symbol_version (__select_tv64p, select, GLIBC_2.1)
+#else
+weak_alias (__select, select)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S
index a2085cc29e..e57acc2020 100644
--- a/sysdeps/unix/sysv/linux/alpha/setitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S
@@ -32,7 +32,13 @@
.text
-LEAF(__setitimer_tv64, 48)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SETITIMER __setitimer_tv64
+#else
+#define SETITIMER __setitimer
+#endif
+
+LEAF(SETITIMER, 48)
ldgp gp, 0(pv)
subq sp, 48, sp
#ifdef PROF
@@ -63,7 +69,7 @@ LEAF(__setitimer_tv64, 48)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -110,8 +116,9 @@ $error:
addq sp, 48, sp
jmp zero, (pv), __syscall_error
-END(__setitimer_tv64)
+END(SETITIMER)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -119,3 +126,6 @@ default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__setitimer_tv64, __setitimer_tv64p)
default_symbol_version (__setitimer_tv64p, setitimer, GLIBC_2.1)
+#else
+weak_alias (__setitimer, setitimer)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
index b730df7136..ae129ecc1c 100644
--- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
@@ -32,7 +32,13 @@
.text
-LEAF(__settimeofday_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SETTIMEOFDAY __settimeofday_tv64
+#else
+#define SETTIMEOFDAY __settimeofday
+#endif
+
+LEAF(SETTIMEOFDAY, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -61,7 +67,7 @@ LEAF(__settimeofday_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -91,8 +97,9 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__settimeofday_tv64)
+END(SETTIMEOFDAY)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -100,3 +107,6 @@ default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__settimeofday_tv64, __settimeofday_tv64p)
default_symbol_version (__settimeofday_tv64p, settimeofday, GLIBC_2.1)
+#else
+weak_alias (__settimeofday, settimeofday)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 59c0cb8a09..26d4f15258 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -64,9 +64,10 @@ pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
# support old timeval32 entry points
osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0
osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0
-osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 settimeofday@GLIBC_2.0
-osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0
-osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0
-osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0
-osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0
-osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0
+osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 __settimeofday@GLIBC_2.0 settimeofday@GLIBC_2.0
+osf_getitimer - osf_getitimer 2 __getitimer_tv32 __getitimer@GLIBC_2.0 getitimer@GLIBC_2.0
+osf_setitimer - osf_setitimer 3 __setitimer_tv32 __setitimer@GLIBC_2.0 setitimer@GLIBC_2.0
+osf_utimes - osf_utimes 2 __utimes_tv32 __utimes@GLIBC_2.0 utimes@GLIBC_2.0
+osf_getrusage - osf_getrusage 2 __getrusage_tv32 __getrusage@GLIBC_2.0 getrusage@GLIBC_2.0
+osf_wait4 - osf_wait4 2 __wait4_tv32 __wait4@GLIBC_2.0 wait4@GLIBC_2.0
+old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLIBC_2.0
diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S
index 2b4c71e410..a1d2b1513c 100644
--- a/sysdeps/unix/sysv/linux/alpha/utimes.S
+++ b/sysdeps/unix/sysv/linux/alpha/utimes.S
@@ -32,7 +32,13 @@
.text
-LEAF(__utimes_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define UTIMES __utimes_tv64
+#else
+#define UTIMES __utimes
+#endif
+
+LEAF(UTIMES, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__utimes_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -96,8 +102,9 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__utimes_tv64)
+END(UTIMES)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -105,3 +112,6 @@ default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__utimes_tv64, __utimes_tv64p)
default_symbol_version (__utimes_tv64p, utimes, GLIBC_2.1)
+#else
+weak_alias (__utimes, utimes)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S
index 5ab86077c8..334836f5aa 100644
--- a/sysdeps/unix/sysv/linux/alpha/wait4.S
+++ b/sysdeps/unix/sysv/linux/alpha/wait4.S
@@ -32,7 +32,13 @@
.text
-LEAF(__wait4_tv64, 32)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define WAIT4 __wait4_tv64
+#else
+#define WAIT4 __wait4
+#endif
+
+LEAF(WAIT4, 32)
ldgp gp, 0(pv)
subq sp, 32, sp
#ifdef PROF
@@ -64,7 +70,7 @@ LEAF(__wait4_tv64, 32)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -79,7 +85,7 @@ $do32: ldi v0, SYS_ify(osf_wait4)
bne a3, $error
/* Copy back to proper format. */
- ldq a3, 8(sp)
+ ldq a3, 24(sp)
beq a3, 2f
ldl t0, 0(a3) # ru_utime.tv_sec
ldl t1, 4(a3) # ru_utime.tv_usec
@@ -98,6 +104,7 @@ $do32: ldi v0, SYS_ify(osf_wait4)
ldt $f25, 96(a3) # ru_msgrcv
ldt $f26, 104(a3) # ru_nsignals
ldt $f27, 112(a3) # ru_nvcsw
+ .set noat
ldt $f28, 120(a3) # ru_nivcsw
stq t0, 0(a3)
stq t1, 8(a3)
@@ -117,6 +124,7 @@ $do32: ldi v0, SYS_ify(osf_wait4)
stt $f26, 120(a3)
stt $f27, 128(a3)
stt $f28, 136(a3)
+ .set at
2: addq sp, 32, sp
ret
@@ -127,8 +135,9 @@ $error:
addq sp, 32, sp
jmp zero, (pv), __syscall_error
-END(__wait4_tv64)
+END(WAIT4)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -136,3 +145,6 @@ default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__wait4_tv64, __wait4_tv64p)
default_symbol_version (__wait4_tv64p, wait4, GLIBC_2.1)
+#else
+weak_alias (__wait4, wait4)
+#endif