[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gmp now working, but number.c:147 isinf declared implicitly.

From: Hugh Sasse
Subject: Re: Gmp now working, but number.c:147 isinf declared implicitly.
Date: Thu, 18 Jan 2007 09:57:39 +0000 (WET)

On Thu, 18 Jan 2007, Kevin Ryde wrote:

> Hugh Sasse <address@hidden> 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[])



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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]