diff options
author | Murray Cumming <murrayc@murrayc.com> | 2005-11-29 15:53:27 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2005-11-29 15:53:27 +0000 |
commit | 7decc2f30b5b1187d0969a13f453b8be6ee1111e (patch) | |
tree | 61ada0e3c017eae44e75e0957a468120fed7d7b8 | |
parent | 9b0311a1a5a58c1bc626643cd40e7923060956b4 (diff) | |
download | glibmm-7decc2f30b5b1187d0969a13f453b8be6ee1111e.tar.gz |
Added --enable-deprecated-api option. When set to disabled, it does not
2005-11-29 Murray Cumming <murrayc@murrayc.com>
* build_shared/Makefile_build.am_fragment:
* configure.in: Added --enable-deprecated-api
option. When set to disabled, it does not build
deprecated API. This reduces the size of the library,
and might be useful for embedded devices.
* glib/src/date.ccg:
* glib/src/date.hg: Use _DEPRECATE_IFDEF_START/END
around the deprecated set_time() method.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | build_shared/Makefile_build.am_fragment | 2 | ||||
-rw-r--r-- | configure.in | 14 | ||||
-rw-r--r-- | glib/src/date.ccg | 2 | ||||
-rw-r--r-- | glib/src/date.hg | 2 |
5 files changed, 30 insertions, 1 deletions
@@ -1,5 +1,16 @@ 2005-11-29 Murray Cumming <murrayc@murrayc.com> + * build_shared/Makefile_build.am_fragment: + * configure.in: Added --enable-deprecated-api + option. When set to disabled, it does not build + deprecated API. This reduces the size of the library, + and might be useful for embedded devices. + * glib/src/date.ccg: + * glib/src/date.hg: Use _DEPRECATE_IFDEF_START/END + around the deprecated set_time() method. + +2005-11-29 Murray Cumming <murrayc@murrayc.com> + * tools/m4/base.m4: Add _DEPRECATE_IFDEF_START and _DEPRECATE_IFDEF_END macros, to #ifdef-out generated methods. diff --git a/build_shared/Makefile_build.am_fragment b/build_shared/Makefile_build.am_fragment index 0c36fc55..edfe7da8 100644 --- a/build_shared/Makefile_build.am_fragment +++ b/build_shared/Makefile_build.am_fragment @@ -42,7 +42,7 @@ all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \ $(sublib_cflags) $(GTHREAD_CFLAGS) extra_defines = -DG_LOG_DOMAIN=\"$(sublib_name)\" \ - -DG_DISABLE_DEPRECATED + -DG_DISABLE_DEPRECATED $(GLIBMM_DISABLE_DEPRECATED) dist_sources = $(files_built_all_cc) $(files_extra_all_cc) \ $(files_built_all_h) $(files_extra_all_h) diff --git a/configure.in b/configure.in index d2c2a20c..71d899f4 100644 --- a/configure.in +++ b/configure.in @@ -213,6 +213,20 @@ GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING() # Evaluate the --enable-warnings=level option. GTKMM_ARG_ENABLE_WARNINGS() + +# Add an --enable-deprecated-api option: +AC_ARG_ENABLE(deprecated-api, [AC_HELP_STRING([--enable-deprecated-api], + [include (build) deprecated API in the libraries [default=yes]])],, + [enable_deprecated_api=yes]) +if test "x$enable_deprecated_api" = "xyes"; then +AC_MSG_WARN([Deprecated API will be built, for backwards-compatibility.]) +else + DISABLE_DEPRECATED_API_CFLAGS="-DGLIBMM_DISABLE_DEPRECATED" +AC_SUBST(DISABLE_DEPRECATED_API_CFLAGS) +AC_MSG_WARN([Deprecated API will not be built, breaking backwards-compatibility. Do not use this build for distribution packages.]) +fi + + # Dummy conditional just to make automake-1.4 happy. # We need an always-false condition in docs/Makefile.am. AM_CONDITIONAL(GTKMM_FALSE,[false]) diff --git a/glib/src/date.ccg b/glib/src/date.ccg index 68edafe2..e70a0e26 100644 --- a/glib/src/date.ccg +++ b/glib/src/date.ccg @@ -65,11 +65,13 @@ void Date::set_parse(const Glib::ustring& str) g_date_set_parse(&gobject_, str.c_str()); } +_DEPRECATE_IFDEF_START void Date::set_time(GTime time) { //This method, and the C function that it wraps, are deprecated. g_date_set_time(&gobject_, time); } +_DEPRECATE_IFDEF_END void Date::set_time(time_t timet) { diff --git a/glib/src/date.hg b/glib/src/date.hg index f17b87f2..0a223901 100644 --- a/glib/src/date.hg +++ b/glib/src/date.hg @@ -70,6 +70,7 @@ public: */ void set_parse (const Glib::ustring& str); + _DEPRECATE_IFDEF_START /** Sets the value of a date from a GTime (time_t) value. * * @param time GTime value to set. @@ -77,6 +78,7 @@ public: * @deprecated Please use set_time(time_t) or set_time(const GTimeVal&). */ void set_time(GTime time); + _DEPRECATE_IFDEF_END /** Sets the value of a date from a <type>time_t</type> value. * |