Remove Wundef warnings for specification macros
commit4a6aca7bf8a70f1dc66a07c04aba2d7fd837602d
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Mon, 29 Dec 2014 12:07:54 +0000 (29 17:37 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Mon, 29 Dec 2014 12:07:54 +0000 (29 17:37 +0530)
tree6f85eb5f9cba191e17cfb74c83d12c19b44a6a7a
parent0025b4cc84a0c1099b11a662acabce2709121be5
Remove Wundef warnings for specification macros

This patch adds a file posix-conf-vars.list that is used to generate
macros to determine if a macro is defined as set, unset or not
defined.  gen-posix-conf-vars.awk processes this file and generates a
header (posix-conf-vars-def.h) with these macros.  A new header
posix-conf-vars.h includes this generated header and defines accessor
macros for the generated macros.

Tested on x86_64.

* posix/Makefile (before-compile): Add posix-conf-vars-def.h.
($(objpfx)posix-conf-vars-def.h): New target.
* posix/posix-conf-vars.list: New file.
* posix/posix-conf-vars.h: New file.
* posix/confstr.c: Include posix-conf-vars.h.
(confstr): Use CONF_IS_* macros.
* posix/posix-envs.def: Include posix-conf-vars.h.  Use
CONF_IS_* macros.
* scripts/gen-posix-conf-vars.awk: New file.
ChangeLog
posix/Makefile
posix/confstr.c
posix/posix-conf-vars.h [new file with mode: 0644]
posix/posix-conf-vars.list [new file with mode: 0644]
posix/posix-envs.def
scripts/gen-posix-conf-vars.awk [new file with mode: 0644]