summaryrefslogtreecommitdiff
path: root/nt/inc/sys/socket.h
diff options
context:
space:
mode:
authorFabrice Popineau <fabrice.popineau@supelec.fr>2012-09-30 23:36:42 +0200
committerEli Zaretskii <eliz@gnu.org>2012-09-30 23:36:42 +0200
commit62aba0d4973c5cba7ac7c387bbe133e0e3061c5c (patch)
tree19fa592c7c48ffdbd0ebae36de7f516f8c749226 /nt/inc/sys/socket.h
parente7a2937b11bffc9ac24936e9f46201ce2abf38cc (diff)
downloademacs-62aba0d4973c5cba7ac7c387bbe133e0e3061c5c.tar.gz
Support x64 build on MS-Windows with MSVC.
src/w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64. (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for compatibility with x64. src/w32term.c (w32_draw_underwave): Don't use GCC extensions for defining an XRectangle structure. src/w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer arithmetics for compatibility with x64. src/w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for compatibility with x64. src/w32heap.h: Adjust prototypes and declarations. src/w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap) (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of DWORD, long, and unsigned long, for compatibility with x64. (allocate_heap) [_WIN64]: Reserve 32GB of memory. (sbrk): Argument is now of type ptrdiff_t. src/w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being less than 0x0500. (w32_msg_pump): Use WPARAM type for 'result'. src/w32.c (init_environment, get_emacs_configuration): Support AMD64 architecture. (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for compatibility with x64. src/vm-limit.c (lim_data): Now size_t. (check_memory_limits): Adjust prototypes of real_morecore and __morecore to receive argument of type ptrdiff_t. Use size_t for five_percent and data_size. src/unexw32.c: Use DWORD_PTR instead of DWORD for file-scope variables, for compatibility with x64. (rva_to_section, offset_to_section, relocate_offset) (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET) (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info) (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD for compatibility with x64. src/sysdep.c (STDERR_FILENO): Define if not already defined. src/ralloc.c (real_morecore): Argument type is now ptrdiff_t. (__morecore): Argument type is now ptrdiff_t. (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'. (relinquish): Use ptrdiff_t type for 'excess'. (r_alloc_sbrk): Argument type is now ptrdiff_t. src/makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE. (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE) instead of a literal number. src/gmalloc.c [WINDOWSNT]: Include w32heap.h. (min): Define only if not already defined. src/frame.c (x_report_frame_params): Use EMACS_UINT for the return value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows hosts. src/image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since 'bitmaps' is a pointer. src/dispextern.h (x_bitmap_pixmap): Adjust prototype. src/alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__. nt/makefile.w32-in ($(TRES)): Use $(EMACS_MANIFEST). nt/inc/sys/socket.h: Don't map Winsock error codes to standard ones that are already defined. nt/inc/ms-w32.h (EMACS_INT, EMACS_UINT, EMACS_INT_MAX, PRIuMAX) (pI, _INTPTR) [_MSC_VER]: Fix definitions for MSVC. [_MSC_VER]: Add pragmas to suppress some MSVC warnings. nt/preprep.c (pfnCheckSumMappedFile, rva_to_section) (offset_to_section, relocate_offset, OFFSET_TO_RVA) (RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA) (OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN) (copy_executable_and_move_sections, ADJUST_IMPORT_RVA, main): Use DWORD_PTR instead of DWORD for compatibility with x64. nt/nmake.defs: Support AMD64. (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST): New macros. nt/gmake.defs: (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST): New macros. nt/addsection.c (pfnCheckSumMappedFile, rva_to_section) (offset_to_section, relocate_offset, OFFSET_TO_RVA) (RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA) (OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN) (copy_executable_and_add_section, main): Use DWORD_PTR instead of DWORD, for compatibility with x64. nt/emacs-x64.manifest: New file. nt/emacs-x86.manifest: Renamed from emacs.manifest. lib-src/ntlib.c (gettimeofday): Copy from src/w32.c. lib/gettime. needs this function.
Diffstat (limited to 'nt/inc/sys/socket.h')
-rw-r--r--nt/inc/sys/socket.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h
index 77610404ffb..70225a9c82f 100644
--- a/nt/inc/sys/socket.h
+++ b/nt/inc/sys/socket.h
@@ -126,42 +126,147 @@ int fcntl (int s, int cmd, int options);
extern int h_errno;
/* map winsock error codes to standard names */
+#if defined(EWOULDBLOCK)
+#undef EWOULDBLOCK
+#endif
#define EWOULDBLOCK WSAEWOULDBLOCK
+#if defined(EINPROGRESS)
+#undef EINPROGRESS
+#endif
#define EINPROGRESS WSAEINPROGRESS
+#if defined(EALREADY)
+#undef EALREADY
+#endif
#define EALREADY WSAEALREADY
+#if defined(ENOTSOCK)
+#undef ENOTSOCK
+#endif
#define ENOTSOCK WSAENOTSOCK
+#if defined(EDESTADDRREQ)
+#undef EDESTADDRREQ
+#endif
#define EDESTADDRREQ WSAEDESTADDRREQ
+#if defined(EMSGSIZE)
+#undef EMSGSIZE
+#endif
#define EMSGSIZE WSAEMSGSIZE
+#if defined(EPROTOTYPE)
+#undef EPROTOTYPE
+#endif
#define EPROTOTYPE WSAEPROTOTYPE
+#if defined(ENOPROTOOPT)
+#undef ENOPROTOOPT
+#endif
#define ENOPROTOOPT WSAENOPROTOOPT
+#if defined(EPROTONOSUPPORT)
+#undef EPROTONOSUPPORT
+#endif
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+#if defined(ESOCKTNOSUPPORT)
+#undef ESOCKTNOSUPPORT
+#endif
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
+#if defined(EOPNOTSUPP)
+#undef EOPNOTSUPP
+#endif
#define EOPNOTSUPP WSAEOPNOTSUPP
+#if defined(EPFNOSUPPORT)
+#undef EPFNOSUPPORT
+#endif
#define EPFNOSUPPORT WSAEPFNOSUPPORT
+#if defined(EAFNOSUPPORT)
+#undef EAFNOSUPPORT
+#endif
#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#if defined(EADDRINUSE)
+#undef EADDRINUSE
+#endif
#define EADDRINUSE WSAEADDRINUSE
+#if defined(EADDRNOTAVAIL)
+#undef EADDRNOTAVAIL
+#endif
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
+#if defined(ENETDOWN)
+#undef ENETDOWN
+#endif
#define ENETDOWN WSAENETDOWN
+#if defined(ENETUNREACH)
+#undef ENETUNREACH
+#endif
#define ENETUNREACH WSAENETUNREACH
+#if defined(ENETRESET)
+#undef ENETRESET
+#endif
#define ENETRESET WSAENETRESET
+#if defined(ECONNABORTED)
+#undef ECONNABORTED
+#endif
#define ECONNABORTED WSAECONNABORTED
+#if defined(ECONNRESET)
+#undef ECONNRESET
+#endif
#define ECONNRESET WSAECONNRESET
+#if defined(ENOBUFS)
+#undef ENOBUFS
+#endif
#define ENOBUFS WSAENOBUFS
+#if defined(EISCONN)
+#undef EISCONN
+#endif
#define EISCONN WSAEISCONN
+#if defined(ENOTCONN)
+#undef ENOTCONN
+#endif
#define ENOTCONN WSAENOTCONN
+#if defined(ESHUTDOWN)
+#undef ESHUTDOWN
+#endif
#define ESHUTDOWN WSAESHUTDOWN
+#if defined(ETOOMANYREFS)
+#undef ETOOMANYREFS
+#endif
#define ETOOMANYREFS WSAETOOMANYREFS
+#if defined(ETIMEDOUT)
+#undef ETIMEDOUT
+#endif
#define ETIMEDOUT WSAETIMEDOUT
+#if defined(ECONNREFUSED)
+#undef ECONNREFUSED
+#endif
#define ECONNREFUSED WSAECONNREFUSED
+#if defined(ELOOP)
+#undef ELOOP
+#endif
#define ELOOP WSAELOOP
/* #define ENAMETOOLONG WSAENAMETOOLONG */
+#if defined(EHOSTDOWN)
+#undef EHOSTDOWN
+#endif
#define EHOSTDOWN WSAEHOSTDOWN
+#if defined(EHOSTUNREACH)
+#undef EHOSTUNREACH
+#endif
#define EHOSTUNREACH WSAEHOSTUNREACH
/* #define ENOTEMPTY WSAENOTEMPTY */
+#if defined(EPROCLIM)
+#undef EPROCLIM
+#endif
#define EPROCLIM WSAEPROCLIM
+#if defined(EUSERS)
+#undef EUSERS
+#endif
#define EUSERS WSAEUSERS
+#if defined(EDQUOT)
+#undef EDQUOT
+#endif
#define EDQUOT WSAEDQUOT
+#if defined(ESTALE)
+#undef ESTALE
+#endif
#define ESTALE WSAESTALE
+#if defined(EREMOTE)
+#undef EREMOTE
+#endif
#define EREMOTE WSAEREMOTE
#endif /* _SOCKET_H_ */