ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/schmorp.h
(Generate patch)

Comparing IO-AIO/schmorp.h (file contents):
Revision 1.17 by root, Sat Feb 17 15:21:07 2018 UTC vs.
Revision 1.18 by root, Tue Feb 20 06:05:19 2018 UTC

357 || fcntl (fd, F_SETFD, FD_CLOEXEC); 357 || fcntl (fd, F_SETFD, FD_CLOEXEC);
358} 358}
359 359
360#endif 360#endif
361 361
362#if HAVE_EVENTFD
363# include <sys/eventfd.h>
364#else
362#if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) 365# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
363# define SCHMORP_H_HAVE_EVENTFD 1 366# define SCHMORP_H_HAVE_EVENTFD 1
364/* our minimum requirement is glibc 2.7 which has the stub, but not the header */ 367/* our minimum requirement is glibc 2.7 which has the stub, but not the header */
365# include <stdint.h> 368# include <stdint.h>
366# ifdef __cplusplus 369# ifdef __cplusplus
367extern "C" { 370extern "C" {
368# endif 371# endif
369 int eventfd (unsigned int initval, int flags); 372 int eventfd (unsigned int initval, int flags);
370# ifdef __cplusplus 373# ifdef __cplusplus
371} 374}
372# endif 375# endif
373#else 376# else
374# define eventfd(initval,flags) -1 377# define eventfd(initval,flags) -1
378# endif
375#endif 379#endif
376 380
377typedef struct { 381typedef struct {
378 int fd[2]; /* read, write fd, might be equal */ 382 int fd[2]; /* read, write fd, might be equal */
379 int len; /* write length (1 pipe/socket, 8 eventfd) */ 383 int len; /* write length (1 pipe/socket, 8 eventfd) */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines