unistd: warn on use of environ without module
authorEric Blake <ebb9@byu.net>
Thu, 31 Dec 2009 20:28:59 +0000 (13:28 -0700)
committerEric Blake <ebb9@byu.net>
Mon, 11 Jan 2010 13:51:55 +0000 (06:51 -0700)
commit718991da5f5026e1a8ce2efcca58359d9b67b2f5
tree2f139f6538b05f21913260dd1a8d64776343ddff
parent524d6a2ef5cb6f367d4f14d5ab5a35df4c7fe08f
unistd: warn on use of environ without module

_GL_WARN_ON_USE only works for functions; so we wrap access to
environ through a function when CFLAGS has -DGNULIB_POSIXCHECK=1.

* modules/unistd (Depends-on): Add warn-on-use.
(Makefile.am): Provide new substitutions.
* m4/unistd_h.m4 (gl_UNISTD_H): Check for inline and environ.
* lib/unistd.in.h (environ): Wrap with a warning helper function.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/unistd.in.h
m4/unistd_h.m4
modules/unistd