git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: "H.Merijn Brand" <h.m.brand@xs4all.nl>,
	"Junio C Hamano" <gitster@pobox.com>,
	Jakub Narebski <jnareb@gmail.com>
Subject: [PATCH] autoconf: Add checking for unsetenv function
Date: Fri, 18 Jan 2008 02:03:51 +0100	[thread overview]
Message-ID: <1200618231-28675-1-git-send-email-jnareb@gmail.com> (raw)
In-Reply-To: <20080117141143.38a88c7a@pc09.procura.nl>

Update configure.ac (and config.mak.in) by adding test for unsetenv
(NO_UNSETENV).  Add comment about NO_UNSETENV to Makefile header, as
original commit 731043fd adding compat/unsetenv.c didn't do that.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
> * Failure of the configure/make to handle the lack of unsetenv() in
>   pre-11.31 HP-UX releases. Bizarrely, it does handle the lack of setenv()
>   and also has a compat/unsetenv.c for use by non-unsetenv()-capable OS'es,
>   but then configure and config.mak.in completely fail to use a NO_UNSETENV
>   variable like they should!

I'm sorry for that. When I was checking which tests were missing from
configure.ac I have examined only Makefile header... and there was no
note about NO_UNSETENV there.

But the above comment I think also means that the uname base "guessage"
system in Makefile didn't catch that. You probably would want to modify
Makefile in that direction too; currently "guessage system" sets
NO_UNSETENV for and SunOS 5.8, SunOS 5.9, and you probably would want
to use it also for (older?) HP-UX.

 Makefile      |    2 ++
 config.mak.in |    1 +
 configure.ac  |    6 ++++++
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 82e9cd6..f35e269 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,8 @@ all::
 #
 # Define NO_SETENV if you don't have setenv in the C library.
 #
+# Define NO_UNSETENV if you don't have unsetenv in the C library.
+#
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 #
 # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
diff --git a/config.mak.in b/config.mak.in
index 15fb26c..40b14d9 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -40,6 +40,7 @@ NO_MEMMEM=@NO_MEMMEM@
 NO_STRLCPY=@NO_STRLCPY@
 NO_STRTOUMAX=@NO_STRTOUMAX@
 NO_SETENV=@NO_SETENV@
+NO_UNSETENV=@NO_UNSETENV@
 NO_MKDTEMP=@NO_MKDTEMP@
 NO_ICONV=@NO_ICONV@
 OLD_ICONV=@OLD_ICONV@
diff --git a/configure.ac b/configure.ac
index 6f641e3..af177fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -356,6 +356,12 @@ AC_CHECK_FUNC(setenv,
 [NO_SETENV=YesPlease])
 AC_SUBST(NO_SETENV)
 #
+# Define NO_UNSETENV if you don't have unsetenv in the C library.
+AC_CHECK_FUNC(unsetenv,
+[NO_UNSETENV=],
+[NO_UNSETENV=YesPlease])
+AC_SUBST(NO_UNSETENV)
+#
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 AC_CHECK_FUNC(mkdtemp,
 [NO_MKDTEMP=],
-- 
1.5.3.7

      parent reply	other threads:[~2008-01-18  0:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-17 13:11 FYI: Reply from HP-UX H.Merijn Brand
2008-01-17 16:58 ` Johannes Schindelin
2008-01-17 17:55   ` H.Merijn Brand
2008-01-17 18:14     ` Johannes Schindelin
2008-01-17 18:21       ` H.Merijn Brand
2008-01-17 18:24         ` Johannes Schindelin
2008-01-17 18:29           ` H.Merijn Brand
2008-01-17 21:17 ` Daniel Barkalow
2008-01-18  1:03 ` Jakub Narebski [this message]

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

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

  git send-email \
    --in-reply-to=1200618231-28675-1-git-send-email-jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=h.m.brand@xs4all.nl \
    /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.
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 NNTP newsgroup(s).