Initialize the gmime for upstream
[platform/upstream/gmime.git] / build / vs2010 / unistd.h
1 /**
2  * unistd.h: Emulation of some standard UNIX APIs
3  **/
4
5 #include <process.h>
6 #include <io.h>
7
8 /* Map the Windows equivalents to the POSIX function names */
9 #define open(path,flags,mode) _open(path,flags,mode)
10 #define close(fd) _close(fd)
11 #define read(fd,buf,n) _read(fd,buf,n)
12 #define write(fd,buf,n) _write(fd,buf,n)
13 #define lseek(fd,offset,whence) _lseek(fd,offset,whence)
14 #define fdopen(fd,mode) _fdopen(fd,mode)
15 #define unlink(path) _unlink(path)
16 #define dup(fd) _dup(fd)
17 #define getpid() _getpid()
18
19 /* Implement some useful sys/stat.h macros that Windows doesn't seem to have */
20 #define S_ISDIR(mode) ((mode) & _S_IFDIR)
21 #define S_ISREG(mode) ((mode) & _S_IFREG)