From 69d9aa6c694f50d8924b8459fc2fde91b9ae1fa9 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Tue, 29 Jul 2003 20:34:36 +0000 Subject: [PATCH] Some fixes for latest gcc 3.4 snapshot. committer: mfx 1059510876 +0000 --- src/Makedefs.dep | 4 ++-- src/Makefile.bld | 15 +++++++++------ src/bele.h | 4 ++-- src/stdcxx.cpp | 17 ----------------- src/stdcxx.h | 6 +++--- 5 files changed, 16 insertions(+), 30 deletions(-) diff --git a/src/Makedefs.dep b/src/Makedefs.dep index f624d0e4..bbeeb467 100644 --- a/src/Makedefs.dep +++ b/src/Makedefs.dep @@ -1,5 +1,5 @@ ifeq ($(DEPS_DONE),) -DEPS_DONE = 1 +DEPS_DONE := 1 # /*********************************************************************** @@ -44,5 +44,5 @@ endif endif -endif +endif # DEPS_DONE diff --git a/src/Makefile.bld b/src/Makefile.bld index 734969e1..aaaaf134 100644 --- a/src/Makefile.bld +++ b/src/Makefile.bld @@ -198,7 +198,7 @@ LINK_EXE_OUTPUT = -e$@ ifeq ($(WITH_ZLIB),1) LDLIBS += -lz endif -# warning: do _not_ use option `-d' --> incorrect string merging will happen +# warning: do not use option `-d' --> incorrect string merging will happen ifeq ($(DEBUG),1) CFLAGS += -Od -dc else @@ -279,7 +279,7 @@ endif # djgpp2 ### -### win32 - cygwin / mingw32 +### win32 - cygwin / mingw32 / rsxnt ### ifeq ($(target),cygwin) @@ -331,7 +331,10 @@ o = .obj a = .lib e = .exe CC = bcc32 -3 -INCLUDES += -I$(srcdir)/acc -I$(srcdir)/filter +INCLUDES += -I$(srcdir)/acc +ifneq ($(strip $(wildcard $(srcdir)/filter)),) +INCLUDES += -I$(srcdir)/filter +endif CFLAGS = -w -w-inl -g1 CFLAGS_OUTPUT = -o$@ LDFLAGS = -ls @@ -416,7 +419,7 @@ ifeq ($(DEBUG),1) CFLAGS += -Od -ZI LINK_EXE_LDFLAGS += /debug else - CFLAGS += -O1 -GF + CFLAGS += -O1 -GF -Gy LINK_EXE_LDFLAGS += /release endif RESOURCES := $(subst .rc,.res,$(notdir $(wildcard $(srcdir)/*.rc))) @@ -475,7 +478,7 @@ LIB := $(DOS_LIBDIRS);$(LIB) endif export LIB -ifeq (1,2) +ifeq (1,1) # statically link libc.lib CC += -ML LDLIBS = $(DOS_LDLIBS:.lib=_ml.lib) setargv.obj @@ -488,7 +491,7 @@ ifeq ($(DEBUG),1) CFLAGS += -Od -ZI LINK_EXE_LDFLAGS += /debug else - CFLAGS += -O1 -GF + CFLAGS += -O1 -GF -Gy LINK_EXE_LDFLAGS += /release ##LINK_EXE_LDFLAGS += /opt:nowin98 endif diff --git a/src/bele.h b/src/bele.h index 7b8ab4ec..9519b50c 100644 --- a/src/bele.h +++ b/src/bele.h @@ -373,8 +373,8 @@ int __acc_cdecl_qsort le32_compare_signed(const void *e1, const void *e2); // just for testing... #if (1 && ACC_ARCH_IA32 && ACC_CC_GNUC >= 0x030200) - typedef unsigned short LE16_unaligned __attribute__((__packed__,__aligned__(1))); - typedef unsigned int LE32_unaligned __attribute__((__packed__,__aligned__(1))); + typedef unsigned short LE16_unaligned __attribute__((__aligned__(1))); + typedef unsigned int LE32_unaligned __attribute__((__aligned__(1))); # define LE16 LE16_unaligned # define LE32 LE32_unaligned #endif diff --git a/src/stdcxx.cpp b/src/stdcxx.cpp index bab8a6ec..ba0a34dd 100644 --- a/src/stdcxx.cpp +++ b/src/stdcxx.cpp @@ -26,28 +26,11 @@ */ -#if 0 && defined(_MSC_VER) && (_MSC_VER >= 1300) -# define _Nomemory UNUSED_Nomemory -# include -# undef _Nomemory -#endif - //#define WANT_STL #include "conf.h" #include "stdcxx.h" -#if 0 && defined(_MSC_VER) && (_MSC_VER >= 1300) -#undef _Nomemory -namespace std { -void __cdecl _Nomemory() { - static const bad_alloc ba; - throw ba; -} -} -#endif - - #if 1 && defined(__linux__) && (ACC_CC_GNUC >= 0x030400) /* this is used by __gnu_cxx::__verbose_terminate_handler() */ extern "C" { diff --git a/src/stdcxx.h b/src/stdcxx.h index a13e26a4..048bb5fa 100644 --- a/src/stdcxx.h +++ b/src/stdcxx.h @@ -52,13 +52,13 @@ # define DISABLE_NEW_DELETE_PLACEMENT_NEW \ static void *operator new(size_t, void *); # endif -# if defined(__GNUC__) && (__GNUC__ >= 3) +# if (ACC_CC_GNUC >= 0x030000ul) # define DISABLE_NEW_DELETE_PLACEMENT_DELETE \ static void operator delete(void *, void *) NOTHROW { } -# elif defined(__INTEL_COMPILER) +# elif (ACC_CC_INTELC) # define DISABLE_NEW_DELETE_PLACEMENT_DELETE \ static void operator delete(void *, void *) NOTHROW { } -# elif defined(_MSC_VER) && (_MSC_VER >= 1200) +# elif (ACC_CC_MSC && (_MSC_VER >= 1200)) # define DISABLE_NEW_DELETE_PLACEMENT_DELETE \ static void operator delete(void *, void *) NOTHROW { } # endif