diff options
| author | Andreas Schwab | 1998-04-06 10:13:46 +0000 |
|---|---|---|
| committer | Andreas Schwab | 1998-04-06 10:13:46 +0000 |
| commit | 7f3bff3e4cf05e54e37047f28c15a2747404125f (patch) | |
| tree | dabb06c5f66a5370949ae8643590ac3683e8b8c9 /lib-src | |
| parent | 1f8c2f557f61050bf8e08c2c5f8168f79516f29c (diff) | |
| download | emacs-7f3bff3e4cf05e54e37047f28c15a2747404125f.tar.gz emacs-7f3bff3e4cf05e54e37047f28c15a2747404125f.zip | |
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.c | 10 |
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. */ | |||
| 29 | 29 | ||
| 30 | #include <stdio.h> | 30 | #include <stdio.h> |
| 31 | #include <getopt.h> | 31 | #include <getopt.h> |
| 32 | #ifdef STDC_HEADERS | ||
| 33 | #include <stdlib.h> | ||
| 34 | #endif | ||
| 32 | 35 | ||
| 33 | char *getenv (), *getwd (); | 36 | char *getenv (), *getwd (); |
| 34 | char *getcwd (); | 37 | char *getcwd (); |
| 35 | int geteuid (); | ||
| 36 | 38 | ||
| 37 | /* This is defined with -D from the compilation command, | 39 | /* This is defined with -D from the compilation command, |
| 38 | which extracts it from ../lisp/version.el. */ | 40 | which extracts it from ../lisp/version.el. */ |
| @@ -47,6 +49,8 @@ char *progname; | |||
| 47 | /* Nonzero means don't wait for a response from Emacs. --no-wait. */ | 49 | /* Nonzero means don't wait for a response from Emacs. --no-wait. */ |
| 48 | int nowait = 0; | 50 | int nowait = 0; |
| 49 | 51 | ||
| 52 | void print_help_and_exit (); | ||
| 53 | |||
| 50 | struct option longopts[] = | 54 | struct option longopts[] = |
| 51 | { | 55 | { |
| 52 | { "no-wait", no_argument, NULL, 'n' }, | 56 | { "no-wait", no_argument, NULL, 'n' }, |
| @@ -94,6 +98,7 @@ decode_options (argc, argv) | |||
| 94 | } | 98 | } |
| 95 | } | 99 | } |
| 96 | 100 | ||
| 101 | void | ||
| 97 | print_help_and_exit () | 102 | print_help_and_exit () |
| 98 | { | 103 | { |
| 99 | fprintf (stderr, | 104 | fprintf (stderr, |
| @@ -177,6 +182,9 @@ main (argc, argv) | |||
| 177 | #include <sys/un.h> | 182 | #include <sys/un.h> |
| 178 | #include <sys/stat.h> | 183 | #include <sys/stat.h> |
| 179 | #include <errno.h> | 184 | #include <errno.h> |
| 185 | #ifdef HAVE_UNISTD_H | ||
| 186 | #include <unistd.h> | ||
| 187 | #endif | ||
| 180 | 188 | ||
| 181 | extern char *strerror (); | 189 | extern char *strerror (); |
| 182 | extern int errno; | 190 | extern int errno; |