[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacsclient horribly broken
From: |
Tim Van Holder |
Subject: |
emacsclient horribly broken |
Date: |
Tue, 31 Oct 2006 08:53:16 +0100 |
My daily build from CVS currently fails because of (apparently
Windows-centric) changes to lib-src/emacsclient.c.
- a '}' outside of an #if/#endif block
- <netinet/in.h> not included => lots of missing types and macros
- use of non-existent INVALID_SOCKET macro
- ioctl(...FIONBIO...) used instead of the posix
fcntl(...O_NONBLOCK...) + no headers/configury used for it; if
FIONBIO is actually desirable, configure should be adjusted to
check for <sys/filio.h> and <sys/ioctl.h>, so emacsclient can
include the ones that exist
- 'argv[0]' used instead of 'progname' (this at least should also
cause a compiler error on win32)
Patch follows (may not be complete solution but at least allows
compilation to pass on my i386-pc-linux-gnu system).
--- emacsclient.c 31 Oct 2006 08:26:43 +0100 1.78
+++ emacsclient.c 31 Oct 2006 08:49:32 +0100
@@ -38,6 +38,9 @@ Boston, MA 02110-1301, USA. */
# 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 @@ void initialize_sockets ()
}
atexit (close_winsock);
-#endif /* WINDOWSNT */
}
+#endif /* WINDOWSNT */
/*
* Read the information needed to set up a TCP comm channel with
@@ -618,7 +621,7 @@ set_local_socket ()
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;
- emacsclient horribly broken,
Tim Van Holder <=
- Re: emacsclient horribly broken, Juanma Barranquero, 2006/10/31
- Re: emacsclient horribly broken, Jan Djärv, 2006/10/31
- Re: emacsclient horribly broken, Juanma Barranquero, 2006/10/31
- Re: emacsclient horribly broken, Kim F. Storm, 2006/10/31
- Re: emacsclient horribly broken, Juanma Barranquero, 2006/10/31