[glibmm] glibmmconfig.h.in: Remove unused configuration constants



commit 4bf358d29c48e69b9b21f5728e09a2534ae67ac2
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Fri Jan 4 18:56:49 2019 +0100

    glibmmconfig.h.in: Remove unused configuration constants
    
    These configuration variables have been removed:
      GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32
      GLIBMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES
      GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC
      GLIBMM_CAN_USE_THREAD_LOCAL
      GLIBMM_HAVE_NAMESPACE_STD
      GLIBMM_COMPILER_SUN_FORTE
      GLIBMM_EXCEPTIONS_ENABLED
      GLIBMM_PROPERTIES_ENABLED
      GLIBMM_VFUNCS_ENABLED
      GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    and this preprocessor macro:
      GLIBMM_USING_STD(Symbol)
    
    The corresponding M4 macros in build/ and their calls in configure.ac have
    also been removed.
    
    Fixes #22

 build/c_std.m4         |  54 ----------------------
 build/cxx.m4           | 121 -------------------------------------------------
 build/cxx_std.m4       |  54 ----------------------
 build/sun.m4           |  34 --------------
 configure.ac           |  14 ------
 glib/glibmmconfig.h.in |  38 ----------------
 6 files changed, 315 deletions(-)
---
diff --git a/build/cxx.m4 b/build/cxx.m4
index 718c7c6a..7fcf7308 100644
--- a/build/cxx.m4
+++ b/build/cxx.m4
@@ -17,60 +17,6 @@
 
 #serial 20110910
 
-## GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES
-##
-## Test whether the compiler allows member functions to refer to spezialized
-## member function templates.  Some compilers have problems with this.  GCC
-## 2.95.3 aborts with an internal compiler error.
-##
-AC_DEFUN([GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],
-[dnl
-AC_CACHE_CHECK(
-  [whether C++ member functions may refer to member templates],
-  [glibmm_cv_cxx_member_functions_member_templates],
-  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-[[
-struct foo
-{
-  template <class C> inline void doit();
-  void thebug();
-};
-
-template <class C>
-inline void foo::doit()
-{}
-
-struct bar
-{
-  void neitherabug();
-};
-
-void bar::neitherabug()
-{
-  void (foo::*func)();
-  func = &foo::doit<int>;
-  (void)func;
-}
-
-void foo::thebug()
-{
-  void (foo::*func)();
-  func = &foo::doit<int>; // the compiler bugs usually show here
-  (void)func;
-}
-]], [[
-void (foo::*func)();
-func = &foo::doit<int>;
-(void)func;
-]])],
-    [glibmm_cv_cxx_member_functions_member_templates=yes],
-    [glibmm_cv_cxx_member_functions_member_templates=no])])
-
-AS_VAR_IF([glibmm_cv_cxx_member_functions_member_templates], ['yes'],
-          [AC_DEFINE([GLIBMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES], [1],
-                     [Define if C++ member functions may refer to member templates.])])[]dnl
-])
-
 ## GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS
 ##
 ## Check whether the compiler finds it ambiguous to have both const and
@@ -190,70 +136,3 @@ AS_VAR_IF([glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks
           [AC_DEFINE([GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS], [1],
                      [Define if extern "C" and extern "C++" function pointers are compatible.])])[]dnl
 ])
-
-## GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC
-##
-## Check whether the compiler puts extern "C" functions in the global
-## namespace, even inside a namespace declaration. The AIX xlC compiler does
-## this, and also gets confused if we declare the namespace again inside the
-## extern "C" block.  This seems like a compiler bug, but not a serious one.
-##
-## It is debatable whether it is a bug at all, since the namespace would only
-## exist at the compiler level anyway, but not be a part of the exported
-## symbol name.  (For the functions in question, it was my fault not to add
-## the namespace prefix to the function name.  Sorry. --danielk)
-##
-AC_DEFUN([GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC],
-[dnl
-AC_CACHE_CHECK(
-  [whether the compiler honors namespaces inside extern "C" blocks],
-  [glibmm_cv_cxx_can_use_namespaces_inside_externc],
-  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-[[
-namespace test
-{
-
-extern "C" { void do_something(); }
-
-class Something
-{
-  int i;
-  friend void do_something();
-};
-
-void do_something()
-{
-  Something something;
-  something.i = 1;
-}
-
-} // namespace test
-]], [])],
-    [glibmm_cv_cxx_can_use_namespaces_inside_externc=yes],
-    [glibmm_cv_cxx_can_use_namespaces_inside_externc=no])])
-
-AS_VAR_IF([glibmm_cv_cxx_can_use_namespaces_inside_externc], ['yes'],
-          [AC_DEFINE([GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC], [1],
-                     [Define if the compiler honors namespaces inside extern "C" blocks.])])[]dnl
-])
-
-## GLIBMM_CXX_CAN_USE_THREAD_LOCAL
-##
-## Check for thread_local support
-##
-AC_DEFUN([GLIBMM_CXX_CAN_USE_THREAD_LOCAL],
-[dnl
-AC_CACHE_CHECK(
-  [whether the thread_local keyword is supported],
-  [glibmm_cv_cxx_can_use_thread_local],
-  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-[[
-thread_local int i=0;
-]], [])],
-    [glibmm_cv_cxx_can_use_thread_local=yes],
-    [glibmm_cv_cxx_can_use_thread_local=no])])
-
-AS_VAR_IF([glibmm_cv_cxx_can_use_thread_local], ['yes'],
-          [AC_DEFINE([GLIBMM_CAN_USE_THREAD_LOCAL], [1],
-                     [Define if the thread_local keyword is supported.])])[]dnl
-])
diff --git a/build/cxx_std.m4 b/build/cxx_std.m4
index a7bfab56..06d3c76c 100644
--- a/build/cxx_std.m4
+++ b/build/cxx_std.m4
@@ -17,46 +17,6 @@
 
 #serial 20110910
 
