summaryrefslogtreecommitdiffstats
path: root/win/sys
diff options
context:
space:
mode:
Diffstat (limited to 'win/sys')
-rw-r--r--win/sys/fcntl.h26
-rw-r--r--win/sys/file.h35
-rw-r--r--win/sys/lock.h41
-rw-r--r--win/sys/mman.h58
-rw-r--r--win/sys/param.h38
-rw-r--r--win/sys/resource.h91
-rw-r--r--win/sys/signal.h20
-rw-r--r--win/sys/socket.h71
-rw-r--r--win/sys/stat.h108
-rw-r--r--win/sys/time.h51
-rw-r--r--win/sys/times.h49
-rw-r--r--win/sys/types.h61
-rw-r--r--win/sys/uio.h20
-rw-r--r--win/sys/un.h35
-rw-r--r--win/sys/utsname.h44
-rw-r--r--win/sys/wait.h82
16 files changed, 830 insertions, 0 deletions
diff --git a/win/sys/fcntl.h b/win/sys/fcntl.h
new file mode 100644
index 000000000..6e5cacdbe
--- /dev/null
+++ b/win/sys/fcntl.h
@@ -0,0 +1,26 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+/* regular sys/fcntl.h */
+#ifdef _MSC_VER
+# include <sys/msvc/fcntl.h>
+#elif defined(__BORLANDC__)
+# include <sys/bcc/fcntl.h>
+#endif
+
diff --git a/win/sys/file.h b/win/sys/file.h
new file mode 100644
index 000000000..883047a0f
--- /dev/null
+++ b/win/sys/file.h
@@ -0,0 +1,35 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _FILE_H_
+#define _FILE_H_
+
+#include <fcntl.h>
+
+#define L_SET 0
+#define L_CURR 1
+#define L_INCR 1
+#define L_XTND 2
+
+#define F_OK 0 /* does file exist */
+#define X_OK 1 /* is it executable by caller */
+#define W_OK 2 /* is it writable by caller */
+#define R_OK 4 /* is it readable by caller */
+
+#endif
diff --git a/win/sys/lock.h b/win/sys/lock.h
new file mode 100644
index 000000000..6735496c9
--- /dev/null
+++ b/win/sys/lock.h
@@ -0,0 +1,41 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef __SYS_LOCK_H__
+#define __SYS_LOCK_H__
+
+/* dummy lock routines for single-threaded aps */
+
+typedef int _LOCK_T;
+typedef int _LOCK_RECURSIVE_T;
+
+#define __LOCK_INIT(class,lock) static int lock = 0;
+#define __LOCK_INIT_RECURSIVE(class,lock) static int lock = 0;
+#define __lock_init(lock) {}
+#define __lock_init_recursive(lock) {}
+#define __lock_close(lock) {}
+#define __lock_close_recursive(lock) {}
+#define __lock_acquire(lock) {}
+#define __lock_acquire_recursive(lock) {}
+#define __lock_try_acquire(lock) {}
+#define __lock_try_acquire_recursive(lock) {}
+#define __lock_release(lock) {}
+#define __lock_release_recursive(lock) {}
+
+#endif /* __SYS_LOCK_H__ */
diff --git a/win/sys/mman.h b/win/sys/mman.h
new file mode 100644
index 000000000..d28bcba88
--- /dev/null
+++ b/win/sys/mman.h
@@ -0,0 +1,58 @@
+/*
+ This file is part of the KDE libraries
+ Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
+
+ These sources are based on ftp://g.oswego.edu/pub/misc/malloc.c
+ file by Doug Lea, released to the public domain.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _MMAP_H
+#define _MMAP_H
+
+#include <kdecore/kdelibs_export.h>
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These values don't really matter in windows mmap emulation */
+#define PROT_NONE 0
+#define PROT_READ 1
+#define PROT_WRITE 2
+#define PROT_EXEC 4
+
+#define MAP_FILE 0
+#define MAP_SHARED 1
+#define MAP_PRIVATE 2
+#define MAP_TYPE 0xF
+#define MAP_FIXED 0x10
+#define MAP_ANONYMOUS 0x20
+#define MAP_ANON MAP_ANONYMOUS
+
+#define MAP_FAILED ((void *)-1)
+
+KDEWIN32_EXPORT void * mmap(void *start, size_t length, int prot , int flags, int fd, off_t offset);
+
+KDEWIN32_EXPORT int munmap(void *start, size_t length);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/win/sys/param.h b/win/sys/param.h
new file mode 100644
index 000000000..d815a232b
--- /dev/null
+++ b/win/sys/param.h
@@ -0,0 +1,38 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _KDEWIN_SYS_PARAM_H
+#define _KDEWIN_SYS_PARAM_H
+
+/* This is defined to be the same as MAX_PATH which is used internally.
+ The Posix version is PATH_MAX. */
+#define MAXPATHLEN (260 - 1 /*NUL*/)
+
+/* some programs use this: */
+#ifndef PATH_MAX
+# define PATH_MAX MAXPATHLEN
+#endif
+
+#define BYTE_ORDER LITTLE_ENDIAN
+
+#ifndef NULL
+#define NULL 0L
+#endif
+
+#endif
diff --git a/win/sys/resource.h b/win/sys/resource.h
new file mode 100644
index 000000000..a505f2838
--- /dev/null
+++ b/win/sys/resource.h
@@ -0,0 +1,91 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SYS_RESOURCE_H_
+#define _SYS_RESOURCE_H_
+
+#include <kdecore/kdelibs_export.h>
+#include <sys/time.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define RLIMIT_CPU 0 /* CPU time in seconds */
+#define RLIMIT_FSIZE 1 /* Maximum filesize */
+#define RLIMIT_DATA 2 /* max data size */
+#define RLIMIT_STACK 3 /* max stack size */
+#define RLIMIT_CORE 4 /* max core file size */
+#define RLIMIT_NOFILE 5 /* max number of open files */
+#define RLIMIT_OFILE RLIMIT_NOFILE /* BSD name */
+#define RLIMIT_AS 6 /* address space (virt. memory) limit */
+
+#define RLIMIT_NLIMITS 7 /* upper bound of RLIMIT_* defines */
+#define RLIM_NLIMITS RLIMIT_NLIMITS
+
+#define RLIM_INFINITY (0xffffffffUL)
+#define RLIM_SAVED_MAX RLIM_INFINITY
+#define RLIM_SAVED_CUR RLIM_INFINITY
+
+typedef unsigned long rlim_t;
+
+struct rlimit {
+ rlim_t rlim_cur;
+ rlim_t rlim_max;
+};
+
+#define RUSAGE_SELF 0 /* calling process */
+#define RUSAGE_CHILDREN -1 /* terminated child processes */
+
+/*
+struct timeval {
+ long tv_sec;
+ long tv_usec;
+};
+*/
+struct rusage {
+ struct timeval ru_utime; /* user time used */
+ struct timeval ru_stime; /* system time used */
+ long ru_maxrss;
+ long ru_ixrss; /* XXX: 0 */
+ long ru_idrss; /* XXX: sum of rm_asrss */
+ long ru_isrss; /* XXX: 0 */
+ long ru_minflt; /* any page faults not requiring I/O */
+ long ru_majflt; /* any page faults requiring I/O */
+ long ru_nswap; /* swaps */
+ long ru_inblock; /* block input operations */
+ long ru_oublock; /* block output operations */
+ long ru_msgsnd; /* messages sent */
+ long ru_msgrcv; /* messages received */
+ long ru_nsignals; /* signals received */
+ long ru_nvcsw; /* voluntary context switches */
+ long ru_nivcsw; /* involuntary " */
+#define ru_last ru_nivcsw
+};
+
+KDEWIN32_EXPORT int getrlimit (int __resource, struct rlimit *__rlp);
+KDEWIN32_EXPORT int setrlimit (int __resource, const struct rlimit *__rlp);
+KDEWIN32_EXPORT int getrusage (int __who, struct rusage *__rusage);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/win/sys/signal.h b/win/sys/signal.h
new file mode 100644
index 000000000..11a3b3677
--- /dev/null
+++ b/win/sys/signal.h
@@ -0,0 +1,20 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "../signal.h"
diff --git a/win/sys/socket.h b/win/sys/socket.h
new file mode 100644
index 000000000..e8a2f6496
--- /dev/null
+++ b/win/sys/socket.h
@@ -0,0 +1,71 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SYS_SOCKET_H
+#define _SYS_SOCKET_H
+
+#include <sys/time.h>
+
+//#define WIN32_LEAN_AND_MEAN
+#include <winsock2.h>
+
+#if 0
+#ifdef __cplusplus
+/*extern "C" {*/
+#endif
+
+/* SUS symbolic values for the second parm to shutdown(2) */
+#define SHUT_RD 0 /* == Win32 SD_RECEIVE */
+#define SHUT_WR 1 /* == Win32 SD_SEND */
+#define SHUT_RDWR 2 /* == Win32 SD_BOTH */
+
+ int accept (int, struct sockaddr *__peer, int *);
+ int bind (int, const struct sockaddr *__my_addr, int __addrlen);
+ int connect (int, const struct sockaddr *, int);
+ int getpeername (int, struct sockaddr *__peer, int *);
+ int getsockname (int, struct sockaddr *__addr, int *);
+ int listen (int, int __n);
+ int recv (int, void *__buff, int __len, unsigned int __flags);
+ int recvfrom (int, char *__buff, int __len, int __flags,
+ struct sockaddr *__from, int *__fromlen);
+ int recvmsg(int s, struct msghdr *msg, int flags);
+ int send (int, const void *__buff, int __len, unsigned int __flags);
+ int sendmsg(int s, const struct msghdr *msg, int flags);
+ int sendto (int, const void *, int, unsigned int, const struct sockaddr *, int);
+ int setsockopt (int __s, int __level, int __optname, const void *optval, int __optlen);
+ int getsockopt (int __s, int __level, int __optname, void *__optval, int *__optlen);
+ int shutdown (int, int);
+/* defined in winsock: int socket (int __family, int __type, int __protocol);*/
+ int socketpair (int __domain, int __type, int __protocol, int *__socket_vec);
+
+/*defined in winsock: struct servent *getservbyname (const char *__name, const char *__proto); */
+
+//#define WIN32_LEAN_AND_MEAN
+#include <winsock2.h>
+
+#if 0
+#ifdef __cplusplus
+/*};*/
+#endif
+
+#endif
+
+#endif
+
+#endif /* _SYS_SOCKET_H */
diff --git a/win/sys/stat.h b/win/sys/stat.h
new file mode 100644
index 000000000..2b22558bc
--- /dev/null
+++ b/win/sys/stat.h
@@ -0,0 +1,108 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SYS_STAT_H
+#define _SYS_STAT_H
+
+#include <kdecore/kdelibs_export.h>
+
+/* regular sys/stat.h */
+#ifdef _MSC_VER
+# include <sys/msvc/stat.h>
+/*# ifdef _INC_STAT
+# define _STAT_H_
+# endif*/
+#elif defined(__BORLANDC__)
+# include <sys/bcc/stat.h>
+#endif
+
+typedef short nlink_t;
+
+#include <time.h>
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined _STAT_H_ && !defined _INC_DIRECT
+
+#define _IFMT 0170000 // type of file
+#define _IFDIR 0040000 // directory
+#define _IFCHR 0020000 // character special
+#define _IFBLK 0060000 // block special
+#define _IFREG 0100000 // regular
+#define _IFLNK 0120000 // symbolic link
+#define _IFSOCK 0140000 // socket
+#define _IFIFO 0010000 // fifo
+
+#define S_BLKSIZE 1024 // size of a block
+
+#define S_ISUID 0004000 // set user id on execution
+#define S_ISGID 0002000 // set group id on execution
+#define S_ISVTX 0001000 // save swapped text even after use
+
+#define S_IFBLK _IFBLK
+#define S_IFLNK _IFLNK
+#define S_IFSOCK _IFSOCK
+#define S_IFIFO _IFIFO
+
+#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
+#define S_IRUSR 0000400 /* read permission, owner */
+#define S_IWUSR 0000200 /* write permission, owner */
+#define S_IXUSR 0000100/* execute/search permission, owner */
+#define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
+#define S_IRGRP 0000040 /* read permission, group */
+#define S_IWGRP 0000020 /* write permission, grougroup */
+#define S_IXGRP 0000010/* execute/search permission, group */
+#define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
+#define S_IROTH 0000004 /* read permission, other */
+#define S_IWOTH 0000002 /* write permission, other */
+#define S_IXOTH 0000001/* execute/search permission, other */
+
+#define S_ISBLK(m) (((m)&_IFMT) == _IFBLK)
+#define S_ISCHR(m) (((m)&_IFMT) == _IFCHR)
+#define S_ISDIR(m) (((m)&_IFMT) == _IFDIR)
+#define S_ISFIFO(m) (((m)&_IFMT) == _IFIFO)
+#define S_ISREG(m) (((m)&_IFMT) == _IFREG)
+#define S_ISLNK(m) (((m)&_IFMT) == _IFLNK)
+#define S_ISSOCK(m) (((m)&_IFMT) == _IFSOCK)
+
+KDEWIN32_EXPORT int lstat( const char *__path, struct stat *__buf);
+
+// KDEWIN32_EXPORT int mkdir( const char *_path, mode_t __mode );
+ extern int mkdir( const char *_path );
+ extern int chdir( const char *dirname );
+ extern char *getcwd( char *buffer, int maxlen );
+ extern int rmdir( const char *dirname );
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/*
+#ifdef __cplusplus
+//this is a C++ function!!!
+//TODO: make available C function too...
+KDEWIN32_EXPORT int mkdir( const char *_path, mode_t __mode );
+#endif
+*/
+#endif /* _SYS_STAT_H */
diff --git a/win/sys/time.h b/win/sys/time.h
new file mode 100644
index 000000000..0f0ca08a6
--- /dev/null
+++ b/win/sys/time.h
@@ -0,0 +1,51 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SYS_TIME_H_
+#define _SYS_TIME_H_
+
+#include <kdecore/kdelibs_export.h>
+
+//??#if !defined(_INC_TIME)
+
+#undef INCL_WINSOCK_API_PROTOTYPES
+#define INCL_WINSOCK_API_PROTOTYPES 1 //for ntohl(), etc.
+#include <winsock2.h> //timeval
+
+/*#ifndef _WINSOCK2API_
+struct timeval {
+ long tv_sec;
+ long tv_usec;
+};
+#endif*/
+
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+KDEWIN32_EXPORT int gettimeofday(struct timeval *__p, struct timezone *__z);
+KDEWIN32_EXPORT int settimeofday(const struct timeval *, const struct timezone *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_SYS_TIME_H_
diff --git a/win/sys/times.h b/win/sys/times.h
new file mode 100644
index 000000000..e555e4888
--- /dev/null
+++ b/win/sys/times.h
@@ -0,0 +1,49 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SYS_TIMES_H
+#define _SYS_TIMES_H
+
+#include <kdecore/kdelibs_export.h>
+//#include <_ansi.h>
+#include <machine/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if !defined(__clock_t_defined) && !defined(_CLOCK_T_DEFINED)
+typedef _CLOCK_T_ clock_t;
+#define __clock_t_defined
+#endif
+
+struct tms {
+ clock_t tms_utime; /* user time */
+ clock_t tms_stime; /* system time */
+ clock_t tms_cutime; /* user time, children */
+ clock_t tms_cstime; /* system time, children */
+};
+
+KDEWIN32_EXPORT clock_t times(struct tms *);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !_SYS_TIMES_H */
diff --git a/win/sys/types.h b/win/sys/types.h
new file mode 100644
index 000000000..9a01fa61d
--- /dev/null
+++ b/win/sys/types.h
@@ -0,0 +1,61 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SYS_TYPES_H_
+#define _SYS_TYPES_H_
+
+/* regular types.h */
+#ifdef _MSC_VER
+# include <sys/msvc/types.h>
+#elif defined(__BORLANDC__)
+# include <sys/bcc/types.h>
+#endif
+
+#ifndef _SIZE_T_DEFINED
+#define _SIZE_T_DEFINED
+typedef unsigned int size_t;
+#endif
+
+#ifndef _SSIZE_T_DEFINED
+#define _SSIZE_T_DEFINED
+typedef size_t ssize_t;
+#endif
+
+
+#ifndef socklen_t
+#define socklen_t int
+#endif
+
+//additional:
+#ifndef _ASM_TYPES_H
+#define _ASM_TYPES_H
+
+//typedef __signed__ char __s8;
+typedef unsigned char __u8;
+
+//typedef __signed__ short __s16;
+typedef unsigned short __u16;
+
+//typedef __signed__ int __s32;
+typedef unsigned int __u32;
+
+#endif /* _ASM_TYPES_H */
+
+
+#endif
diff --git a/win/sys/uio.h b/win/sys/uio.h
new file mode 100644
index 000000000..a78e29e13
--- /dev/null
+++ b/win/sys/uio.h
@@ -0,0 +1,20 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+/* dummy */
diff --git a/win/sys/un.h b/win/sys/un.h
new file mode 100644
index 000000000..1763308b3
--- /dev/null
+++ b/win/sys/un.h
@@ -0,0 +1,35 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SYS_UN_H
+#define _SYS_UN_H
+
+/* POSIX requires only at least 100 bytes */
+#define UNIX_PATH_LEN 108
+
+struct sockaddr_un {
+ unsigned short sun_family; /* address family AF_LOCAL/AF_UNIX */
+ char sun_path[UNIX_PATH_LEN]; /* 108 bytes of socket address */
+};
+
+/* Evaluates the actual length of `sockaddr_un' structure. */
+#define SUN_LEN(p) ((size_t)(((struct sockaddr_un *) NULL)->sun_path) \
+ + strlen ((p)->sun_path))
+
+#endif
diff --git a/win/sys/utsname.h b/win/sys/utsname.h
new file mode 100644
index 000000000..1560e0e6b
--- /dev/null
+++ b/win/sys/utsname.h
@@ -0,0 +1,44 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SYS_UTSNAME_H
+#define _SYS_UTSNAME_H
+
+#include <kdecore/kdelibs_export.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct utsname
+{
+ char sysname[20];
+ char nodename[20];
+ char release[20];
+ char version[20];
+ char machine[20];
+};
+
+KDEWIN32_EXPORT int uname (struct utsname *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/win/sys/wait.h b/win/sys/wait.h
new file mode 100644
index 000000000..077f46618
--- /dev/null
+++ b/win/sys/wait.h
@@ -0,0 +1,82 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SYS_WAIT_H
+#define _SYS_WAIT_H
+
+#include <sys/types.h>
+#include <sys/resource.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define WNOHANG 1
+#define WUNTRACED 2
+
+/* A status looks like:
+ <2 bytes info> <2 bytes code>
+
+ <code> == 0, child has exited, info is the exit value
+ <code> == 1..7e, child has exited, info is the signal number.
+ <code> == 7f, child has stopped, info was the signal number.
+ <code> == 80, there was a core dump.
+*/
+
+#define WIFEXITED(w) (((w) & 0xff) == 0)
+#define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
+#define WIFSTOPPED(w) (((w) & 0xff) == 0x7f)
+#define WEXITSTATUS(w) (((w) >> 8) & 0xff)
+#define WTERMSIG(w) ((w) & 0x7f)
+#define WSTOPSIG WEXITSTATUS
+
+pid_t wait (int *);
+pid_t waitpid (pid_t, int *, int);
+pid_t wait3 (int *__status, int __options, struct rusage *__rusage);
+pid_t wait4 (pid_t __pid, int *__status, int __options, struct rusage *__rusage);
+
+union wait
+ {
+ int w_status;
+ struct
+ {
+ unsigned int __w_termsig:7; /* Terminating signal. */
+ unsigned int __w_coredump:1; /* Set if dumped core. */
+ unsigned int __w_retcode:8; /* Return code if exited normally. */
+ unsigned int:16;
+ } __wait_terminated;
+ struct
+ {
+ unsigned int __w_stopval:8; /* W_STOPPED if stopped. */
+ unsigned int __w_stopsig:8; /* Stopping signal. */
+ unsigned int:16;
+ } __wait_stopped;
+ };
+
+#define w_termsig __wait_terminated.__w_termsig
+#define w_coredump __wait_terminated.__w_coredump
+#define w_retcode __wait_terminated.__w_retcode
+#define w_stopsig __wait_stopped.__w_stopsig
+#define w_stopval __wait_stopped.__w_stopval
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif