From 1861bee4ff6a8bf065fa6079b170649452d19242 Mon Sep 17 00:00:00 2001 From: goffioul Date: Wed, 26 Oct 2005 11:29:28 +0000 Subject: [PATCH] Make FPE catching work under MSVC. --- msvc/c/Makefile | 5 +++-- msvc/h/config.h.msvc6 | 2 ++ src/c/arch/fpe_x86.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/msvc/c/Makefile b/msvc/c/Makefile index b4a496f9f..35fbe4083 100644 --- a/msvc/c/Makefile +++ b/msvc/c/Makefile @@ -118,8 +118,9 @@ clean: $(DPP): $(srcdir)/dpp.c $(srcdir)/symbols_list2.h ../h/config.h $(TRUE_CC) -I../h -I./ -I$(HDIR) $(DEFS) $(srcdir)/dpp.c -o $@ -../h/config.h: ../h/config.h.msvc6 - $(CP) ..\h\config.h.msvc6 ..\h\config.h +../h/config.h: ../h/config.h.msvc6 Makefile + cut.exe "@ECL_FPE_CODE@" "$(srcdir:\=/)/arch/fpe_x86.c" \ + < ..\h\config.h.msvc6 > $@ # # GCC might break this code diff --git a/msvc/h/config.h.msvc6 b/msvc/h/config.h.msvc6 index 54b30e9db..7eea38182 100644 --- a/msvc/h/config.h.msvc6 +++ b/msvc/h/config.h.msvc6 @@ -276,3 +276,5 @@ typedef int int32_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; + +#include "@ECL_FPE_CODE@" diff --git a/src/c/arch/fpe_x86.c b/src/c/arch/fpe_x86.c index 00a5eb9a9..95e6017ec 100644 --- a/src/c/arch/fpe_x86.c +++ b/src/c/arch/fpe_x86.c @@ -16,7 +16,7 @@ * See fpe_none.c for a description */ -#ifdef _MSVC +#ifdef _MSC_VER #define ecl_detect_fpe() __asm fwait #endif