Use netinc.h
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1620 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
48c1f94425
commit
fef8729179
4 changed files with 5 additions and 149 deletions
|
@ -4,42 +4,7 @@
|
|||
|
||||
#include "iweb.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define EMSGSIZE WSAEMSGSIZE
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define ECONNABORTED WSAECONNABORTED
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
||||
|
||||
#define qerrno WSAGetLastError()
|
||||
#else
|
||||
#define qerrno errno
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/uio.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef sun
|
||||
#include <sys/filio.h>
|
||||
#endif
|
||||
|
||||
#ifdef NeXT
|
||||
#include <libc.h>
|
||||
#endif
|
||||
|
||||
#define closesocket close
|
||||
#define ioctlsocket ioctl
|
||||
#endif
|
||||
|
||||
#include "netinc.h"
|
||||
|
||||
typedef struct FTPclientconn_s{
|
||||
char server[256];
|
||||
|
|
|
@ -10,42 +10,7 @@
|
|||
//the later bits of the file may not arrive before the client closes the conenction.
|
||||
//this is a major bug and can prevent the server from giving files at a high pl/ping
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define EMSGSIZE WSAEMSGSIZE
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define ECONNABORTED WSAECONNABORTED
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
||||
|
||||
#define qerrno WSAGetLastError()
|
||||
#else
|
||||
#define qerrno errno
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/uio.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef sun
|
||||
#include <sys/filio.h>
|
||||
#endif
|
||||
|
||||
#ifdef NeXT
|
||||
#include <libc.h>
|
||||
#endif
|
||||
|
||||
#define closesocket close
|
||||
#define ioctlsocket ioctl
|
||||
#endif
|
||||
#include "netinc.h"
|
||||
|
||||
int ftpfilelistsocket;
|
||||
|
||||
|
|
|
@ -5,49 +5,11 @@
|
|||
#include "iweb.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
//msvc crap
|
||||
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define EMSGSIZE WSAEMSGSIZE
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define ECONNABORTED WSAECONNABORTED
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
||||
|
||||
#define snprintf _snprintf
|
||||
|
||||
#define qerrno WSAGetLastError()
|
||||
#else
|
||||
|
||||
//gcc stuff
|
||||
|
||||
#define qerrno errno
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/uio.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef sun
|
||||
#include <sys/filio.h>
|
||||
#endif
|
||||
|
||||
#ifdef NeXT
|
||||
#include <libc.h>
|
||||
#endif
|
||||
|
||||
#define closesocket close
|
||||
#define ioctlsocket ioctl
|
||||
#endif
|
||||
|
||||
#include "netinc.h"
|
||||
|
||||
/*
|
||||
Test files/servers.:
|
||||
|
|
|
@ -4,46 +4,10 @@
|
|||
|
||||
#include "iweb.h"
|
||||
|
||||
#include "netinc.h"
|
||||
|
||||
//FIXME: Before any admins use this for any serious usage, make the server send bits of file slowly.
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define EMSGSIZE WSAEMSGSIZE
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define ECONNABORTED WSAECONNABORTED
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
||||
|
||||
#define qerrno WSAGetLastError()
|
||||
#else
|
||||
#define qerrno errno
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/uio.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef sun
|
||||
#include <sys/filio.h>
|
||||
#endif
|
||||
|
||||
#ifdef NeXT
|
||||
#include <libc.h>
|
||||
#endif
|
||||
|
||||
#define closesocket close
|
||||
#define ioctlsocket ioctl
|
||||
#endif
|
||||
|
||||
static qboolean httpserverinitied = false;
|
||||
static int httpserversocket;
|
||||
|
||||
|
|
Loading…
Reference in a new issue