2014-08-11 13:27:10 +02:00

109 lines
2.4 KiB
Plaintext

$NetBSD: patch-ac,v 1.5 2014/02/02 20:20:50 wiz Exp $
--- vobcopy.h.orig 2009-06-08 20:15:39.000000000 +0000
+++ vobcopy.h
@@ -54,7 +54,11 @@
#include <sys/mnttab.h>
#include <sys/statvfs.h>
+#ifdef FALSE
+typedef int bool;
+#else
typedef enum { FALSE=0, TRUE=1 } bool;
+#endif
# if ( _FILE_OFFSET_BITS == 64 )
#define HAS_LARGEFILE 1
@@ -67,7 +71,6 @@ typedef enum { FALSE=0, TRUE=1 } bool;
/*#define off_t __off64_t THIS HERE BREAKS OSX 10.5 */
/* ////////// *BSD ////////// */
-#if ( defined( BSD ) && ( BSD >= 199306 ) )
#if !defined( __NetBSD__ ) || \
( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) )
@@ -100,20 +103,27 @@ typedef enum { FALSE=0, TRUE=1 } bool;
#define GETMNTINFO_USES_STATVFS
# endif
-#endif
#if defined(__FreeBSD__)
#define USE_STATFS_FOR_DEV
#include <sys/statvfs.h>
-#else
+#elif !defined(__DragonFly__) && !defined(__NetBSD__)
#include <sys/vfs.h>
#endif
-# if !defined(OpenBSD)
+#if defined(__NetBSD__) && !defined(O_LARGEFILE)
+#define O_LARGEFILE 0
+#endif
+
+# if !defined(OpenBSD) && defined(O_LARGEFILE)
#define HAS_LARGEFILE 1
#endif
+#ifdef FALSE
+typedef int bool;
+#else
typedef enum { FALSE=0, TRUE=1 } bool;
+#endif
#else /* *BSD */
@@ -134,8 +144,10 @@ typedef enum { FALSE=0, TRUE=1 } bool;
#define GETMNTINFO_USES_STATFS 1
#define USE_GETMNTINFO 1
+#ifndef FALSE
#define FALSE 0
#define TRUE 1
+#endif
typedef int bool;
# endif
@@ -163,7 +175,11 @@ typedef int bool;
#define HAVE_GETOPT_LONG 1
#define HAS_LARGEFILE 1
+#ifdef FALSE
+typedef int bool;
+#else
typedef enum { FALSE=0, TRUE=1 } bool;
+#endif
#elif defined( __GLIBC__ )
@@ -174,13 +190,21 @@ typedef int bool;
#define HAVE_GETOPT_LONG 1
#define HAS_LARGEFILE 1
+#ifdef FALSE
+typedef int bool;
+#else
typedef enum { FALSE=0, TRUE=1 } bool;
+#endif
#else
/* ////////// For other cases ////////// */
+#ifdef FALSE
+typedef int bool;
+#else
typedef enum { FALSE=0, TRUE=1 } bool;
+#endif
#if defined( __USE_FILE_OFFSET64 )
# define HAS_LARGEFILE 1
@@ -232,6 +256,6 @@ char *safestrncpy(char *dest, const char
int check_progress( void ); /* this can be removed because the one below supersedes it */
int progressUpdate( int starttime, int cur, int tot, int force );
-#if defined(__APPLE__) && defined(__GNUC__)
+#if (defined(__APPLE__) && defined(__GNUC__)) || defined(__DragonFly__)
int fdatasync( int value );
#endif