summaryrefslogtreecommitdiff
path: root/support/findme.c
diff options
context:
space:
mode:
Diffstat (limited to 'support/findme.c')
-rw-r--r--support/findme.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/support/findme.c b/support/findme.c
index 6d1b41c..4ba4950 100644
--- a/support/findme.c
+++ b/support/findme.c
@@ -2,7 +2,24 @@
file accompanying popt source distributions, available from
ftp://ftp.redhat.com/pub/code/popt */
-#include "system.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#ifdef __NeXT
+/* access macros are not declared in non posix mode in unistd.h -
+ don't try to use posix on NeXTstep 3.3 ! */
+#include <libc.h>
+#endif
+
+#if HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
+
#include "findme.h"
const char * findProgramPath(const char * argv0) {
@@ -14,7 +31,7 @@ const char * findProgramPath(const char * argv0) {
/* If there is a / in the argv[0], it has to be an absolute
path */
if (strchr(argv0, '/'))
- return xstrdup(argv0);
+ return strdup(argv0);
if (!path) return NULL;