mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
[windows] Less number of warnings
This commit is contained in:
parent
3aed9a8fda
commit
1042755f7f
@ -831,6 +831,9 @@
|
||||
/* Define to 1 if you have the <windows.h> header file. */
|
||||
#mesondefine HAVE_WINDOWS_H
|
||||
|
||||
/* Define to 1 if you have the <winsock2.h> header file. */
|
||||
#mesondefine HAVE_WINSOCK2_H
|
||||
|
||||
/* Define to 1 if you have the <ws2tcpip.h> header file. */
|
||||
#mesondefine HAVE_WS2TCPIP_H
|
||||
|
||||
|
@ -318,6 +318,10 @@ if compiler.has_header('windows.h')
|
||||
conf_data.set('HAVE_WINDOWS_H', 1)
|
||||
endif
|
||||
|
||||
if compiler.has_header('winsock2.h')
|
||||
conf_data.set('HAVE_WINSOCK2_H', 1)
|
||||
endif
|
||||
|
||||
if compiler.has_header('ws2tcpip.h')
|
||||
conf_data.set('HAVE_WS2TCPIP_H', 1)
|
||||
endif
|
||||
|
@ -44,6 +44,9 @@
|
||||
#endif
|
||||
#else /* WIN32 */
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
|
||||
#ifndef EL__OSDEP_WIN32_OVERRIDES_H
|
||||
#define EL__OSDEP_WIN32_OVERRIDES_H
|
||||
|
||||
#ifdef CONFIG_OS_WIN32
|
||||
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
@ -33,14 +33,37 @@
|
||||
/* Misc defines */
|
||||
#define IN_LOOPBACKNET 127
|
||||
|
||||
#ifndef EADDRINUSE
|
||||
#define EADDRINUSE WSAEADDRINUSE
|
||||
#endif
|
||||
|
||||
#ifndef EAFNOSUPPORT
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#endif
|
||||
|
||||
#ifndef EALREADY
|
||||
#define EALREADY WSAEALREADY
|
||||
#endif
|
||||
|
||||
#ifndef ECONNREFUSED
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#endif
|
||||
|
||||
#ifndef ECONNRESET
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#endif
|
||||
|
||||
#ifndef EINPROGRESS
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#endif
|
||||
|
||||
#ifndef EWOULDBLOCK
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#endif
|
||||
|
||||
#ifndef ENETUNREACH
|
||||
#define ENETUNREACH WSAENETUNREACH
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#ifdef CONFIG_OS_WIN32
|
||||
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
@ -7,7 +7,14 @@
|
||||
/* Get SHGFP_TYPE_CURRENT from <shlobj.h>. */
|
||||
#define _WIN32_IE 0x500
|
||||
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <shlobj.h>
|
||||
|
||||
#include "osdep/system.h"
|
||||
|
Loading…
Reference in New Issue
Block a user