-## GLIBMM_CXX_HAS_NAMESPACE_STD()
-##
-## Test whether libstdc++ declares namespace std.  For safety,
-## also check whether several randomly selected STL symbols
-## are available in namespace std.
-##
-## On success, #define GLIBMM_HAVE_NAMESPACE_STD to 1.
-##
-AC_DEFUN([GLIBMM_CXX_HAS_NAMESPACE_STD],
-[
-  AC_CACHE_CHECK(
-    [whether C++ library symbols are declared in namespace std],
-    [glibmm_cv_cxx_has_namespace_std],
-  [
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-    [[
-      #include <algorithm>
-      #include <iterator>
-      #include <iostream>
-      #include <string>
-    ]],[[
-      using std::min;
-      using std::find;
-      using std::copy;
-      using std::bidirectional_iterator_tag;
-      using std::string;
-      using std::istream;
-      using std::cout;
-    ]])],
-      [glibmm_cv_cxx_has_namespace_std='yes'],
-      [glibmm_cv_cxx_has_namespace_std='no']
-    )
-  ])
-
-  AS_VAR_IF([glibmm_cv_cxx_has_namespace_std], ['yes'],
-            [AC_DEFINE([GLIBMM_HAVE_NAMESPACE_STD], [1],
-                       [Defined when the libstdc++ declares the std-namespace])])[]dnl
-])
-
-
 ## GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS()
 ##
 ## Check for standard-conform std::iterator_traits<>, and
