From: Dan Nicolaescu Date: Fri, 6 Aug 2010 04:09:54 +0000 (-0700) Subject: emacsclient.c cleanups. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~49^2~49 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0613f5d515c2f7fe7930ad5f7d3e177e1fd3b44c;p=emacs.git emacsclient.c cleanups. * lib-src/emacsclient.c: Move socket related #includes together with the rest of the #includes. Move a WINDOWSNT includes closer together. (HAVE_CONFIG_H): Remove. (NO_RETURN): Remove, defined in config.h. (main): Convert definition to standard C. --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 34e0c7ee388..bcd4b1a5169 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,11 @@ +2010-08-06 Dan Nicolaescu + + * emacsclient.c: Move socket related #includes together with the + rest of the #includes. Move a WINDOWSNT includes closer together. + (HAVE_CONFIG_H): Remove. + (NO_RETURN): Remove, defined in config.h. + (main): Convert definition to standard C. + 2010-07-29 Juanma Barranquero * make-docfile.c (write_c_args): Warn for old-style empty arglist (). diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 1ca9b793f3a..cbc1dfe3f6a 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -18,9 +18,7 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#ifdef HAVE_CONFIG_H #include -#endif #ifdef WINDOWSNT @@ -32,6 +30,8 @@ along with GNU Emacs. If not, see . */ # include # include # include +# include +# include # define NO_SOCKETS_IN_FILE_SYSTEM @@ -45,8 +45,12 @@ along with GNU Emacs. If not, see . */ # ifdef HAVE_INET_SOCKETS # include +# ifdef HAVE_SOCKETS +# include +# include +# include +# endif /* HAVE_SOCKETS */ # endif - # include # define INVALID_SOCKET -1 @@ -67,19 +71,15 @@ along with GNU Emacs. If not, see . */ #include #include "getopt.h" #ifdef HAVE_UNISTD_H -#include +# include #endif -#ifdef WINDOWSNT -# include -#else /* not WINDOWSNT */ -# include -#endif /* not WINDOWSNT */ +#include #include - #include #include + char *getenv (const char *), *getwd (char *); #ifdef HAVE_GETCWD @@ -114,10 +114,6 @@ char *w32_getenv (char *); #define TRUE 1 #endif -#ifndef NO_RETURN -#define NO_RETURN -#endif - /* Additional space when allocating buffers for filenames, etc. */ #define EXTRA_SPACE 100 @@ -702,9 +698,7 @@ fail (void) #if !defined (HAVE_SOCKETS) || !defined (HAVE_INET_SOCKETS) int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { main_argv = argv; progname = argv[0]; @@ -716,14 +710,6 @@ main (argc, argv) #else /* HAVE_SOCKETS && HAVE_INET_SOCKETS */ -#ifdef WINDOWSNT -# include -#else -# include -# include -# include -#endif - #define AUTH_KEY_LENGTH 64 #define SEND_BUFFER_SIZE 4096