From c44c2f04d9f3436668c0daa36f4cb88fe14f3af8 Mon Sep 17 00:00:00 2001 From: pwpiwi Date: Mon, 6 Mar 2017 19:55:23 +0100 Subject: [PATCH] Fix some #defines - Use -D_ISOC99_SOURCE instead of -D__USE_MINGW_ANSI_STDIO=1 - WIN32 is deprecated. Use _WIN32 instead --- client/Makefile | 3 +-- client/hid-flasher/proxendian.h | 2 +- client/hid-flasher/sleep.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/client/Makefile b/client/Makefile index 7c2a7a71..c1ff5ee3 100644 --- a/client/Makefile +++ b/client/Makefile @@ -15,11 +15,10 @@ OBJDIR = obj LDLIBS = -L/opt/local/lib -L/usr/local/lib -lreadline -lpthread -lm LUALIB = ../liblua/liblua.a LDFLAGS = $(COMMON_FLAGS) -CFLAGS = -std=c99 -I. -I../include -I../common -I../zlib -I/opt/local/include -I../liblua -Wall $(COMMON_FLAGS) -g -O4 +CFLAGS = -std=c99 -D_ISOC99_SOURCE -I. -I../include -I../common -I../zlib -I/opt/local/include -I../liblua -Wall $(COMMON_FLAGS) -g -O4 LUAPLATFORM = generic ifneq (,$(findstring MINGW,$(platform))) - CFLAGS += -D__USE_MINGW_ANSI_STDIO=1 CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui MOC = $(QTDIR)/bin/moc LUAPLATFORM = mingw diff --git a/client/hid-flasher/proxendian.h b/client/hid-flasher/proxendian.h index 4a386a0d..4f5a4519 100644 --- a/client/hid-flasher/proxendian.h +++ b/client/hid-flasher/proxendian.h @@ -13,7 +13,7 @@ #include -#ifdef WIN32 +#ifdef _WIN32 # define HOST_LITTLE_ENDIAN #else # include diff --git a/client/hid-flasher/sleep.h b/client/hid-flasher/sleep.h index 81f4e060..62d9f4d1 100644 --- a/client/hid-flasher/sleep.h +++ b/client/hid-flasher/sleep.h @@ -11,7 +11,7 @@ #ifndef SLEEP_H__ #define SLEEP_H__ -#ifdef WIN32 +#ifdef _WIN32 #include #define sleep(n) Sleep(1000 * n) #define msleep(n) Sleep(n) -- 2.39.5