]> skyeroc.xyz Git - dgamelaunch/commitdiff
don't use on BSD and Linux, setenv(3) is BSD 4.3
authorJoshua Kwan <joshk@triplehelix.org>
Fri, 16 Jan 2004 02:02:40 +0000 (02:02 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Fri, 16 Jan 2004 02:02:40 +0000 (02:02 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@120 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c

index 8db6f8fadfcb527b0fb232473830e1c5bedc14e1..520ab12329a0a3dfb33efcea446c9bdf7f61b525 100644 (file)
 # include <libutil.h>
 #endif
 
+#if defined(__linux__) || defined(BSD)
+# define mysetenv setenv
+#endif
+
 #ifdef __linux__
 # include <pty.h>
 #endif
@@ -124,6 +128,7 @@ struct dg_user **users = NULL;
 struct dg_user *me = NULL;
 struct dg_banner banner;
 
+#if !(defined(__linux__) || defined(BSD))
 int
 mysetenv (const char* name, const char* value, int overwrite)
 {
@@ -142,6 +147,7 @@ mysetenv (const char* name, const char* value, int overwrite)
   
   return retval;  
 }
+#endif /* !linux && !bsd */
 
 void
 create_config ()