Mercurial > emacs
comparison lib-src/emacsclient.c @ 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 | 1289a4779e68 |
children | a080769e8f7d |
comparison
equal
deleted
inserted
replaced
21386:49b24e54a5fa | 21387:4812cf228971 |
---|---|
27 #undef close | 27 #undef close |
28 #undef signal | 28 #undef signal |
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. */ |
39 | 41 |
40 #ifndef VERSION | 42 #ifndef VERSION |
44 /* Name used to invoke this program. */ | 46 /* Name used to invoke this program. */ |
45 char *progname; | 47 char *progname; |
46 | 48 |
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; |
51 | |
52 void print_help_and_exit (); | |
49 | 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' }, |
53 { "help", no_argument, NULL, 'H' }, | 57 { "help", no_argument, NULL, 'H' }, |
92 print_help_and_exit (); | 96 print_help_and_exit (); |
93 } | 97 } |
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, |
100 "Usage: %s [-n] [--no-wait] [+LINENUMBER] FILENAME\n", | 105 "Usage: %s [-n] [--no-wait] [+LINENUMBER] FILENAME\n", |
101 progname); | 106 progname); |
175 #include <sys/types.h> | 180 #include <sys/types.h> |
176 #include <sys/socket.h> | 181 #include <sys/socket.h> |
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; |
183 | 191 |
184 int | 192 int |