summaryrefslogtreecommitdiff
path: root/ports/sysdeps/unix/sysv/linux/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'ports/sysdeps/unix/sysv/linux/alpha')
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/bits/eventfd.h (renamed from ports/sysdeps/unix/sysv/linux/alpha/setresgid.c)34
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h46
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/bits/inotify.h (renamed from ports/sysdeps/unix/sysv/linux/alpha/setregid.c)30
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/bits/signalfd.h (renamed from ports/sysdeps/unix/sysv/linux/alpha/setreuid.c)30
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/bits/stat.h5
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/configure11
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/configure.in11
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c9
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c63
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/getitimer.S6
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/getrusage.S6
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/gettimeofday.S6
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h9
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/select.S6
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/setitimer.S6
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/setresuid.c33
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/settimeofday.S6
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h52
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/sys/inotify.h105
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h66
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/syscall.S7
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/utimes.S6
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/wait4.S6
23 files changed, 202 insertions, 357 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/setresgid.c b/ports/sysdeps/unix/sysv/linux/alpha/bits/eventfd.h
index 50e29e3c7..346794ad0 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/setresgid.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/eventfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -12,22 +12,20 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <unistd.h>
-#include <setxid.h>
-
-
-int
-__setresgid (gid_t rgid, gid_t egid, gid_t sgid)
-{
- return INLINE_SETXID_SYSCALL (setresgid, 3, (int) rgid,
- (int) egid, (int) sgid);
-}
-libc_hidden_def (__setresgid)
-#ifndef __setresgid
-weak_alias (__setresgid, setresgid)
+#ifndef _SYS_EVENTFD_H
+# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
#endif
+
+/* Flags for eventfd. */
+enum
+ {
+ EFD_SEMAPHORE = 000000001,
+#define EFD_SEMAPHORE EFD_SEMAPHORE
+ EFD_CLOEXEC = 010000000,
+#define EFD_CLOEXEC EFD_CLOEXEC
+ EFD_NONBLOCK = 000000004
+#define EFD_NONBLOCK EFD_NONBLOCK
+ };
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index e5e726bf4..d1cebfa68 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-2000,2004,2005,2006,2007,2010 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 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
@@ -223,6 +223,18 @@ struct f_owner_ex
we splice from/to). */
# define SPLICE_F_MORE 4 /* Expect more data. */
# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
+
+/* File handle structure. */
+struct file_handle
+{
+ unsigned int handle_bytes;
+ int handle_type;
+ /* File identifier. */
+ unsigned char f_handle[0];
+};
+
+/* Maximum handle size (for now). */
+# define MAX_HANDLE_SZ 128
#endif
__BEGIN_DECLS
@@ -252,6 +264,38 @@ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
extern ssize_t tee (int __fdin, int __fdout, size_t __len,
unsigned int __flags);
+/* Reserve storage for the data of the file associated with FD.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+# ifndef __USE_FILE_OFFSET64
+extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
+ fallocate64);
+# else
+# define fallocate fallocate64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len);
+# endif
+
+/* Map file name to file handle. */
+extern int name_to_handle_at (int __dfd, const char *__name,
+ struct file_handle *__handle, int *__mnt_id,
+ int __flags) __THROW;
+
+/* Open file using the file handle.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
+ int __flags);
+
#endif
__END_DECLS
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/setregid.c b/ports/sysdeps/unix/sysv/linux/alpha/bits/inotify.h
index 0973fe4ac..3fbe3b8ec 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/setregid.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/inotify.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -12,20 +12,18 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <unistd.h>
-#include <setxid.h>
-
-
-int
-__setregid (gid_t rgid, gid_t egid)
-{
- return INLINE_SETXID_SYSCALL (setregid, 2, (int) rgid, (int) egid);
-}
-#ifndef __setregid
-weak_alias (__setregid, setregid)
+#ifndef _SYS_INOTIFY_H
+# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
#endif
+
+/* Flags for the parameter of inotify_init1. */
+enum
+ {
+ IN_CLOEXEC = 010000000,
+#define IN_CLOEXEC IN_CLOEXEC
+ IN_NONBLOCK = 000000004
+#define IN_NONBLOCK IN_NONBLOCK
+ };
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/setreuid.c b/ports/sysdeps/unix/sysv/linux/alpha/bits/signalfd.h
index a23a34792..7ea70faef 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/setreuid.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/signalfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -12,20 +12,18 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <unistd.h>
-#include <setxid.h>
-
-
-int
-__setreuid (uid_t ruid, uid_t euid)
-{
- return INLINE_SETXID_SYSCALL (setreuid, 2, (int) ruid, (int) euid);
-}
-#ifndef __setreuid
-weak_alias (__setreuid, setreuid)
+#ifndef _SYS_SIGNALFD_H
+# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
#endif
+
+/* Flags for signalfd. */
+enum
+ {
+ SFD_CLOEXEC = 010000000,
+#define SFD_CLOEXEC SFD_CLOEXEC
+ SFD_NONBLOCK = 000000004
+#define SFD_NONBLOCK SFD_NONBLOCK
+ };
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index d7241bd1a..e70e83636 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2010
+/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2010,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -30,7 +30,8 @@
#define _STAT_VER_GLIBC2_1 2
#define _STAT_VER_KERNEL64 3
#define _STAT_VER_GLIBC2_3_4 3
-#define _STAT_VER _STAT_VER_GLIBC2_3_4
+#define _STAT_VER_LINUX 3
+#define _STAT_VER _STAT_VER_LINUX
/* Versions of the `xmknod' interface. */
#define _MKNOD_VER_LINUX 0
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/configure b/ports/sysdeps/unix/sysv/linux/alpha/configure
new file mode 100644
index 000000000..c7c4feeea
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/alpha/configure
@@ -0,0 +1,11 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/unix/sysv/linux/alpha
+
+# There are several bits that no longer compile cleanly without
+# realtime signal support (ver 2.2.0). Given that we also now
+# require TLS (ver 2.6.0), it seems pointless to fix them.
+# ??? Surely this should now be the generic default.
+arch_minimum_kernel=2.6.0
+
+# We did historically export the unwinder from glibc.
+libc_cv_gcc_unwind_find_fde=yes
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/configure.in b/ports/sysdeps/unix/sysv/linux/alpha/configure.in
new file mode 100644
index 000000000..5a1af6207
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/alpha/configure.in
@@ -0,0 +1,11 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/alpha
+
+# There are several bits that no longer compile cleanly without
+# realtime signal support (ver 2.2.0). Given that we also now
+# require TLS (ver 2.6.0), it seems pointless to fix them.
+# ??? Surely this should now be the generic default.
+arch_minimum_kernel=2.6.0
+
+# We did historically export the unwinder from glibc.
+libc_cv_gcc_unwind_find_fde=yes
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c b/ports/sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c
new file mode 100644
index 000000000..41e83bcf1
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c
@@ -0,0 +1,9 @@
+/* In this implementation we do not really care whether the call fails
+ because of missing kernel support since we do not even call the
+ function in this case. */
+/* For Alpha, in <kernel-features.h> we redefine the default definition of
+ when __ASSUME_ATFCTS is present. The hack must wait until after that. */
+#include <kernel-features.h>
+#undef __ASSUME_ATFCTS
+#define __ASSUME_ATFCTS 1
+#include "fxstatat.c"
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
index 6fa3aeb14..a6fd06b1d 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
@@ -30,11 +30,44 @@
#undef __fxstatat64
+#ifdef __ASSUME_ATFCTS
+# define __have_atfcts 1
+#endif
+#ifdef __ASSUME_STAT64_SYSCALL
+# define __libc_missing_axp_stat64 0
+#endif
/* Get information about the file NAME in BUF. */
int
__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
{
+ INTERNAL_SYSCALL_DECL (err);
+ int result, errno_out;
+
+ /* ??? The __fxstatat entry point is new enough that it must be using
+ vers == _STAT_VER_KERNEL64. For the benefit of dl-fxstatat64.c, we
+ cannot actually check this, lest the compiler not optimize the rest
+ of the function away. */
+
+#ifdef __NR_fstatat64
+ if (__have_atfcts >= 0)
+ {
+ result = INTERNAL_SYSCALL (fstatat64, err, 4, fd, file, st, flag);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+#ifndef __ASSUME_ATFCTS
+ if (errno_out == ENOSYS)
+ __have_atfcts = -1;
+ else
+#endif
+ {
+ __set_errno (errno_out);
+ return -1;
+ }
+ }
+#endif /* __NR_fstatat64 */
+
if (flag & ~AT_SYMLINK_NOFOLLOW)
{
__set_errno (EINVAL);
@@ -67,12 +100,8 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
file = buf;
}
- INTERNAL_SYSCALL_DECL (err);
- int result, errno_out;
- struct kernel_stat kst;
-
-#if __ASSUME_STAT64_SYSCALL > 0
- if (vers == _STAT_VER_KERNEL64)
+#ifdef __NR_stat64
+ if (!__libc_missing_axp_stat64)
{
if (flag & AT_SYMLINK_NOFOLLOW)
result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
@@ -82,24 +111,16 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return result;
errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
- goto fail;
- }
-#elif defined __NR_stat64
- if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
- {
- if (flag & AT_SYMLINK_NOFOLLOW)
- result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
+# if __ASSUME_STAT64_SYSCALL == 0
+ if (errno_out == ENOSYS)
+ __libc_missing_axp_stat64 = 1;
else
- result = INTERNAL_SYSCALL (stat64, err, 2, file, st);
-
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return result;
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
- if (errno_out != ENOSYS)
+# endif
goto fail;
- __libc_missing_axp_stat64 = 1;
}
-#endif
+#endif /* __NR_stat64 */
+
+ struct kernel_stat kst;
if (flag & AT_SYMLINK_NOFOLLOW)
result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst);
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/getitimer.S b/ports/sysdeps/unix/sysv/linux/alpha/getitimer.S
index 6644a5c36..c29b3bdbc 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/getitimer.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/getitimer.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006, 2012 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
@@ -23,7 +23,7 @@
.text
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if defined PIC && defined DO_VERSIONING
#define GETITIMER __getitimer_tv64
#else
#define GETITIMER getitimer
@@ -108,6 +108,6 @@ $error:
END(GETITIMER)
#endif /* __ASSUME_TIMEVAL64 */
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if defined PIC && defined DO_VERSIONING
default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1)
#endif
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/getrusage.S b/ports/sysdeps/unix/sysv/linux/alpha/getrusage.S
index 0bca4b5f2..2516ab022 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006, 2012 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
@@ -23,7 +23,7 @@
.text
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if defined PIC && defined DO_VERSIONING
#define GETRUSAGE __getrusage_tv64
#else
#define GETRUSAGE __getrusage
@@ -140,7 +140,7 @@ $error:
END(GETRUSAGE)
#endif /* __ASSUME_TIMEVAL64 */
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if defined PIC && defined DO_VERSIONING
strong_alias(__getrusage_tv64, ____getrusage_tv64)
default_symbol_version (____getrusage_tv64, __getrusage, GLIBC_2.1)
default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1)
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/ports/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
index 7c9183a4f..2910830c0 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2002, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2002, 2003, 2006, 2012 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
@@ -23,7 +23,7 @@
.text
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if defined PIC && defined DO_VERSIONING
#define GETTIMEOFDAY __gettimeofday_tv64
#else
#define GETTIMEOFDAY __gettimeofday
@@ -106,7 +106,7 @@ $error:
END(GETTIMEOFDAY)
#endif /* __ASSUME_TIMEVAL64 */
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if 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
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
index 9c640f984..ce4d1607d 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
@@ -18,6 +18,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifndef _KERNEL_FEATURES_H
+#define _KERNEL_FEATURES_H 1
+
/* alpha switched to a 64-bit timeval sometime before 2.2.0. */
#if __LINUX_KERNEL_VERSION >= 131584
# define __ASSUME_TIMEVAL64 1
@@ -96,3 +99,9 @@
#if __LINUX_KERNEL_VERSION < 0x020621
# undef __ASSUME_FALLOCATE
#endif
+
+/* There never has been support for fstat64. */
+#undef __ASSUME_STATFS64
+#define __ASSUME_STATFS64 0
+
+#endif /* _KERNEL_FEATURES_H */
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/select.S b/ports/sysdeps/unix/sysv/linux/alpha/select.S
index 35a81e949..94f209bff 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/select.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998,2002,2003,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998,2002,2003,2006,2012 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
@@ -23,7 +23,7 @@
.text
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if defined PIC && defined DO_VERSIONING
#define SELECT __select_tv64
#else
#define SELECT __select
@@ -224,7 +224,7 @@ $error:
END(SELECT)
#endif /* __ASSUME_TIMEVAL64 */
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if 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
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/setitimer.S b/ports/sysdeps/unix/sysv/linux/alpha/setitimer.S
index 59caeac68..59f97f75d 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/setitimer.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/setitimer.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006, 2012 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
@@ -23,7 +23,7 @@
.text
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if defined PIC && defined DO_VERSIONING
#define SETITIMER __setitimer_tv64
#else
#define SETITIMER __setitimer
@@ -124,7 +124,7 @@ $error:
END(SETITIMER)
#endif /* __ASSUME_TIMEVAL64 */
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if 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
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/setresuid.c b/ports/sysdeps/unix/sysv/linux/alpha/setresuid.c
deleted file mode 100644
index e76413bf6..000000000
--- a/ports/sysdeps/unix/sysv/linux/alpha/setresuid.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 1998, 2000, 2003, 2004 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <unistd.h>
-#include <setxid.h>
-
-
-int
-__setresuid (uid_t ruid, uid_t euid, uid_t suid)
-{
- return INLINE_SETXID_SYSCALL (setresuid, 3, (int) ruid,
- (int) euid, (int) suid);
-}
-libc_hidden_def (__setresuid)
-#ifndef __setresuid
-weak_alias (__setresuid, setresuid)
-#endif
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/ports/sysdeps/unix/sysv/linux/alpha/settimeofday.S
index e39eadc20..e80d05478 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/settimeofday.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/settimeofday.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006, 2012 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
@@ -23,7 +23,7 @@
.text
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if defined PIC && defined DO_VERSIONING
#define SETTIMEOFDAY __settimeofday_tv64
#else
#define SETTIMEOFDAY __settimeofday
@@ -105,7 +105,7 @@ $error:
END(SETTIMEOFDAY)
#endif /* __ASSUME_TIMEVAL64 */
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if 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
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h b/ports/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h
deleted file mode 100644
index c8ce55462..000000000
--- a/ports/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (C) 2007, 2008 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_EVENTFD_H
-#define _SYS_EVENTFD_H 1
-
-#include <stdint.h>
-
-
-/* Type for event counter. */
-typedef uint64_t eventfd_t;
-
-/* Flags for signalfd. */
-enum
- {
- EFD_CLOEXEC = 010000000,
-#define EFD_CLOEXEC EFD_CLOEXEC
- EFD_NONBLOCK = 04
-#define EFD_NONBLOCK EFD_NONBLOCK
- };
-
-
-__BEGIN_DECLS
-
-/* Return file descriptor for generic event channel. Set initial
- value to COUNT. */
-extern int eventfd (int __count, int __flags) __THROW;
-
-/* Read event counter and possibly wait for events. */
-extern int eventfd_read (int __fd, eventfd_t *__value);
-
-/* Increment event counter. */
-extern int eventfd_write (int __fd, eventfd_t value);
-
-__END_DECLS
-
-#endif /* sys/eventfd.h */
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/sys/inotify.h b/ports/sysdeps/unix/sysv/linux/alpha/sys/inotify.h
deleted file mode 100644
index d61c700d5..000000000
--- a/ports/sysdeps/unix/sysv/linux/alpha/sys/inotify.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Copyright (C) 2005, 2006, 2008 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_INOTIFY_H
-#define _SYS_INOTIFY_H 1
-
-#include <stdint.h>
-
-
-/* Flags for the parameter of inotify_init1. */
-enum
- {
- IN_CLOEXEC = 010000000,
-#define IN_CLOEXEC IN_CLOEXEC
- IN_NONBLOCK = 04
-#define IN_NONBLOCK IN_NONBLOCK
- };
-
-
-/* Structure describing an inotify event. */
-struct inotify_event
-{
- int wd; /* Watch descriptor. */
- uint32_t mask; /* Watch mask. */
- uint32_t cookie; /* Cookie to synchronize two events. */
- uint32_t len; /* Length (including NULs) of name. */
- char name __flexarr; /* Name. */
-};
-
-
-/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */
-#define IN_ACCESS 0x00000001 /* File was accessed. */
-#define IN_MODIFY 0x00000002 /* File was modified. */
-#define IN_ATTRIB 0x00000004 /* Metadata changed. */
-#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */
-#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */
-#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
-#define IN_OPEN 0x00000020 /* File was opened. */
-#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */
-#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */
-#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
-#define IN_CREATE 0x00000100 /* Subfile was created. */
-#define IN_DELETE 0x00000200 /* Subfile was deleted. */
-#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */
-#define IN_MOVE_SELF 0x00000800 /* Self was moved. */
-
-/* Events sent by the kernel. */
-#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */
-#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */
-#define IN_IGNORED 0x00008000 /* File was ignored. */
-
-/* Helper events. */
-#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
-#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
-
-/* Special flags. */
-#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a
- directory. */
-#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */
-#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already
- existing watch. */
-#define IN_ISDIR 0x40000000 /* Event occurred against dir. */
-#define IN_ONESHOT 0x80000000 /* Only send event once. */
-
-/* All events which a program can wait on. */
-#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \
- | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \
- | IN_MOVED_TO | IN_CREATE | IN_DELETE \
- | IN_DELETE_SELF | IN_MOVE_SELF)
-
-
-__BEGIN_DECLS
-
-/* Create and initialize inotify instance. */
-extern int inotify_init (void) __THROW;
-
-/* Create and initialize inotify instance. */
-extern int inotify_init1 (int __flags) __THROW;
-
-/* Add watch of object NAME to inotify instance FD. Notify about
- events specified by MASK. */
-extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
- __THROW;
-
-/* Remove the watch specified by WD from the inotify instance FD. */
-extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW;
-
-__END_DECLS
-
-#endif /* sys/inotify.h */
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h b/ports/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h
deleted file mode 100644
index 4cbe97776..000000000
--- a/ports/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright (C) 2007, 2008 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_SIGNALFD_H
-#define _SYS_SIGNALFD_H 1
-
-#define __need_sigset_t
-#include <signal.h>
-#include <stdint.h>
-
-
-struct signalfd_siginfo
-{
- uint32_t ssi_signo;
- int32_t ssi_errno;
- int32_t ssi_code;
- uint32_t ssi_pid;
- uint32_t ssi_uid;
- int32_t ssi_fd;
- uint32_t ssi_tid;
- uint32_t ssi_band;
- uint32_t ssi_overrun;
- uint32_t ssi_trapno;
- int32_t ssi_status;
- int32_t ssi_int;
- uint64_t ssi_ptr;
- uint64_t ssi_utime;
- uint64_t ssi_stime;
- uint64_t ssi_addr;
- uint8_t __pad[48];
-};
-
-/* Flags for signalfd. */
-enum
- {
- SFD_CLOEXEC = 010000000,
-#define SFD_CLOEXEC SFD_CLOEXEC
- SFD_NONBLOCK = 04
-#define SFD_NONBLOCK SFD_NONBLOCK
- };
-
-__BEGIN_DECLS
-
-/* Request notification for delivery of signals in MASK to be
- performed using descriptor FD.*/
-extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
- __THROW __nonnull ((2));
-
-__END_DECLS
-
-#endif /* sys/signalfd.h */
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/syscall.S b/ports/sysdeps/unix/sysv/linux/alpha/syscall.S
index 0c4081363..02d5d6519 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -31,13 +31,13 @@
*
* Usage:
*
- * long syscall(syscall_number, arg1, arg2, arg3, arg4, arg5)
+ * long syscall(syscall_number, arg1, arg2, arg3, arg4, arg5, arg6)
*
* syscall_number = the index of the system call we're invoking
- * arg1-arg5 = up to 5 integer arguments to the system call
+ * arg1-arg6 = up to 6 integer arguments to the system call
*
* We need to do some arg shifting: the kernel expects the
- * syscall number in v0 and the first five args in a0-a4.
+ * syscall number in v0 and the first six args in a0-a5.
*
*/
@@ -60,6 +60,7 @@ LEAF(__syscall, 0)
mov a3, a2
mov a4, a3
mov a5, a4
+ ldq a5,0(sp) /* arg6 -> a5 */
call_pal PAL_callsys /* Invoke system call */
bne a3, $error
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/utimes.S b/ports/sysdeps/unix/sysv/linux/alpha/utimes.S
index 0dd0a9372..2ab2b19c0 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/utimes.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/utimes.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006, 2012 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
@@ -23,7 +23,7 @@
.text
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if defined PIC && defined DO_VERSIONING
#define UTIMES __utimes_tv64
#else
#define UTIMES __utimes
@@ -110,7 +110,7 @@ $error:
END(UTIMES)
#endif /* __ASSUME_TIMEVAL64 */
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if 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
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/wait4.S b/ports/sysdeps/unix/sysv/linux/alpha/wait4.S
index 634993deb..5e1e5d460 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/wait4.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/wait4.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006, 2012 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
@@ -23,7 +23,7 @@
.text
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if defined PIC && defined DO_VERSIONING
#define WAIT4 __wait4_tv64
#else
#define WAIT4 __wait4
@@ -143,7 +143,7 @@ $error:
END(WAIT4)
#endif /* __ASSUME_TIMEVAL64 */
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if 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