annotate src/os/unix/ngx_posix_config.h @ 1576:5cd655d5d2fa

Cygwin support
author Igor Sysoev <igor@sysoev.ru>
date Tue, 16 Oct 2007 14:14:30 +0000
parents 0d57c150115b
children 81774dc3db28
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
441
da8c5707af39 nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents: 374
diff changeset
1
da8c5707af39 nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents: 374
diff changeset
2 /*
444
42d11f017717 nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents: 441
diff changeset
3 * Copyright (C) Igor Sysoev
441
da8c5707af39 nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents: 374
diff changeset
4 */
da8c5707af39 nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents: 374
diff changeset
5
da8c5707af39 nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents: 374
diff changeset
6
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
7 #ifndef _NGX_POSIX_CONFIG_H_INCLUDED_
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
8 #define _NGX_POSIX_CONFIG_H_INCLUDED_
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
9
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
10
515
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
11 #if (NGX_HPUX)
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
12 #define _XOPEN_SOURCE
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
13 #define _XOPEN_SOURCE_EXTENDED 1
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
14 #endif
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
15
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
16
515
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 509
diff changeset
17 #if (NGX_TRU64)
467
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
18 #define _REENTRANT
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
19 #endif
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
20
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
21
1576
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
22 #ifdef __CYGWIN__
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
23 #define timezonevar /* timezone is variable */
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
24 #endif
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
25
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
26
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
27 #include <sys/types.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
28 #include <sys/time.h>
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
29 #if (NGX_HAVE_UNISTD_H)
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
30 #include <unistd.h>
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
31 #endif
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
32 #if (NGX_HAVE_INTTYPES_H)
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
33 #include <inttypes.h>
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
34 #endif
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
35 #include <stdarg.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
36 #include <stddef.h> /* offsetof() */
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
37 #include <stdio.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
38 #include <stdlib.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
39 #include <errno.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
40 #include <string.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
41 #include <signal.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
42 #include <pwd.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
43 #include <grp.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
44 #include <dirent.h>
727
532d15ddbe68 glob support in include
Igor Sysoev <igor@sysoev.ru>
parents: 601
diff changeset
45 #include <glob.h>
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
46
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
47 #if (NGX_HAVE_SYS_FILIO_H)
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
48 #include <sys/filio.h> /* FIONBIO */
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
49 #endif
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
50 #include <sys/ioctl.h> /* FIONBIO */
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
51
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
52 #include <sys/uio.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
53 #include <sys/stat.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
54 #include <fcntl.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
55
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
56 #include <sys/wait.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
57 #include <sys/mman.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
58 #include <sys/resource.h>
374
213f17e9f776 nginx-0.0.7-2004-07-02-09:47:00 import
Igor Sysoev <igor@sysoev.ru>
parents: 355
diff changeset
59 #include <sched.h>
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
60
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
61 #include <sys/socket.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
62 #include <netinet/in.h>
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
63 #include <netinet/tcp.h> /* TCP_NODELAY */
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
64 #include <arpa/inet.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
65 #include <netdb.h>
479
c52408583801 nginx-0.1.14-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 469
diff changeset
66 #include <sys/un.h>
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
67
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
68 #if (NGX_HAVE_LIMITS_H)
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
69 #include <limits.h> /* IOV_MAX */
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
70 #endif
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
71
1576
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
72 #if (NGX_HAVE_MALLOC_H)
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
73 #include <malloc.h> /* memalign() */
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
74 #endif
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
75
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
76 #if (NGX_HAVE_CRYPT_H)
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
77 #include <crypt.h>
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
78 #endif
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
79
5cd655d5d2fa Cygwin support
Igor Sysoev <igor@sysoev.ru>
parents: 1377
diff changeset
80
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
81 #ifndef IOV_MAX
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
82 #define IOV_MAX 16
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
83 #endif
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
84
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
85
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
86 #include <ngx_auto_config.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
87
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
88
469
2ff194b74f1e nginx-0.1.9-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 467
diff changeset
89 #if (NGX_HAVE_POLL)
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
90 #include <poll.h>
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
91 #endif
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
92
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
93
469
2ff194b74f1e nginx-0.1.9-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 467
diff changeset
94 #if (NGX_HAVE_KQUEUE)
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
95 #include <sys/event.h>
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
96 #endif
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
97
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
98
469
2ff194b74f1e nginx-0.1.9-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 467
diff changeset
99 #if (NGX_HAVE_DEVPOLL)
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
100 #include <sys/ioctl.h>
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
101 #include <sys/devpoll.h>
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
102 #endif
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
103
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
104
1377
0d57c150115b set default listen() backlog to 511 on all platforms except FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents: 727
diff changeset
105 #define NGX_LISTEN_BACKLOG 511
0d57c150115b set default listen() backlog to 511 on all platforms except FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents: 727
diff changeset
106
0d57c150115b set default listen() backlog to 511 on all platforms except FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents: 727
diff changeset
107
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
108 #if (__FreeBSD__) && (__FreeBSD_version < 400017)
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
109
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
110 #include <sys/param.h> /* ALIGN() */
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
111
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
112 /* FreeBSD 3.x has no CMSG_SPACE() at all and has the broken CMSG_DATA() */
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
113
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
114 #undef CMSG_SPACE
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
115 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l))
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
116
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
117 #undef CMSG_DATA
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
118 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr)))
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
119
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
120 #endif
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
121
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
122
601
77f77f53214a nginx-0.3.22-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 539
diff changeset
123 extern char **environ;
77f77f53214a nginx-0.3.22-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 539
diff changeset
124
77f77f53214a nginx-0.3.22-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 539
diff changeset
125
355
0fb6c53fb135 nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
126 #endif /* _NGX_POSIX_CONFIG_H_INCLUDED_ */