From: Pavel Janík Date: Wed, 19 Dec 2001 07:23:54 +0000 (+0000) Subject: Conditionally include config.h. X-Git-Tag: ttn-vms-21-2-B4~17601 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b8509940e96d5e4d9f0c7de480291accbb3b56d1;p=emacs.git Conditionally include config.h. --- 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 + * 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 #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; - } + } } }