aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2006-10-31 09:08:24 +0000
committerJuanma Barranquero2006-10-31 09:08:24 +0000
commite35fc9628ced2eafed2073622bbab1eec010d82a (patch)
treebbd6f6e11d21184659ba51efbebe0dfdbde82fff
parent6ceb8058570a0be21df9bde80d2ee269bdf7291a (diff)
downloademacs-e35fc9628ced2eafed2073622bbab1eec010d82a.tar.gz
emacs-e35fc9628ced2eafed2073622bbab1eec010d82a.zip
Fixes to emacsclient.c for GNU/Linux.
[!WINDOWSNT] <top level>: Include <netinet/in.h> and <sys/ioctl.h>. (INVALID_SOCKET): Define. (initialize_sockets): Put #endif at the right place. (set_local_socket): Use progname, not argv[0].
-rw-r--r--lib-src/ChangeLog10
-rw-r--r--lib-src/emacsclient.c7
2 files changed, 15 insertions, 2 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index d36646065e1..0a6b4b35bee 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,12 @@
12006-10-31 Tim Van Holder <tim.vanholder@gmail.com> (tiny change)
2
3 Fixes to emacsclient.c for GNU/Linux.
4 * emacsclient.c [!WINDOWSNT] <top level>: Include <netinet/in.h> and
5 <sys/ioctl.h>.
6 (INVALID_SOCKET): Define.
7 (initialize_sockets): Put #endif at the right place.
8 (set_local_socket): Use progname, not argv[0].
9
12006-10-31 Juanma Barranquero <lekktu@gmail.com> 102006-10-31 Juanma Barranquero <lekktu@gmail.com>
2 11
3 * makefile.w32-in (ALL): Add emacsclient. 12 * makefile.w32-in (ALL): Add emacsclient.
@@ -32,6 +41,7 @@
32 set_local_socket. Use set_socket. Get answers from server.el with 41 set_local_socket. Use set_socket. Get answers from server.el with
33 recv(), not file stream functions. 42 recv(), not file stream functions.
34 43
44
352006-10-09 Eli Zaretskii <eliz@gnu.org> 452006-10-09 Eli Zaretskii <eliz@gnu.org>
36 46
37 * makefile.w32-in (../src/config.h): Fix error message. 47 * makefile.w32-in (../src/config.h): Fix error message.
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 943053b3c0f..b3a5180653c 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -38,6 +38,9 @@ Boston, MA 02110-1301, USA. */
38# define INITIALIZE() (initialize_sockets ()) 38# define INITIALIZE() (initialize_sockets ())
39typedef unsigned long IOCTL_BOOL_ARG; 39typedef unsigned long IOCTL_BOOL_ARG;
40#else 40#else
41# include <netinet/in.h>
42# include <sys/ioctl.h>
43# define INVALID_SOCKET -1
41# define HSOCKET int 44# define HSOCKET int
42# define CLOSE_SOCKET close 45# define CLOSE_SOCKET close
43# define IOCTL ioctl 46# define IOCTL ioctl
@@ -390,8 +393,8 @@ void initialize_sockets ()
390 } 393 }
391 394
392 atexit (close_winsock); 395 atexit (close_winsock);
393#endif /* WINDOWSNT */
394} 396}
397#endif /* WINDOWSNT */
395 398
396/* 399/*
397 * Read the information needed to set up a TCP comm channel with 400 * Read the information needed to set up a TCP comm channel with
@@ -618,7 +621,7 @@ set_local_socket ()
618 we are root. */ 621 we are root. */
619 if (0 != geteuid ()) 622 if (0 != geteuid ())
620 { 623 {
621 fprintf (stderr, "%s: Invalid socket owner\n", argv[0]); 624 fprintf (stderr, "%s: Invalid socket owner\n", progname);
622 return INVALID_SOCKET; 625 return INVALID_SOCKET;
623 } 626 }
624 break; 627 break;