From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Holger Jaekel Date: Sun, 24 Mar 2024 14:11:24 +0100 Subject: [PATCH] Drop usage of stat64 on Linux Not required on modern systems. Origin: Alpine Linux Upstream-Status: Unknown [ismael@sourcemage.org: Metadata reconstructed from aports commit; reduced the patch to make it more acceptable by upstream] Signed-off-by: Ismael Luceno --- IO/EnSight/vtkEnSight6BinaryReader.cxx | 9 +-------- IO/EnSight/vtkEnSightGoldBinaryReader.cxx | 9 +-------- IO/LSDyna/LSDynaFamily.cxx | 7 +------ 3 files changed, 3 insertions(+), 22 deletions(-) --- a/IO/EnSight/vtkEnSight6BinaryReader.cxx +++ b/IO/EnSight/vtkEnSight6BinaryReader.cxx @@ -38,16 +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__ || defined __NetBSD__ || \ - defined __OpenBSD__ -// The BSDs use stat(). +#else #define VTK_STAT_STRUCT struct stat #define VTK_STAT_FUNC stat -#else -// here, we're relying on _FILE_OFFSET_BITS defined in vtkWin32Header.h to help -// us on POSIX without resorting to using stat64. -#define VTK_STAT_STRUCT struct stat64 -#define VTK_STAT_FUNC stat64 #endif vtkStandardNewMacro(vtkEnSight6BinaryReader); --- a/IO/EnSight/vtkEnSightGoldBinaryReader.cxx +++ b/IO/EnSight/vtkEnSightGoldBinaryReader.cxx @@ -43,16 +43,9 @@ #if defined(_WIN32) #define VTK_STAT_STRUCT struct _stat64 #define VTK_STAT_FUNC _stat64 -#elif defined _DARWIN_FEATURE_64_BIT_INODE || defined __FreeBSD__ || defined __NetBSD__ || \ - defined __OpenBSD__ -// The BSDs use stat(). +#else #define VTK_STAT_STRUCT struct stat #define VTK_STAT_FUNC stat -#else -// here, we're relying on _FILE_OFFSET_BITS defined in vtkWin32Header.h to help -// us on POSIX without resorting to using stat64. -#define VTK_STAT_STRUCT struct stat64 -#define VTK_STAT_FUNC stat64 #endif class vtkEnSightGoldBinaryReader::vtkUtilities --- a/IO/LSDyna/LSDynaFamily.cxx +++ b/IO/LSDyna/LSDynaFamily.cxx @@ -35,13 +35,8 @@ // 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 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 +#ifdef _WIN32 #define USE_WIN_STAT_64 -#endif #else #define USE_STAT #endif .