diff options
Diffstat (limited to 'src/include/port/win32')
-rw-r--r-- | src/include/port/win32/arpa/inet.h | 3 | ||||
-rw-r--r-- | src/include/port/win32/dlfcn.h | 1 | ||||
-rw-r--r-- | src/include/port/win32/grp.h | 1 | ||||
-rw-r--r-- | src/include/port/win32/netdb.h | 7 | ||||
-rw-r--r-- | src/include/port/win32/netinet/in.h | 3 | ||||
-rw-r--r-- | src/include/port/win32/netinet/tcp.h | 7 | ||||
-rw-r--r-- | src/include/port/win32/pwd.h | 3 | ||||
-rw-r--r-- | src/include/port/win32/sys/resource.h | 20 | ||||
-rw-r--r-- | src/include/port/win32/sys/select.h | 3 | ||||
-rw-r--r-- | src/include/port/win32/sys/socket.h | 26 | ||||
-rw-r--r-- | src/include/port/win32/sys/un.h | 17 | ||||
-rw-r--r-- | src/include/port/win32/sys/wait.h | 3 |
12 files changed, 94 insertions, 0 deletions
diff --git a/src/include/port/win32/arpa/inet.h b/src/include/port/win32/arpa/inet.h new file mode 100644 index 0000000..ad18031 --- /dev/null +++ b/src/include/port/win32/arpa/inet.h @@ -0,0 +1,3 @@ +/* src/include/port/win32/arpa/inet.h */ + +#include <sys/socket.h> diff --git a/src/include/port/win32/dlfcn.h b/src/include/port/win32/dlfcn.h new file mode 100644 index 0000000..b6e43c0 --- /dev/null +++ b/src/include/port/win32/dlfcn.h @@ -0,0 +1 @@ +/* src/include/port/win32/dlfcn.h */ diff --git a/src/include/port/win32/grp.h b/src/include/port/win32/grp.h new file mode 100644 index 0000000..8b4f213 --- /dev/null +++ b/src/include/port/win32/grp.h @@ -0,0 +1 @@ +/* src/include/port/win32/grp.h */ diff --git a/src/include/port/win32/netdb.h b/src/include/port/win32/netdb.h new file mode 100644 index 0000000..9ed13e4 --- /dev/null +++ b/src/include/port/win32/netdb.h @@ -0,0 +1,7 @@ +/* src/include/port/win32/netdb.h */ +#ifndef WIN32_NETDB_H +#define WIN32_NETDB_H + +#include <ws2tcpip.h> + +#endif diff --git a/src/include/port/win32/netinet/in.h b/src/include/port/win32/netinet/in.h new file mode 100644 index 0000000..a4e22f8 --- /dev/null +++ b/src/include/port/win32/netinet/in.h @@ -0,0 +1,3 @@ +/* src/include/port/win32/netinet/in.h */ + +#include <sys/socket.h> diff --git a/src/include/port/win32/netinet/tcp.h b/src/include/port/win32/netinet/tcp.h new file mode 100644 index 0000000..1d377b6 --- /dev/null +++ b/src/include/port/win32/netinet/tcp.h @@ -0,0 +1,7 @@ +/* src/include/port/win32/netinet/tcp.h */ +#ifndef WIN32_NETINET_TCP_H +#define WIN32_NETINET_TCP_H + +#include <sys/socket.h> + +#endif diff --git a/src/include/port/win32/pwd.h b/src/include/port/win32/pwd.h new file mode 100644 index 0000000..b8c7178 --- /dev/null +++ b/src/include/port/win32/pwd.h @@ -0,0 +1,3 @@ +/* + * src/include/port/win32/pwd.h + */ diff --git a/src/include/port/win32/sys/resource.h b/src/include/port/win32/sys/resource.h new file mode 100644 index 0000000..a14feeb --- /dev/null +++ b/src/include/port/win32/sys/resource.h @@ -0,0 +1,20 @@ +/* + * Replacement for <sys/resource.h> for Windows. + */ +#ifndef WIN32_SYS_RESOURCE_H +#define WIN32_SYS_RESOURCE_H + +#include <sys/time.h> /* for struct timeval */ + +#define RUSAGE_SELF 0 +#define RUSAGE_CHILDREN (-1) + +struct rusage +{ + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ +}; + +extern int getrusage(int who, struct rusage *rusage); + +#endif /* WIN32_SYS_RESOURCE_H */ diff --git a/src/include/port/win32/sys/select.h b/src/include/port/win32/sys/select.h new file mode 100644 index 0000000..f8a877a --- /dev/null +++ b/src/include/port/win32/sys/select.h @@ -0,0 +1,3 @@ +/* + * src/include/port/win32/sys/select.h + */ diff --git a/src/include/port/win32/sys/socket.h b/src/include/port/win32/sys/socket.h new file mode 100644 index 0000000..0c32c0f --- /dev/null +++ b/src/include/port/win32/sys/socket.h @@ -0,0 +1,26 @@ +/* + * src/include/port/win32/sys/socket.h + */ +#ifndef WIN32_SYS_SOCKET_H +#define WIN32_SYS_SOCKET_H + +/* + * Unfortunately, <wingdi.h> of VC++ also defines ERROR. + * To avoid the conflict, we include <windows.h> here and undefine ERROR + * immediately. + * + * Note: Don't include <wingdi.h> directly. It causes compile errors. + */ +#include <winsock2.h> +#include <ws2tcpip.h> +#include <windows.h> + +#undef ERROR +#undef small + +/* Restore old ERROR value */ +#ifdef PGERROR +#define ERROR PGERROR +#endif + +#endif /* WIN32_SYS_SOCKET_H */ diff --git a/src/include/port/win32/sys/un.h b/src/include/port/win32/sys/un.h new file mode 100644 index 0000000..4fc13a2 --- /dev/null +++ b/src/include/port/win32/sys/un.h @@ -0,0 +1,17 @@ +/* + * src/include/port/win32/sys/un.h + */ +#ifndef WIN32_SYS_UN_H +#define WIN32_SYS_UN_H + +/* + * Windows defines this structure in <afunix.h>, but not all tool chains have + * the header yet, so we define it here for now. + */ +struct sockaddr_un +{ + unsigned short sun_family; + char sun_path[108]; +}; + +#endif diff --git a/src/include/port/win32/sys/wait.h b/src/include/port/win32/sys/wait.h new file mode 100644 index 0000000..eaeb566 --- /dev/null +++ b/src/include/port/win32/sys/wait.h @@ -0,0 +1,3 @@ +/* + * src/include/port/win32/sys/wait.h + */ |