mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[windows] Compilation fixes
This commit is contained in:
parent
1ecc9e20b4
commit
decdfa853c
16
meson.build
16
meson.build
@ -152,8 +152,8 @@ conf_data.set('CONFIG_OS_RISCOS', false)
|
||||
|
||||
# AC_HEADER_DIRENT
|
||||
conf_data.set('HAVE_DIRENT_H', 1)
|
||||
# AC_HEADER_SYS_WAIT
|
||||
conf_data.set('HAVE_SYS_WAIT_H', 1)
|
||||
|
||||
|
||||
# AC_HEADER_TIME
|
||||
conf_data.set('HAVE_SYS_TIME_H', 1)
|
||||
|
||||
@ -166,6 +166,10 @@ if conf_data.get('CONFIG_ECMASCRIPT')
|
||||
extracppflags += ['-fpermissive', '-Wno-sign-compare']
|
||||
endif
|
||||
|
||||
if compiler.has_header('sys/wait.h')
|
||||
conf_data.set('HAVE_SYS_WAIT_H', 1)
|
||||
endif
|
||||
|
||||
if compiler.has_header('wchar.h')
|
||||
conf_data.set('HAVE_WCHAR_H', 1)
|
||||
endif
|
||||
@ -310,6 +314,14 @@ if compiler.has_header('term.h')
|
||||
conf_data.set('HAVE_TERM_H', 1)
|
||||
endif
|
||||
|
||||
if compiler.has_header('windows.h')
|
||||
conf_data.set('HAVE_WINDOWS_H', 1)
|
||||
endif
|
||||
|
||||
if compiler.has_header('ws2tcpip.h')
|
||||
conf_data.set('HAVE_WS2TCPIP_H', 1)
|
||||
endif
|
||||
|
||||
st = get_option('static')
|
||||
|
||||
deps = []
|
||||
|
@ -28,6 +28,10 @@
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#include <ws2tcpip.h> /* socklen_t for MinGW */
|
||||
#endif
|
||||
|
||||
#include "elinks.h"
|
||||
|
||||
#include "config/cmdline.h"
|
||||
|
@ -29,7 +29,9 @@
|
||||
#include <iconv.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_KD_H
|
||||
#include <sys/kd.h>
|
||||
|
@ -53,9 +53,7 @@ int resize_window(int, int, int, int);
|
||||
int can_resize_window(int);
|
||||
int can_open_os_shell(int);
|
||||
void set_highpri(void);
|
||||
#ifndef WIN32
|
||||
char *tempname(const char *dir, const char *pfx, char *suff);
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPEN_PREALLOC
|
||||
int open_prealloc(char *, int, int, off_t);
|
||||
|
@ -24,6 +24,10 @@
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
#include "elinks.h"
|
||||
|
||||
#include "osdep/stub.h"
|
||||
|
@ -17,10 +17,25 @@ use of this software.
|
||||
Let me know of any bugs and suggestions.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -46,6 +61,11 @@ use of this software.
|
||||
#include "protocol/uri.h"
|
||||
#include "util/conv.h"
|
||||
|
||||
#ifdef CONFIG_OS_WIN32
|
||||
#undef random
|
||||
#define random rand
|
||||
#endif
|
||||
|
||||
static void fsp_stat_continue(void *data);
|
||||
|
||||
typedef void (*return_handler_T)(void *data);
|
||||
@ -435,7 +455,11 @@ fsp_open_session(const char *host, unsigned short port, const char *password)
|
||||
|
||||
if ((fd = getaddrinfo(host, port_s, &hints, &res)) != 0) {
|
||||
|
||||
#ifdef CONFIG_OS_WIN32
|
||||
if (1) {
|
||||
#else
|
||||
if (fd != EAI_SYSTEM) {
|
||||
#endif
|
||||
/* We need to set errno ourself */
|
||||
switch (fd) {
|
||||
case EAI_SOCKTYPE:
|
||||
|
@ -29,6 +29,10 @@
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
#include "elinks.h"
|
||||
|
||||
#include "cache/cache.h"
|
||||
|
@ -136,7 +136,7 @@ void
|
||||
selected_item(struct terminal *term, void *item_, void *ses_)
|
||||
{
|
||||
struct session *ses = (struct session *)ses_;
|
||||
int item = (long) item_;
|
||||
int item = (int)(size_t)item_;
|
||||
struct document_view *doc_view;
|
||||
struct link *link;
|
||||
struct form_state *fs;
|
||||
|
Loading…
Reference in New Issue
Block a user