Subversion Repositories Tewi

Rev

Rev 359 | Rev 364 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 359 Rev 361
Line 1... Line 1...
1
/* $Id: server.c 359 2024-10-16 14:34:51Z nishi $ */
1
/* $Id: server.c 361 2024-10-17 00:37:10Z nishi $ */
2
 
2
 
3
#define SOURCE
3
#define SOURCE
4
 
4
 
5
#include "../config.h"
5
#include "../config.h"
6
 
6
 
Line 61... Line 61...
61
#include <windows.h>
61
#include <windows.h>
62
 
62
 
63
#include "strptime.h"
63
#include "strptime.h"
64
typedef int socklen_t;
64
typedef int socklen_t;
65
#elif defined(__NETWARE__)
65
#elif defined(__NETWARE__)
-
 
66
#include <sys/bsdskt.h>
66
#include <sys/socket.h>
67
#include <sys/socket.h>
67
 
68
 
68
#define IPPROTO_TCP 0
69
#define IPPROTO_TCP 0
69
#define INADDR_ANY 0
70
#define INADDR_ANY 0
70
#define htons(x) x
-
 
71
#include "strptime.h"
71
#include "strptime.h"
72
typedef int socklen_t;
72
typedef int socklen_t;
-
 
73
 
-
 
74
uint16_t htons(uint16_t n) { return ((n >> 8) & 0xff) | ((n << 8) & 0xff00); }
73
#elif defined(__DOS__)
75
#elif defined(__DOS__)
74
#include <netinet/tcp.h>
76
#include <netinet/tcp.h>
75
#include <netinet/in.h>
77
#include <netinet/in.h>
76
#include <arpa/inet.h>
78
#include <arpa/inet.h>
77
#include <sys/select.h>
79
#include <sys/select.h>
Line 1008... Line 1010...
1008
	int i;
1010
	int i;
1009
#ifndef USE_POLL
1011
#ifndef USE_POLL
1010
	fd_set fdset;
1012
	fd_set fdset;
1011
	struct timeval tv;
1013
	struct timeval tv;
1012
#endif
1014
#endif
1013
#if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
1015
#if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__NETWARE__))
1014
	struct thread_entry threads[2048];
1016
	struct thread_entry threads[2048];
1015
	for(i = 0; i < sizeof(threads) / sizeof(threads[0]); i++) {
1017
	for(i = 0; i < sizeof(threads) / sizeof(threads[0]); i++) {
1016
		threads[i].used = false;
1018
		threads[i].used = false;
1017
	}
1019
	}
1018
#endif
1020
#endif
Line 1081... Line 1083...
1081
#endif
1083
#endif
1082
#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
1084
#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
1083
#ifdef __OS2__
1085
#ifdef __OS2__
1084
					_beginthread(tw_server_pass, 0, 0, e);
1086
					_beginthread(tw_server_pass, 0, 0, e);
1085
#elif defined(__NETWARE__)
1087
#elif defined(__NETWARE__)
1086
					tw_server_pass(e);
1088
					BeginThread(tw_server_pass, NULL, 0, e);
1087
#elif defined(__DOS__)
1089
#elif defined(__DOS__)
1088
					tw_server_pass(e);
1090
					tw_server_pass(e);
1089
#else
1091
#else
1090
					_beginthread(tw_server_pass, 0, e);
1092
					_beginthread(tw_server_pass, 0, e);
1091
#endif
1093
#endif