zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: leading '=' in enviroment variable truncated
Date: Sun, 8 May 2016 15:16:46 -0700	[thread overview]
Message-ID: <CAH+w=7Ywz41S3-z=Q62_pwSApkFKNgdt7S6_baed0Aio54hdvA@mail.gmail.com> (raw)
In-Reply-To: <160508145807.ZM10454@torch.brasslantern.com>

On Sun, May 8, 2016 at 2:58 PM, Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> If we're going to go so far as to have a configure test, shouldn't we
> include a check that setenv is in fact defined before attempting to
> run a test that uses it?

Never mind.  You included the test but spelled "setenv" wrong, and I
missed that you'd tested anything at all.

However, even if I change the "setsnv" to "setenv" the test still gets
the wrong results.

conftest.c:259:4: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
   main()
   ^~~~
conftest.c:261:7: warning: implicit declaration of function 'setenv'
is invalid in C99 [-Wimplicit-function-declaration]
      setenv("NAME", "=VALUE", 1);
      ^
conftest.c:262:29: warning: implicit declaration of function 'getenv'
is invalid in C99 [-Wimplicit-function-declaration]
      return strcmp((char *)getenv("NAME"), "=VALUE");
                            ^
conftest.c:262:21: warning: cast to 'char *' from smaller integer type
'int' [-Wint-to-pointer-cast]
      return strcmp((char *)getenv("NAME"), "=VALUE");
                    ^
4 warnings generated.
configure:12601: $? = 0
configure:12601: ./conftest
./configure: line 1719: 90473 Segmentation fault: 11  (core dumped)
./conftest$ac_exeext


  reply	other threads:[~2016-05-08 22:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-07 16:21 Jacob Lowe
2016-05-07 16:43 ` Jacob Lowe
2016-05-08 17:59 ` Bart Schaefer
2016-05-08 19:12   ` Peter Stephenson
2016-05-08 20:24     ` Bart Schaefer
2016-05-08 20:28       ` Peter Stephenson
2016-05-08 21:58         ` Bart Schaefer
2016-05-08 22:16           ` Bart Schaefer [this message]
2016-05-09  9:11             ` Peter Stephenson
2016-05-09 14:52               ` Bart Schaefer
2016-05-09  2:14 ` Bart Schaefer
2016-05-09  2:19   ` Jacob Lowe

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='CAH+w=7Ywz41S3-z=Q62_pwSApkFKNgdt7S6_baed0Aio54hdvA@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.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://git.vuxu.org/mirror/zsh/

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).