diff options
-rw-r--r-- | build/cxx.m4 | 51 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | sigc++/adaptors/bind.h | 12 | ||||
-rw-r--r-- | sigc++/adaptors/macros/retype.h.m4 | 11 | ||||
-rw-r--r-- | sigc++/functors/functor_trait.h | 28 | ||||
-rw-r--r-- | sigc++/functors/slot.h | 11 | ||||
-rw-r--r-- | sigc++/signal.h | 12 |
7 files changed, 1 insertions, 126 deletions
diff --git a/build/cxx.m4 b/build/cxx.m4 deleted file mode 100644 index f1f80ee..0000000 --- a/build/cxx.m4 +++ /dev/null @@ -1,51 +0,0 @@ -dnl -dnl SIGC_CXX_PRAGMA_PUSH_POP_MACRO -dnl -dnl TODO: When we can break ABI, delete this. It's used when nil is -dnl temporarily undefined. See comment in functor_trait.h. -dnl -AC_DEFUN([SIGC_CXX_PRAGMA_PUSH_POP_MACRO],[ -AC_MSG_CHECKING([if C++ preprocessor supports pragma push_macro() and pop_macro().]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM( -[[ - #define BEGIN { - #define END } - #pragma push_macro("BEGIN") - #pragma push_macro("END") - #undef BEGIN - #undef END - - // BEGIN and END are not prepreprocessor macros - struct Test1 - { - int BEGIN; - double END; - }; - - #pragma pop_macro("BEGIN") - #pragma pop_macro("END") - - // BEGIN and END are prepreprocessor macros - struct Test2 - BEGIN - int i; - double d; - END; - - void func1(Test1& x); - void func2(Test2& x); -]], -[[ - Test1 test1; - Test2 test2; - func1(test1); - func2(test2); -]])], -[ - sigcm_cxx_pragma_push_pop_macro=yes - AC_DEFINE([SIGC_PRAGMA_PUSH_POP_MACRO],[1],[does the C++ preprocessor support pragma push_macro() and pop_macro().]) -],[ - sigcm_cxx_pragma_push_pop_macro=no -]) -AC_MSG_RESULT([$sigcm_cxx_pragma_push_pop_macro]) -]) diff --git a/configure.ac b/configure.ac index 2259fcb..f8b24bb 100644 --- a/configure.ac +++ b/configure.ac @@ -50,7 +50,7 @@ MM_ARG_ENABLE_DOCUMENTATION MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++]) AC_LANG([C++]) -SIGC_CXX_PRAGMA_PUSH_POP_MACRO +SIGC_CXX_HAS_NAMESPACE_STD SIGC_CXX_HAS_SUN_REVERSE_ITERATOR AS_IF([test "x$config_error" = xyes], diff --git a/sigc++/adaptors/bind.h b/sigc++/adaptors/bind.h index d82f993..390d42b 100644 --- a/sigc++/adaptors/bind.h +++ b/sigc++/adaptors/bind.h @@ -8,14 +8,6 @@ #include <sigc++/tuple-utils/tuple_end.h> #include <sigc++/tuple-utils/tuple_transform_each.h> - -//TODO: See comment in functor_trait.h. -#if defined(nil) && defined(SIGC_PRAGMA_PUSH_POP_MACRO) - #define SIGC_NIL_HAS_BEEN_PUSHED 1 - #pragma push_macro("nil") - #undef nil -#endif - namespace sigc { @@ -335,8 +327,4 @@ bind(const T_functor& _A_func, T_type... _A_b) } /* namespace sigc */ -#ifdef SIGC_NIL_HAS_BEEN_PUSHED - #undef SIGC_NIL_HAS_BEEN_PUSHED - #pragma pop_macro("nil") -#endif #endif /* _SIGC_ADAPTORS_BIND_H_ */ diff --git a/sigc++/adaptors/macros/retype.h.m4 b/sigc++/adaptors/macros/retype.h.m4 index dd69839..2478a3b 100644 --- a/sigc++/adaptors/macros/retype.h.m4 +++ b/sigc++/adaptors/macros/retype.h.m4 @@ -43,13 +43,6 @@ _FIREWALL([ADAPTORS_RETYPE]) #include <sigc++/functors/mem_fun.h> #include <sigc++/functors/slot.h> -//TODO: See comment in functor_trait.h. -#if defined(nil) && defined(SIGC_PRAGMA_PUSH_POP_MACRO) - #define SIGC_NIL_HAS_BEEN_PUSHED 1 - #pragma push_macro("nil") - #undef nil -#endif - namespace sigc { /** @defgroup retype retype(), retype_return() @@ -183,7 +176,3 @@ RETYPE_MEM_FUNCTOR([bound_const_volatile_]) } /* namespace sigc */ -#ifdef SIGC_NIL_HAS_BEEN_PUSHED - #undef SIGC_NIL_HAS_BEEN_PUSHED - #pragma pop_macro("nil") -#endif diff --git a/sigc++/functors/functor_trait.h b/sigc++/functors/functor_trait.h index 176a330..904d507 100644 --- a/sigc++/functors/functor_trait.h +++ b/sigc++/functors/functor_trait.h @@ -5,34 +5,6 @@ namespace sigc { -//TODO: When we can break ABI, replace nil by something else, such as sigc_nil. -// nil is a keyword in Objective C++. When gcc is used for compiling Objective C++ -// programs, nil is defined as a preprocessor macro. -// https://bugzilla.gnome.org/show_bug.cgi?id=695235 -#if defined(nil) && defined(SIGC_PRAGMA_PUSH_POP_MACRO) - #define SIGC_NIL_HAS_BEEN_PUSHED 1 - #pragma push_macro("nil") - #undef nil -#endif - -/** nil struct type. - * The nil struct type is used as default template argument in the - * unnumbered sigc::signal and sigc::slot templates. - * - * @ingroup signal - * @ingroup slot - */ -#ifndef DOXYGEN_SHOULD_SKIP_THIS -struct nil; -#else -struct nil {}; -#endif - -#ifdef SIGC_NIL_HAS_BEEN_PUSHED - #undef SIGC_NIL_HAS_BEEN_PUSHED - #pragma pop_macro("nil") -#endif - /** @defgroup sigcfunctors Functors * Functors are copyable types that define operator()(). * diff --git a/sigc++/functors/slot.h b/sigc++/functors/slot.h index 66ad68e..7a3713f 100644 --- a/sigc++/functors/slot.h +++ b/sigc++/functors/slot.h @@ -6,13 +6,6 @@ #include <sigc++/adaptors/adaptor_trait.h> #include <sigc++/functors/slot_base.h> -//TODO: See comment in functor_trait.h. -#if defined(nil) && defined(SIGC_PRAGMA_PUSH_POP_MACRO) - #define SIGC_NIL_HAS_BEEN_PUSHED 1 - #pragma push_macro("nil") - #undef nil -#endif - namespace sigc { namespace internal { @@ -265,9 +258,5 @@ struct visitor<slot<T_return, T_arg...>> } /* namespace sigc */ -#ifdef SIGC_NIL_HAS_BEEN_PUSHED - #undef SIGC_NIL_HAS_BEEN_PUSHED - #pragma pop_macro("nil") -#endif #endif /* _SIGC_FUNCTORS_SLOT_H_ */ diff --git a/sigc++/signal.h b/sigc++/signal.h index 59b3580..9a36575 100644 --- a/sigc++/signal.h +++ b/sigc++/signal.h @@ -29,13 +29,6 @@ #include <tuple> #include <utility> -//TODO: See comment in functor_trait.h. -#if defined(nil) && defined(SIGC_PRAGMA_PUSH_POP_MACRO) - #define SIGC_NIL_HAS_BEEN_PUSHED 1 - #pragma push_macro("nil") - #undef nil -#endif - namespace sigc { /** STL-style iterator for slot_list. @@ -1108,9 +1101,4 @@ public: } /* namespace sigc */ -#ifdef SIGC_NIL_HAS_BEEN_PUSHED - #undef SIGC_NIL_HAS_BEEN_PUSHED - #pragma pop_macro("nil") -#endif - #endif /* _SIGC_SIGNAL_H_ */ |