cmogstored dev/user discussion/issues/patches/etc
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: cmogstored-public@bogomips.org
Subject: [PATCH] rely on gnulib for environ portability
Date: Mon, 18 Jul 2016 07:37:01 +0000	[thread overview]
Message-ID: <20160718073701.11572-1-e@80x24.org> (raw)

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


                 reply	other threads:[~2016-07-18  7:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/cmogstored/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160718073701.11572-1-e@80x24.org \
    --to=e@80x24.org \
    --cc=cmogstored-public@bogomips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).