Print this page
872 remove duplicate daemon() definitions


  29 #include <sys/socket.h>
  30 #include <sys/param.h>
  31 #include <sys/time.h>
  32 #if (!defined(BSD)) || (BSD < 199306)
  33 #include <sys/bitypes.h>
  34 #endif
  35 #ifdef HAVE_INTTYPES_H
  36 #include <inttypes.h>
  37 #endif
  38 #ifdef HAVE_SYS_SELECT_H
  39 #include <sys/select.h>
  40 #endif /* HAVE_SYS_SELECT_H */
  41 
  42 #ifdef REENABLE_SEND
  43 #undef send
  44 #endif
  45 
  46 #undef NEED_PSELECT
  47 #undef HAVE_SA_LEN
  48 #undef HAVE_MINIMUM_IFREQ
  49 #define NEED_DAEMON 1
  50 #undef NEED_STRSEP
  51 #undef NEED_STRERROR
  52 #ifdef NEED_STRERROR
  53 const char *isc_strerror(int);
  54 #define strerror isc_strerror
  55 #endif
  56 /* HAS_INET6_STRUCTS and HAVE_SIN6_SCOPE_ID are defined by port_ipv6.h
  57  * #define HAS_INET6_STRUCTS 1
  58  * #define HAVE_SIN6_SCOPE_ID 1
  59  */
  60 #include <port_ipv6.h>
  61 
  62 #undef NEED_IN6ADDR_ANY
  63 #undef HAS_IN_ADDR6
  64 #define HAVE_SOCKADDR_STORAGE 1
  65 #undef NEED_GETTIMEOFDAY
  66 #define HAVE_STRNDUP
  67 #undef USE_FIONBIO_IOCTL
  68 #undef INNETGR_ARGS
  69 


 275 #define INADDR_NONE 0xffffffff
 276 #endif
 277 
 278 #ifndef MAXHOSTNAMELEN
 279 #define MAXHOSTNAMELEN 256
 280 #endif
 281 
 282 #ifndef INET6_ADDRSTRLEN
 283 /* sizeof("aaaa:bbbb:cccc:dddd:eeee:ffff:123.123.123.123") */
 284 #define INET6_ADDRSTRLEN 46
 285 #endif
 286 
 287 #ifndef MIN
 288 #define MIN(x,y) (((x) <= (y)) ? (x) : (y))
 289 #endif
 290 
 291 #ifndef MAX
 292 #define MAX(x,y) (((x) >= (y)) ? (x) : (y))
 293 #endif
 294 
 295 #ifdef NEED_DAEMON
 296 int daemon(int nochdir, int noclose);
 297 #endif
 298 
 299 #ifdef NEED_STRSEP
 300 char * strsep(char **stringp, const char *delim);
 301 #endif
 302 
 303 #ifndef ALIGN
 304 #define ALIGN(p) (((uintptr_t)(p) + (sizeof(long) - 1)) & ~(sizeof(long) - 1))
 305 #endif
 306 
 307 #ifdef NEED_SETGROUPENT
 308 int setgroupent(int stayopen);
 309 #endif
 310 
 311 #ifdef NEED_GETGROUPLIST
 312 int getgrouplist(GETGROUPLIST_ARGS);
 313 #endif
 314 
 315 #ifdef POSIX_GETGRNAM_R
 316 int
 317 __posix_getgrnam_r(const char *, struct group *, char *, int, struct group **);
 318 #endif




  29 #include <sys/socket.h>
  30 #include <sys/param.h>
  31 #include <sys/time.h>
  32 #if (!defined(BSD)) || (BSD < 199306)
  33 #include <sys/bitypes.h>
  34 #endif
  35 #ifdef HAVE_INTTYPES_H
  36 #include <inttypes.h>
  37 #endif
  38 #ifdef HAVE_SYS_SELECT_H
  39 #include <sys/select.h>
  40 #endif /* HAVE_SYS_SELECT_H */
  41 
  42 #ifdef REENABLE_SEND
  43 #undef send
  44 #endif
  45 
  46 #undef NEED_PSELECT
  47 #undef HAVE_SA_LEN
  48 #undef HAVE_MINIMUM_IFREQ

  49 #undef NEED_STRSEP
  50 #undef NEED_STRERROR
  51 #ifdef NEED_STRERROR
  52 const char *isc_strerror(int);
  53 #define strerror isc_strerror
  54 #endif
  55 /* HAS_INET6_STRUCTS and HAVE_SIN6_SCOPE_ID are defined by port_ipv6.h
  56  * #define HAS_INET6_STRUCTS 1
  57  * #define HAVE_SIN6_SCOPE_ID 1
  58  */
  59 #include <port_ipv6.h>
  60 
  61 #undef NEED_IN6ADDR_ANY
  62 #undef HAS_IN_ADDR6
  63 #define HAVE_SOCKADDR_STORAGE 1
  64 #undef NEED_GETTIMEOFDAY
  65 #define HAVE_STRNDUP
  66 #undef USE_FIONBIO_IOCTL
  67 #undef INNETGR_ARGS
  68 


 274 #define INADDR_NONE 0xffffffff
 275 #endif
 276 
 277 #ifndef MAXHOSTNAMELEN
 278 #define MAXHOSTNAMELEN 256
 279 #endif
 280 
 281 #ifndef INET6_ADDRSTRLEN
 282 /* sizeof("aaaa:bbbb:cccc:dddd:eeee:ffff:123.123.123.123") */
 283 #define INET6_ADDRSTRLEN 46
 284 #endif
 285 
 286 #ifndef MIN
 287 #define MIN(x,y) (((x) <= (y)) ? (x) : (y))
 288 #endif
 289 
 290 #ifndef MAX
 291 #define MAX(x,y) (((x) >= (y)) ? (x) : (y))
 292 #endif
 293 




 294 #ifdef NEED_STRSEP
 295 char * strsep(char **stringp, const char *delim);
 296 #endif
 297 
 298 #ifndef ALIGN
 299 #define ALIGN(p) (((uintptr_t)(p) + (sizeof(long) - 1)) & ~(sizeof(long) - 1))
 300 #endif
 301 
 302 #ifdef NEED_SETGROUPENT
 303 int setgroupent(int stayopen);
 304 #endif
 305 
 306 #ifdef NEED_GETGROUPLIST
 307 int getgrouplist(GETGROUPLIST_ARGS);
 308 #endif
 309 
 310 #ifdef POSIX_GETGRNAM_R
 311 int
 312 __posix_getgrnam_r(const char *, struct group *, char *, int, struct group **);
 313 #endif