From 3fd22b7b86ebad8fbd4b66da3d63e6d9c1ca829c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Dec 2010 11:38:49 +0200 Subject: Detect TR1 availability Also use the wrapper header from libodb. --- common/inverse/makefile | 3 +-- common/inverse/test.hxx | 7 ++++++- common/inverse/tr1-memory.hxx | 41 ----------------------------------------- 3 files changed, 7 insertions(+), 44 deletions(-) delete mode 100644 common/inverse/tr1-memory.hxx (limited to 'common/inverse') diff --git a/common/inverse/makefile b/common/inverse/makefile index b7480fc..05871d1 100644 --- a/common/inverse/makefile +++ b/common/inverse/makefile @@ -53,13 +53,12 @@ name := $(notdir $(src_base)) $(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) -$(dist): export extra_headers := tr1-memory.hxx $(dist): data_dist := test.std $(dist): export name := $(name) $(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \ $(call vc10projs,$(name)) $(dist): - $(call dist-data,$(sources) $(headers) $(extra_headers) $(data_dist)) + $(call dist-data,$(sources) $(headers) $(data_dist)) $(call meta-automake,../template/Makefile.am) $(call meta-vc9projs,../template/template,$(name)) $(call meta-vc10projs,../template/template,$(name)) diff --git a/common/inverse/test.hxx b/common/inverse/test.hxx index e57cb78..7dcb17e 100644 --- a/common/inverse/test.hxx +++ b/common/inverse/test.hxx @@ -6,14 +6,19 @@ #ifndef TEST_HXX #define TEST_HXX +#include // HAVE_TR1_MEMORY + #include #include #include #include -#include "tr1-memory.hxx" #include +#ifdef HAVE_TR1_MEMORY +# include +#endif + struct obj1; struct obj2; struct obj3; diff --git a/common/inverse/tr1-memory.hxx b/common/inverse/tr1-memory.hxx deleted file mode 100644 index 44d369a..0000000 --- a/common/inverse/tr1-memory.hxx +++ /dev/null @@ -1,41 +0,0 @@ -// file : common/inverse/tr1-memory.hxx -// author : Boris Kolpackov -// copyright : not copyrighted - public domain - -#ifndef TR1_MEMORY_HXX -#define TR1_MEMORY_HXX - -//@@ tmp -#define HAVE_TR1_MEMORY - -// -// Try to include TR1 in a compiler-specific manner. Fall-back -// on the Boost TR1 implementation if the compiler does not support TR1. -// - -#include // __GLIBCXX__, _HAS_TR1 - -// GNU C++ or Intel C++ using libstd++. -// -#if defined (__GNUC__) && __GNUC__ >= 4 && defined (__GLIBCXX__) -# include -// -// IBM XL C++. -// -#elif defined (__xlC__) && __xlC__ >= 0x0900 -# define __IBMCPP_TR1__ -# include -// -// VC++ or Intel C++ using VC++ standard library. -// -#elif defined (_MSC_VER) && \ - (_MSC_VER == 1500 && defined (_HAS_TR1) || _MSC_VER > 1500) -# include -// -// Boost fall-back. -// -#else -# include -#endif - -#endif // TR1_MEMORY_HXX -- cgit v1.1