Mercurial > emacs
diff lib-src/emacsclient.c @ 73578:e193b6a3f379
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].
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Tue, 31 Oct 2006 09:07:18 +0000 |
parents | 368665ce6f35 |
children | 75bfdccded78 |
line wrap: on
line diff
--- a/lib-src/emacsclient.c Tue Oct 31 08:33:53 2006 +0000 +++ b/lib-src/emacsclient.c Tue Oct 31 09:07:18 2006 +0000 @@ -38,6 +38,9 @@ # define INITIALIZE() (initialize_sockets ()) typedef unsigned long IOCTL_BOOL_ARG; #else +# include <netinet/in.h> +# include <sys/ioctl.h> +# define INVALID_SOCKET -1 # define HSOCKET int # define CLOSE_SOCKET close # define IOCTL ioctl @@ -390,8 +393,8 @@ } atexit (close_winsock); +} #endif /* WINDOWSNT */ -} /* * Read the information needed to set up a TCP comm channel with @@ -618,7 +621,7 @@ we are root. */ if (0 != geteuid ()) { - fprintf (stderr, "%s: Invalid socket owner\n", argv[0]); + fprintf (stderr, "%s: Invalid socket owner\n", progname); return INVALID_SOCKET; } break;