From 900a1e0a29d7e8e98fd04fa6ee21f838771c4e54 Mon Sep 17 00:00:00 2001 From: Snaipe Date: Sun, 15 Nov 2015 19:48:29 +0100 Subject: [PATCH] Refactored cr_off{32,64} definitions to its own header file to avoid collisions --- src/compat/internal.h | 8 +++----- src/compat/off_t.h | 9 +++++++++ src/compat/posix.h | 5 +---- 3 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 src/compat/off_t.h diff --git a/src/compat/internal.h b/src/compat/internal.h index d56f1a0..47d32cd 100644 --- a/src/compat/internal.h +++ b/src/compat/internal.h @@ -31,12 +31,10 @@ # define _WIN32_WINNT 0x0502 # include -# include - -typedef int32_t cr_off32; -typedef int64_t cr_off64; - # if defined(__MINGW32__) || defined(__MINGW64__) + +# include "off_t.h" + # if !defined(__MINGW64__) # define off_t cr_off32 # else diff --git a/src/compat/off_t.h b/src/compat/off_t.h new file mode 100644 index 0000000..24dc65d --- /dev/null +++ b/src/compat/off_t.h @@ -0,0 +1,9 @@ +#ifndef OFF_T_H_ +# define OFF_T_H_ + +# include + +typedef int32_t cr_off32; +typedef int64_t cr_off64; + +#endif /* !OFF_T_H_ */ diff --git a/src/compat/posix.h b/src/compat/posix.h index b4a35b5..81af6b3 100644 --- a/src/compat/posix.h +++ b/src/compat/posix.h @@ -42,10 +42,7 @@ # endif # if defined(__MINGW32__) || defined(__MINGW64__) -# include - -typedef int32_t cr_off32; -typedef int64_t cr_off64; +# include "off_t.h" # if !defined(__MINGW64__) # define off_t cr_off32