~eric-rnd/mysql-proxy/mysql-proxy-fixes

« back to all changes in this revision

Viewing changes to src/chassis-event-thread.c

  • Committer: Kay Roepke
  • Date: 2009-09-07 16:29:20 UTC
  • Revision ID: kay@sun.com-20090907162920-syli2b54k5vu5bnq
properly use closesocket on windows

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#include "chassis-event-thread.h"
46
46
 
47
47
#define C(x) x, sizeof(x) - 1
48
 
 
 
48
#ifndef WIN32
 
49
#define closesocket(x) close(x)
 
50
#endif
49
51
/**
50
52
 * create a new event-op
51
53
 *
187
189
 
188
190
        if (event_thread->notify_fd != -1) {
189
191
                event_del(&(event_thread->notify_fd_event));
190
 
                close(event_thread->notify_fd);
 
192
                closesocket(event_thread->notify_fd);
191
193
        }
192
194
 
193
195
        /* we don't want to free the global event-base */
269
271
 
270
272
        /* close the notification pipe */
271
273
        if (threads->event_notify_fds[0] != -1) {
272
 
                close(threads->event_notify_fds[0]);
 
274
                closesocket(threads->event_notify_fds[0]);
273
275
        }
274
276
        if (threads->event_notify_fds[1] != -1) {
275
 
                close(threads->event_notify_fds[1]);
 
277
                closesocket(threads->event_notify_fds[1]);
276
278
        }
277
279
 
278
280