From 75c4ab34b11f60aafe0cbb7199b227c8fb884545 Mon Sep 17 00:00:00 2001 From: johnoel Date: Mon, 12 Feb 2024 11:10:37 -1000 Subject: [PATCH] lvector type should be long long for _WIN64. --- src/linad99/fvar.hpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/linad99/fvar.hpp b/src/linad99/fvar.hpp index dc536fd56..490a828a9 100644 --- a/src/linad99/fvar.hpp +++ b/src/linad99/fvar.hpp @@ -61,14 +61,23 @@ Macro definitions. #define AD_LONG_INT long long int #endif #elif defined(_MSC_VER) - #define OFF_T __int64 - #define LSEEK _lseeki64 + #ifdef _WIN64 + #define OFF_T __int64 + #define LSEEK _lseeki64 + #else + #define OFF_T long + #define LSEEK _lseek + #endif #define READ _read #define WRITE _write #if defined(AD_LONG_INT) #error "Error: AD_LONG_INT should not be defined." #else - #define AD_LONG_INT long int + #ifdef _WIN64 + #define AD_LONG_INT long long int + #else + #define AD_LONG_INT long int + #endif #endif #else #define OFF_T off_t