2009-12-07 Rolf Bjarne Kvinge <RKvinge@novell.com>
[moon.git] / build / vs2008 / unistd.h
blobcf1778ef2292e706598b124f1e5522a65424201b
1 /**
2 * unistd.h: Emulation of some standard UNIX APIs
3 **/
5 #include <io.h>
7 /* map ssize_t to int */
8 typedef int ssize_t;
10 /* Map the Windows equivalents to the POSIX function names */
12 #define close(fd) _close(fd)
13 #define read(fd,buf,n) _read(fd,buf,n)
14 #define write(fd,buf,n) _write(fd,buf,n)
16 /* Implement some sys/stat.h macros that are missing in Windows */
17 #define S_ISDIR(mode) ((mode) & _S_IFDIR)
18 #define S_ISREG(mode) ((mode) & _S_IFREG)