comparison src/event/modules/ngx_eventport_module.c @ 1870:a62fb6c156c5

fix building --test-build-rtsig and --test-build-eventport on FreeBSD 7
author Igor Sysoev <igor@sysoev.ru>
date Mon, 28 Jan 2008 16:24:01 +0000
parents f69d1aab6a0f
children 6e7daf852eec
comparison
equal deleted inserted replaced
1869:192443881e51 1870:a62fb6c156c5
37 37
38 typedef struct port_notify { 38 typedef struct port_notify {
39 int portnfy_port; /* bind request(s) to port */ 39 int portnfy_port; /* bind request(s) to port */
40 void *portnfy_user; /* user defined */ 40 void *portnfy_user; /* user defined */
41 } port_notify_t; 41 } port_notify_t;
42
43 typedef struct itimerspec { /* definition per POSIX.4 */
44 struct timespec it_interval;/* timer period */
45 struct timespec it_value; /* timer expiration */
46 } itimerspec_t;
47 42
48 int port_create(void) 43 int port_create(void)
49 { 44 {
50 return -1; 45 return -1;
51 } 46 }
104 static char *ngx_eventport_init_conf(ngx_cycle_t *cycle, void *conf); 99 static char *ngx_eventport_init_conf(ngx_cycle_t *cycle, void *conf);
105 100
106 static int ep = -1; 101 static int ep = -1;
107 static port_event_t *event_list; 102 static port_event_t *event_list;
108 static ngx_uint_t nevents; 103 static ngx_uint_t nevents;
109 static timer_t event_timer = -1; 104 static timer_t event_timer = (timer_t) -1;
110 105
111 static ngx_str_t eventport_name = ngx_string("eventport"); 106 static ngx_str_t eventport_name = ngx_string("eventport");
112 107
113 108
114 static ngx_command_t ngx_eventport_commands[] = { 109 static ngx_command_t ngx_eventport_commands[] = {
235 230
236 231
237 static void 232 static void
238 ngx_eventport_done(ngx_cycle_t *cycle) 233 ngx_eventport_done(ngx_cycle_t *cycle)
239 { 234 {
240 if (event_timer != -1) { 235 if (event_timer != (timer_t) -1) {
241 if (timer_delete(event_timer) == -1) { 236 if (timer_delete(event_timer) == -1) {
242 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, 237 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
243 "timer_delete() failed"); 238 "timer_delete() failed");
244 } 239 }
245 240
246 event_timer = -1; 241 event_timer = (timer_t) -1;
247 } 242 }
248 243
249 if (close(ep) == -1) { 244 if (close(ep) == -1) {
250 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, 245 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
251 "close() event port failed"); 246 "close() event port failed");