summaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
Diffstat (limited to 'ports')
-rw-r--r--ports/ChangeLog.mips20
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/bits/socket.h12
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/kernel-features.h6
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/readelflib.c7
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h2
5 files changed, 44 insertions, 3 deletions
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index db3131590..6f5e4f731 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,3 +1,23 @@
+2009-04-09 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/socket.h: Add missing protocol
+ numbers.
+ * sysdeps/unix/sysv/linux/mips/sys/eventfd.h (EFD_SEMAPHORE):
+ Define.
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h: Add entries for
+ preadv and pwritev.
+
+2009-03-18 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file):
+ Use the Elf32_Ehdr type to check for EF_MIPS_ABI2 in the flags.
+
+2009-03-18 Zhang Le <r0bertz@gentoo.org>
+
+ [BZ #7074]
+ * sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file):
+ Fix the condition used to annotate n32 objects.
+
2009-03-17 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/getsysstats.c (GET_NPROCS_PARSER):
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h b/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h
index dad2c2d09..60db51554 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -95,15 +95,20 @@ enum __socket_type
#define PF_ASH 18 /* Ash. */
#define PF_ECONET 19 /* Acorn Econet. */
#define PF_ATMSVC 20 /* ATM SVCs. */
+#define PF_RDS 21 /* RDS sockets. */
#define PF_SNA 22 /* Linux SNA Project */
#define PF_IRDA 23 /* IRDA sockets. */
#define PF_PPPOX 24 /* PPPoX sockets. */
#define PF_WANPIPE 25 /* Wanpipe API sockets. */
+#define PF_LLC 26 /* Linux LLC. */
+#define PF_CAN 29 /* Controller Area Network. */
+#define PF_TIPC 30 /* TIPC sockets. */
#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
#define PF_IUCV 32 /* IUCV sockets. */
#define PF_RXRPC 33 /* RxRPC sockets. */
#define PF_ISDN 34 /* mISDN sockets. */
-#define PF_MAX 35 /* For now.. */
+#define PF_PHONET 35 /* Phonet sockets. */
+#define PF_MAX 36 /* For now.. */
/* Address families. */
#define AF_UNSPEC PF_UNSPEC
@@ -130,14 +135,19 @@ enum __socket_type
#define AF_ASH PF_ASH
#define AF_ECONET PF_ECONET
#define AF_ATMSVC PF_ATMSVC
+#define AF_RDS PF_RDS
#define AF_SNA PF_SNA
#define AF_IRDA PF_IRDA
#define AF_PPPOX PF_PPPOX
#define AF_WANPIPE PF_WANPIPE
+#define AF_LLC PF_LLC
+#define AF_CAN PF_CAN
+#define AF_TIPC PF_TIPC
#define AF_BLUETOOTH PF_BLUETOOTH
#define AF_IUCV PF_IUCV
#define AF_RXRPC PF_RXRPC
#define AF_ISDN PF_ISDN
+#define AF_PHONET PF_PHONET
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
diff --git a/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
index f479b6063..1cdf19e3f 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -31,4 +31,10 @@
# define __ASSUME_FCNTL64 1
#endif
+/* Support for preadv and pwritev was added in 2.6.30. */
+#if __LINUX_KERNEL_VERSION >= 0x02061e
+# define __ASSUME_PREADV 1
+# define __ASSUME_PWRITEV 1
+#endif
+
#include_next <kernel-features.h>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/readelflib.c b/ports/sysdeps/unix/sysv/linux/mips/readelflib.c
index baa92fe57..547362f31 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/readelflib.c
+++ b/ports/sysdeps/unix/sysv/linux/mips/readelflib.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001, 2002, 2003, 2005, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Alexandre Oliva <aoliva@redhat.com>
Based on work ../x86_64/readelflib.c,
@@ -39,11 +40,13 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
{
+ Elf32_Ehdr *elf32_header = (Elf32_Ehdr *) elf_header;
+
ret = process_elf32_file (file_name, lib, flag, osversion, soname,
file_contents, file_length);
/* n32 libraries are always libc.so.6+. */
- if (ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0)
+ if (!ret && (elf32_header->e_flags & EF_MIPS_ABI2) != 0)
*flag = FLAG_MIPS64_LIBN32|FLAG_ELF_LIBC6;
}
else
diff --git a/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h b/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
index 8b55ba631..b30d09a83 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
@@ -28,6 +28,8 @@ typedef uint64_t eventfd_t;
/* Flags for signalfd. */
enum
{
+ EFD_SEMAPHORE = 1,
+#define EFD_SEMAPHORE EFD_SEMAPHORE
EFD_CLOEXEC = 02000000,
#define EFD_CLOEXEC EFD_CLOEXEC
EFD_NONBLOCK = 0200