| @@ -1,101 +1,104 @@ | | | @@ -1,101 +1,104 @@ |
1 | $NetBSD: patch-ac,v 1.3 2009/04/28 13:01:39 hasso Exp $ | | 1 | $NetBSD: patch-ac,v 1.4 2010/09/16 12:02:16 wiz Exp $ |
2 | | | 2 | |
3 | --- vobcopy.h.orig 2008-02-19 07:27:04 +0200 | | 3 | --- vobcopy.h.orig 2009-06-08 20:15:39.000000000 +0000 |
4 | +++ vobcopy.h 2009-04-28 15:31:42 +0300 | | 4 | +++ vobcopy.h |
5 | @@ -43,7 +43,11 @@ | | 5 | @@ -54,7 +54,11 @@ |
6 | #include <sys/mnttab.h> | | 6 | #include <sys/mnttab.h> |
7 | #include <sys/statvfs.h> | | 7 | #include <sys/statvfs.h> |
8 | | | 8 | |
9 | +#ifdef FALSE | | 9 | +#ifdef FALSE |
10 | +typedef int bool; | | 10 | +typedef int bool; |
11 | +#else | | 11 | +#else |
12 | typedef enum { FALSE=0, TRUE=1 } bool; | | 12 | typedef enum { FALSE=0, TRUE=1 } bool; |
13 | +#endif | | 13 | +#endif |
14 | | | 14 | |
15 | # if ( _FILE_OFFSET_BITS == 64 ) | | 15 | # if ( _FILE_OFFSET_BITS == 64 ) |
16 | #define HAS_LARGEFILE 1 | | 16 | #define HAS_LARGEFILE 1 |
17 | @@ -58,7 +62,7 @@ typedef enum { FALSE=0, TRUE=1 } bool; | | 17 | @@ -67,7 +71,6 @@ typedef enum { FALSE=0, TRUE=1 } bool; |
| | | 18 | /*#define off_t __off64_t THIS HERE BREAKS OSX 10.5 */ |
| | | 19 | |
18 | /* ////////// *BSD ////////// */ | | 20 | /* ////////// *BSD ////////// */ |
19 | #if ( defined( BSD ) && ( BSD >= 199306 ) ) | | 21 | -#if ( defined( BSD ) && ( BSD >= 199306 ) ) |
20 | | | 22 | |
21 | -# if !defined( __NetBSD__ ) ) || \ | | 23 | #if !defined( __NetBSD__ ) || \ |
22 | +# if ( !defined( __NetBSD__ ) ) || \ | | | |
23 | ( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) ) | | 24 | ( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) ) |
24 | #include <sys/mount.h> | | 25 | @@ -100,20 +103,23 @@ typedef enum { FALSE=0, TRUE=1 } bool; |
25 | #define USE_STATFS 1 | | 26 | #define GETMNTINFO_USES_STATVFS |
26 | @@ -88,15 +92,21 @@ typedef enum { FALSE=0, TRUE=1 } bool; | | | |
27 | | | 27 | |
28 | # endif | | 28 | # endif |
| | | 29 | -#endif |
29 | | | 30 | |
30 | -# else | | 31 | #if defined(__FreeBSD__) |
31 | +# elif !defined(__DragonFly__) | | 32 | #define USE_STATFS_FOR_DEV |
32 | | | 33 | #include <sys/statvfs.h> |
| | | 34 | -#else |
| | | 35 | +#elif !defined(__DragonFly__) && !defined(__NetBSD__) |
33 | #include <sys/vfs.h> | | 36 | #include <sys/vfs.h> |
| | | 37 | #endif |
34 | | | 38 | |
35 | # endif | | 39 | -# if !defined(OpenBSD) |
36 | | | 40 | +# if !defined(OpenBSD) && defined(O_LARGEFILE) |
37 | +#ifdef O_LARGEFILE | | | |
38 | #define HAS_LARGEFILE 1 | | 41 | #define HAS_LARGEFILE 1 |
39 | +#endif | | 42 | #endif |
40 | | | 43 | |
41 | +#ifdef FALSE | | 44 | +#ifdef FALSE |
42 | +typedef int bool; | | 45 | +typedef int bool; |
43 | +#else | | 46 | +#else |
44 | typedef enum { FALSE=0, TRUE=1 } bool; | | 47 | typedef enum { FALSE=0, TRUE=1 } bool; |
45 | +#endif | | 48 | +#endif |
46 | | | 49 | |
47 | #else /* *BSD */ | | 50 | #else /* *BSD */ |
48 | | | 51 | |
49 | @@ -117,8 +127,10 @@ typedef enum { FALSE=0, TRUE=1 } bool; | | 52 | @@ -134,8 +140,10 @@ typedef enum { FALSE=0, TRUE=1 } bool; |
50 | #define GETMNTINFO_USES_STATFS 1 | | 53 | #define GETMNTINFO_USES_STATFS 1 |
51 | #define USE_GETMNTINFO 1 | | 54 | #define USE_GETMNTINFO 1 |
52 | | | 55 | |
53 | +#ifndef FALSE | | 56 | +#ifndef FALSE |
54 | #define FALSE 0 | | 57 | #define FALSE 0 |
55 | #define TRUE 1 | | 58 | #define TRUE 1 |
56 | +#endif | | 59 | +#endif |
57 | typedef int bool; | | 60 | typedef int bool; |
58 | | | 61 | |
59 | # endif | | 62 | # endif |
60 | @@ -145,7 +157,11 @@ typedef int bool; | | 63 | @@ -163,7 +171,11 @@ typedef int bool; |
61 | #define HAVE_GETOPT_LONG 1 | | 64 | #define HAVE_GETOPT_LONG 1 |
62 | #define HAS_LARGEFILE 1 | | 65 | #define HAS_LARGEFILE 1 |
63 | | | 66 | |
64 | +#ifdef FALSE | | 67 | +#ifdef FALSE |
65 | +typedef int bool; | | 68 | +typedef int bool; |
66 | +#else | | 69 | +#else |
67 | typedef enum { FALSE=0, TRUE=1 } bool; | | 70 | typedef enum { FALSE=0, TRUE=1 } bool; |
68 | +#endif | | 71 | +#endif |
69 | | | 72 | |
70 | #elif defined( __GLIBC__ ) | | 73 | #elif defined( __GLIBC__ ) |
71 | | | 74 | |
72 | @@ -156,13 +172,21 @@ typedef int bool; | | 75 | @@ -174,13 +186,21 @@ typedef int bool; |
73 | #define HAVE_GETOPT_LONG 1 | | 76 | #define HAVE_GETOPT_LONG 1 |
74 | #define HAS_LARGEFILE 1 | | 77 | #define HAS_LARGEFILE 1 |
75 | | | 78 | |
76 | +#ifdef FALSE | | 79 | +#ifdef FALSE |
77 | +typedef int bool; | | 80 | +typedef int bool; |
78 | +#else | | 81 | +#else |
79 | typedef enum { FALSE=0, TRUE=1 } bool; | | 82 | typedef enum { FALSE=0, TRUE=1 } bool; |
80 | +#endif | | 83 | +#endif |
81 | | | 84 | |
82 | #else | | 85 | #else |
83 | | | 86 | |
84 | /* ////////// For other cases ////////// */ | | 87 | /* ////////// For other cases ////////// */ |
85 | | | 88 | |
86 | +#ifdef FALSE | | 89 | +#ifdef FALSE |
87 | +typedef int bool; | | 90 | +typedef int bool; |
88 | +#else | | 91 | +#else |
89 | typedef enum { FALSE=0, TRUE=1 } bool; | | 92 | typedef enum { FALSE=0, TRUE=1 } bool; |
90 | +#endif | | 93 | +#endif |
91 | | | 94 | |
92 | #if defined( __USE_FILE_OFFSET64 ) | | 95 | #if defined( __USE_FILE_OFFSET64 ) |
93 | # define HAS_LARGEFILE 1 | | 96 | # define HAS_LARGEFILE 1 |
94 | @@ -212,6 +236,6 @@ void watchdog_handler( int signal ); | | 97 | @@ -232,6 +252,6 @@ char *safestrncpy(char *dest, const char |
95 | void shutdown_handler( int signal ); | | 98 | int check_progress( void ); /* this can be removed because the one below supersedes it */ |
96 | char *safestrncpy(char *dest, const char *src, size_t n); | | 99 | int progressUpdate( int starttime, int cur, int tot, int force ); |
97 | | | 100 | |
98 | -#if defined(__APPLE__) && defined(__GNUC__) | | 101 | -#if defined(__APPLE__) && defined(__GNUC__) |
99 | +#if (defined(__APPLE__) && defined(__GNUC__)) || defined(__DragonFly__) | | 102 | +#if (defined(__APPLE__) && defined(__GNUC__)) || defined(__DragonFly__) |
100 | int fdatasync( int value ); | | 103 | int fdatasync( int value ); |
101 | #endif | | 104 | #endif |