From: Hugh Sasse <hgs@dmu.ac.uk>
Cc: guile-user@gnu.org
Subject: Re: Gmp now working, but number.c:147 isinf declared implicitly.
Date: Thu, 18 Jan 2007 09:57:39 +0000 (WET) [thread overview]
Message-ID: <Pine.GSO.4.64.0701180929190.29988@brains.eng.cse.dmu.ac.uk> (raw)
In-Reply-To: <87irf5xizi.fsf@zip.com.au>
On Thu, 18 Jan 2007, Kevin Ryde wrote:
> Hugh Sasse <hgs@dmu.ac.uk> writes:
> >
> > putenv putenv (3c) - change or add value to environment
> >
> > The manual page says it should be of the form "name=value" and the
> > string should not be automatic. In a function it should be declared
> > static.
>
> Yep. I believe there's a bit of variation in whether it's copied or
> not. The fleebsd extreme is to copy and then in fact never free.
^^^^^^ ! :-) ^^^^^ Ouch!
>
> For an unsetenv traditionally I think it was putenv("FOO"). We should
bash-2.05$ gcc -o putenvtest putenvtest.c
bash-2.05$ ./putenvtest
PUTENVTEST is something_or_other
PUTENVTEST is something_or_other
bash-2.05$ cat putenvtest.c
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]);
void display_putenvtest_var();
void display_putenvtest_var()
{
char *value;
if ((value = getenv("PUTENVTEST")) != NULL)
{
printf("PUTENVTEST is %s\n",value);
} else {
printf("no such environment variable as PUTENVTEST\n");
}
}
int main(int argc, char *argv[])
{
putenv("PUTENVTEST=something_or_other");
display_putenvtest_var();
putenv("PUTENVTEST");
display_putenvtest_var();
return(0);
}
bash-2.05$
> try to arrange to do that, somehow. There's an autoconf portability
> note that such a putenv seg faults on AIX, but presumably there's an
I don't have access to AIX.
> unsetenv on that system.
I can't find anything about removing an environment variable in C.
>
> An alternative would be the gnulib portable implementations of all
> these bits, which do some explict manipulation of the "environ" global
> variable.
This would introduce another dependency, I think....
>
Hugh
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2007-01-18 9:57 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-05 14:52 Gmp now working, but number.c:147 isinf declared implicitly Hugh Sasse
2007-01-12 17:37 ` Hugh Sasse
2007-01-12 22:59 ` Kevin Ryde
2007-01-15 9:46 ` Hugh Sasse
2007-01-15 11:58 ` Hugh Sasse
2007-01-15 20:31 ` Kevin Ryde
2007-01-16 10:21 ` Hugh Sasse
2007-01-16 14:58 ` Hugh Sasse
2007-01-19 0:37 ` Kevin Ryde
2007-01-19 10:02 ` Hugh Sasse
2007-01-21 23:27 ` Kevin Ryde
2007-01-22 11:53 ` Hugh Sasse
2007-01-22 21:11 ` Kevin Ryde
2007-01-23 10:27 ` Hugh Sasse
2007-01-19 15:43 ` Hugh Sasse
2007-01-21 21:08 ` Kevin Ryde
2007-01-21 23:22 ` Kevin Ryde
2007-01-22 12:08 ` Hugh Sasse
2007-01-22 21:05 ` Kevin Ryde
2007-01-23 11:01 ` Hugh Sasse
2007-01-24 21:23 ` Kevin Ryde
2007-01-25 10:27 ` Hugh Sasse
2007-01-26 22:24 ` Kevin Ryde
2007-01-18 0:43 ` Kevin Ryde
2007-01-18 9:57 ` Hugh Sasse [this message]
2007-01-18 12:21 ` Hugh Sasse
2007-01-18 10:43 ` Ludovic Courtès
2007-01-15 20:27 ` Kevin Ryde
2007-01-16 10:11 ` Hugh Sasse
2007-01-18 0:38 ` Kevin Ryde
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://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.GSO.4.64.0701180929190.29988@brains.eng.cse.dmu.ac.uk \
--to=hgs@dmu.ac.uk \
--cc=guile-user@gnu.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.
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).