ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.353 by root, Thu Oct 21 12:32:47 2010 UTC vs.
Revision 1.354 by root, Fri Oct 22 09:24:11 2010 UTC

35 * and other provisions required by the GPL. If you do not delete the 35 * and other provisions required by the GPL. If you do not delete the
36 * provisions above, a recipient may use your version of this file under 36 * provisions above, a recipient may use your version of this file under
37 * either the BSD or the GPL. 37 * either the BSD or the GPL.
38 */ 38 */
39 39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44/* this big block deduces configuration from config.h */ 40/* this big block deduces configuration from config.h */
45#ifndef EV_STANDALONE 41#ifndef EV_STANDALONE
46# ifdef EV_CONFIG_H 42# ifdef EV_CONFIG_H
47# include EV_CONFIG_H 43# include EV_CONFIG_H
48# else 44# else
182# include EV_H 178# include EV_H
183#else 179#else
184# include "ev.h" 180# include "ev.h"
185#endif 181#endif
186 182
183EV_CPP(extern "C" {)
184
187#ifndef _WIN32 185#ifndef _WIN32
188# include <sys/time.h> 186# include <sys/time.h>
189# include <sys/wait.h> 187# include <sys/wait.h>
190# include <unistd.h> 188# include <unistd.h>
191#else 189#else
411# define EFD_CLOEXEC O_CLOEXEC 409# define EFD_CLOEXEC O_CLOEXEC
412# else 410# else
413# define EFD_CLOEXEC 02000000 411# define EFD_CLOEXEC 02000000
414# endif 412# endif
415# endif 413# endif
416# ifdef __cplusplus
417extern "C" {
418# endif
419int (eventfd) (unsigned int initval, int flags); 414EV_CPP(extern "C") int (eventfd) (unsigned int initval, int flags);
420# ifdef __cplusplus
421}
422# endif
423#endif 415#endif
424 416
425#if EV_USE_SIGNALFD 417#if EV_USE_SIGNALFD
426/* our minimum requirement is glibc 2.7 which has the stub, but not the header */ 418/* our minimum requirement is glibc 2.7 which has the stub, but not the header */
427# include <stdint.h> 419# include <stdint.h>
433# define SFD_CLOEXEC O_CLOEXEC 425# define SFD_CLOEXEC O_CLOEXEC
434# else 426# else
435# define SFD_CLOEXEC 02000000 427# define SFD_CLOEXEC 02000000
436# endif 428# endif
437# endif 429# endif
438# ifdef __cplusplus
439extern "C" {
440# endif
441int signalfd (int fd, const sigset_t *mask, int flags); 430EV_CPP (extern "C") int signalfd (int fd, const sigset_t *mask, int flags);
442 431
443struct signalfd_siginfo 432struct signalfd_siginfo
444{ 433{
445 uint32_t ssi_signo; 434 uint32_t ssi_signo;
446 char pad[128 - sizeof (uint32_t)]; 435 char pad[128 - sizeof (uint32_t)];
447}; 436};
448# ifdef __cplusplus
449}
450# endif
451#endif 437#endif
452 438
453/**/ 439/**/
454 440
455#if EV_VERIFY >= 3 441#if EV_VERIFY >= 3
3807 3793
3808#if EV_MULTIPLICITY 3794#if EV_MULTIPLICITY
3809 #include "ev_wrap.h" 3795 #include "ev_wrap.h"
3810#endif 3796#endif
3811 3797
3812#ifdef __cplusplus 3798EV_CPP(})
3813}
3814#endif
3815 3799

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines