emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100991: emacsclient.c cleanups.


From: Dan Nicolaescu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100991: emacsclient.c cleanups.
Date: Thu, 05 Aug 2010 21:09:54 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100991
committer: Dan Nicolaescu <address@hidden>
branch nick: trunk
timestamp: Thu 2010-08-05 21:09:54 -0700
message:
  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.
modified:
  lib-src/ChangeLog
  lib-src/emacsclient.c
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2010-07-29 02:42:53 +0000
+++ b/lib-src/ChangeLog 2010-08-06 04:09:54 +0000
@@ -1,3 +1,11 @@
+2010-08-06  Dan Nicolaescu  <address@hidden>
+
+       * 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  <address@hidden>
 
        * make-docfile.c (write_c_args): Warn for old-style empty arglist ().

=== modified file 'lib-src/emacsclient.c'
--- a/lib-src/emacsclient.c     2010-07-25 03:36:54 +0000
+++ b/lib-src/emacsclient.c     2010-08-06 04:09:54 +0000
@@ -18,9 +18,7 @@
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #ifdef WINDOWSNT
 
@@ -32,6 +30,8 @@
 # include <stdlib.h>
 # include <windows.h>
 # include <commctrl.h>
+# include <io.h>
+# include <winsock2.h>
 
 # define NO_SOCKETS_IN_FILE_SYSTEM
 
@@ -45,8 +45,12 @@
 
 # ifdef HAVE_INET_SOCKETS
 #  include <netinet/in.h>
+#  ifdef HAVE_SOCKETS
+#    include <sys/types.h>
+#    include <sys/socket.h>
+#    include <sys/un.h>
+#  endif /* HAVE_SOCKETS */
 # endif
-
 # include <arpa/inet.h>
 
 # define INVALID_SOCKET -1
@@ -67,19 +71,15 @@
 #include <stdio.h>
 #include "getopt.h"
 #ifdef HAVE_UNISTD_H
-#include <unistd.h>
+# include <unistd.h>
 #endif
 
-#ifdef WINDOWSNT
-# include <io.h>
-#else /* not WINDOWSNT */
-# include <pwd.h>
-#endif /* not WINDOWSNT */
+#include <pwd.h>
 #include <sys/stat.h>
-
 #include <signal.h>
 #include <errno.h>
 
+
 
 char *getenv (const char *), *getwd (char *);
 #ifdef HAVE_GETCWD
@@ -114,10 +114,6 @@
 #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 @@
 #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 @@
 
 #else /* HAVE_SOCKETS && HAVE_INET_SOCKETS */
 
-#ifdef WINDOWSNT
-# include <winsock2.h>
-#else
-# include <sys/types.h>
-# include <sys/socket.h>
-# include <sys/un.h>
-#endif
-
 #define AUTH_KEY_LENGTH      64
 #define SEND_BUFFER_SIZE   4096
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]