00001
00002
00003 #ifndef __ARC_WIN32_H__
00004 #define __ARC_WIN32_H__
00005 #define NOGDI
00006 #define WINVER 0x0501
00007 #define WIN32_LEAN_AND_MEAN
00008
00009 #include <windows.h>
00010 #include <winsock2.h>
00011 #include <ws2tcpip.h>
00012 #undef USE_WINSOCK
00013 #define USE_WINSOCK 2
00014 #include <io.h>
00015 #include <winsock2.h>
00016
00017
00018 #ifdef CreateDirectory
00019 #undef CreateDirectory
00020 #endif
00021
00022 #define SIGPIPE 13
00023 #define SIGTTIN 21
00024 #define SIGTTOU 22
00025 #define sleep(x) Sleep((x) * 1000)
00026 inline int usleep(int x) { Sleep((x + 999) / 1000); return 0; }
00027 #ifndef HAVE_MKSTEMP
00028 #ifdef HAVE_MKTEMP
00029 inline int mkstemp(char *pattern) {
00030 return mktemp(pattern) != '\0';
00031 };
00032 #endif
00033 #endif
00034
00035
00036
00037 #define chown(x, y, z) (0)
00038 #define lchown(x, y, z) (0)
00039 #define fchown(x, y, z) (0)
00040 #define symlink(x, y) (-1)
00041
00042
00043 #define getuid() (0)
00044 #define getgid() (0)
00045
00046 inline ssize_t readlink(const char *path, char *buf, size_t bufsiz) {
00047 return -1;
00048 };
00049
00050 #if defined(__cplusplus)
00051 inline int mkdir(const char *pathname, mode_t mode) {
00052 return ::mkdir(pathname);
00053 }
00054 #endif
00055
00056 inline int link(const char *oldpath, const char *newpath) {
00057 return -1;
00058 };
00059
00060 #if defined(__cplusplus)
00061 #include <sys/stat.h>
00062 inline int lstat(const char *path, struct stat *buf) {
00063 return ::stat(path,buf);
00064 };
00065 #endif
00066
00067
00068 struct passwd {
00069 char *pw_name;
00070 char *pw_passwd;
00071 int pw_uid;
00072 int pw_gid;
00073 char *pw_age;
00074 char *pw_comment;
00075 char *pw_gecos;
00076 char *pw_dir;
00077 char *pw_shell;
00078 };
00079
00080 #endif