@@ -64,8 +24,6 @@ AC_DEFUN([GLIBMM_CXX_HAS_NAMESPACE_STD],
 ##
 AC_DEFUN([GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS],
 [
-  AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
-
   AC_CACHE_CHECK(
     [whether the C++ library supports std::iterator_traits],
     [glibmm_cv_cxx_has_std_iterator_traits],
@@ -73,9 +31,7 @@ AC_DEFUN([GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS],
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
     [[
       #include <iterator>
-      #ifdef GLIBMM_HAVE_NAMESPACE_STD
       using namespace std;
-      #endif
     ]],[[
       typedef iterator_traits<char*>::value_type ValueType;
     ]])],
@@ -97,8 +53,6 @@ AC_DEFUN([GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS],
 ##
 AC_DEFUN([GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR],
 [
-  AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
-
   AC_CACHE_CHECK(
     [for non-standard Sun libCstd reverse_iterator],
     [glibmm_cv_cxx_has_sun_reverse_iterator],
@@ -106,9 +60,7 @@ AC_DEFUN([GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR],
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
     [[
       #include <iterator>
-      #ifdef GLIBMM_HAVE_NAMESPACE_STD
       using namespace std;
-      #endif
     ]],[[
       typedef reverse_iterator<char*,random_access_iterator_tag,char,char&,char*,int> ReverseIter;
     ]])],
@@ -130,8 +82,6 @@ AC_DEFUN([GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR],
 ##
 AC_DEFUN([GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS],
 [
-  AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
-
   AC_CACHE_CHECK(
     [whether STL containers have templated sequence constructors],
     [glibmm_cv_cxx_has_template_sequence_ctors],
@@ -141,9 +91,7 @@ AC_DEFUN([GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS],
       #include <vector>
       #include <deque>
       #include <list>
-      #ifdef GLIBMM_HAVE_NAMESPACE_STD
       using namespace std;
-      #endif
     ]],[[
       const int array[8] = { 0, };
       vector<int>  test_vector (&array[0], &array[8]);
@@ -169,8 +117,6 @@ AC_DEFUN([GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS],
 ##
 AC_DEFUN([GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS],
 [
-  AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
-
   AC_CACHE_CHECK(
     [whether the compiler allows a static member variable to be initialized inline to std::string::npos],
     [glibmm_cv_cxx_has_allows_static_inline_npos],
diff --git a/configure.ac b/configure.ac
index ce06d056..ed2fbc53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,10 +94,6 @@ PKG_CHECK_MODULES([GIOMM],  [$GIOMM_MODULES])
 AC_CHECK_PROGS([M4], [gm4 m4], [m4])
 GLIB_GSETTINGS
 
-# Check for the SUN Forte compiler, and define GLIBMM_COMPILER_SUN_FORTE
-# in the header.
-GLIBMM_PROG_CXX_SUN
-
 AC_CHECK_FUNCS([flockfile funlockfile getc_unlocked mkfifo])
 
 # Ensure MSVC-compatible struct packing convention is used when
@@ -118,14 +114,10 @@ DK_CHECK_FEATURE([wide stream],
 GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS
 GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR
 GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS
-GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES
 GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS
 GLIBMM_CXX_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
 GLIBMM_CXX_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS
-GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC
 GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS
-GLIBMM_CXX_CAN_USE_THREAD_LOCAL
-GLIBMM_C_STD_TIME_T_IS_NOT_INT32
 
 MM_ARG_ENABLE_DOCUMENTATION
 MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++])
@@ -144,12 +136,6 @@ MM_ARG_ENABLE_WARNINGS([GLIBMM_WXXFLAGS],
 # to reduce the code size:
 MM_ARG_DISABLE_DEPRECATED_API([GLIBMM GIOMM])
 
-# These are just defined to avoid breaking old code:
-AC_DEFINE([GLIBMM_EXCEPTIONS_ENABLED],[1], [This is always set. This is only for backwards compatibility.])
-AC_DEFINE([GLIBMM_PROPERTIES_ENABLED],[1], [This is always set. This is only for backwards compatibility.])
-AC_DEFINE([GLIBMM_VFUNCS_ENABLED],[1], [This is always set. This is only for backwards compatibility.])
-AC_DEFINE([GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED],[1], [This is always set. This is only for backwards 
compatibility.])
-
 AC_CHECK_PROGS([CLANG_FORMAT], [clang-format clang-format-3.9 clang-format-3.8 clang-format-3.7], [])
 AM_CONDITIONAL([HAVE_CLANG_FORMAT], test -n "$CLANG_FORMAT")
 
diff --git a/glib/glibmmconfig.h.in b/glib/glibmmconfig.h.in
index e5639cb7..56e7a42e 100644
--- a/glib/glibmmconfig.h.in
+++ b/glib/glibmmconfig.h.in
@@ -32,42 +32,20 @@
    type. */
 #undef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
 
-/* Define if the compiler honors namespaces inside extern "C" blocks. */
-#undef GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC
-
-/* Defined when the SUN Forte C++ compiler is being used. */
-#undef GLIBMM_COMPILER_SUN_FORTE
-
 /* Defined when the --enable-debug-refcounting configure argument was given */
 #undef GLIBMM_DEBUG_REFCOUNTING
 
-/* This is always set. This is only for backwards compatibility. */
-#undef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
-
 /* Define to omit deprecated API from the library. */
 #undef GLIBMM_DISABLE_DEPRECATED
 
-/* This is always set. This is only for backwards compatibility. */
-#undef GLIBMM_EXCEPTIONS_ENABLED
-
-/* This is always set. This is only for backwards compatibility. */
-#undef GLIBMM_VFUNCS_ENABLED
-
 /* Defined if a static member variable may be initialized inline to
    std::string::npos */
 #undef GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS
 
-/* Defined when time_t is not equivalent to gint32, meaning that it can be
-   used for a method overload */
-#undef GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32
-
 /* Define if the compiler disambiguates template specializations for const and
    non-const types. */
 #undef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
 
-/* Defined when the libstdc++ declares the std-namespace */
-#undef GLIBMM_HAVE_NAMESPACE_STD
-
 /* Defined if std::iterator_traits<> is standard-conforming */
 #undef GLIBMM_HAVE_STD_ITERATOR_TRAITS
 
@@ -83,18 +61,12 @@
 /* Major version number of glibmm. */
 #undef GLIBMM_MAJOR_VERSION
 
-/* Define if C++ member functions may refer to member templates. */
-#undef GLIBMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES
-
 /* Micro version number of glibmm. */
 #undef GLIBMM_MICRO_VERSION
 
 /* Minor version number of glibmm. */
 #undef GLIBMM_MINOR_VERSION
 
-/* This is always set. This is only for backwards compatibility. */
-#undef GLIBMM_PROPERTIES_ENABLED
-
 /* Define if glibmm is built as a static library */
 #undef GLIBMM_STATIC_LIB
 
@@ -106,14 +78,8 @@
 # define GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS 2
 # define GLIBMM_HAVE_WIDE_STREAM 1
 # define GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS 1
-# define GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 1
 # define GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION 1
 # define GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS 1
-# define GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC 1
-# define GLIBMM_PROPERTIES_ENABLED 1
-# define GLIBMM_VFUNCS_ENABLED 1
-# define GLIBMM_EXCEPTIONS_ENABLED 1
-# define GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 1
 # pragma warning (disable: 4786 4355 4800 4181)
 
 #if (_MSC_VER < 1900)
@@ -135,10 +101,6 @@
 #endif /* _MSC_VER < 1900 */
 #endif /* GLIBMM_MSC */
 
-/* Dummy macro definition for compatibility with old code that expects
- * it to be defined.  Remove after grace period. */
-#define GLIBMM_USING_STD(Symbol)
-
 /* Enable DLL-specific stuff only when not building a static library */
 #if !defined(__CYGWIN__) && defined(__MINGW32__) && !defined(GLIBMM_STATIC_LIB)
 # define GLIBMM_DLL 1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]