Subversion Repositories Tewi

Rev

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

Rev 187 Rev 212
Line 1... Line 1...
1
/* $Id: tw_config.h 187 2024-09-28 00:07:34Z nishi $ */
1
/* $Id: tw_config.h 212 2024-10-02 17:44:55Z nishi $ */
2
 
2
 
3
#ifndef __TW_CONFIG_H__
3
#ifndef __TW_CONFIG_H__
4
#define __TW_CONFIG_H__
4
#define __TW_CONFIG_H__
5
 
5
 
6
#ifdef __cplusplus
6
#ifdef __cplusplus
Line 12... Line 12...
12
#include "tw_http.h"
12
#include "tw_http.h"
13
 
13
 
14
#include <stdint.h>
14
#include <stdint.h>
15
#include <stdbool.h>
15
#include <stdbool.h>
16
 
16
 
17
#ifdef __MINGW32__
17
#if defined(__MINGW32__) || defined(_MSC_VER)
18
#include <winsock2.h>
18
#include <winsock2.h>
19
#define NO_IPV6
19
#define NO_IPV6
20
#else
20
#else
21
#ifdef __PPU__
21
#ifdef __PPU__
22
#include <net/net.h>
22
#include <net/net.h>
Line 40... Line 40...
40
#define MAX_MIME 1024
40
#define MAX_MIME 1024
41
#define MAX_ICON 1024
41
#define MAX_ICON 1024
42
#define MAX_INDEX 1024
42
#define MAX_INDEX 1024
43
#define MAX_README 8
43
#define MAX_README 8
44
 
44
 
-
 
45
#ifdef _MSC_VER
-
 
46
#define NUM1024 1024UL
-
 
47
#else
-
 
48
#define NUM1024 1024ULL
-
 
49
#endif
-
 
50
 
45
enum TW_DIR_TYPE {
51
enum TW_DIR_TYPE {
46
	TW_DIR_ALLOW = 0,
52
	TW_DIR_ALLOW = 0,
47
	TW_DIR_DENY
53
	TW_DIR_DENY
48
};
54
};
49
 
55
 
Line 86... Line 92...
86
	char* chroot_path;
92
	char* chroot_path;
87
#endif
93
#endif
88
};
94
};
89
 
95
 
90
struct tw_config {
96
struct tw_config {
-
 
97
#ifdef _MSC_VER
-
 
98
	uint32_t ports[MAX_PORTS + 1];
-
 
99
#else
91
	uint64_t ports[MAX_PORTS + 1]; /* If port & (1 << 32) is non-zero, it is SSL */
100
	uint64_t ports[MAX_PORTS + 1]; /* If port & (1 << 32) is non-zero, it is SSL */
-
 
101
#endif
92
	char hostname[1025];
102
	char hostname[1025];
93
	char* defined[1025];
103
	char* defined[1025];
94
	struct tw_config_entry root;
104
	struct tw_config_entry root;
95
	struct tw_config_entry vhosts[MAX_VHOSTS];
105
	struct tw_config_entry vhosts[MAX_VHOSTS];
96
	void* modules[MAX_MODULES];
106
	void* modules[MAX_MODULES];