5 #ifndef __ARC_WIN32_H__ 
    6 #define __ARC_WIN32_H__ 
    9 #define WIN32_LEAN_AND_MEAN 
   20 #ifdef CreateDirectory 
   21 #undef CreateDirectory 
   27 #define sleep(x) Sleep((x) * 1000) 
   28 inline int usleep(
int x) { Sleep((x + 999) / 1000); 
return 0; }
 
   31 inline int mkstemp(
char *pattern) {
 
   32    return mktemp(pattern) != 
'\0';
 
   39 #define chown(x, y, z) (0) 
   40 #define lchown(x, y, z) (0) 
   41 #define fchown(x, y, z) (0) 
   42 #define symlink(x, y) (-1) 
   49 #define EWOULDBLOCK     WSAEWOULDBLOCK      
   50 #define EINPROGRESS     WSAEINPROGRESS      
   51 #define EALREADY        WSAEALREADY         
   52 #define ENOTSOCK        WSAENOTSOCK         
   53 #define EDESTADDRREQ    WSAEDESTADDRREQ     
   54 #define EMSGSIZE        WSAEMSGSIZE         
   55 #define EPROTOTYPE      WSAEPROTOTYPE       
   56 #define ENOPROTOOPT     WSAENOPROTOOPT      
   57 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT  
   58 #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT  
   59 #define EOPNOTSUPP      WSAEOPNOTSUPP       
   60 #define EPFNOSUPPORT    WSAEPFNOSUPPORT     
   61 #define EAFNOSUPPORT    WSAEAFNOSUPPORT     
   62 #define EADDRINUSE      WSAEADDRINUSE       
   63 #define EADDRNOTAVAIL   WSAEADDRNOTAVAIL    
   64 #define ENETDOWN        WSAENETDOWN         
   65 #define ENETUNREACH     WSAENETUNREACH      
   66 #define ENETRESET       WSAENETRESET        
   67 #define ECONNABORTED    WSAECONNABORTED     
   68 #define ECONNRESET      WSAECONNRESET       
   69 #define ENOBUFS         WSAENOBUFS          
   70 #define EISCONN         WSAEISCONN          
   71 #define ENOTCONN        WSAENOTCONN         
   72 #define ESHUTDOWN       WSAESHUTDOWN        
   73 #define ETOOMANYREFS    WSAETOOMANYREFS     
   74 #define ETIMEDOUT       WSAETIMEDOUT        
   75 #define ECONNREFUSED    WSAECONNREFUSED     
   76 #define ELOOP           WSAELOOP            
   77 #define ENAMETOOLONG    WSAENAMETOOLONG     
   78 #define EHOSTDOWN       WSAEHOSTDOWN        
   79 #define EHOSTUNREACH    WSAEHOSTUNREACH     
   80 #define EUSERS          WSAEUSERS           
   81 #define EDQUOT          WSAEDQUOT           
   82 #define ESTALE          WSAESTALE           
   83 #define EREMOTE         WSAEREMOTE          
   85 inline ssize_t readlink(
const char *path, 
char *buf, 
size_t bufsiz) {
 
   89 #if defined(__cplusplus) 
   91 #include <sys/types.h> 
   92 inline int mkdir(
const char *pathname, mode_t mode) {
 
   93     return ::mkdir(pathname);
 
   97 inline int link(
const char *oldpath, 
const char *newpath) {
 
  101 #if defined(__cplusplus) 
  102 #include <sys/stat.h> 
  103 inline int lstat(
const char *path, 
struct stat *buf) {
 
  104     return ::stat(path,buf);