En réponse à "Paquet, Gilles" <[EMAIL PROTECTED]>:
> Visiblement il cherche encore une librairie qui contient setenv :
(trans.: it's seeking for yet another library containing setenv)

I forgot that...
setenv is not part of POSIX api, it's a BSD extension, and it's not availlable
in Solaris. The simplest way to get rid of that is to redefine setenv using
putenv (which is defined by the POSIX standard) like the following:
----8<--------------
diff -Nur ../ftpproxy-1.1.5/src/setenv.c ./src/setenv.c
--- ../ftpproxy-1.1.5/src/setenv.c      Thu Jan  1 01:00:00 1970
+++ ./src/setenv.c      Fri Jul 19 16:43:11 2002
@@ -0,0 +1,10 @@
+#define MAXSETENV 4096
+int setenv(const char *name, const char *value)
+{
+       char    buf[MAXSETENV];
+
+       snprintf(buf, MAXSETENV-1, "%s=%s", name, value);
+       buf[sizeof(buf)-1] = 0;
+       return putenv(buf);
+}
+
----8<--------------

In fact, I encountered yet another problem on Solaris: the syslog facility
"LOG_FTP" wasn't defined on my computer, and i needed to use "LOG_DAEMON" 
instead:
----8<--------------
diff -Nur ../ftpproxy-1.1.5/src/main.c ./src/main.c
--- ../ftpproxy-1.1.5/src/main.c        Mon Feb  4 19:00:27 2002
+++ ./src/main.c        Mon Aug 20 19:55:00 2001
@@ -85,7 +85,11 @@
        config->allow_anyremote = 0;
        strcpy(config->varname, "PROXY_");
 
+#ifdef LOG_FTP
        openlog(program, LOG_PID, LOG_FTP);
+#else
+       openlog(program, LOG_PID, LOG_DAEMON);
+#endif
 
        k = 1;
        while (k < argc  &&  argv[k][0] == '-'  &&  argv[k][1] != 0) {
----8<--------------


I believe Andreas is planning to port ftp.proxy source code to automake/autoconf
and so, it will soon be far much easier to compile on various platforms :-)


--
Gregoire Barbier - gregoire.barbier(at)free.fr - +33 6 21 35 73 49

Reply via email to