Klaus Demo nginx / 20ce4fc
Merge of r4760, r4761: -Wmissing-prototypes. Fixed compilation with -Wmissing-prototypes. Added a commented out -Wmissing-prototypes to CFLAGS. It is commented out to not break builds with 3rd party modules. Maxim Dounin 9 years ago
15 changed file(s) with 76 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
148148 CFLAGS="$CFLAGS -Wall -Wpointer-arith"
149149 #CFLAGS="$CFLAGS -Wconversion"
150150 #CFLAGS="$CFLAGS -Winline"
151 #CFLAGS="$CFLAGS -Wmissing-prototypes"
151152
152153
153154 case "$NGX_GCC_VER" in
14471447 }
14481448
14491449
1450 #if 0
1451
14501452 char *
14511453 ngx_conf_unsupported(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
14521454 {
14531455 return "unsupported on this platform";
14541456 }
1457
1458 #endif
14551459
14561460
14571461 char *
55
66 #include <ngx_config.h>
77 #include <ngx_core.h>
8 #include <ngx_crypt.h>
89 #include <ngx_md5.h>
910 #if (NGX_HAVE_SHA1)
1011 #include <ngx_sha1.h>
4343 epoll_data_t data;
4444 };
4545
46
47 int epoll_create(int size);
48
4649 int epoll_create(int size)
4750 {
4851 return -1;
4952 }
5053
54
55 int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
56
5157 int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
5258 {
5359 return -1;
5460 }
61
62
63 int epoll_wait(int epfd, struct epoll_event *events, int nevents, int timeout);
5564
5665 int epoll_wait(int epfd, struct epoll_event *events, int nevents, int timeout)
5766 {
7483 int64_t res2; /* secondary result */
7584 };
7685
77
78 int eventfd(u_int initval)
79 {
80 return -1;
81 }
8286
8387 #endif
8488 #endif
1313
1414 #define ushort_t u_short
1515 #define uint_t u_int
16
17 #ifndef CLOCK_REALTIME
18 #define CLOCK_REALTIME 0
19 typedef int clockid_t;
20 typedef void * timer_t;
21 #endif
1622
1723 /* Solaris declarations */
1824
2329 #define PORT_SOURCE_ALERT 5
2430 #define PORT_SOURCE_MQ 6
2531
32 #ifndef ETIME
2633 #define ETIME 64
34 #endif
2735
2836 #define SIGEV_PORT 4
2937
4957
5058 #endif
5159
60 int port_create(void);
61
5262 int port_create(void)
5363 {
5464 return -1;
5565 }
66
67
68 int port_associate(int port, int source, uintptr_t object, int events,
69 void *user);
5670
5771 int port_associate(int port, int source, uintptr_t object, int events,
5872 void *user)
6074 return -1;
6175 }
6276
77
78 int port_dissociate(int port, int source, uintptr_t object);
79
6380 int port_dissociate(int port, int source, uintptr_t object)
6481 {
6582 return -1;
6683 }
84
85
86 int port_getn(int port, port_event_t list[], uint_t max, uint_t *nget,
87 struct timespec *timeout);
6788
6889 int port_getn(int port, port_event_t list[], uint_t max, uint_t *nget,
6990 struct timespec *timeout)
7192 return -1;
7293 }
7394
95
96 int timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid);
97
7498 int timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
7599 {
76100 return -1;
77101 }
102
103
104 int timer_settime(timer_t timerid, int flags, const struct itimerspec *value,
105 struct itimerspec *ovalue);
78106
79107 int timer_settime(timer_t timerid, int flags, const struct itimerspec *value,
80108 struct itimerspec *ovalue)
81109 {
82110 return -1;
83111 }
112
113
114 int timer_delete(timer_t timerid);
84115
85116 int timer_delete(timer_t timerid)
86117 {
1010
1111
1212 #if (NGX_TEST_BUILD_RTSIG)
13
14 #if (NGX_DARWIN)
15
16 #define SIGRTMIN 33
17 #define si_fd __pad[0]
18
19 #else
1320
1421 #ifdef SIGRTMIN
1522 #define si_fd _reason.__spare__.__spare2__[0]
1825 #define si_fd __spare__[0]
1926 #endif
2027
28 #endif
29
2130 #define F_SETSIG 10
2231 #define KERN_RTSIGNR 30
2332 #define KERN_RTSIGMAX 31
33
34 int sigtimedwait(const sigset_t *set, siginfo_t *info,
35 const struct timespec *timeout);
2436
2537 int sigtimedwait(const sigset_t *set, siginfo_t *info,
2638 const struct timespec *timeout)
566566
567567 #if !(NGX_WIN32)
568568
569 void
569 static void
570570 ngx_timer_signal_handler(int signo)
571571 {
572572 ngx_event_timer_alarm = 1;
217217 };
218218
219219
220 ngx_int_t
220 static ngx_int_t
221221 ngx_http_log_handler(ngx_http_request_t *r)
222222 {
223223 u_char *line, *p;
8080 };
8181
8282
83 ngx_int_t
83 static ngx_int_t
8484 ngx_http_upstream_init_least_conn(ngx_conf_t *cf,
8585 ngx_http_upstream_srv_conf_t *us)
8686 {
66
77 #include <ngx_config.h>
88 #include <ngx_core.h>
9 #include <ngx_http.h>
910
1011
1112 static ngx_uint_t mday[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
88 #include <ngx_core.h>
99 #include <ngx_event.h>
1010 #include <ngx_mail.h>
11 #include <ngx_mail_pop3_module.h>
12 #include <ngx_mail_imap_module.h>
13 #include <ngx_mail_smtp_module.h>
1114
1215
1316 ngx_int_t
1919 // #include <string>
2020
2121
22 void ngx_cpp_test_handler(void *data);
23
2224 void
2325 ngx_cpp_test_handler(void *data)
2426 {
4747 #include <libkern/OSAtomic.h>
4848
4949 /* "bool" conflicts with perl's CORE/handy.h */
50 #if 0
5051 #undef bool
52 #endif
5153
5254
5355 #define NGX_HAVE_ATOMIC_OPS 1
9797 }
9898
9999
100 #if 0
101
100102 ngx_int_t
101103 ngx_posix_post_conf_init(ngx_log_t *log)
102104 {
121123
122124 return NGX_OK;
123125 }
126
127 #endif
2727 {
2828 return -1;
2929 }
30
31 ngx_chain_t *ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in,
32 off_t limit);
3033
3134 #endif
3235