cosmopolitan/libc/isystem/netinet/in.h
Gautham 3eec69f9c3
Simplify cosmocc builds (#863)
- tcgetpgrp(STDIN_FILENO) should be equal to getpgrp() on Windows also,
  found while reading wget source code which uses this check to decide
  whether to print to stderr or to a file
- IN6_ADDR_ARE_EQUAL is a comparison macro used when IPV6 is allowed,
  found while reading CPython3.11 source code
- the changes in signal.h and addition of ucontext.h are because
  CPython3.11 source code expect sigaltstack to be available
- the sqlite3.mk change is because CPython3.11 requires sqlite3 to be
  built with -DOMIT_SHARED_CACHE
- unistd.h has getopt.h now, because some libraries like it there
2023-07-23 11:11:08 -07:00

27 lines
1.1 KiB
C

#ifndef COSMOPOLITAN_LIBC_ISYSTEM_NETINET_IN_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_NETINET_IN_H_
#include "libc/calls/weirdtypes.h"
#include "libc/sock/sock.h"
#include "libc/sock/struct/in6_pktinfo.h"
#include "libc/sock/struct/in_pktinfo.h"
#include "libc/sock/struct/ip_mreq.h"
#include "libc/sock/struct/sockaddr.h"
#include "libc/sock/struct/sockaddr6.h"
#include "libc/sysv/consts/in.h"
#include "libc/sysv/consts/inaddr.h"
#include "libc/sysv/consts/inet6.h"
#include "libc/sysv/consts/ip.h"
#include "libc/sysv/consts/ipport.h"
#include "libc/sysv/consts/ipproto.h"
#include "libc/sysv/consts/ipv6.h"
#include "libc/sysv/consts/mcast.h"
#include "libc/sysv/consts/pf.h"
#include "libc/sysv/consts/sock.h"
# define IN6_ARE_ADDR_EQUAL(a,b) \
((((const uint32_t *) (a))[0] == ((const uint32_t *) (b))[0]) \
&& (((const uint32_t *) (a))[1] == ((const uint32_t *) (b))[1]) \
&& (((const uint32_t *) (a))[2] == ((const uint32_t *) (b))[2]) \
&& (((const uint32_t *) (a))[3] == ((const uint32_t *) (b))[3]))
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_NETINET_IN_H_ */