We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Define setenv() in terms of putenv() on Solaris 9 to allow unit tests to 
compile.
ato (author)
Tue Jul 08 20:24:31 -0700 2008
commit  c618dcf8f84a87206b44cc2850227f3122882e44
tree    c3461d62d92d960089a38e0fd026d60e8c1c1c80
parent  f97d825704bed3cae095248c950c1b506bb30a52
...
42
43
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
46
47
...
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
0
@@ -42,6 +42,21 @@
0
 #include <winbase.h>
0
 #endif
0
 
0
+#ifdef __SOLARIS9__
0
+// Solaris 9 only has putenv, not setenv.
0
+static int setenv(const char *name, const char *value, int override) {
0
+ int ret;
0
+ char *s = (char*)malloc(strlen(name) + strlen(value) + 2);
0
+ s[0] = 0;
0
+ strcpy(s, name);
0
+ strcpy(s, "=");
0
+ strcpy(s, value);
0
+ ret = putenv(s);
0
+ free(s);
0
+ return ret;
0
+}
0
+#endif
0
+
0
 #define DEFINE_TEST_GROUP(name) \
0
   using namespace tut; \
0
   typedef test_group<name> factory; \

Comments

    No one has commented yet.