about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-07-30 16:09:11 -0700
committerRoland McGrath <roland@hack.frob.com>2012-07-30 16:34:33 -0700
commitbea9b19322c77265033a068ac60c95a37e798a80 (patch)
treed3fad60d4780a5d86fe5dbedd994c3cd7625890b /sysdeps/generic
parentfc56c5bbc1a0d56b9b49171dd377c73c268ebcfd (diff)
downloadglibc-bea9b19322c77265033a068ac60c95a37e798a80.tar.gz
glibc-bea9b19322c77265033a068ac60c95a37e798a80.tar.xz
glibc-bea9b19322c77265033a068ac60c95a37e798a80.zip
Fix lots of bitrot for stub configurations.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/ldsodefs.h2
-rw-r--r--sysdeps/generic/sys/param.h75
2 files changed, 68 insertions, 9 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 */