[distcc] distc-1.1 on Solaris 8
Martin Pool
mbp at samba.org
Tue Jan 28 08:58:50 GMT 2003
On 28 Jan 2003, Dimitri PAPADOPOULOS-ORFANOS <papadopo at shfj.cea.fr> wrote:
> Sorry to write directly to you, but all messages I had been
> sending to distcc at lists.samba.org seem to have been lost.
>From the samba.org logs it looks like they didn't make it to our mail
server... Please try resending them and let me know if there are
still problems.
> The problem is that there's no setenv() function on Solaris 8
> and most other older UNIX systems. setenv() has been introduced
> in Single UNIX Specification version 3 and does not exist in
> Single UNIX Specification version 2. Just use putenv() instead.
Thanks, fixed.
Index: exec.c
===================================================================
RCS file: /data/cvs/distcc/src/exec.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -u -p -r1.69 -r1.70
--- exec.c 27 Jan 2003 12:05:09 -0000 1.69
+++ exec.c 28 Jan 2003 08:57:35 -0000 1.70
@@ -48,7 +48,8 @@
* accidentally recursively invoking itself, thinking it's the real
* compiler.
**/
-static const char *distcc_safeguard = "_DISTCC_SAFEGUARD";
+static const char *dcc_safeguard_name = "_DISTCC_SAFEGUARD";
+static char *dcc_safeguard_set = "_DISTCC_SAFEGUARD=1";
#include "config.h"
@@ -173,7 +174,7 @@ void dcc_execvp(char **argv)
void dcc_recursion_safeguard(void)
{
- if (getenv(distcc_safeguard)) {
+ if (getenv(dcc_safeguard_name)) {
rs_log_crit("distcc seems to have invoked itself recursively!");
dcc_exit(EXIT_RECURSION);
}
@@ -210,7 +211,7 @@ static int dcc_inside_child(const char *
if ((ret = dcc_ignore_sigpipe(0))) /* set handler back to default */
return ret;
- if ((setenv(distcc_safeguard, "1", 1) == -1)) {
+ if ((putenv(dcc_safeguard_set) == -1)) {
rs_log_error("setenv failed");
/* and continue */
}
--
Martin
More information about the distcc
mailing list