S390: Optimize utf8-utf16 module.
[glibc.git] / posix / posix-conf-vars.h
blob3df0b8dd291d23ce16d9064cde2a42636e3631bf
1 /* Macros to check if a POSIX configuration variable is defined or set.
3 Copyright (C) 1991-2016 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
20 #ifndef _POSIX_CONF_VARS_H
21 #define _POSIX_CONF_VARS_H
23 /* The script gen-posix-conf-vars.awk generates the header
24 posix-conf-vars-def.h from the list file posix-conf-vars.list and defines
25 CONF_DEF_* macros for each entry in the list file set to either of
26 CONF_DEF_UNDEFINED, CONF_DEF_DEFINED_SET or CONF_DEF_DEFINED_UNSET. To
27 check configuration variables within glibc code, use the configuration macro
28 functions instead of checking for definitions of the macros. */
30 #include <posix-conf-vars-def.h>
32 #define CONF_DEF_UNDEFINED 1
33 #define CONF_DEF_DEFINED_SET 2
34 #define CONF_DEF_DEFINED_UNSET 3
36 /* The configuration variable is not defined. */
37 #define CONF_IS_UNDEFINED(conf) (CONF_DEF##conf == CONF_DEF_UNDEFINED)
39 /* The configuration variable is defined. It may or may not be set. */
40 #define CONF_IS_DEFINED(conf) (CONF_DEF##conf != CONF_DEF_UNDEFINED)
42 /* The configuration variable is defined and set. */
43 #define CONF_IS_DEFINED_SET(conf) (CONF_DEF##conf == CONF_DEF_DEFINED_SET)
45 /* The configuration variable is defined but not set. */
46 #define CONF_IS_DEFINED_UNSET(conf) (CONF_DEF##conf == CONF_DEF_DEFINED_UNSET)
48 #endif