Imported Upstream version 2.47.4 upstream/2.47.4
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 7 Sep 2020 07:10:38 +0000 (00:10 -0700)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 7 Sep 2020 07:10:38 +0000 (00:10 -0700)
27 files changed:
NEWS
configure.ac
examples/network/socket-client.cc
examples/network/socket-server.cc
examples/thread/threadpool.cc
gio/src/action.hg
gio/src/actiongroup.hg
gio/src/actionmap.hg
gio/src/appinfo.hg
gio/src/application.ccg
gio/src/asyncresult.hg
gio/src/memoryinputstream.hg
gio/src/menuitem.ccg
gio/src/menuitem.hg
gio/src/notification.hg
gio/src/unixsocketaddress.hg
glib/glibmm/dispatcher.cc
glib/glibmm/exceptionhandler.cc
glib/glibmm/main.cc
glib/glibmm/main.h
glib/glibmm/sarray.h
glib/glibmm/threadpool.cc
glib/glibmm/threadpool.h
glib/glibmm/ustring.h
glib/src/filelist.am
glib/src/threads.hg
tools/m4/base.m4

diff --git a/NEWS b/NEWS
index 3c29667..c8f5562 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,32 @@
+2.47.4:
+
+Glib::
+* ustring: Don't allow comparison to 0.
+  (Kjell Ahlstedt) Bug #572978 (Armin Burgmeier)
+
+Gio:
+* ActionMap: Fix the ref count in lookup_action_vfunc().
+  (Kjell Ahlstedt) Bug #758813 (Aurimas Černius)
+
+Build:
+* Dispatcher: #include <mutex> in Windows builds.
+  (T Sailor) Bug #758894
+* Gio::Application: Destructor: Use noexcept in the implementation too.
+  (Murray Cumming) Bug #758798 (Émeric MASCHINO)
+* Fix the build with --disable-deprecated-api.
+  (Kjell Ahlstedt)
+
+2.47.3.1:
+
+* Use thread_local instead of (deprecated) Glib::Threads::Private.
+  (Murray Cumming, Kjell Ahlstedt) 
+
 2.47.3:
 
 * Deprecate all of Glib::Threads, including Mutex, Lock, Thread, etc.
-* Deprecated Glib::ThreadPool
+* Deprecated Glib::ThreadPool.
+  (Murray Cumming, Kjell Ahlstedt) 
+
 2.46.2:
 
 * ObjectBase, Object, Interface: Correct move constructors and move assignment
index 00aaea5..77e92f1 100644 (file)
@@ -15,7 +15,7 @@
 ## You should have received a copy of the GNU Lesser General Public License
 ## along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_INIT([glibmm], [2.47.3],
