Commit 7f3bff3e authored by Andreas Schwab's avatar Andreas Schwab
Browse files

Include <stdlib.h> and <unistd.h> if available.

Don't declare geteuid.
(print_help_and_exit): Change return type to void.  Forward
declare it.
parent 1f8c2f55
...@@ -29,10 +29,12 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,10 +29,12 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h> #include <stdio.h>
#include <getopt.h> #include <getopt.h>
#ifdef STDC_HEADERS
#include <stdlib.h>
#endif
char *getenv (), *getwd (); char *getenv (), *getwd ();
char *getcwd (); char *getcwd ();
int geteuid ();
/* This is defined with -D from the compilation command, /* This is defined with -D from the compilation command,
which extracts it from ../lisp/version.el. */ which extracts it from ../lisp/version.el. */
...@@ -47,6 +49,8 @@ char *progname; ...@@ -47,6 +49,8 @@ char *progname;
/* Nonzero means don't wait for a response from Emacs. --no-wait. */ /* Nonzero means don't wait for a response from Emacs. --no-wait. */
int nowait = 0; int nowait = 0;
void print_help_and_exit ();
struct option longopts[] = struct option longopts[] =
{ {
{ "no-wait", no_argument, NULL, 'n' }, { "no-wait", no_argument, NULL, 'n' },
...@@ -94,6 +98,7 @@ decode_options (argc, argv) ...@@ -94,6 +98,7 @@ decode_options (argc, argv)
} }
} }
void
print_help_and_exit () print_help_and_exit ()
{ {
fprintf (stderr, fprintf (stderr,
...@@ -177,6 +182,9 @@ main (argc, argv) ...@@ -177,6 +182,9 @@ main (argc, argv)
#include <sys/un.h> #include <sys/un.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h> #include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
extern char *strerror (); extern char *strerror ();
extern int errno; extern int errno;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment