Created
April 18, 2010 14:16
-
-
Save yugui/370234 to your computer and use it in GitHub Desktop.
patch for apcupsd on AIX 5.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- src/lib/getopt.c.orig 2010-04-18 08:54:21.000000000 -0500 | |
+++ src/lib/getopt.c 2010-04-18 08:54:34.000000000 -0500 | |
@@ -57,7 +57,9 @@ | |
#ifdef __GNU_LIBRARY__ | |
/* Don't include stdlib.h for non-GNU C libraries because some of them | |
contain conflicting prototypes for getopt. */ | |
+#ifndef _AIX | |
#include <stdlib.h> | |
+#endif | |
#endif /* GNU C library. */ | |
/* This is for other GNU distributions with internationalized messages. | |
@@ -177,7 +179,11 @@ static char *posixly_correct; | |
whose names are inconsistent. */ | |
/* ADK: No, let's just include the darn thing and be done with it. */ | |
/* char *getenv (); */ | |
+#ifndef _AIX | |
#include <stdlib.h> | |
+#else | |
+char *getenv(const char* name); | |
+#endif | |
static char * | |
my_index (const char *str, int chr) | |
@@ -291,7 +297,7 @@ _getopt_initialize (const char *optstrin | |
nextchar = NULL; | |
- posixly_correct = getenv ("POSIXLY_CORRECT"); | |
+ posixly_correct = 0;/*getenv ("POSIXLY_CORRECT");*/ | |
/* Determine how to handle the ordering of options and nonoptions. */ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment