From bea9b19322c77265033a068ac60c95a37e798a80 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 30 Jul 2012 16:09:11 -0700 Subject: Fix lots of bitrot for stub configurations. --- sysdeps/generic/ldsodefs.h | 2 +- sysdeps/generic/sys/param.h | 75 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 68 insertions(+), 9 deletions(-) (limited to 'sysdeps/generic') 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 + . */ + +#ifndef _SYS_PARAM_H + +#define _SYS_PARAM_H 1 +#include + +#define __need_NULL +#include + +#include +#include +#include +#include #include -#define MAXSYMLINKS 1 -#define MAXPATHLEN 256 + +/* BSD names for some 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 */ -- cgit 1.4.1