Commit ac162a57 authored by Sean McBride's avatar Sean McBride Committed by Kitware Robot

Merge topic 'OpenBSDFixes'

ef8b90e2 Fixed some compilation errors on OpenBSD
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel's avatarBen Boeckel <ben.boeckel@kitware.com>
Merge-request: !6344
parents 77deb27c ef8b90e2
......@@ -37,8 +37,9 @@
#if defined(_WIN32)
#define VTK_STAT_STRUCT struct _stat64
#define VTK_STAT_FUNC _stat64
#elif defined _DARWIN_FEATURE_64_BIT_INODE || defined __FreeBSD__
// FreeBSD and OSX use stat
#elif defined _DARWIN_FEATURE_64_BIT_INODE || defined __FreeBSD__ || defined __NetBSD__ || \
defined __OpenBSD__
// The BSDs use stat().
#define VTK_STAT_STRUCT struct stat
#define VTK_STAT_FUNC stat
#else
......
......@@ -38,8 +38,9 @@
#if defined(_WIN32)
#define VTK_STAT_STRUCT struct _stat64
#define VTK_STAT_FUNC _stat64
#elif defined _DARWIN_FEATURE_64_BIT_INODE || defined __FreeBSD__
// FreeBSD and OSX use stat
#elif defined _DARWIN_FEATURE_64_BIT_INODE || defined __FreeBSD__ || defined __NetBSD__ || \
defined __OpenBSD__
// The BSDs use stat().
#define VTK_STAT_STRUCT struct stat
#define VTK_STAT_FUNC stat
#else
......
......@@ -34,8 +34,9 @@ namespace
{
// Decide which of 3 stat varieties to use: stat, stat64, __stat64
// Usually stat uses 32 bit fields, and stat64 (with underscores in Windows) uses 64 bit fields.
// But on OS X and FreeBSD, stat uses 64 bit fields these days.
#if (VTK_SIZEOF_ID_TYPE == 8) && !defined(_DARWIN_FEATURE_64_BIT_INODE) && !defined(__FreeBSD__)
// But on the BSDs, stat uses 64 bit fields these days.
#if (VTK_SIZEOF_ID_TYPE == 8) && !defined(_DARWIN_FEATURE_64_BIT_INODE) && \
!defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
#ifndef _WIN32
#define USE_STAT_64
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment