Subversion Repositories DevTools

Rev

Rev 227 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
227 dpurdie 1
/*
2
 * Visual C/C++ unistd.h compat header file
3
 */
4
#ifndef UNISTD_H_INCLUDED
5
#define UNISTD_H_INCLUDED
6
 
7
#include <fcntl.h>
8
#include <sys/types.h>
9
#include <sys/stat.h>
10
#include <stdio.h>
11
#include <stdlib.h>
12
#include <io.h>
13
#include <process.h>            /* getpid */
14
#include <limits.h>             /* _MAX_PATH */
15
 
16
#if !defined(PATH_MAX)
17
#include <direct.h>
18
#define PATH_MAX       _MAX_PATH
19
#define NAME_MAX       _MAX_PATH
20
#endif
21
 
22
/*fcntl.h*/                     /* WIN32 access */
23
#define F_OK           0        /* 00 Existence only */
24
#define W_OK           2        /* 02 Write permission */
25
#define X_OK           2
26
#define R_OK           4        /* 04 Read permission */
27
                                /* 06 Read and write permission */
28
 
29
#ifndef S_ISDIR
30
#define S_ISDIR(m)              ((m) & _S_IFDIR)
31
#endif
32
 
33
/*stdio.h*/
34
#define STDIN_FILENO    0
35
#define STDOUT_FILENO   1
36
#define STDERR_FILENO   2
37
 
38
/*types.h*/
39
#ifndef _UNIXTYPES_T_DEFINED
40
#define _UNIXTYPES_T_DEFINED
41
typedef unsigned char  u_char;  /* BSD compatibility */
42
typedef unsigned short u_short;
43
typedef unsigned int   u_int;
44
typedef unsigned long  u_long;
45
typedef unsigned char  uchar;   /* Sys V compatibility */
46
typedef unsigned short ushort;
47
typedef unsigned int   uint;
48
#endif  /*_UNIXTYPES_T_DEFINED*/
49
 
50
#define strcasecmp(a,b)         stricmp(a,b)
51
 
52
#endif  /*UNISTD_H_INCLUDED*/
53