3078
|
1 |
--- TiMidity++-2.13.2/timidity/sysdep.h 2004-05-30 19:49:51.000000000 +0200
|
|
2 |
+++ timidity-2.13.2+cvs20081202/timidity/sysdep.h 2008-05-21 15:01:43.000000000 +0200
|
|
3 |
@@ -80,7 +80,7 @@
|
|
4 |
|
|
5 |
|
|
6 |
/* integer type definitions: ISO C now knows a better way */
|
|
7 |
-#if __STDC_VERSION__ == 199901L || __GNUC__ >= 3
|
|
8 |
+#if defined(HAVE_STDINT_H) || __GNUC__ >= 3
|
|
9 |
#include <stdint.h> // int types are defined here
|
|
10 |
typedef int8_t int8;
|
|
11 |
typedef uint8_t uint8;
|
|
12 |
@@ -107,7 +107,10 @@
|
|
13 |
/* DEC MMS has 64 bit long words */
|
|
14 |
/* Linux-Axp has also 64 bit long words */
|
|
15 |
#if defined(DEC) || defined(__alpha__) \
|
|
16 |
- || defined(__ia64__) || defined (__x86_64__) || defined(__ppc64__)
|
|
17 |
+ || defined(__ia64__) || defined (__x86_64__) \
|
|
18 |
+ || defined(__ppc64__) || defined(__s390x__) \
|
|
19 |
+ || defined(__mips64__) || defined(__LP64__) \
|
|
20 |
+ || defined(_LP64)
|
|
21 |
typedef int int32;
|
|
22 |
typedef unsigned int uint32;
|
|
23 |
typedef long int64;
|
|
24 |
@@ -122,9 +125,14 @@
|
|
25 |
typedef unsigned long long uint64;
|
|
26 |
#define TIMIDITY_HAVE_INT64 1
|
|
27 |
#elif defined(_MSC_VER)
|
|
28 |
-/* VC++. */
|
|
29 |
+/* VC++. or PellesC */
|
|
30 |
+# ifdef __POCC__
|
|
31 |
+typedef __int64 int64;
|
|
32 |
+typedef unsigned __int64 uint64;
|
|
33 |
+# else
|
|
34 |
typedef _int64 int64;
|
|
35 |
typedef unsigned _int64 uint64;
|
|
36 |
+# endif
|
|
37 |
#define TIMIDITY_HAVE_INT64 1
|
|
38 |
#elif defined(__BORLANDC__) || defined(__WATCOMC__)
|
|
39 |
typedef __int64 int64;
|
|
40 |
@@ -139,6 +147,15 @@
|
|
41 |
#endif /* 64bit arch */
|
|
42 |
#endif /* C99 */
|
|
43 |
|
|
44 |
+/* pointer size is not long in WIN64 */
|
|
45 |
+#if defined(WIN32) && defined(_AMD64_)
|
|
46 |
+typedef long long ptr_size_t;
|
|
47 |
+typedef unsigned long long u_ptr_size_t;
|
|
48 |
+#else
|
|
49 |
+typedef long ptr_size_t;
|
|
50 |
+typedef unsigned long u_ptr_size_t;
|
|
51 |
+#endif
|
|
52 |
+
|
|
53 |
|
|
54 |
/* Instrument files are little-endian, MIDI files big-endian, so we
|
|
55 |
need to do some conversions. */
|
|
56 |
@@ -349,7 +366,7 @@
|
|
57 |
#undef MAIL_NAME
|
|
58 |
#endif /* __W32__ */
|
|
59 |
|
|
60 |
-#if defined(__BORLANDC__) || defined(__WATCOMC__)
|
|
61 |
+#if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DMC__)
|
|
62 |
/* strncasecmp() -> strncmpi(char *,char *,size_t) */
|
|
63 |
//#define strncasecmp(a,b,c) strncmpi(a,b,c)
|
|
64 |
//#define strcasecmp(a,b) strcmpi(a,b)
|
|
65 |
@@ -360,12 +377,34 @@
|
|
66 |
#if defined(_MSC_VER)
|
|
67 |
#define strncasecmp(a,b,c) _strnicmp((a),(b),(c))
|
|
68 |
#define strcasecmp(a,b) _stricmp((a),(b))
|
|
69 |
+#ifndef __POCC__
|
|
70 |
#define open _open
|
|
71 |
#define close _close
|
|
72 |
-#define write _write
|
|
73 |
+//#define write _write
|
|
74 |
#define lseek _lseek
|
|
75 |
#define unlink _unlink
|
|
76 |
+#if _MSC_VER < 1500 /* 1500(VC9) */
|
|
77 |
+#define write _write
|
|
78 |
+#ifdef HAVE_VSNPRINTF
|
|
79 |
+#define vsnprintf _vsnprintf
|
|
80 |
+#endif
|
|
81 |
+#endif
|
|
82 |
#pragma warning( 4 : 4305 4244 )
|
|
83 |
+#else
|
|
84 |
+#ifndef EPERM
|
|
85 |
+#define EPERM 1
|
|
86 |
+#endif
|
|
87 |
+#ifndef EINTR
|
|
88 |
+#define EINTR 4
|
|
89 |
+#endif
|
|
90 |
+#ifndef STDOUT_FILENO
|
|
91 |
+#define STDOUT_FILENO 1
|
|
92 |
+#endif
|
|
93 |
+#ifndef _MAX_PATH
|
|
94 |
+#define _MAX_PATH 260
|
|
95 |
+#endif
|
|
96 |
+#undef strncasecmp
|
|
97 |
+#endif
|
|
98 |
#endif /* _MSC_VER */
|
|
99 |
|
|
100 |
#define SAFE_CONVERT_LENGTH(len) (6 * (len) + 1)
|