summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>1998-04-06 10:13:46 +0000
committerAndreas Schwab <schwab@suse.de>1998-04-06 10:13:46 +0000
commitb3a0b703f5a464592f612699a22628c9115934f0 (patch)
tree8641934e3f681af23a1ed03dabfa21488c8a5539 /lib-src
parent7a84d28b9582b42a16aae86ffb5e7c6c22fa4f21 (diff)
downloademacs-b3a0b703f5a464592f612699a22628c9115934f0.tar.gz
Include <stdlib.h> and <unistd.h> if available.
Don't declare geteuid. (print_help_and_exit): Change return type to void. Forward declare it.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 97261b716ae..ae9fb36a9c9 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -29,10 +29,12 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <getopt.h>
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
char *getenv (), *getwd ();
char *getcwd ();
-int geteuid ();
/* This is defined with -D from the compilation command,
which extracts it from ../lisp/version.el. */
@@ -47,6 +49,8 @@ char *progname;
/* Nonzero means don't wait for a response from Emacs. --no-wait. */
int nowait = 0;
+void print_help_and_exit ();
+
struct option longopts[] =
{
{ "no-wait", no_argument, NULL, 'n' },
@@ -94,6 +98,7 @@ decode_options (argc, argv)
}
}
+void
print_help_and_exit ()
{
fprintf (stderr,
@@ -177,6 +182,9 @@ main (argc, argv)
#include <sys/un.h>
#include <sys/stat.h>
#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
extern char *strerror ();
extern int errno;