Back to index

nordugrid-arc-nox  1.1.0~rc6
win32.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifndef __ARC_WIN32_H__
00004 #define __ARC_WIN32_H__
00005 #define NOGDI
00006 #define WINVER 0x0501 /* we support XP or higher */
00007 #define WIN32_LEAN_AND_MEAN
00008 
00009 #include <string>
00010 #include <windows.h>
00011 #include <winsock2.h>
00012 #include <ws2tcpip.h>
00013 #undef USE_WINSOCK
00014 #define USE_WINSOCK 2
00015 #include <io.h>
00016 #include <winsock2.h>
00017 
00018 #define SIGPIPE 13
00019 #define SIGTTIN 21
00020 #define SIGTTOU 22
00021 #define sleep(x) Sleep((x) * 1000)
00022 #define mkdir(x, y) mkdir((x))
00023 // no windows functions
00024 #define chown(x, y, z) (0)
00025 #define lchown(x, y, z) (0)
00026 #define fchown(x, y, z) (0)
00027 #define symlink(x, y) (0)
00028 
00029 // pwd.h does not exist on windows
00030 struct passwd {
00031   char *pw_name;
00032   char *pw_passwd;
00033   int pw_uid;
00034   int pw_gid;
00035   char *pw_age;
00036   char *pw_comment;
00037   char *pw_gecos;
00038   char *pw_dir;
00039   char *pw_shell;
00040 };
00041 
00042 std::string GetOsErrorMessage(void);
00043 #endif