diff options
Diffstat (limited to 'system/include')
-rw-r--r-- | system/include/SDL/SDL_stdinc.h | 2 | ||||
-rw-r--r-- | system/include/libc/ctype.h | 4 | ||||
-rw-r--r-- | system/include/libcxx/ostream | 2 | ||||
-rw-r--r-- | system/include/net/arpa/inet.h | 2 | ||||
-rw-r--r-- | system/include/net/netdb.h | 9 | ||||
-rw-r--r-- | system/include/net/netinet/in.h | 2 | ||||
-rw-r--r-- | system/include/sys/socket.h | 15 |
7 files changed, 33 insertions, 3 deletions
diff --git a/system/include/SDL/SDL_stdinc.h b/system/include/SDL/SDL_stdinc.h index 89cbc3c5..c4ce7ccd 100644 --- a/system/include/SDL/SDL_stdinc.h +++ b/system/include/SDL/SDL_stdinc.h @@ -65,7 +65,7 @@ #endif #if defined(HAVE_INTTYPES_H) # include <inttypes.h> -#elif defined(HAVE_STDINT_H) +#elif defined(EMSCRIPTEN) || defined(HAVE_STDINT_H) # include <stdint.h> #endif #ifdef HAVE_CTYPE_H diff --git a/system/include/libc/ctype.h b/system/include/libc/ctype.h index 6df2e7c4..43d21f3f 100644 --- a/system/include/libc/ctype.h +++ b/system/include/libc/ctype.h @@ -33,9 +33,9 @@ int _EXFUN(toascii, (int __c)); #ifndef _MB_CAPABLE _CONST #endif -extern __IMPORT char *__ctype_ptr__; +/* XXX Emscripten extern __IMPORT char *__ctype_ptr__; */ -#ifndef __cplusplus +#if 0 /* ndef __cplusplus XXX Emscripten: Do not use the macros here. always use the simple functions */ /* XXX Emscripten - these confuse libc++. moved to inside ifndef __cplusplus, and added CTYPE_ */ #define CTYPE__U 01 diff --git a/system/include/libcxx/ostream b/system/include/libcxx/ostream index f1a3de9c..c70f3c15 100644 --- a/system/include/libcxx/ostream +++ b/system/include/libcxx/ostream @@ -204,6 +204,7 @@ protected: basic_ostream() {} // extension, intentially does not initialize }; +/* template <class _CharT, class _Traits> class _LIBCPP_VISIBLE basic_ostream<_CharT, _Traits>::sentry { @@ -1287,6 +1288,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x) extern template class basic_ostream<char>; extern template class basic_ostream<wchar_t>; +*/ _LIBCPP_END_NAMESPACE_STD diff --git a/system/include/net/arpa/inet.h b/system/include/net/arpa/inet.h index 76ad8b5f..af7845fd 100644 --- a/system/include/net/arpa/inet.h +++ b/system/include/net/arpa/inet.h @@ -1,5 +1,7 @@ /* */ +#include <stdint.h> + uint32_t ntohl(uint32_t netlong); uint16_t ntohs(uint16_t netshort); diff --git a/system/include/net/netdb.h b/system/include/net/netdb.h index 3b6f3389..ee33be5f 100644 --- a/system/include/net/netdb.h +++ b/system/include/net/netdb.h @@ -16,3 +16,12 @@ extern void freeaddrinfo(struct addrinfo *ai); extern int getnameinfo (struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, unsigned int flags); const char *gai_strerror(int ecode); +struct hostent +{ + char *h_name; + char **h_aliases; + int h_addrtype; + int h_length; + char **h_addr_list; +}; + diff --git a/system/include/net/netinet/in.h b/system/include/net/netinet/in.h index 0def3127..7ac40c03 100644 --- a/system/include/net/netinet/in.h +++ b/system/include/net/netinet/in.h @@ -1,6 +1,8 @@ #define INET_ADDRSTRLEN 16 +#define INADDR_ANY 0 + struct in_addr { unsigned long s_addr; }; diff --git a/system/include/sys/socket.h b/system/include/sys/socket.h index 95a0635a..68e06509 100644 --- a/system/include/sys/socket.h +++ b/system/include/sys/socket.h @@ -1,5 +1,9 @@ /* */ +#define SOMAXCONN 128 +#define PF_INET 2 +#define SO_BROADCAST 6 + #define AF_UNSPEC 100 #define SOCK_STREAM 200 #define SOL_SOCKET 50 @@ -38,3 +42,14 @@ ssize_t send(int s, const void *buf, size_t len, int flags); int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen); ssize_t sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); +struct msghdr +{ + void *msg_name; + socklen_t msg_namelen; + struct iovec *msg_iov; + size_t msg_iovlen; + void * msg_control; + size_t msg_controllen; + int msg_flags; +}; + |