[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] Solaris
From: |
Gergely Nagy |
Subject: |
Re: [RP] Solaris |
Date: |
Thu Jan 3 12:02:19 2002 |
User-agent: |
Wanderlust/2.9.2 (Unchained Melody) Emacs/21.1 Mule/5.0 (SAKAKI) |
> But current cvs doesn't link:
> > gcc -Wall -O2 -I/usr/openwin/include -L/usr/openwin/lib
> > -R/usr/openwin/lib -lsocket -lnsl -o ratpoison actions.o bar.o
> > communications.o events.o getopt.o getopt1.o input.o list.o main.o manage.o
> > number.o sbuf.o split.o -lresolv -lX11
> actions.o: In function `cmd_setenv':
> actions.o(.text+0x30d4): undefined reference to `setenv'
> actions.o: In function `cmd_unsetenv':
> actions.o(.text+0x3244): undefined reference to `unsetenv'
> collect2: ld returned 1 exit status
So, it appears that Solaris doesn't have the setenv and unsetenv
functions in its libc.. does it have putenv and clearenv?
Try compiling this program:
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
int main(void)
{
putenv("FOO=bar");
printf("FOO: %s\n", getenv("FOO"));
return 0;
}
If it does work, we can add a wrapper for setenv, emulating it using
putenv. And the same goes for unsetenv/clearenv pair.
pgpeFNwoNFGzp.pgp
Description: PGP signature
- [RP] Solaris, Sven Hartrumpf, 2002/01/03
- Re: [RP] Solaris,
Gergely Nagy <=