changeset 21387:4812cf228971

Include <stdlib.h> and <unistd.h> if available. Don't declare geteuid. (print_help_and_exit): Change return type to void. Forward declare it.
author Andreas Schwab <schwab@suse.de>
date Mon, 06 Apr 1998 10:13:46 +0000
parents 49b24e54a5fa
children 1a8c44e38d9c
files lib-src/emacsclient.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/emacsclient.c	Mon Apr 06 10:12:28 1998 +0000
+++ b/lib-src/emacsclient.c	Mon Apr 06 10:13:46 1998 +0000
@@ -29,10 +29,12 @@
 
 #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 @@
 /* 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 @@
     }
 }
 
+void
 print_help_and_exit ()
 {
   fprintf (stderr,
@@ -177,6 +182,9 @@
 #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;