#define DECL(VAL) { #VAL, sizeof(#VAL)-1, (VAL) }
static struct Mapping_uint32 const VALUES[] = {
+#if HAVE_DECL_MMAP_PAGE_ZERO
DECL(MMAP_PAGE_ZERO),
+#endif
+
+#if HAVE_DECL_ADDR_LIMIT_32BIT
DECL(ADDR_LIMIT_32BIT),
+#endif
+
+#if HAVE_DECL_SHORT_INODE
DECL(SHORT_INODE),
+#endif
+
+#if HAVE_DECL_WHOLE_SECONDS
DECL(WHOLE_SECONDS),
+#endif
+
+#if HAVE_DECL_STICKY_TIMEOUTS
DECL(STICKY_TIMEOUTS),
- DECL(ADDR_LIMIT_3GB)
+#endif
+
+#if HAVE_DECL_ADDR_LIMIT_3GB
+ DECL(ADDR_LIMIT_3GB),
+#endif
};
uint_least32_t
#define DECL(VAL) { #VAL, sizeof(#VAL)-1, (PER_ ## VAL) }
static struct Mapping_uint32 const VALUES[] = {
+#if HAVE_DECL_PER_LINUX
DECL(LINUX),
+#endif
+
+#if HAVE_DECL_PER_LINUX_32BIT
DECL(LINUX_32BIT),
+#endif
+
+#if HAVE_DECL_PER_SVR4
DECL(SVR4),
+#endif
+
+#if HAVE_DECL_PER_SVR3
DECL(SVR3),
+#endif
+
+#if HAVE_DECL_PER_SCOSVR3
DECL(SCOSVR3),
+#endif
+
+#if HAVE_DECL_PER_OSR5
DECL(OSR5),
+#endif
+
+#if HAVE_DECL_PER_WYSEV386
DECL(WYSEV386),
+#endif
+
+#if HAVE_DECL_PER_ISCR4
DECL(ISCR4),
+#endif
+
+#if HAVE_DECL_PER_BSD
DECL(BSD),
+#endif
+
+#if HAVE_DECL_PER_SUNOS
DECL(SUNOS),
+#endif
+
+#if HAVE_DECL_PER_XENIX
DECL(XENIX),
+#endif
+
+#if HAVE_DECL_PER_LINUX32
DECL(LINUX32),
+#endif
+
+#if HAVE_DECL_PER_LINUX32_3GB
DECL(LINUX32_3GB),
+#endif
+
+#if HAVE_DECL_PER_IRIX32
DECL(IRIX32),
+#endif
+
+#if HAVE_DECL_PER_IRIXN32
DECL(IRIXN32),
+#endif
+
+#if HAVE_DECL_PER_IRIX64
DECL(IRIX64),
+#endif
+
+#if HAVE_DECL_PER_RISCOS
DECL(RISCOS),
+#endif
+
+#if HAVE_DECL_PER_SOLARIS
DECL(SOLARIS),
+#endif
+
+#if HAVE_DECL_PER_UW7
DECL(UW7),
+#endif
+
+#if HAVE_DECL_PER_HPUX
DECL(HPUX),
- DECL(OSF4)
+#endif
+
+#if HAVE_DECL_PER_OSF4
+ DECL(OSF4),
+#endif
+
};
static char const *
--- /dev/null
+dnl $Id$
+
+dnl Copyright (C) 2002 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; version 2 of the License.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+dnl Usage: ENSC_CHECK_PERSONALITY_FLAGS
+AC_DEFUN([ENSC_CHECK_PERSONALITY_FLAGS],
+[
+ AC_MSG_CHECKING([for declarations in <linux/personality.h>])
+ AC_MSG_RESULT([])
+
+ AC_LANG_PUSH(C)
+ AC_CHECK_DECLS([MMAP_PAGE_ZERO, ADDR_LIMIT_32BIT, SHORT_INODE,
+ WHOLE_SECONDS, STICKY_TIMEOUTS, ADDR_LIMIT_3GB],
+ [],[],
+ [
+#include <linux/personality.h>
+ ])
+
+ AC_CHECK_DECLS([PER_LINUX, PER_LINUX_32BIT, PER_SVR4, PER_SVR3,
+ PER_SCOSVR3, PER_OSR5, PER_WYSEV386, PER_ISCR4,
+ PER_BSD, PER_SUNOS, PER_XENIX, PER_LINUX32,
+ PER_LINUX32_3GB, PER_IRIX32, PER_IRIXN32,
+ PER_IRIX64, PER_RISCOS, PER_SOLARIS, PER_UW7,
+ PER_HPUX, PER_OSF4],
+ [], [],
+ [
+#include <linux/personality.h>
+ ])
+ AC_LANG_POP
+])
+