[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r6124 - in /trunk: libc/ libc/bits/ libc/nscd/ libc/stdlib/ libc/sysdeps/mach/hurd/bits/ libc/sysdeps/sparc/sparc32/ libc/sy...
- To: commits@xxxxxxxxxx
- Subject: [commits] r6124 - in /trunk: libc/ libc/bits/ libc/nscd/ libc/stdlib/ libc/sysdeps/mach/hurd/bits/ libc/sysdeps/sparc/sparc32/ libc/sy...
- From: joseph@xxxxxxxxxx
- Date: Wed, 07 May 2008 11:51:23 -0000
Author: joseph
Date: Wed May 7 04:51:22 2008
New Revision: 6124
Log:
Merge changes between r6018 and r6123 from /fsf/trunk.
Added:
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/getcontext.S
- copied unchanged from r6123, fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/getcontext.S
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c
- copied unchanged from r6123, fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S
- copied unchanged from r6123, fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/swapcontext.S
- copied unchanged from r6123, fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/swapcontext.S
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym
- copied unchanged from r6123, fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym
Modified:
trunk/libc/ChangeLog
trunk/libc/bits/termios.h
trunk/libc/nscd/Makefile
trunk/libc/nscd/connections.c
trunk/libc/nscd/nscd.h
trunk/libc/stdlib/tst-setcontext.c
trunk/libc/sysdeps/mach/hurd/bits/ioctls.h
trunk/libc/sysdeps/sparc/sparc32/Makefile
trunk/libc/sysdeps/sparc/sparc64/Makefile
trunk/libc/sysdeps/unix/sysv/linux/alpha/bits/resource.h
trunk/libc/sysdeps/unix/sysv/linux/bits/resource.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S
trunk/libc/sysdeps/unix/sysv/linux/times.c
trunk/ports/ChangeLog.mips
trunk/ports/sysdeps/unix/sysv/linux/mips/bits/resource.h
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Wed May 7 04:51:22 2008
@@ -1,3 +1,73 @@
+2008-05-05 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc32/Makefile: Use -mcpu=v7 for initfini.s build.
+ * sysdeps/sparc/sparc64/Makefile: Use -mcpu=v9 for initfini.s build.
+
+2007-09-14 Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
+
+ Fix termios bit macros.
+ Move *DLY definitions where they belong, in termios.h.
+ Add *[0-3] definitions.
+ Fixes confusion between VT and FF.
+ * sysdeps/mach/hurd/bits/ioctls.h (NL0, NL1, TAB0, TAB1, TAB2, CR0,
+ CR1, CR2, CR3, FF0, FF1, BS0, BS1): Undefine these at start if they
+ are already defined to avoid collision with termios.h.
+ (NLDLY, TABDLY, TAB3, CRDLY, VTDLY, BSDLY): Remove macros.
+ * bits/termios.h [__USE_MISC || __USE_XOPEN] (NL0, NL1, TAB0,
+ TAB1, TAB2, CR0, CR1, CR2, CR3, FF0, FF1, BS0, BS1): Likewise.
+ [__USE_BSD || __USE_XOPEN] (OCRNL, ONOCR, ONLRET): New macros.
+ [__USE_MISC || __USE_XOPEN] (NLDLY, NL0, NL1, TABDLY, TAB0, TAB1, TAB2,
+ TAB3, CRDLY, CR0, CR1, CR2, CR3, FFDLY, FF0, FF1, BSDLY, BS0, BS1,
+ VTDLY, VT0, VT1): New macros.
+ [__USE_GNU] (OLCUC): Change value of macro.
+ [__USE_XOPEN] (OFILL): New macro.
+ [__USE_BSD] (CRTSCTS): Change value.
+ (CRTS_IFLOW, CCTS_OFLOW): Change into compatibility macros.
+ [__USE_BSD] (CDTRCTS, CHWFLOW): New macros.
+ (B7200, B14400, B28800, B76800): New macros.
+
+2008-05-01 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym: New file.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile [$(subdir) = stdlib]:
+ (gen-as-const-headers): Add it.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/getcontext.S: New file.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/swapcontext.S: Likewise.
+
+ * sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S: Add support for
+ six system call parameters.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: Likewise.
+
+2008-04-30 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/bits/resource.h: Define RUSAGE_THREAD and
+ RUSAGE_LWP.
+ * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise.
+
+2008-04-30 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * stdlib/tst-setcontext.c: Include unistd.h.
+
+2008-04-25 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c (semctl):
+ Pass "union semun" properly in to sys_ipc, it must be passed
+ by value, not by reference.
+
+2008-04-22 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * nscd/Makefile (nscd-cflags): Set back to -fpie.
+ * nscd/nscd.h (mem_in_flight): Add attribute_tls_model_ie.
+ * nscd/connections.c (mem_in_flight): Likewise.
+
+ * nscd/nscd.h (dbs): Make hidden.
+
+ * sysdeps/unix/sysv/linux/times.c (__times): Fix check for EFAULT.
+ Avoid returning -1, return 0 instead.
+
2008-04-19 Ulrich Drepper <drepper@xxxxxxxxxx>
* resolv/res_mkquery.c (__res_nopt): Use NS_PUT16 instead of ns_put16.
Modified: trunk/libc/bits/termios.h
==============================================================================
--- trunk/libc/bits/termios.h (original)
+++ trunk/libc/bits/termios.h Wed May 7 04:51:22 2008
@@ -24,6 +24,50 @@
/* These macros are also defined in some <bits/ioctls.h> files (with
numerically identical values), but this serves to shut up cpp's
complaining. */
+#if defined __USE_MISC || defined __USE_XOPEN
+
+# ifdef NL0
+# undef NL0
+# endif
+# ifdef NL1
+# undef NL1
+# endif
+# ifdef TAB0
+# undef TAB0
+# endif
+# ifdef TAB1
+# undef TAB1
+# endif
+# ifdef TAB2
+# undef TAB2
+# endif
+# ifdef CR0
+# undef CR0
+# endif
+# ifdef CR1
+# undef CR1
+# endif
+# ifdef CR2
+# undef CR2
+# endif
+# ifdef CR3
+# undef CR3
+# endif
+# ifdef FF0
+# undef FF0
+# endif
+# ifdef FF1
+# undef FF1
+# endif
+# ifdef BS0
+# undef BS0
+# endif
+# ifdef BS1
+# undef BS1
+# endif
+
+#endif /* __USE_MISC || __USE_XOPEN */
+
#ifdef __USE_BSD
# ifdef MDMBUF
@@ -93,11 +137,43 @@
#define OPOST (1 << 0) /* Perform output processing. */
#ifdef __USE_BSD
# define ONLCR (1 << 1) /* Map NL to CR-NL on output. */
-# define OXTABS (1 << 2) /* Expand tabs to spaces. */
+# define OXTABS TAB3 /* Expand tabs to spaces. */
# define ONOEOT (1 << 3) /* Discard EOT (^D) on output. */
#endif
+#if defined __USE_BSD || defined __USE_XOPEN
+# define OCRNL (1 << 4) /* Map CR to NL. */
+# define ONOCR (1 << 5) /* Discard CR's when on column 0. */
+# define ONLRET (1 << 6) /* Move to column 0 on NL. */
+#endif
+#if defined __USE_MISC || defined __USE_XOPEN
+# define NLDLY (3 << 8) /* NL delay. */
+# define NL0 (0 << 8) /* NL type 0. */
+# define NL1 (1 << 8) /* NL type 1. */
+# define TABDLY (3 << 10) /* TAB delay. */
+# define TAB0 (0 << 10) /* TAB delay type 0. */
+# define TAB1 (1 << 10) /* TAB delay type 1. */
+# define TAB2 (2 << 10) /* TAB delay type 2. */
+# define TAB3 (1 << 2) /* Expand tabs to spaces. */
+# define CRDLY (3 << 12) /* CR delay. */
+# define CR0 (0 << 12) /* CR delay type 0. */
+# define CR1 (1 << 12) /* CR delay type 1. */
+# define CR2 (2 << 12) /* CR delay type 2. */
+# define CR3 (3 << 12) /* CR delay type 3. */
+# define FFDLY (1 << 14) /* FF delay. */
+# define FF0 (0 << 14) /* FF delay type 0. */
+# define FF1 (1 << 14) /* FF delay type 1. */
+# define BSDLY (1 << 15) /* BS delay. */
+# define BS0 (0 << 15) /* BS delay type 0. */
+# define BS1 (1 << 15) /* BS delay type 1. */
+# define VTDLY (1 << 16) /* VT delay. */
+# define VT0 (0 << 16) /* VT delay type 0. */
+# define VT1 (1 << 16) /* VT delay type 1. */
+#endif /* __USE_MISC || __USE_XOPEN */
#ifdef __USE_GNU
-# define OLCUC (1 << 9) /* Translate lower case output to upper case */
+# define OLCUC (1 << 17) /* Translate lower case output to upper case */
+#endif
+#ifdef __USE_XOPEN
+# define OFILL (1 << 18) /* Send fill characters for delays. */
#endif
/* Control modes. */
@@ -117,10 +193,12 @@
#define HUPCL (1 << 14) /* Hang up on last close. */
#define CLOCAL (1 << 15) /* Ignore modem status lines. */
#ifdef __USE_BSD
-# define CCTS_OFLOW (1 << 16) /* CTS flow control of output. */
-# define CRTS_IFLOW (1 << 17) /* RTS flow control of input. */
-# define CRTSCTS (CCTS_OFLOW|CRTS_IFLOW) /* CTS/RTS flow control. */
-# define MDMBUF (1 << 20) /* Carrier flow control of output. */
+# define CRTSCTS (1 << 16) /* RTS/CTS flow control. */
+# define CRTS_IFLOW CRTSCTS /* Compatibility. */
+# define CCTS_OFLOW CRTSCTS /* Compatibility. */
+# define CDTRCTS (1 << 17) /* DTR/CTS flow control. */
+# define MDMBUF (1 << 20) /* DTR/DCD flow control. */
+# define CHWFLOW (MDMBUF|CRTSCTS|CDTRCTS) /* All types of flow control. */
#endif
/* Local modes. */
@@ -210,13 +288,17 @@
#define B2400 2400 /* 2400 baud. */
#define B4800 4800 /* 4800 baud. */
#define B9600 9600 /* 9600 baud. */
+#define B7200 7200 /* 7200 baud. */
+#define B14400 14400 /* 14400 baud. */
#define B19200 19200 /* 19200 baud. */
+#define B28800 28800 /* 28800 baud. */
#define B38400 38400 /* 38400 baud. */
#ifdef __USE_MISC
# define EXTA 19200
# define EXTB 38400
#endif
#define B57600 57600
+#define B76800 76800
#define B115200 115200
#define B230400 230400
#define B460800 460800
Modified: trunk/libc/nscd/Makefile
==============================================================================
--- trunk/libc/nscd/Makefile (original)
+++ trunk/libc/nscd/Makefile Wed May 7 04:51:22 2008
@@ -98,8 +98,7 @@
nscd-cflags = -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2
ifeq (yesyes,$(have-fpie)$(build-shared))
-#nscd-cflags += -fpie
-nscd-cflags += -fpic
+nscd-cflags += -fpie
endif
ifeq (yes,$(have-ssp))
nscd-cflags += -fstack-protector
Modified: trunk/libc/nscd/connections.c
==============================================================================
--- trunk/libc/nscd/connections.c (original)
+++ trunk/libc/nscd/connections.c Wed May 7 04:51:22 2008
@@ -226,7 +226,7 @@
unsigned long int client_queued;
/* Data structure for recording in-flight memory allocation. */
-__thread struct mem_in_flight mem_in_flight;
+__thread struct mem_in_flight mem_in_flight attribute_tls_model_ie;
/* Global list of the mem_in_flight variables of all the threads. */
struct mem_in_flight *mem_in_flight_list;
Modified: trunk/libc/nscd/nscd.h
==============================================================================
--- trunk/libc/nscd/nscd.h (original)
+++ trunk/libc/nscd/nscd.h Wed May 7 04:51:22 2008
@@ -130,7 +130,7 @@
/* Global variables. */
-extern struct database_dyn dbs[lastdb];
+extern struct database_dyn dbs[lastdb] attribute_hidden;
extern const char *const dbnames[lastdb];
extern const char *const serv2str[LASTREQ];
@@ -201,7 +201,7 @@
} block[IDX_last];
struct mem_in_flight *next;
-} mem_in_flight;
+} mem_in_flight attribute_tls_model_ie;
/* Global list of the mem_in_flight variables of all the threads. */
extern struct mem_in_flight *mem_in_flight_list;
Modified: trunk/libc/stdlib/tst-setcontext.c
==============================================================================
--- trunk/libc/stdlib/tst-setcontext.c (original)
+++ trunk/libc/stdlib/tst-setcontext.c Wed May 7 04:51:22 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,2002,2004,2006 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2002,2004,2006,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
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include <ucontext.h>
+#include <unistd.h>
static ucontext_t ctx[3];
Modified: trunk/libc/sysdeps/mach/hurd/bits/ioctls.h
==============================================================================
--- trunk/libc/sysdeps/mach/hurd/bits/ioctls.h (original)
+++ trunk/libc/sysdeps/mach/hurd/bits/ioctls.h Wed May 7 04:51:22 2008
@@ -25,6 +25,46 @@
/* These macros are also defined in <bits/termios.h> (with numerically
identical values) but this serves to shut up cpp's complaining. */
+
+#ifdef NL0
+# undef NL0
+#endif
+#ifdef NL1
+# undef NL1
+#endif
+#ifdef TAB0
+# undef TAB0
+#endif
+#ifdef TAB1
+# undef TAB1
+#endif
+#ifdef TAB2
+# undef TAB2
+#endif
+#ifdef CR0
+# undef CR0
+#endif
+#ifdef CR1
+# undef CR1
+#endif
+#ifdef CR2
+# undef CR2
+#endif
+#ifdef CR3
+# undef CR3
+#endif
+#ifdef FF0
+# undef FF0
+#endif
+#ifdef FF1
+# undef FF1
+#endif
+#ifdef BS0
+# undef BS0
+#endif
+#ifdef BS1
+# undef BS1
+#endif
#ifdef MDMBUF
# undef MDMBUF
#endif
@@ -284,31 +324,25 @@
#define ODDP 0x00000040 /* get/send odd parity */
#define EVENP 0x00000080 /* get/send even parity */
#define ANYP 0x000000c0 /* get any parity/send none */
-#define NLDLY 0x00000300 /* \n delay */
-#define NLDELAY NLDLY /* traditional BSD name */
+#define NLDELAY 0x00000300 /* \n delay */
#define NL0 0x00000000
#define NL1 0x00000100 /* tty 37 */
#define NL2 0x00000200 /* vt05 */
#define NL3 0x00000300
-#define TABDLY 0x00000c00 /* horizontal tab delay */
-#define TBDELAY TABDLY /* traditional BSD name */
+#define TBDELAY 0x00000c00 /* horizontal tab delay */
#define TAB0 0x00000000
#define TAB1 0x00000400 /* tty 37 */
#define TAB2 0x00000800
-#define TAB3 0x00000c00
#define XTABS 0x00000c00 /* expand tabs on output */
-#define CRDLY 0x00003000 /* \r delay */
-#define CRDELAY CRDLY /* traditional BSD name */
+#define CRDELAY 0x00003000 /* \r delay */
#define CR0 0x00000000
#define CR1 0x00001000 /* tn 300 */
#define CR2 0x00002000 /* tty 37 */
#define CR3 0x00003000 /* concept 100 */
-#define VTDLY 0x00004000 /* vertical tab delay */
-#define VTDELAY VTDLY /* traditional BSD name */
+#define VTDELAY 0x00004000 /* vertical tab delay */
#define FF0 0x00000000
#define FF1 0x00004000 /* tty 37 */
-#define BSDLY 0x00008000 /* \b delay */
-#define BSDELAY BSDLY /* traditional BSD name */
+#define BSDELAY 0x00008000 /* \b delay */
#define BS0 0x00000000
#define BS1 0x00008000
#define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY)
Modified: trunk/libc/sysdeps/sparc/sparc32/Makefile
==============================================================================
--- trunk/libc/sysdeps/sparc/sparc32/Makefile (original)
+++ trunk/libc/sysdeps/sparc/sparc32/Makefile Wed May 7 04:51:22 2008
@@ -19,6 +19,10 @@
ifeq ($(subdir),gnulib)
sysdep_routines = dotmul umul $(divrem) alloca
endif # gnulib
+
+ifeq ($(subdir),csu)
+CFLAGS-initfini.s += -mcpu=v7
+endif
# We distribute these files, even though they are generated,
# so as to avoid the need for a functioning m4 to build the library.
Modified: trunk/libc/sysdeps/sparc/sparc64/Makefile
==============================================================================
--- trunk/libc/sysdeps/sparc/sparc64/Makefile (original)
+++ trunk/libc/sysdeps/sparc/sparc64/Makefile Wed May 7 04:51:22 2008
@@ -2,3 +2,7 @@
sysdep_routines += hp-timing
elide-routines.os += hp-timing
endif
+
+ifeq ($(subdir),csu)
+CFLAGS-initfini.s += -mcpu=v9
+endif
Modified: trunk/libc/sysdeps/unix/sysv/linux/alpha/bits/resource.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/alpha/bits/resource.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/alpha/bits/resource.h Wed May 7 04:51:22 2008
@@ -158,8 +158,16 @@
#define RUSAGE_SELF RUSAGE_SELF
/* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1
+ RUSAGE_CHILDREN = -1,
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+#ifdef __USE_GNU
+ /* The calling thread. */
+ RUSAGE_THREAD = 1
+# define RUSAGE_THREAD RUSAGE_THREAD
+ /* Name for the same functionality on Solaris. */
+# define RUSAGE_LWP RUSAGE_THREAD
+#endif
};
#define __need_timeval
Modified: trunk/libc/sysdeps/unix/sysv/linux/bits/resource.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/bits/resource.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/bits/resource.h Wed May 7 04:51:22 2008
@@ -158,8 +158,16 @@
#define RUSAGE_SELF RUSAGE_SELF
/* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1
+ RUSAGE_CHILDREN = -1,
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+#ifdef __USE_GNU
+ /* The calling thread. */
+ RUSAGE_THREAD = 1
+# define RUSAGE_THREAD RUSAGE_THREAD
+ /* Name for the same functionality on Solaris. */
+# define RUSAGE_LWP RUSAGE_THREAD
+#endif
};
#define __need_timeval
Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h Wed May 7 04:51:22 2008
@@ -174,8 +174,16 @@
#define RUSAGE_SELF RUSAGE_SELF
/* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1
+ RUSAGE_CHILDREN = -1,
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+#ifdef __USE_GNU
+ /* The calling thread. */
+ RUSAGE_THREAD = 1
+# define RUSAGE_THREAD RUSAGE_THREAD
+ /* Name for the same functionality on Solaris. */
+# define RUSAGE_LWP RUSAGE_THREAD
+#endif
};
#define __need_timeval
Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile Wed May 7 04:51:22 2008
@@ -1,6 +1,10 @@
asm-CPPFLAGS = -D__ASSEMBLY__
ASFLAGS-.os += -fPIC
LD += -melf32_sparc
+
+ifeq ($(subdir),stdlib)
+gen-as-const-headers += ucontext_i.sym
+endif
# When I get this to work, this is the right thing
ifeq ($(subdir),elf)
Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S Wed May 7 04:51:22 2008
@@ -27,6 +27,7 @@
mov %o3, %o2
mov %o4, %o3
mov %o5, %o4
+ ld [%sp + 92], %o5
ta 0x10
bcc 1f
mov %o7, %g1
Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c Wed May 7 04:51:22 2008
@@ -54,5 +54,5 @@
va_end (ap);
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ CHECK_SEMCTL (&arg, semid, cmd)->array);
}
Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S Wed May 7 04:51:22 2008
@@ -27,6 +27,7 @@
mov %o3,%o2
mov %o4,%o3
mov %o5,%o4
+ ldx [%sp + STACK_BIAS + 176],%o5
ta 0x6d
Modified: trunk/libc/sysdeps/unix/sysv/linux/times.c
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/times.c (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/times.c Wed May 7 04:51:22 2008
@@ -27,7 +27,7 @@
INTERNAL_SYSCALL_DECL (err);
clock_t ret = INTERNAL_SYSCALL (times, err, 1, buf);
if (INTERNAL_SYSCALL_ERROR_P (ret, err)
- && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == -EFAULT, 0))
+ && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == EFAULT, 0))
{
/* This might be an error or not. For architectures which have
no separate return value and error indicators we cannot
@@ -49,6 +49,11 @@
return an EFAULT error. Return the value given by the kernel. */
}
+ /* Return value (clock_t) -1 signals an error, but if there wasn't any,
+ return the following value. */
+ if (ret == (clock_t) -1)
+ return (clock_t) 0;
+
return ret;
}
weak_alias (__times, times)
Modified: trunk/ports/ChangeLog.mips
==============================================================================
--- trunk/ports/ChangeLog.mips (original)
+++ trunk/ports/ChangeLog.mips Wed May 7 04:51:22 2008
@@ -1,3 +1,8 @@
+2008-05-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/bits/resource.h: Define
+ RUSAGE_THREAD and RUSAGE_LWP.
+
2008-04-21 Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/mips/bits/shm.h: Fix comment describing
Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/bits/resource.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/bits/resource.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/bits/resource.h Wed May 7 04:51:22 2008
@@ -166,8 +166,16 @@
#define RUSAGE_SELF RUSAGE_SELF
/* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1
+ RUSAGE_CHILDREN = -1,
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+#ifdef __USE_GNU
+ /* The calling thread. */
+ RUSAGE_THREAD = 1
+# define RUSAGE_THREAD RUSAGE_THREAD
+ /* Name for the same functionality on Solaris. */
+# define RUSAGE_LWP RUSAGE_THREAD
+#endif
};
#define __need_timeval