diff options
author | Pavel Janík <Pavel@Janik.cz> | 2001-12-19 07:23:54 +0000 |
---|---|---|
committer | Pavel Janík <Pavel@Janik.cz> | 2001-12-19 07:23:54 +0000 |
commit | b8509940e96d5e4d9f0c7de480291accbb3b56d1 (patch) | |
tree | 499c6d578ea7f615ed9db92fa240194c129a2a78 | |
parent | e69233c2de0e722fd9f7805ecf68a6279034de12 (diff) | |
download | emacs-b8509940e96d5e4d9f0c7de480291accbb3b56d1.tar.gz |
Conditionally include config.h.
-rw-r--r-- | lib-src/ChangeLog | 2 | ||||
-rw-r--r-- | lib-src/emacsserver.c | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 33717725b5d..31d929efd86 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,7 @@ 2001-12-19 Pavel Jan,Bm(Bk <Pavel@Janik.cz> + * emacsserver.c: Conditionally include config.h. + * emacsclient.c: Include "config.h", not <../src/config.h>. (main): Parenthesize assignment when used as truth value to prevent gcc warnings. diff --git a/lib-src/emacsserver.c b/lib-src/emacsserver.c index d68b5286db5..431c5b3e4e2 100644 --- a/lib-src/emacsserver.c +++ b/lib-src/emacsserver.c @@ -26,7 +26,11 @@ Boston, MA 02111-1307, USA. */ up to the Emacs which then executes them. */ #define NO_SHORTNAMES + +#ifdef HAVE_CONFIG_H #include "config.h" +#endif + #include <signal.h> #undef signal @@ -240,7 +244,7 @@ main (argc, argv) if (openfiles == 0) abort (); - /* + /* * Open up an AF_UNIX socket in this person's home directory */ @@ -274,7 +278,7 @@ main (argc, argv) perror_1 ("unlink"); exit (1); } -#else +#else if ((homedir = getenv ("HOME")) == NULL) fatal_error ("No home directory\n"); @@ -398,14 +402,14 @@ main (argc, argv) fflush (infile); /* If command is close, close connection to client. */ - if (strncmp (code, "Close:", 6) == 0) - if (infd > 2) + if (strncmp (code, "Close:", 6) == 0) + if (infd > 2) { fclose (infile); close (infd); } continue; - } + } } } |