# HG changeset patch # User Juanma Barranquero # Date 1162312755 0 # Node ID 7d264c036b255037c449857bfd1fed2710a0ba66 # Parent e049c4ee04b16a84083922c0334eb8372f77e649 [WINDOWSNT]: Include and . (close_winsock): Declare as __cdecl. diff -r e049c4ee04b1 -r 7d264c036b25 lib-src/emacsclient.c --- a/lib-src/emacsclient.c Tue Oct 31 13:52:32 2006 +0000 +++ b/lib-src/emacsclient.c Tue Oct 31 16:39:15 2006 +0000 @@ -27,29 +27,35 @@ #endif #ifdef WINDOWSNT -#define HAVE_SOCKETS -#define NO_SOCKETS_IN_FILE_SYSTEM -#endif + +# include +# include -#ifdef WINDOWSNT +# 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 #endif # include # include + # 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 @@ #ifdef WINDOWSNT /* Wrapper to make WSACleanup a cdecl, as required by atexit(). */ -void close_winsock () +void __cdecl close_winsock () { WSACleanup (); } @@ -497,7 +503,7 @@ #else IOCTL (s, FIONBIO, &c_arg); #endif -#endif +#endif setsockopt (s, SOL_SOCKET, SO_LINGER, (char *) &l_arg, sizeof l_arg); /*