cmogstored dev/user discussion/issues/patches/etc
 help / color / mirror / code / Atom feed
* [PATCH] rely on gnulib for environ portability
@ 2016-07-18  7:37 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-07-18  7:37 UTC (permalink / raw)
  To: cmogstored-public

This avoids warnings on my GNU system while still working on
FreeBSD.
---
 configure.ac       | 2 ++
 iostat_process.c   | 1 -
 m4/gnulib-cache.m4 | 3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1a94fa4..22f6d9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,8 @@ gl_WARN_ADD([-Werror=pointer-arith])
 gl_WARN_ADD([-Werror-implicit-function-declaration])
 gl_WARN_ADD([-Werror=declaration-after-statement]) dnl I hate C99 for this :P
 gl_WARN_ADD([-ggdb3],[CFLAGS])
+gl_ENVIRON
+gl_UNISTD_MODULE_INDICATOR([environ])
 AX_PTHREAD(true)
 CM_GCC_ATOMICS(true)
 AC_SYS_LARGEFILE
diff --git a/iostat_process.c b/iostat_process.c
index 65acd22..9f98077 100644
--- a/iostat_process.c
+++ b/iostat_process.c
@@ -8,7 +8,6 @@
  * regardless of the number of mog_svc objects we have.
  */
 #include "cmogstored.h"
-extern char **environ;
 
 static pid_t iostat_pid;
 static time_t iostat_last_fail;
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index f50dae3..9cdd8fb 100644
--- a/m4/gnulib-cache.m4
+++ b/m4/gnulib-cache.m4
@@ -27,7 +27,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --avoid=accept --avoid=accept4 --avoid=alloca --avoid=fstatat --avoid=getcwd --avoid=ioctl --avoid=openat --avoid=read --avoid=sleep --avoid=write --no-conditional-dependencies --no-libtool --macro-prefix=gl argp base64 canonicalize crypto/gc-md5 crypto/gc-sha1 dprintf error findprog gettime git-version-gen hash mempcpy minmax mountlist nonblocking nproc pipe2 progname random_r verify warnings xvasprintf
+#   gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --avoid=accept --avoid=accept4 --avoid=alloca --avoid=fstatat --avoid=getcwd --avoid=ioctl --avoid=openat --avoid=read --avoid=sleep --avoid=write --no-conditional-dependencies --no-libtool --macro-prefix=gl argp base64 canonicalize crypto/gc-md5 crypto/gc-sha1 dprintf environ error findprog gettime git-version-gen hash mempcpy minmax mountlist nonblocking nproc pipe2 progname random_r verify warnings xvasprintf
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
@@ -38,6 +38,7 @@ gl_MODULES([
   crypto/gc-md5
   crypto/gc-sha1
   dprintf
+  environ
   error
   findprog
   gettime
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-18  7:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18  7:37 [PATCH] rely on gnulib for environ portability Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/cmogstored.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).