+AC_INIT([glibmm], [2.47.4],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
         [glibmm], [http://www.gtkmm.org/])
 AC_PREREQ([2.59])
@@ -62,7 +62,7 @@ AS_IF([test "x$enable_static" = xyes],
   AC_DEFINE([GIOMM_STATIC_LIB],  [1], [Define if giomm is built as a static library])
 ])
 
-glibreq='2.0 >= 2.46.0'
+glibreq='2.0 >= 2.47.4'
 
 GLIBMM_MODULES="sigc++-2.0 >= 2.6.0 glib-$glibreq gobject-$glibreq gmodule-$glibreq"
 GIOMM_MODULES="$GLIBMM_MODULES gio-$glibreq"
index ebde5b6..3fdb30d 100644 (file)
@@ -2,6 +2,10 @@
 #include <giomm.h>
 #include <glibmm.h>
 #include <thread>
+#include <mutex>
+#include <condition_variable>
+#include <chrono>
+#include <memory>
 #include <iostream>
 
 namespace
@@ -15,6 +19,9 @@ bool use_udp = false;
 bool use_source = false;
 bool use_ipv6 = false;
 int cancel_timeout = 0;
+bool stop_thread = false;
+std::mutex mutex_thread;
+std::condition_variable cond_thread;
 
 class ClientOptionGroup : public Glib::OptionGroup
 {
@@ -112,11 +119,28 @@ ensure_condition (const Glib::RefPtr<Gio::Socket>& socket,
 static void
 cancel_thread (Glib::RefPtr<Gio::Cancellable> cancellable)
 {
-    g_usleep (1000*1000*cancel_timeout);
+  std::unique_lock<std::mutex> lock(mutex_thread);
+  if (!cond_thread.wait_for(lock, std::chrono::seconds(cancel_timeout),
+      [](){ return stop_thread; }))
+  {
+    // !stop_thread, i.e. timeout
     std::cout << "Cancelling\n";
-    cancellable->cancel ();
+    cancellable->cancel();
+  }
 }
 
+class JoinAndDelete
+{
+public:
+  void operator()(std::thread* thread)
+  {
+    stop_thread = true;
+    cond_thread.notify_all();
+    thread->join();
+    delete thread;
+  }
+};
+
 } // end anonymous namespace
 
 int
@@ -160,11 +184,11 @@ main (int argc,
         return 1;
     }
 
-    std::thread* thread = nullptr;
+    std::unique_ptr<std::thread, JoinAndDelete> thread;
     if (cancel_timeout)
     {
         cancellable = Gio::Cancellable::create ();
-        thread = new std::thread(&cancel_thread, cancellable);
+        thread.reset(new std::thread(&cancel_thread, cancellable));
     }
 
     loop = Glib::MainLoop::create ();
@@ -322,12 +346,5 @@ main (int argc,
         return 1;
     }
 
-    //TODO: This won't happen if we returned earlier.
-    if(thread)
-    {
-      thread->join();
-      delete thread;
-    }
-
     return 0;
 }
index 43c0e6e..835a6b7 100644 (file)
@@ -1,7 +1,11 @@
-#include <thread>
-#include <iostream>
 #include <giomm.h>
 #include <glibmm.h>
+#include <thread>
+#include <mutex>
+#include <condition_variable>
+#include <chrono>
+#include <memory>
+#include <iostream>
 
 namespace
 {
@@ -16,6 +20,9 @@ bool use_udp = false;
 bool use_source = false;
 bool use_ipv6 = false;
 int cancel_timeout = 0;
+bool stop_thread = false;
+std::mutex mutex_thread;
+std::condition_variable cond_thread;
 
 class ServerOptionGroup : public Glib::OptionGroup
 {
@@ -118,11 +125,28 @@ ensure_condition (const Glib::RefPtr<Gio::Socket>& socket,
 static void
 cancel_thread (Glib::RefPtr<Gio::Cancellable> cancellable)
 {
-    g_usleep (1000*1000*cancel_timeout);
+  std::unique_lock<std::mutex> lock(mutex_thread);
+  if (!cond_thread.wait_for(lock, std::chrono::seconds(cancel_timeout),
+      [](){ return stop_thread; }))
+  {
+    // !stop_thread, i.e. timeout
     std::cout << "Cancelling\n";
-    cancellable->cancel ();
+    cancellable->cancel();
+  }
 }
 
+class JoinAndDelete
+{
+public:
+  void operator()(std::thread* thread)
+  {
+    stop_thread = true;
+    cond_thread.notify_all();
+    thread->join();
+    delete thread;
+  }
+};
+
 } // end anonymous namespace
 
 int
@@ -148,11 +172,11 @@ main (int argc,
       return 1;
     }
 
-    std::thread* thread = nullptr;
+    std::unique_ptr<std::thread, JoinAndDelete> thread;
     if (cancel_timeout)
     {
         cancellable = Gio::Cancellable::create ();
-        thread = new std::thread(&cancel_thread, cancellable);
+        thread.reset(new std::thread(&cancel_thread, cancellable));
     }
 
     loop = Glib::MainLoop::create ();
@@ -323,13 +347,5 @@ main (int argc,
         return 1;
     }
 
-
-    //TODO: This won't happen if we returned earlier.
-    if(thread)
-    {
-      thread->join();
-      delete thread;
-    }
-
     return 0;
 }
index b1a382d..5109674 100644 (file)
@@ -7,12 +7,23 @@
 //TODO: Maybe use std::async() instead?
 #undef GLIBMM_DISABLE_DEPRECATED
 
+#include <glibmmconfig.h>
+
+#ifdef GLIBMM_DISABLE_DEPRECATED
+int main(int, char**)
+{
+  // If glibmm is configured with --disable-deprecated-api,
+  // GLIBMM_DISABLE_DEPRECATED is defined in glibmmconfig.h.
+  std::cout << "Glib::ThreadPool not available because deprecated API has been disabled." << std::endl;
+  return 77; // Tell automake's test harness to skip this test.
+}
+
+#else
+
 #include <glibmm/random.h>
 #include <glibmm/threadpool.h>
 #include <glibmm/timer.h>
 
-
-
 namespace
 {
 
@@ -51,4 +62,4 @@ int main(int, char**)
 
   return 0;
 }
-
+#endif //GLIBMM_DISABLE_DEPRECATED
index 1b10876..8788da3 100644 (file)
@@ -15,6 +15,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+_CONFIGINCLUDE(giommconfig.h)
+
 #include <glibmm/interface.h>
 #include <glibmm/varianttype.h>
 #include <gio/gio.h>
index 99af197..3e42368 100644 (file)
@@ -15,6 +15,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+_CONFIGINCLUDE(giommconfig.h)
+
 #include <glibmm/interface.h>
 #include <glibmm/varianttype.h>
 #include <gio/gio.h> //To declare g_action_group_get_action_state_type().
index 3fb7332..6f32fdb 100644 (file)
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2012 The giomm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -185,7 +183,7 @@ public:
   _WRAP_METHOD(void remove_action(const Glib::ustring& action_name), g_action_map_remove_action)
 
 #m4 _CONVERSION(`Glib::RefPtr<Action>', `GAction*', `Glib::unwrap($3)')
-  _WRAP_VFUNC(Glib::RefPtr<Action> lookup_action(const Glib::ustring& name) const, "lookup_action")
+  _WRAP_VFUNC(Glib::RefPtr<Action> lookup_action(const Glib::ustring& name) const, "lookup_action", refreturn)
 
   //TODO: Change this to use const & when we can break ABI.
   // ( Changing it causes a symbol lookup error when trying to run already-built applications. )
index 330e2a2..848f7fc 100644 (file)
@@ -15,6 +15,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+_CONFIGINCLUDE(giommconfig.h)
+
 #include <giomm/applaunchcontext.h>
 
 #include <exception>
index 9fb5866..c7488ac 100644 (file)
@@ -278,7 +278,7 @@ Application::Application(const Glib::ustring& application_id, ApplicationFlags f
 
 }
 
-Application::~Application()
+Application::~Application() noexcept
 {
   // Delete all OptionArgCallbackData instances that belong to this application.
   std::lock_guard<std::mutex> lock(option_arg_callback_data_mutex);
index 7705700..395b63f 100644 (file)
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2007 The giomm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -17,6 +15,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+_CONFIGINCLUDE(giommconfig.h)
+
 #include <glibmm/interface.h>
 #include <glibmm/object.h>
 
index 0d51959..9ac5f9a 100644 (file)
@@ -15,6 +15,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+_CONFIGINCLUDE(giommconfig.h)
+
 #include <giomm/inputstream.h>
 #include <giomm/seekable.h>
 
index 5903cd7..6483f42 100644 (file)
@@ -45,10 +45,12 @@ MenuItem::MenuItem(const Glib::RefPtr<MenuModel>& submenu)
   set_submenu(submenu);
 }
 
+_DEPRECATE_IFDEF_START
 void MenuItem::set_action_and_target(const Glib::ustring& action)
 {
   g_menu_item_set_action_and_target_value(gobj(), action.c_str(), nullptr);
 }
+_DEPRECATE_IFDEF_END
 
 void MenuItem::set_action(const Glib::ustring& action)
 {
index 258aba9..9c54a45 100644 (file)
@@ -15,6 +15,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+_CONFIGINCLUDE(giommconfig.h)
+
 #include <glibmm/object.h>
 #include <giomm/menumodel.h>
 #include <giomm/icon.h>
index 83c38ba..02ff5e8 100644 (file)
@@ -14,6 +14,8 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
+_CONFIGINCLUDE(giommconfig.h)
+
 #include <glibmm/object.h>
 #include <glibmm/ustring.h>
 #include <glibmm/variant.h>
index 5fe8010..e3e4170 100644 (file)
@@ -15,6 +15,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+_CONFIGINCLUDE(giommconfig.h)
+
 #include <giomm/socketaddress.h>
 
 _DEFS(giomm,gio)
index 198d525..795a224 100644 (file)
@@ -18,7 +18,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <glibmm/threads.h>
 #include <glibmm/dispatcher.h>
 #include <glibmm/exceptionhandler.h>
 #include <glibmm/fileutils.h>
@@ -34,6 +33,7 @@
 # include <io.h>
 # include <direct.h>
 # include <list>
+# include <mutex>
 #else
 # include <unistd.h>
 #endif
@@ -144,7 +144,7 @@ protected:
   explicit DispatchNotifier(const Glib::RefPtr<MainContext>& context);
 
 private:
-  static Glib::Threads::Private<DispatchNotifier> thread_specific_instance_;
+  static thread_local DispatchNotifier* thread_specific_instance_;
 
   std::set<const Dispatcher*>   deleted_dispatchers_;
 
@@ -167,7 +167,7 @@ private:
 /**** Glib::DispatchNotifier ***********************************************/
 
 // static
-Glib::Threads::Private<DispatchNotifier> DispatchNotifier::thread_specific_instance_;
+thread_local DispatchNotifier* DispatchNotifier::thread_specific_instance_ = nullptr;
 
 DispatchNotifier::DispatchNotifier(const Glib::RefPtr<MainContext>& context)
 :
@@ -270,12 +270,12 @@ void DispatchNotifier::create_pipe()
 DispatchNotifier* DispatchNotifier::reference_instance
   (const Glib::RefPtr<MainContext>& context, const Dispatcher* dispatcher)
 {
-  DispatchNotifier* instance = thread_specific_instance_.get();
+  DispatchNotifier* instance = thread_specific_instance_;
 
   if(!instance)
   {
     instance = new DispatchNotifier(context);
-    thread_specific_instance_.replace(instance);
+    thread_specific_instance_ = instance;
   }
   else
   {
@@ -303,7 +303,7 @@ DispatchNotifier* DispatchNotifier::reference_instance
 void DispatchNotifier::unreference_instance(
   DispatchNotifier* notifier, const Dispatcher* dispatcher)
 {
-  DispatchNotifier* const instance = thread_specific_instance_.get();
+  DispatchNotifier* const instance = thread_specific_instance_;
 
   // Yes, the notifier argument is only used to check for sanity.
   g_return_if_fail(instance == notifier);
@@ -320,8 +320,8 @@ void DispatchNotifier::unreference_instance(
   {
     g_return_if_fail(instance->ref_count_ == 0); // could be < 0 if messed up
 
-    // This causes deletion of the notifier object.
-    thread_specific_instance_.replace(nullptr);
+    delete thread_specific_instance_;
+    thread_specific_instance_ = nullptr;
   }
 }
 
index df0b53e..faad2a0 100644 (file)
@@ -20,7 +20,6 @@
  */
 
 #include <glibmmconfig.h>
-#include <glibmm/threads.h>
 #include <glibmm/error.h>
 #include <glibmm/exceptionhandler.h>
 #include <glib.h>
@@ -35,7 +34,7 @@ typedef sigc::signal<void> HandlerList;
 
 // Each thread has its own list of exception handlers
 // to avoid thread synchronization problems.
-static Glib::Threads::Private<HandlerList> thread_specific_handler_list;
+static thread_local HandlerList* thread_specific_handler_list = nullptr;
 
 
 static void glibmm_exception_warning(const GError* error)
@@ -86,12 +85,12 @@ namespace Glib
 
 sigc::connection add_exception_handler(const sigc::slot<void>& slot)
 {
-  HandlerList* handler_list = thread_specific_handler_list.get();
+  HandlerList* handler_list = thread_specific_handler_list;
 
   if(!handler_list)
   {
     handler_list = new HandlerList();
-    thread_specific_handler_list.set(handler_list);
+    thread_specific_handler_list = handler_list;
   }
 
   handler_list->slots().push_front(slot);
@@ -114,7 +113,7 @@ void exception_handlers_invoke() noexcept
   // handled.  If there are no more handlers in the list and the exception
   // is still unhandled, call glibmm_unexpected_exception().
 
-  if(HandlerList *const handler_list = thread_specific_handler_list.get())
+  if(HandlerList *const handler_list = thread_specific_handler_list)
   {
     HandlerList::iterator pslot = handler_list->slots().begin();
 
index d44d71b..483b377 100644 (file)
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#undef G_DISABLE_DEPRECATED //So we can use newly-deprecated API, to preserve our API.
-#define GLIB_DISABLE_DEPRECATION_WARNINGS 1
-
-#include <glibmm/threads.h>
+#include <glibmmconfig.h> // May define GLIBMM_DISABLE_DEPRECATED
 
 #ifndef GLIBMM_DISABLE_DEPRECATED
+//Include glibmm/thread.h first because we need it to be first to include <glib.h>,
+//so we can do an undef trick to still use deprecated API in the header:
 #include <glibmm/thread.h>
+#include <glibmm/threads.h>
 #endif //GLIBMM_DISABLE_DEPRECATED
 
 #include <glibmm/main.h>
@@ -976,10 +976,12 @@ void Source::remove_poll(Glib::PollFD& poll_fd)
 }
 
 #ifndef GLIBMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 void Source::get_current_time(Glib::TimeVal& current_time)
 {
   g_source_get_current_time(gobject_, &current_time);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 #endif //GLIBMM_DISABLE_DEPRECATED
 
 gint64 Source::get_time() const
index 622f2db..47ce0dc 100644 (file)
@@ -1,4 +1,3 @@
-// -*- c++ -*-
 #ifndef _GLIBMM_MAIN_H
 #define _GLIBMM_MAIN_H
 
@@ -34,13 +33,13 @@ namespace Glib
 #ifndef GLIBMM_DISABLE_DEPRECATED
 class Cond;
 class Mutex;
-#endif //GLIBMM_DISABLE_DEPRECATED
 
 namespace Threads
 {
   class Cond;
   class Mutex;
 }
+#endif //GLIBMM_DISABLE_DEPRECATED
 
 /** @defgroup MainLoop The Main Event Loop
  * Manages all available sources of events.
index 6226f50..2ec2fea 100644 (file)
@@ -1,9 +1,6 @@
-// -*- c++ -*-
 #ifndef _GLIBMM_SARRAY_H
 #define _GLIBMM_SARRAY_H
 
-/* $Id$ */
-
 /* array.h
  *
  * Copyright (C) 2002 The gtkmm Development Team
@@ -23,6 +20,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <glibmmconfig.h>
+
 #ifndef GLIBMM_DISABLE_DEPRECATED
 #include <glibmm/arrayhandle.h>
 #include <glibmm/ustring.h>
@@ -39,4 +38,3 @@ typedef Glib::ArrayHandle<Glib::ustring> SArray;
 #endif //GLIBMM_DISABLE_DEPRECATED
 
 #endif // _GLIBMM_SARRAY_H
-
index 198e7ed..f021815 100644 (file)
@@ -1,5 +1,3 @@
-// -*- c++ -*-
-
 /* Copyright (C) 2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -17,9 +15,9 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <glibmmconfig.h>
 #ifndef GLIBMM_DISABLE_DEPRECATED
 
-#include <glibmmconfig.h>
 #include <glibmm/threadpool.h>
 #include <glibmm/exceptionhandler.h>
 #include <glibmm/threads.h>
index 8b92010..fbf4739 100644 (file)
@@ -1,9 +1,6 @@
-// -*- c++ -*-
 #ifndef _GLIBMM_THREADPOOL_H
 #define _GLIBMM_THREADPOOL_H
 
-/* $Id$ */
-
 /* Copyright (C) 2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -21,6 +18,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <glibmmconfig.h>
+
 #ifndef GLIBMM_DISABLE_DEPRECATED
 
 #include <sigc++/sigc++.h>
index 94d6c35..a4e2fa8 100644 (file)
@@ -1591,6 +1591,24 @@ inline bool operator>=(const ustring& lhs, const char* rhs)
 inline bool operator>=(const char* lhs, const ustring& rhs)
   { return (rhs.compare(lhs) <= 0); }
 
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+// Don't allow implicit conversion of integer 0 to nullptr in the relational operators.
+// If the int versions of the relational operators are not deleted, attempts to
+// compare with other integer values than 0 can result in really unexpected behaviour.
+// See https://bugzilla.gnome.org/show_bug.cgi?id=572978#c10
+bool operator==(const ustring& lhs, int rhs) = delete;
+bool operator==(int lhs, const ustring& rhs) = delete;
+bool operator!=(const ustring& lhs, int rhs) = delete;
+bool operator!=(int lhs, const ustring& rhs) = delete;
+bool operator<(const ustring& lhs, int rhs) = delete;
+bool operator<(int lhs, const ustring& rhs) = delete;
+bool operator>(const ustring& lhs, int rhs) = delete;
+bool operator>(int lhs, const ustring& rhs) = delete;
+bool operator<=(const ustring& lhs, int rhs) = delete;
+bool operator<=(int lhs, const ustring& rhs) = delete;
+bool operator>=(const ustring& lhs, int rhs) = delete;
+bool operator>=(int lhs, const ustring& rhs) = delete;
+#endif // DOXYGEN_SHOULD_SKIP_THIS
 
 /**** Glib::ustring -- concatenation operators *****************************/
 
index 9434132..a35ffdc 100644 (file)
@@ -35,26 +35,24 @@ glibmm_files_any_hg =               \
        regex.hg                \
        shell.hg                \
        spawn.hg                \
+       thread.hg               \
        threads.hg              \
        timezone.hg             \
        unicode.hg              \
        uriutils.hg             \
+       valuearray.hg \
        variant.hg              \
        variantdict.hg          \
        variantiter.hg          \
        varianttype.hg
 
-glibmm_files_deprecated_hg = \
-       thread.hg               \
-       valuearray.hg
-
-if DISABLE_DEPRECATED_API
+## Unconditionally used files,
+## deprecated files (even if configured with --disable-deprecated-api),
+## if there are architecture-specific files, only those for the present architecture.
 glibmm_files_used_hg = $(glibmm_files_any_hg)
-else
-glibmm_files_used_hg = $(glibmm_files_any_hg) $(glibmm_files_deprecated_hg)
-endif
 
-glibmm_files_hg = $(glibmm_files_any_hg) $(glibmm_files_deprecated_hg)
+## All .hg files
+glibmm_files_hg = $(glibmm_files_any_hg)
 
 glibmm_files_ccg = $(glibmm_files_hg:.hg=.ccg)
 
index 0dcaa49..51decfc 100644 (file)
@@ -48,6 +48,9 @@ _GMMPROC_EXTRA_NAMESPACE(Threads)
 /** @defgroup Threads Threads
  * %Thread abstraction; including threads, different mutexes,
  * conditions and thread private data.
+ *
+ * @deprecated The entire Glib::Threads API is deprecated in favor of the
+ * standard C++ concurrency API in C++11 and C++14.
  * @{
  */
 
index 6734b2a..a577075 100644 (file)
@@ -236,6 +236,10 @@ define(`_CONFIGINCLUDE',`dnl
 _PUSH(SECTION_HEADER_FIRST)
 #include <$1>
 _POP()
+_PUSH()
+dnl Define this macro to be tested for later.
+define(`__FILENAME_CONFIGINCLUDE__',`$1')
+_POP()
 ')
 
 dnl Start of processing
@@ -261,14 +265,26 @@ define(`_DEPRECATE_IFDEF_END',`dnl
 #endif // __DEPRECATION_GUARD__'
 )
 
-dnl begin optional deprecation of whole class
+dnl begin optional deprecation of whole file
 define(`_DEPRECATE_IFDEF_CLASS_START',`dnl
 ifdef(`__BOOL_DEPRECATED__',`dnl
 _DEPRECATE_IFDEF_START',`dnl
 ')
 ')
 
-dnl end optional deprecation of whole class
+dnl begin optional deprecation of whole file,
+dnl preceded by inclusion of config file
+dnl (the config file may define the __DEPRECATION_GUARD__)
+define(`_DEPRECATE_IFDEF_CLASS_CONFIG_START',`dnl
+ifdef(`__BOOL_DEPRECATED__',`dnl
+ifdef(`__FILENAME_CONFIGINCLUDE__',`dnl
+#include <__FILENAME_CONFIGINCLUDE__>',`dnl
+')
+_DEPRECATE_IFDEF_START',`dnl
+')
+')
+
+dnl end optional deprecation of whole file
 define(`_DEPRECATE_IFDEF_CLASS_END',`dnl
 ifdef(`__BOOL_DEPRECATED__',`dnl
 _DEPRECATE_IFDEF_END',`dnl
@@ -283,7 +299,6 @@ define(`_END',`dnl
 m4_divert(0)dnl
 #S 0 dnl Marks the beginning of the header file.
 
-// -*- c++ -*-
 // Generated by gmmproc __GLIBMM_VERSION__ -- DO NOT MODIFY!
 #ifndef __HEADER_GUARD__`'_H
 #define __HEADER_GUARD__`'_H
@@ -306,7 +321,6 @@ _DEPRECATE_IFDEF_CLASS_END
 
 #S 1 dnl Marks the beginning of the private header file.
 
-// -*- c++ -*-
 // Generated by gmmproc __GLIBMM_VERSION__ -- DO NOT MODIFY!
 #ifndef __HEADER_GUARD__`'_P_H
 #define __HEADER_GUARD__`'_P_H
@@ -321,7 +335,7 @@ _DEPRECATE_IFDEF_CLASS_END
 
 _IMPORT(SECTION_CC_PRE_INCLUDES)
 
-_DEPRECATE_IFDEF_CLASS_START
+_DEPRECATE_IFDEF_CLASS_CONFIG_START
 
 #include <glibmm.h>