4ecb4314aa
XXX The SCons usage sucks.
40 lines
1.5 KiB
Text
40 lines
1.5 KiB
Text
$NetBSD: patch-an,v 1.2 2006/05/29 19:44:24 joerg Exp $
|
|
|
|
--- Top/one_file.c.orig 2006-01-11 03:47:55.000000000 -0800
|
|
+++ Top/one_file.c
|
|
@@ -24,7 +24,7 @@
|
|
#include "csoundCore.h"
|
|
#include <ctype.h>
|
|
#include <errno.h>
|
|
-#if defined(LINUX) || defined(__MACH__) || defined(WIN32)
|
|
+#if defined(LINUX) || defined(__MACH__) || defined(WIN32) || defined(__NetBSD__) || defined(__DragonFly__)
|
|
# include <sys/types.h>
|
|
# include <sys/stat.h>
|
|
#endif
|
|
@@ -66,7 +66,7 @@ CS_NOINLINE char *csoundTmpFileName(CSOU
|
|
buf = csound->Malloc(csound, nBytes);
|
|
}
|
|
{
|
|
-#if defined(LINUX) || defined(__MACH__)
|
|
+#if defined(LINUX) || defined(__MACH__) || defined(__NetBSD__) || defined(__DragonFly__)
|
|
struct stat tmp;
|
|
do {
|
|
#elif defined(WIN32)
|
|
@@ -89,7 +89,7 @@ CS_NOINLINE char *csoundTmpFileName(CSOU
|
|
}
|
|
#endif
|
|
if (ext != NULL && ext[0] != (char) 0) {
|
|
-#if !defined(LINUX) && !defined(__MACH__) && !defined(WIN32)
|
|
+#if !defined(LINUX) && !defined(__MACH__) && !defined(WIN32) && !defined(__NetBSD__) && !defined(__DragonFly__)
|
|
char *p;
|
|
/* remove original extension (does not work on OS X */
|
|
/* and may be a bad idea) */
|
|
@@ -109,7 +109,7 @@ CS_NOINLINE char *csoundTmpFileName(CSOU
|
|
} while (buf[i] != (char) 0);
|
|
}
|
|
#endif
|
|
-#if defined(LINUX) || defined(__MACH__)
|
|
+#if defined(LINUX) || defined(__MACH__) || defined(__NetBSD__) || defined(__DragonFly__)
|
|
/* if the file already exists, try again */
|
|
} while (stat(buf, &tmp) == 0);
|
|
#elif defined(WIN32)
|