r18925: Add current snapshot of the ejs-2.0 code. Tridge, will you be incorporating...
[bbaumbach/samba-autobuild/.git] / source4 / lib / appweb / ejs-2.0 / mpr / mprUnix.h
1 /*
2  *      @file   mprUnix.h
3  *      @brief  Make windows a bit more unix like
4  *      @copy   default
5  *      
6  *      Copyright (c) Mbedthis Software LLC, 2003-2006. All Rights Reserved.
7  *      
8  *      This software is distributed under commercial and open source licenses.
9  *      You may use the GPL open source license described below or you may acquire 
10  *      a commercial license from Mbedthis Software. You agree to be fully bound 
11  *      by the terms of either license. Consult the LICENSE.TXT distributed with 
12  *      this software for full details.
13  *      
14  *      This software is open source; you can redistribute it and/or modify it 
15  *      under the terms of the GNU General Public License as published by the 
16  *      Free Software Foundation; either version 2 of the License, or (at your 
17  *      option) any later version. See the GNU General Public License for more 
18  *      details at: http://www.mbedthis.com/downloads/gplLicense.html
19  *      
20  *      This program is distributed WITHOUT ANY WARRANTY; without even the 
21  *      implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
22  *      
23  *      This GPL license does NOT permit incorporating this software into 
24  *      proprietary programs. If you are unable to comply with the GPL, you must
25  *      acquire a commercial license to use this software. Commercial licenses 
26  *      for this software and support services are available from Mbedthis 
27  *      Software at http://www.mbedthis.com 
28  *      
29  *      @end
30  */
31
32 /******************************* Documentation ********************************/
33
34 /*
35  *      This header is part of the Mbedthis Portable Runtime and aims to include
36  *      all necessary O/S headers and to unify the constants and declarations 
37  *      required by Mbedthis products. It can be included by C or C++ programs.
38  */
39
40 /******************************************************************************/
41
42 #ifndef _h_MPR_UNIX
43 #define _h_MPR_UNIX 1
44
45 /******************************************************************************/
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49
50 /*
51  *      Define BLD_NO_POSIX_REMAP if these defines mess with your app
52  */
53 #if WIN && !BLD_NO_POSIX_REMAP
54 /*
55  *      MOB -- clashes with ATL
56  */
57 #define access  _access
58 #define close   _close
59 #define fileno  _fileno
60 #define fstat   _fstat
61 #define getpid  _getpid
62 #define open    _open
63 #define putenv  _putenv
64 #define read    _read
65 #define stat    _stat
66 #define umask   _umask
67 #define unlink  _unlink
68 #define write   _write
69 #define strdup  _strdup
70 #define lseek   _lseek
71 #define getcwd  _getcwd
72 #define chdir   _chdir
73
74 #define mkdir(a,b)      _mkdir(a)
75 #define rmdir(a)        _rmdir(a)
76
77 #define         R_OK            4
78 #define         W_OK            2
79 #define         MPR_TEXT        "t"
80
81 extern void             srand48(long);
82 extern long             lrand48(void);
83 extern long     ulimit(int, ...);
84 extern long     nap(long);
85 extern int              getuid(void);
86 extern int              geteuid(void);
87 #endif
88
89
90 /******************************************************************************/
91 #ifdef __cplusplus
92 }
93 #endif
94
95 #endif /* _h_MPR_UNIX */
96
97 /*
98  * Local variables:
99  * tab-width: 4
100  * c-basic-offset: 4
101  * End:
102  * vim:tw=78
103  * vim600: sw=4 ts=4 fdm=marker
104  * vim<600: sw=4 ts=4
105  */