From 78f3e0630bc4948b4ce323fa0beaf19330fbb350 Mon Sep 17 00:00:00 2001 From: inikep Date: Wed, 17 Aug 2016 14:52:11 +0200 Subject: [PATCH] disabled %llu warnings with MinGW on Windows --- .travis.yml | 6 +++++- programs/fileio.c | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f980c9727..81773ae50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ matrix: - gcc-arm-linux-gnueabi - libc6-dev-armel-cross - linux-libc-dev-armel-cross + - binfmt-support - os: linux sudo: required env: PLATFORM="Ubuntu 12.04" CMD="make -C programs test32" @@ -41,6 +42,7 @@ matrix: apt: packages: - libc6-dev-i386 + - gcc-multilib - os: linux sudo: required env: PLATFORM="Ubuntu 12.04" CMD="make -C tests versionsTest" @@ -51,6 +53,7 @@ matrix: apt: packages: - libc6-dev-i386 + - gcc-multilib - os: linux sudo: required env: PLATFORM="Ubuntu 12.04" CMD="make -C programs valgrindTest" @@ -62,12 +65,13 @@ matrix: - os: linux dist: trusty sudo: required - env: PLATFORM="Ubuntu 14.04" CMD="make zlibwrapper && make clean && make gcc5test && make clean && make gcc6test && make clean && make ppcinstall ppctest" + env: PLATFORM="Ubuntu 14.04" CMD="make zlibwrapper && make clean && make gcc5test && make clean && make gcc6test && make clean && make ppctest" addons: apt: sources: - ubuntu-toolchain-r-test packages: + - gcc-multilib - gcc-5-multilib - gcc-6-multilib - qemu-system-ppc diff --git a/programs/fileio.c b/programs/fileio.c index 04d5a71ac..c64a14cf7 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -41,11 +41,12 @@ * Compiler Options ***************************************/ #ifdef _MSC_VER /* Visual */ -# define _POSIX_SOURCE 1 /* enable %llu on Windows */ # define _CRT_SECURE_NO_WARNINGS /* removes Visual warning on strerror() */ # pragma warning(disable : 4204) /* non-constant aggregate initializer */ #endif - +#if defined(__MINGW32__) && !defined(_POSIX_SOURCE) +# define _POSIX_SOURCE 1 /* disable %llu warnings with MinGW on Windows */ +#endif /*-************************************* * Includes