aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorAndreas Schwab1998-04-06 10:13:46 +0000
committerAndreas Schwab1998-04-06 10:13:46 +0000
commit7f3bff3e4cf05e54e37047f28c15a2747404125f (patch)
treedabb06c5f66a5370949ae8643590ac3683e8b8c9 /lib-src
parent1f8c2f557f61050bf8e08c2c5f8168f79516f29c (diff)
downloademacs-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.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. */
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
33char *getenv (), *getwd (); 36char *getenv (), *getwd ();
34char *getcwd (); 37char *getcwd ();
35int 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. */
48int nowait = 0; 50int nowait = 0;
49 51
52void print_help_and_exit ();
53
50struct option longopts[] = 54struct 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
101void
97print_help_and_exit () 102print_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
181extern char *strerror (); 189extern char *strerror ();
182extern int errno; 190extern int errno;