From: James Zern Date: Thu, 3 Apr 2014 03:06:07 +0000 (-0700) Subject: tools_common.h: (msvs) avoid redefining off_t X-Git-Tag: v1.4.0~1910^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dae4cfcb70c0294b99f1f9ee70c8b4cb49d18bb2;p=libvpx tools_common.h: (msvs) avoid redefining off_t in some configurations MSVS will define _off_t / off_t in wchar.h; the former is used locally while the latter is for compatibility. this change overrides off_t as in the past and sets _OFF_T_DEFINED to prevent a clash in types. Change-Id: I9b0e6db586a0a2729b545d93edfc56570d2fcf97 --- diff --git a/tools_common.h b/tools_common.h index 58894def0..549e895ec 100644 --- a/tools_common.h +++ b/tools_common.h @@ -22,10 +22,12 @@ #endif #if defined(_MSC_VER) -/* MSVS doesn't define off_t, and uses _f{seek,tell}i64. */ -typedef __int64 off_t; +/* MSVS uses _f{seek,tell}i64. */ #define fseeko _fseeki64 #define ftello _ftelli64 +typedef long _off_t; // NOLINT - MSVS compatible type +typedef __int64 off_t; // fseeki64 compatible type +#define _OFF_T_DEFINED #elif defined(_WIN32) /* MinGW defines off_t as long and uses f{seek,tell}o64/off64_t for large * files. */