1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-09 15:50:40 -08:00

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].
This commit is contained in:
Juanma Barranquero 2006-10-31 09:08:24 +00:00
parent 6ceb805857
commit e35fc9628c
2 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2006-10-31 Tim Van Holder <tim.vanholder@gmail.com> (tiny change)
Fixes to emacsclient.c for GNU/Linux.
* emacsclient.c [!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].
2006-10-31 Juanma Barranquero <lekktu@gmail.com> 2006-10-31 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in (ALL): Add emacsclient. * makefile.w32-in (ALL): Add emacsclient.
@ -32,6 +41,7 @@
set_local_socket. Use set_socket. Get answers from server.el with set_local_socket. Use set_socket. Get answers from server.el with
recv(), not file stream functions. recv(), not file stream functions.
2006-10-09 Eli Zaretskii <eliz@gnu.org> 2006-10-09 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (../src/config.h): Fix error message. * makefile.w32-in (../src/config.h): Fix error message.

View file

@ -38,6 +38,9 @@ Boston, MA 02110-1301, USA. */
# define INITIALIZE() (initialize_sockets ()) # define INITIALIZE() (initialize_sockets ())
typedef unsigned long IOCTL_BOOL_ARG; typedef unsigned long IOCTL_BOOL_ARG;
#else #else
# include <netinet/in.h>
# include <sys/ioctl.h>
# define INVALID_SOCKET -1
# define HSOCKET int # define HSOCKET int
# define CLOSE_SOCKET close # define CLOSE_SOCKET close
# define IOCTL ioctl # define IOCTL ioctl
@ -390,8 +393,8 @@ void initialize_sockets ()
} }
atexit (close_winsock); atexit (close_winsock);
#endif /* WINDOWSNT */
} }
#endif /* WINDOWSNT */
/* /*
* Read the information needed to set up a TCP comm channel with * Read the information needed to set up a TCP comm channel with
@ -618,7 +621,7 @@ set_local_socket ()
we are root. */ we are root. */
if (0 != geteuid ()) if (0 != geteuid ())
{ {
fprintf (stderr, "%s: Invalid socket owner\n", argv[0]); fprintf (stderr, "%s: Invalid socket owner\n", progname);
return INVALID_SOCKET; return INVALID_SOCKET;
} }
break; break;