1*b30d1939SAndy Fiddaman 2*b30d1939SAndy Fiddaman/* : : generated by proto : : */ 3*b30d1939SAndy Fiddaman/* : : generated from contrib/ast/src/cmd/ksh93/features/poll by iffe version 2012-07-17 : : */ 4*b30d1939SAndy Fiddaman#ifndef _def_poll_ksh93 5*b30d1939SAndy Fiddaman#if !defined(__PROTO__) 6*b30d1939SAndy Fiddaman# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus) 7*b30d1939SAndy Fiddaman# if defined(__cplusplus) 8*b30d1939SAndy Fiddaman# define __LINKAGE__ "C" 9*b30d1939SAndy Fiddaman# else 10*b30d1939SAndy Fiddaman# define __LINKAGE__ 11*b30d1939SAndy Fiddaman# endif 12*b30d1939SAndy Fiddaman# define __STDARG__ 13*b30d1939SAndy Fiddaman# define __PROTO__(x) x 14*b30d1939SAndy Fiddaman# define __OTORP__(x) 15*b30d1939SAndy Fiddaman# define __PARAM__(n,o) n 16*b30d1939SAndy Fiddaman# if !defined(__STDC__) && !defined(__cplusplus) 17*b30d1939SAndy Fiddaman# if !defined(c_plusplus) 18*b30d1939SAndy Fiddaman# define const 19*b30d1939SAndy Fiddaman# endif 20*b30d1939SAndy Fiddaman# define signed 21*b30d1939SAndy Fiddaman# define void int 22*b30d1939SAndy Fiddaman# define volatile 23*b30d1939SAndy Fiddaman# define __V_ char 24*b30d1939SAndy Fiddaman# else 25*b30d1939SAndy Fiddaman# define __V_ void 26*b30d1939SAndy Fiddaman# endif 27*b30d1939SAndy Fiddaman# else 28*b30d1939SAndy Fiddaman# define __PROTO__(x) () 29*b30d1939SAndy Fiddaman# define __OTORP__(x) x 30*b30d1939SAndy Fiddaman# define __PARAM__(n,o) o 31*b30d1939SAndy Fiddaman# define __LINKAGE__ 32*b30d1939SAndy Fiddaman# define __V_ char 33*b30d1939SAndy Fiddaman# define const 34*b30d1939SAndy Fiddaman# define signed 35*b30d1939SAndy Fiddaman# define void int 36*b30d1939SAndy Fiddaman# define volatile 37*b30d1939SAndy Fiddaman# endif 38*b30d1939SAndy Fiddaman# define __MANGLE__ __LINKAGE__ 39*b30d1939SAndy Fiddaman# if defined(__cplusplus) || defined(c_plusplus) 40*b30d1939SAndy Fiddaman# define __VARARG__ ... 41*b30d1939SAndy Fiddaman# else 42*b30d1939SAndy Fiddaman# define __VARARG__ 43*b30d1939SAndy Fiddaman# endif 44*b30d1939SAndy Fiddaman# if defined(__STDARG__) 45*b30d1939SAndy Fiddaman# define __VA_START__(p,a) va_start(p,a) 46*b30d1939SAndy Fiddaman# else 47*b30d1939SAndy Fiddaman# define __VA_START__(p,a) va_start(p) 48*b30d1939SAndy Fiddaman# endif 49*b30d1939SAndy Fiddaman# if !defined(__INLINE__) 50*b30d1939SAndy Fiddaman# if defined(__cplusplus) 51*b30d1939SAndy Fiddaman# define __INLINE__ extern __MANGLE__ inline 52*b30d1939SAndy Fiddaman# else 53*b30d1939SAndy Fiddaman# if defined(_WIN32) && !defined(__GNUC__) 54*b30d1939SAndy Fiddaman# define __INLINE__ __inline 55*b30d1939SAndy Fiddaman# endif 56*b30d1939SAndy Fiddaman# endif 57*b30d1939SAndy Fiddaman# endif 58*b30d1939SAndy Fiddaman#endif 59*b30d1939SAndy Fiddaman#if !defined(__LINKAGE__) 60*b30d1939SAndy Fiddaman#define __LINKAGE__ /* 2004-08-11 transition */ 61*b30d1939SAndy Fiddaman#endif 62*b30d1939SAndy Fiddaman 63*b30d1939SAndy Fiddaman#define _def_poll_ksh93 1 64*b30d1939SAndy Fiddaman#define _sys_types 1 /* #include <sys/types.h> ok */ 65*b30d1939SAndy Fiddaman#define _LIB_nsl 1 /* -lnsl is a library */ 66*b30d1939SAndy Fiddaman#define _LIB_socket 1 /* -lsocket is a library */ 67*b30d1939SAndy Fiddaman#define _hdr_poll 1 /* #include <poll.h> ok */ 68*b30d1939SAndy Fiddaman#define _hdr_netinet_in 1 /* #include <netinet/in.h> ok */ 69*b30d1939SAndy Fiddaman#define _sys_poll 1 /* #include <sys/poll.h> ok */ 70*b30d1939SAndy Fiddaman#define _sys_socket 1 /* #include <sys/socket.h> ok */ 71*b30d1939SAndy Fiddaman#define _lib_select 1 /* select() in default lib(s) */ 72*b30d1939SAndy Fiddaman#define _lib_poll 1 /* poll() in default lib(s) */ 73*b30d1939SAndy Fiddaman#define _lib_socket 1 /* socket() in default lib(s) */ 74*b30d1939SAndy Fiddaman#define _lib_htons 1 /* htons() in default lib(s) */ 75*b30d1939SAndy Fiddaman#define _lib_htonl 1 /* htonl() in default lib(s) */ 76*b30d1939SAndy Fiddaman#define _hdr_netdb 1 /* #include <netdb.h> ok */ 77*b30d1939SAndy Fiddaman#define _lib_getaddrinfo 1 /* getaddrinfo() in default lib(s) */ 78*b30d1939SAndy Fiddaman#define _hdr_time 1 /* #include <time.h> ok */ 79*b30d1939SAndy Fiddaman#define _sys_time 1 /* #include <sys/time.h> ok */ 80*b30d1939SAndy Fiddaman#define _sys_times 1 /* #include <sys/times.h> ok */ 81*b30d1939SAndy Fiddaman#define _hdr_stddef 1 /* #include <stddef.h> ok */ 82*b30d1939SAndy Fiddaman#define _hdr_stdlib 1 /* #include <stdlib.h> ok */ 83*b30d1939SAndy Fiddaman#define _sys_select 1 /* #include <sys/select.h> ok */ 84*b30d1939SAndy Fiddaman#define _typ_fd_set 1 /* fd_set is a type */ 85*b30d1939SAndy Fiddaman#define _hdr_unistd 1 /* #include <unistd.h> ok */ 86*b30d1939SAndy Fiddaman#define _typ_socklen_t 1 /* socklen_t is a type */ 87*b30d1939SAndy Fiddaman 88*b30d1939SAndy Fiddaman#ifdef _lib_poll 89*b30d1939SAndy Fiddaman# define poll _SYS_poll 90*b30d1939SAndy Fiddaman#else 91*b30d1939SAndy Fiddaman# undef _hdr_poll 92*b30d1939SAndy Fiddaman# undef _sys_poll 93*b30d1939SAndy Fiddaman#endif /* _lib_poll */ 94*b30d1939SAndy Fiddaman#ifdef _hdr_poll 95*b30d1939SAndy Fiddaman# include <poll.h> 96*b30d1939SAndy Fiddaman#else 97*b30d1939SAndy Fiddaman# ifdef _sys_poll 98*b30d1939SAndy Fiddaman# include <sys/poll.h> 99*b30d1939SAndy Fiddaman# endif /* _sys_poll */ 100*b30d1939SAndy Fiddaman#endif /* _hdr_poll */ 101*b30d1939SAndy Fiddaman#ifdef _lib_poll 102*b30d1939SAndy Fiddaman# undef poll 103*b30d1939SAndy Fiddaman extern __MANGLE__ int poll __PROTO__((struct pollfd*,unsigned long,int)); 104*b30d1939SAndy Fiddaman#endif /* _lib_poll */ 105*b30d1939SAndy Fiddaman#ifdef _lib_select 106*b30d1939SAndy Fiddaman# ifndef FD_ZERO 107*b30d1939SAndy Fiddaman# define FD_ZERO(x) (*(x)=0) 108*b30d1939SAndy Fiddaman# endif /* FD_ZERO */ 109*b30d1939SAndy Fiddaman# ifndef FD_SET 110*b30d1939SAndy Fiddaman# define FD_SET(n,x) (*(x)|=(1L<<(n))) 111*b30d1939SAndy Fiddaman# endif /* FD_SET */ 112*b30d1939SAndy Fiddaman# ifndef _typ_fd_set 113*b30d1939SAndy Fiddaman typedef long fd_set; 114*b30d1939SAndy Fiddaman# endif /*_typ_fd_set */ 115*b30d1939SAndy Fiddaman#endif /* _lib_select */ 116*b30d1939SAndy Fiddaman 117*b30d1939SAndy Fiddaman#endif 118