blob: 74ece4b88372ae3a6c49d905639af2427cff79f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
$NetBSD: patch-an,v 1.3 2014/02/13 10:10:06 mrg Exp $
--- Top/one_file.c.orig 2013-01-07 04:49:34.000000000 -0800
+++ Top/one_file.c 2014-02-12 20:55:08.000000000 -0800
@@ -29,7 +29,7 @@
#include <stdlib.h>
#include "corfile.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
@@ -99,7 +99,7 @@
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)
@@ -134,7 +134,7 @@
}
#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) */
@@ -154,7 +154,7 @@
} 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)
|