aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog8
-rw-r--r--lib-src/emacsclient.c36
2 files changed, 19 insertions, 25 deletions
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 @@
12010-08-06 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * emacsclient.c: Move socket related #includes together with the
4 rest of the #includes. Move a WINDOWSNT includes closer together.
5 (HAVE_CONFIG_H): Remove.
6 (NO_RETURN): Remove, defined in config.h.
7 (main): Convert definition to standard C.
8
12010-07-29 Juanma Barranquero <lekktu@gmail.com> 92010-07-29 Juanma Barranquero <lekktu@gmail.com>
2 10
3 * make-docfile.c (write_c_args): Warn for old-style empty arglist (). 11 * 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
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20 20
21#ifdef HAVE_CONFIG_H
22#include <config.h> 21#include <config.h>
23#endif
24 22
25#ifdef WINDOWSNT 23#ifdef WINDOWSNT
26 24
@@ -32,6 +30,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
32# include <stdlib.h> 30# include <stdlib.h>
33# include <windows.h> 31# include <windows.h>
34# include <commctrl.h> 32# include <commctrl.h>
33# include <io.h>
34# include <winsock2.h>
35 35
36# define NO_SOCKETS_IN_FILE_SYSTEM 36# define NO_SOCKETS_IN_FILE_SYSTEM
37 37
@@ -45,8 +45,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
45 45
46# ifdef HAVE_INET_SOCKETS 46# ifdef HAVE_INET_SOCKETS
47# include <netinet/in.h> 47# include <netinet/in.h>
48# ifdef HAVE_SOCKETS
49# include <sys/types.h>
50# include <sys/socket.h>
51# include <sys/un.h>
52# endif /* HAVE_SOCKETS */
48# endif 53# endif
49
50# include <arpa/inet.h> 54# include <arpa/inet.h>
51 55
52# define INVALID_SOCKET -1 56# define INVALID_SOCKET -1
@@ -67,19 +71,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
67#include <stdio.h> 71#include <stdio.h>
68#include "getopt.h" 72#include "getopt.h"
69#ifdef HAVE_UNISTD_H 73#ifdef HAVE_UNISTD_H
70#include <unistd.h> 74# include <unistd.h>
71#endif 75#endif
72 76
73#ifdef WINDOWSNT 77#include <pwd.h>
74# include <io.h>
75#else /* not WINDOWSNT */
76# include <pwd.h>
77#endif /* not WINDOWSNT */
78#include <sys/stat.h> 78#include <sys/stat.h>
79
80#include <signal.h> 79#include <signal.h>
81#include <errno.h> 80#include <errno.h>
82 81
82
83 83
84char *getenv (const char *), *getwd (char *); 84char *getenv (const char *), *getwd (char *);
85#ifdef HAVE_GETCWD 85#ifdef HAVE_GETCWD
@@ -114,10 +114,6 @@ char *w32_getenv (char *);
114#define TRUE 1 114#define TRUE 1
115#endif 115#endif
116 116
117#ifndef NO_RETURN
118#define NO_RETURN
119#endif
120
121/* Additional space when allocating buffers for filenames, etc. */ 117/* Additional space when allocating buffers for filenames, etc. */
122#define EXTRA_SPACE 100 118#define EXTRA_SPACE 100
123 119
@@ -702,9 +698,7 @@ fail (void)
702#if !defined (HAVE_SOCKETS) || !defined (HAVE_INET_SOCKETS) 698#if !defined (HAVE_SOCKETS) || !defined (HAVE_INET_SOCKETS)
703 699
704int 700int
705main (argc, argv) 701main (int argc, char **argv)
706 int argc;
707 char **argv;
708{ 702{
709 main_argv = argv; 703 main_argv = argv;
710 progname = argv[0]; 704 progname = argv[0];
@@ -716,14 +710,6 @@ main (argc, argv)
716 710
717#else /* HAVE_SOCKETS && HAVE_INET_SOCKETS */ 711#else /* HAVE_SOCKETS && HAVE_INET_SOCKETS */
718 712
719#ifdef WINDOWSNT
720# include <winsock2.h>
721#else
722# include <sys/types.h>
723# include <sys/socket.h>
724# include <sys/un.h>
725#endif
726
727#define AUTH_KEY_LENGTH 64 713#define AUTH_KEY_LENGTH 64
728#define SEND_BUFFER_SIZE 4096 714#define SEND_BUFFER_SIZE 4096
729 715