Control-center-1.0.6 on Solaris 2.6
- From: "Mark R. Bowyer" <Moredhel earthling net>
- To: GNOME-List <gnome-list gnome org>
- Subject: Control-center-1.0.6 on Solaris 2.6
- Date: Wed, 18 Aug 1999 13:29:13 +0100 (BST)
Hi,
I had to make the following change in control-center-1.0.6/capplets/
screensaver-properties/callbacks.c to get it so compile on Solaris, as we don't
have the same setenv() function, instead using a putenv() one.
The patch goes:
root@kelvin:.../screensaver-properties 54 ]diff -c callbacks.c.orig callbacks.c
*** callbacks.c.orig Wed Aug 18 13:11:22 1999
--- callbacks.c Wed Aug 18 13:17:57 1999
***************
*** 439,445 ****
return;
}
if (pid == 0) {
! char *ctmp, *envpath;
char **argv;
close (p[0]);
--- 439,445 ----
return;
}
if (pid == 0) {
! char *ctmp, *envpath, *putstr;
char **argv;
close (p[0]);
***************
*** 450,457 ****
envpath?envpath:"",
envpath?":":"",
"/usr/X11R6/lib/xscreensaver");
- setenv("PATH", ctmp, 1);
argv = g_strsplit(g_strconcat(sd->demo, " ", sd->windowid, " ",
xid, NULL), " ", -1);
execvp (argv[0], argv);
--- 450,466 ----
envpath?envpath:"",
envpath?":":"",
"/usr/X11R6/lib/xscreensaver");
+ /* Replace this line to work on Solaris: */
+ /*setenv("PATH", ctmp, 1);*/
+
+ putstr = malloc(strlen(ctmp)+6);
+ strcpy(putstr, "PATH=");
+ strcpy(putstr, ctmp);
+ putenv(putstr);
+
+ /* end changes */
+
argv = g_strsplit(g_strconcat(sd->demo, " ", sd->windowid, " ",
xid, NULL), " ", -1);
execvp (argv[0], argv);
---
Hope this helps someone,
-------My opinion - Not sane, intelligent or necessarily useful-------
o o mailto:Moredhel@earthling.net
/v\ark R. Bowyer. http://i.am/Moredhel mailto:Mark.Bowyer@UK.Sun.COM
`-' "Everything is true, for a given value of 'true'" - PTerry
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]