diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_nearbyint.c | 9 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_rint.c | 11 | ||||
-rw-r--r-- | sysdeps/mach/hurd/if_index.c | 3 | ||||
-rw-r--r-- | sysdeps/posix/sprofil.c | 3 | ||||
-rw-r--r-- | sysdeps/s390/fpu/fegetenv.c | 10 | ||||
-rw-r--r-- | sysdeps/s390/fpu/fesetenv.c | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/adjtime.c | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/sched.h | 7 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/dl-sysdep.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/sys/user.h | 4 |
10 files changed, 36 insertions, 31 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_nearbyint.c b/sysdeps/ieee754/dbl-64/s_nearbyint.c index 32f5bf9447..71e14cfb6d 100644 --- a/sysdeps/ieee754/dbl-64/s_nearbyint.c +++ b/sysdeps/ieee754/dbl-64/s_nearbyint.c @@ -71,8 +71,15 @@ TWO52[2]={ if(((i0&i)|i1)==0) return x; /* x is integral */ i>>=1; if(((i0&i)|i1)!=0) { - if(j0==19) i1 = 0x40000000; else + if (j0==19) + i1 = 0x40000000; + else if (j0<18) i0 = (i0&(~i))|((0x20000)>>j0); + else + { + i0 &= ~i; + i1 = 0x80000000; + } } } } else if (j0>51) { diff --git a/sysdeps/ieee754/dbl-64/s_rint.c b/sysdeps/ieee754/dbl-64/s_rint.c index e5f241291c..4e6381efbe 100644 --- a/sysdeps/ieee754/dbl-64/s_rint.c +++ b/sysdeps/ieee754/dbl-64/s_rint.c @@ -67,8 +67,15 @@ TWO52[2]={ if(((i0&i)|i1)==0) return x; /* x is integral */ i>>=1; if(((i0&i)|i1)!=0) { - if(j0==19) i1 = 0x40000000; else - i0 = (i0&(~i))|((0x20000)>>j0); + if (j0==19) + i1 = 0x40000000; + else if (j0<18) + i0 = (i0&(~i))|((0x20000)>>j0); + else + { + i0 &= ~i; + i1 = 0x80000000; + } } } } else if (j0>51) { diff --git a/sysdeps/mach/hurd/if_index.c b/sysdeps/mach/hurd/if_index.c index 664a3a1ef3..4ecda2298c 100644 --- a/sysdeps/mach/hurd/if_index.c +++ b/sysdeps/mach/hurd/if_index.c @@ -59,8 +59,7 @@ if_freenameindex (struct if_nameindex *ifn) struct if_nameindex *ptr = ifn; while (ptr->if_name || ptr->if_index) { - if (ptr->if_name) - free (ptr->if_name); + free (ptr->if_name); ++ptr; } free (ifn); diff --git a/sysdeps/posix/sprofil.c b/sysdeps/posix/sprofil.c index 853038d078..6ffce4d783 100644 --- a/sysdeps/posix/sprofil.c +++ b/sysdeps/posix/sprofil.c @@ -322,8 +322,7 @@ __sprofil (struct prof *profp, int profcnt, struct timeval *tvp, for (i = 0; i < profcnt; ++i) if (add_region (p[i], (flags & PROF_UINT) != 0) < 0) { - if (prof_info.region) - free (prof_info.region); + free (prof_info.region); prof_info.num_regions = 0; prof_info.region = NULL; return -1; diff --git a/sysdeps/s390/fpu/fegetenv.c b/sysdeps/s390/fpu/fegetenv.c index b35a76a4e8..a244f2ca8b 100644 --- a/sysdeps/s390/fpu/fegetenv.c +++ b/sysdeps/s390/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 2000, 2003 Free Software Foundation, Inc. + Copyright (C) 2000, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). @@ -28,15 +28,7 @@ int fegetenv (fenv_t *envp) { - /* The S/390 IEEE fpu doesn't keep track of the ieee instruction pointer. - To get around that the kernel will store the address of the last - fpu fault to the process structure. This ptrace call reads this value - from the kernel space. That means the ieee_instruction_pointer is - only correct after a fpu fault. That's the best we can do, there is - no way to find out the ieee instruction pointer if there was no fault. */ _FPU_GETCW (envp->fpc); - envp->ieee_instruction_pointer = - (void *) ptrace (PTRACE_PEEKUSER, getpid (), PT_IEEE_IP); /* Success. */ return 0; diff --git a/sysdeps/s390/fpu/fesetenv.c b/sysdeps/s390/fpu/fesetenv.c index bb71c95a1e..82555c4948 100644 --- a/sysdeps/s390/fpu/fesetenv.c +++ b/sysdeps/s390/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). @@ -43,13 +43,7 @@ fesetenv (const fenv_t *envp) else env = (*envp); - /* The S/390 IEEE fpu doesn't have a register for the ieee - instruction pointer. The operating system is required to keep an - instruction pointer on a per process base. We read and write this - value with the ptrace interface. */ _FPU_SETCW (env.fpc); - ptrace (PTRACE_POKEUSER, getpid (), PT_IEEE_IP, - env.ieee_instruction_pointer); /* Success. */ return 0; diff --git a/sysdeps/unix/sysv/linux/adjtime.c b/sysdeps/unix/sysv/linux/adjtime.c index 202bb14485..ebd2149705 100644 --- a/sysdeps/unix/sysv/linux/adjtime.c +++ b/sysdeps/unix/sysv/linux/adjtime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 2002, 2004, 2007 +/* Copyright (C) 1995, 1996, 1997, 1998, 2002, 2004, 2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -71,14 +71,16 @@ ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv) return -1; } tntx.offset = tmp.tv_usec + tmp.tv_sec * 1000000L; + tntx.modes = ADJ_OFFSET_SINGLESHOT; + } + else + { #ifdef ADJ_OFFSET_SS_READ tntx.modes = ADJ_OFFSET_SS_READ; #else - tntx.modes = ADJ_OFFSET_SINGLESHOT; + tntx.modes = 0; #endif } - else - tntx.modes = 0; #if defined ADJ_OFFSET_SS_READ && !defined __ASSUME_ADJ_OFFSET_SS_READ again: diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h index 5387b9cef0..38ba305006 100644 --- a/sysdeps/unix/sysv/linux/bits/sched.h +++ b/sysdeps/unix/sysv/linux/bits/sched.h @@ -59,7 +59,12 @@ force CLONE_PTRACE on this clone. */ # define CLONE_CHILD_SETTID 0x01000000 /* Store TID in userlevel buffer in the child. */ -# define CLONE_STOPPED 0x02000000 /* Start in stopped state. */ +# define CLONE_NEWUTS 0x04000000 /* New utsname group. */ +# define CLONE_NEWIPC 0x08000000 /* New ipcs. */ +# define CLONE_NEWUSER 0x10000000 /* New user namespace. */ +# define CLONE_NEWPID 0x20000000 /* New pid namespace. */ +# define CLONE_NEWNET 0x40000000 /* New network namespace. */ +# define CLONE_IO 0x80000000 /* Clone I/O context. */ #endif /* The official definition. */ diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.h b/sysdeps/unix/sysv/linux/dl-sysdep.h index 0371fe87a1..f44fa9814e 100644 --- a/sysdeps/unix/sysv/linux/dl-sysdep.h +++ b/sysdeps/unix/sysv/linux/dl-sysdep.h @@ -29,7 +29,7 @@ /* The _dl_discover_osversion function is so far only needed in sysconf to check for kernels later than 2.6.23. */ -#if !defined ASSEMBLER && __LINUX_KERNEL_VERSION < 0x020617 +#if !defined __ASSEMBLER__ && __LINUX_KERNEL_VERSION < 0x020617 /* Get version of the OS. */ extern int _dl_discover_osversion (void) attribute_hidden; # define HAVE_DL_DISCOVER_OSVERSION 1 diff --git a/sysdeps/unix/sysv/linux/s390/sys/user.h b/sysdeps/unix/sysv/linux/s390/sys/user.h index f00caea84d..cd3e60cf0d 100644 --- a/sysdeps/unix/sysv/linux/s390/sys/user.h +++ b/sysdeps/unix/sysv/linux/s390/sys/user.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000,2005 Free Software Foundation, Inc. +/* Copyright (C) 2000,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 @@ -56,7 +56,7 @@ struct _user_regs_struct unsigned long orig_gpr2; /* Original gpr2. */ struct _user_fpregs_struct fp_regs; /* Floating point registers. */ struct _user_per_struct per_info; /* Hardware tracing registers. */ - unsigned long ieee_instruction_pointer; + unsigned long ieee_instruction_pointer; /* Always 0. */ }; struct user { |