summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2006-10-31 16:40:11 +0000
committerJuanma Barranquero <lekktu@gmail.com>2006-10-31 16:40:11 +0000
commit411b80a566ce95fe19f40d296de1c89549bd4c7a (patch)
tree5430f8d118ff6e6b25651935b1ee569ddb02c5f2 /lib-src
parent95d0feaa4a914e897f202c5c0b1d8ea14524620a (diff)
downloademacs-411b80a566ce95fe19f40d296de1c89549bd4c7a.tar.gz
[WINDOWSNT]: Include <malloc.h> and <stdlib.h>.
(close_winsock): Declare as __cdecl.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/emacsclient.c22
2 files changed, 19 insertions, 8 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 939cb1b24c0..3a5071ddb0c 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-31 ,bS(Bscar Fuentes <ofv@wanadoo.es> (tiny change)
+
+ * emacsclient.c [WINDOWSNT]: Include <malloc.h> and <stdlib.h>.
+ (close_winsock): Declare as __cdecl.
+
2006-10-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* emacsclient.c [!WINDOWSNT]: Include <fcntl.h> if available.
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index b7f3dd592a7..a155073c072 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -27,29 +27,35 @@ Boston, MA 02110-1301, USA. */
#endif
#ifdef WINDOWSNT
-#define HAVE_SOCKETS
-#define NO_SOCKETS_IN_FILE_SYSTEM
-#endif
-#ifdef WINDOWSNT
+# include <malloc.h>
+# include <stdlib.h>
+
+# define HAVE_SOCKETS
+# define NO_SOCKETS_IN_FILE_SYSTEM
+
# define HSOCKET SOCKET
# define CLOSE_SOCKET closesocket
# define IOCTL ioctlsocket
# define INITIALIZE() (initialize_sockets ())
typedef unsigned long IOCTL_BOOL_ARG;
-#else
+
+#else /* !WINDOWSNT */
+
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
# include <netinet/in.h>
# include <sys/ioctl.h>
+
# define INVALID_SOCKET -1
# define HSOCKET int
# define CLOSE_SOCKET close
# define IOCTL ioctl
# define INITIALIZE()
typedef int IOCTL_BOOL_ARG;
-#endif
+
+#endif /* !WINDOWSNT */
#undef signal
@@ -379,7 +385,7 @@ quote_file_name (s, name)
#ifdef WINDOWSNT
/* Wrapper to make WSACleanup a cdecl, as required by atexit(). */
-void close_winsock ()
+void __cdecl close_winsock ()
{
WSACleanup ();
}
@@ -497,7 +503,7 @@ set_tcp_socket ()
#else
IOCTL (s, FIONBIO, &c_arg);
#endif
-#endif
+#endif
setsockopt (s, SOL_SOCKET, SO_LINGER, (char *) &l_arg, sizeof l_arg);
/*