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.25 by greg, Tue Feb 2 18:02:32 2016 UTC vs.
Revision 2.32 by greg, Tue Jun 3 21:31:51 2025 UTC

# Line 12 | Line 12
12   #include <sys/types.h>
13   #include <sys/stat.h>
14  
15 < #ifdef _WIN32
15 > #if defined(_WIN32) || defined(_WIN64)
16    #include <io.h>
17    #include <direct.h> /* getcwd(), chdir(), _mkdir(), etc. */
18 +  #define getcwd _getcwd
19 +  #define chdir _chdir
20  
21    #define access                _access
22    #define mkdir(dirname,perms)  _mkdir(dirname)
23 <  #ifdef _MSC_VER
23 >  /* The windows _popen with the native shell breaks '\\\n' escapes.
24 >   * RT_WINPROC (used by SCons) enables our replacement functions to fix that.
25 >   * XXX This should really not depend on the compiler used! */
26 >  #if 1 /* defined(_MSC_VER) && !defined(RT_WINPROC) */
27      #define popen(cmd,mode)     _popen(cmd,mode)
28      #define pclose(p)           _pclose(p)
29    #else
# Line 27 | Line 32
32    #endif
33    #define kill(pid,sig)         win_kill(pid,sig)
34    #define nice(inc)             win_nice(inc)
35 <  #define PATH_                 MAX _MAX_PATH
35 >  #define PATH_MAX              _MAX_PATH
36    #define NULL_DEVICE           "NUL"
37    #define DIRSEP                '/'
38    #define ISDIRSEP(c)           (((c)=='/') | ((c)=='\\'))
# Line 87 | Line 92
92      #ifndef DEFPATH
93        #define DEFPATH           ";/ray/lib"
94      #endif
90    #define      fixargv0(a0)   (a0)
95  
96    #else
97  
# Line 101 | Line 105
105          #define CURDIR          '.'
106      #define DEFAULT_TEMPDIRS    {"/var/tmp", "/usr/tmp", "/tmp", ".", NULL}
107      #define TEMPLATE            "/tmp/rtXXXXXX"
108 <    #define TEMPLEN             17
108 >    #define TEMPLEN             13
109      #define ULIBVAR             "RAYPATH"
110      #ifndef DEFPATH
111        #define DEFPATH           ":/usr/local/lib/ray"
# Line 109 | Line 113
113      #define SPECIALS            " \t\n'\"()${}*?[];|&"
114      #define QUOTCHAR            '\''
115      #define ALTQUOT             '"'
112    #define      fixargv0(a0)   (a0)
116  
117    #endif
118   #endif
# Line 125 | Line 128
128   extern "C" {
129   #endif
130  
131 < #if _WIN32
131 > #if defined(_WIN32) || defined(_WIN64)
132    extern FILE *win_popen(char *command, char *type);
133    extern int win_pclose(FILE *p);
131  extern int win_kill(RT_PID pid, int sig /* ignored */);
132  extern char  *fixargv0();
134   #endif
135 +
136 + /* Set global progname and return path-free version of argv[0] */
137 + extern char  *fixargv0(char *arg0);
138 + extern char  *progname;
139  
140   /* Check if any of the characters in str2 are found in str1 */
141   extern int matchany(const char *str1, const char *str2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines