--- ray/src/common/paths.h 2003/07/14 20:02:29 2.18 +++ ray/src/common/paths.h 2004/10/30 04:59:41 2.21 @@ -1,12 +1,9 @@ -/* RCSid $Id: paths.h,v 2.18 2003/07/14 20:02:29 schorsch Exp $ */ +/* RCSid $Id: paths.h,v 2.21 2004/10/30 04:59:41 greg Exp $ */ /* * Definitions for paths on different machines */ #ifndef _RAD_PATHS_H_ #define _RAD_PATHS_H_ -#ifdef __cplusplus -extern "C" { -#endif #include #include @@ -21,6 +18,7 @@ extern "C" { #define access _access #define PATH_MAX _MAX_PATH + #define NULL_DEVICE "NUL" #define DIRSEP '/' #define ISDIRSEP(c) ((c)=='/' || (c)=='\\') #define ISABS(s) ((s)!=NULL \ @@ -51,8 +49,15 @@ extern "C" { #define S_IRUSR _S_IREAD #define S_IWUSR _S_IWRITE #endif -extern char *fixargv0(); + #ifdef __cplusplus + extern "C" { + #endif + extern char *fixargv0(); + #ifdef __cplusplus + } + #endif + #else /* everything but Windows */ #include #include @@ -67,6 +72,7 @@ extern char *fixargv0(); #ifdef AMIGA + #define NULL_DEVICE "NIL:" #define DIRSEP '/' #define ISABS(s) ((s)!=NULL && (ISDIRSEP(s[0]))) #define PATHSEP ';' @@ -91,7 +97,7 @@ extern char *fixargv0(); #define PATHSEP ':' #define CURDIR '.' #define DEFAULT_TEMPDIRS {"/var/tmp", "/usr/tmp", "/tmp", ".", NULL} - #define TEMPLATE "/usr/tmp/rtXXXXXX" + #define TEMPLATE "/tmp/rtXXXXXX" #define TEMPLEN 17 #define ULIBVAR "RAYPATH" #ifndef DEFPATH @@ -109,6 +115,9 @@ extern char *fixargv0(); #define CASEDIRSEP case DIRSEP #endif +#ifdef __cplusplus +extern "C" { +#endif /* Find a writeable directory for temporary files */ /* If s is NULL, we return a static string */