ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/paths.h
(Generate patch)

Comparing ray/src/common/paths.h (file contents):
Revision 2.18 by schorsch, Mon Jul 14 20:02:29 2003 UTC vs.
Revision 2.23 by greg, Wed Oct 5 17:20:55 2011 UTC

# Line 4 | Line 4
4   */
5   #ifndef _RAD_PATHS_H_
6   #define _RAD_PATHS_H_
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
7  
8   #include <stdio.h>
9   #include <stdlib.h>
# Line 17 | Line 14 | extern "C" {
14  
15   #ifdef _WIN32
16    #include <io.h>
17 <  #include <direct.h> /* getcwd(), chdir(), etc. */
17 >  #include <direct.h> /* getcwd(), chdir(), _mkdir(), etc. */
18  
19    #define access _access
20 +  #define mkdir(dirname,perms) _mkdir(dirname)
21    #define PATH_MAX _MAX_PATH
22 +  #define NULL_DEVICE   "NUL"
23    #define DIRSEP                '/'
24    #define ISDIRSEP(c)   ((c)=='/' || (c)=='\\')
25    #define ISABS(s)      ((s)!=NULL \
# Line 42 | Line 41 | extern "C" {
41    /* <io.h> only does half the work for access() */
42    #ifndef F_OK
43      #define  F_OK 00
45    #define  X_OK 01
44      #define  W_OK 02
47    #define  R_OK 04
45    #endif
46 +  #ifndef R_OK
47 +    #define X_OK 01
48 +    #define R_OK 04
49 +  #endif
50    /* to make the permissions user specific we'd need to use CreateFile() */
51    #ifndef S_IRUSR
52      #define S_IRUSR _S_IREAD
53      #define S_IWUSR _S_IWRITE
54    #endif
54 extern char  *fixargv0();
55  
56 +  #ifdef __cplusplus
57 +    extern "C" {
58 +  #endif
59 +  extern char  *fixargv0();
60 +  #ifdef __cplusplus
61 +    }
62 +  #endif
63 +
64   #else /* everything but Windows */
65    #include <unistd.h>
66    #include <sys/param.h>
# Line 67 | Line 75 | extern char  *fixargv0();
75  
76    #ifdef AMIGA
77  
78 +        #define NULL_DEVICE     "NIL:"
79      #define DIRSEP              '/'
80      #define ISABS(s) ((s)!=NULL && (ISDIRSEP(s[0])))
81      #define PATHSEP             ';'
# Line 91 | Line 100 | extern char  *fixargv0();
100      #define PATHSEP             ':'
101          #define CURDIR          '.'
102      #define DEFAULT_TEMPDIRS {"/var/tmp", "/usr/tmp", "/tmp", ".", NULL}
103 <    #define TEMPLATE    "/usr/tmp/rtXXXXXX"
103 >    #define TEMPLATE    "/tmp/rtXXXXXX"
104      #define TEMPLEN             17
105      #define ULIBVAR             "RAYPATH"
106      #ifndef DEFPATH
# Line 109 | Line 118 | extern char  *fixargv0();
118    #define CASEDIRSEP    case DIRSEP
119   #endif
120  
121 + #ifdef __cplusplus
122 + extern "C" {
123 + #endif
124  
125   /* Find a writeable directory for temporary files */
126   /* If s is NULL, we return a static string */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines