diff options
author | Roland McGrath <roland@hack.frob.com> | 2012-07-30 16:09:11 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2012-07-30 16:34:33 -0700 |
commit | bea9b19322c77265033a068ac60c95a37e798a80 (patch) | |
tree | d3fad60d4780a5d86fe5dbedd994c3cd7625890b /sysdeps | |
parent | fc56c5bbc1a0d56b9b49171dd377c73c268ebcfd (diff) | |
download | glibc-bea9b19322c77265033a068ac60c95a37e798a80.tar.gz glibc-bea9b19322c77265033a068ac60c95a37e798a80.tar.xz glibc-bea9b19322c77265033a068ac60c95a37e798a80.zip |
Fix lots of bitrot for stub configurations.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 2 | ||||
-rw-r--r-- | sysdeps/generic/sys/param.h | 75 | ||||
-rw-r--r-- | sysdeps/ieee754/k_standard.c | 2 | ||||
-rw-r--r-- | sysdeps/posix/getcwd.c | 2 | ||||
-rw-r--r-- | sysdeps/posix/pwrite64.c | 3 | ||||
-rw-r--r-- | sysdeps/posix/spawni.c | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/x32/tmpfile.c | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/x32/tmpfile64.c | 1 | ||||
-rw-r--r-- | sysdeps/wordsize-64/tmpfile.c | 3 | ||||
-rw-r--r-- | sysdeps/wordsize-64/tmpfile64.c | 1 |
10 files changed, 75 insertions, 18 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 39c633904a..72048eab7f 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -272,7 +272,7 @@ struct rtld_global /* Search table for unique objects. */ struct unique_sym_table { - __rtld_lock_recursive_t lock; + __rtld_lock_define_recursive (, lock) struct unique_sym { uint32_t hashval; diff --git a/sysdeps/generic/sys/param.h b/sysdeps/generic/sys/param.h index 0e10a0ea94..f6e9f431d5 100644 --- a/sysdeps/generic/sys/param.h +++ b/sysdeps/generic/sys/param.h @@ -1,15 +1,74 @@ -/* This file should contain various parameter macros appropriate for the - machine and operating system. There is no standard set of macros; this - file is just for compatibility with programs written for Unix that - expect it to define things. On Unix systems that do not have their own - sysdep version of this file, it is generated at build time by examining - the installed headers on the system. */ +/* Compatibility header for old-style Unix parameters and limits. Stub version. + Copyright (C) 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 + 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, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _SYS_PARAM_H + +#define _SYS_PARAM_H 1 +#include <features.h> + +#define __need_NULL +#include <stddef.h> + +#include <sys/types.h> +#include <errno.h> +#include <signal.h> +#include <endian.h> #include <limits.h> -#define MAXSYMLINKS 1 -#define MAXPATHLEN 256 + +/* BSD names for some <limits.h> values. We do not define the BSD names + for the values which are not statically limited, such as NOFILE. */ + +#define NBBY CHAR_BIT +#define NGROUPS NGROUPS_MAX +#define MAXSYMLINKS SYMLOOP_MAX +#define CANBSIZ MAX_CANON /* XXX ? */ + +/* ARG_MAX is unlimited, but we define NCARGS for BSD programs that want to + compare against some fixed limit. */ +#define NCARGS INT_MAX + + +/* Magical constants. */ +#define NOGROUP 65535 /* Marker for empty group set member. */ +#define NODEV ((dev_t) -1) /* Non-existent device. */ + + +/* Bit map related macros. */ +#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) +#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) +#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) +#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) + +/* Macros for counting and rounding. */ +#ifndef howmany +# define howmany(x, y) (((x)+((y)-1))/(y)) +#endif +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) +#define powerof2(x) ((((x)-1)&(x))==0) /* Macros for min/max. */ #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) + + +/* Unit of `st_blocks'. */ +#define DEV_BSIZE 512 + + +#endif /* sys/param.h */ diff --git a/sysdeps/ieee754/k_standard.c b/sysdeps/ieee754/k_standard.c index 4e65bb16ce..cd3123046b 100644 --- a/sysdeps/ieee754/k_standard.c +++ b/sysdeps/ieee754/k_standard.c @@ -1003,6 +1003,7 @@ __kernel_standard_f(float x, float y, int type) return __kernel_standard(x, y, type); } +#ifndef __NO_LONG_DOUBLE_MATH long double __kernel_standard_l (long double x, long double y, int type) { @@ -1082,3 +1083,4 @@ __kernel_standard_l (long double x, long double y, int type) return __kernel_standard (dx, dy, type); } } +#endif diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c index 1dc45e8ee2..911cbfab5d 100644 --- a/sysdeps/posix/getcwd.c +++ b/sysdeps/posix/getcwd.c @@ -401,8 +401,10 @@ __getcwd (buf, size) goto lose; } +#ifdef _DIRENT_HAVE_D_TYPE if (d->d_type != DT_DIR && d->d_type != DT_UNKNOWN) continue; +#endif if (d->d_name[0] == '.' && (d->d_name[1] == '\0' || (d->d_name[1] == '.' && d->d_name[2] == '\0'))) diff --git a/sysdeps/posix/pwrite64.c b/sysdeps/posix/pwrite64.c index d9ec10f38d..61c193bea3 100644 --- a/sysdeps/posix/pwrite64.c +++ b/sysdeps/posix/pwrite64.c @@ -1,6 +1,6 @@ /* Write block to given position in file without changing file pointer. POSIX version. - Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1997-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -56,7 +56,6 @@ __libc_pwrite64 (int fd, const void *buf, size_t nbyte, off64_t offset) return result; } #ifndef __libc_pwrite64 -libc_hidden_def (__libc_pwrite64) weak_alias (__libc_pwrite64, __pwrite64) libc_hidden_weak (__pwrite64) weak_alias (__libc_pwrite64, pwrite64) diff --git a/sysdeps/posix/spawni.c b/sysdeps/posix/spawni.c index abbf956226..2d3ae941dd 100644 --- a/sysdeps/posix/spawni.c +++ b/sysdeps/posix/spawni.c @@ -1,5 +1,5 @@ /* Guts of POSIX spawn interface. Generic POSIX.1 version. - Copyright (C) 2000-2005, 2006, 2011, 2012 Free Software Foundation, Inc. + Copyright (C) 2000-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 @@ -20,6 +20,7 @@ #include <fcntl.h> #include <paths.h> #include <spawn.h> +#include <stdbool.h> #include <stdlib.h> #include <string.h> #include <unistd.h> diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile.c b/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile.c deleted file mode 100644 index f24f361bb6..0000000000 --- a/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/wordsize-64/tmpfile.c> diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile64.c b/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile64.c deleted file mode 100644 index 55feef2a64..0000000000 --- a/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile64.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/wordsize-64/tmpfile64.c> diff --git a/sysdeps/wordsize-64/tmpfile.c b/sysdeps/wordsize-64/tmpfile.c deleted file mode 100644 index 449a222d98..0000000000 --- a/sysdeps/wordsize-64/tmpfile.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "../../stdio-common/tmpfile.c" - -weak_alias (__new_tmpfile, tmpfile64) diff --git a/sysdeps/wordsize-64/tmpfile64.c b/sysdeps/wordsize-64/tmpfile64.c deleted file mode 100644 index 5c124c249b..0000000000 --- a/sysdeps/wordsize-64/tmpfile64.c +++ /dev/null @@ -1 +0,0 @@ -/* Defined in tmpfile.c. */ |