From 75a29ef15c261a2e92e530e399f56b82b6846907 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 6 Jan 2008 21:01:38 +0000 Subject: [PATCH] added configure option for wxUSE_AUTOID_MANAGEMENT git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 51 ++++++++++++++++++++++++++++++++++++ configure.in | 7 ++++- include/wx/datetime.h | 13 +++++++-- include/wx/mac/setup0.h | 6 ++++- include/wx/motif/setup0.h | 6 ++++- include/wx/msw/setup0.h | 6 ++++- include/wx/msw/wince/setup.h | 6 ++++- include/wx/os2/setup0.h | 6 ++++- include/wx/palmos/setup0.h | 6 ++++- include/wx/setup_inc.h | 6 ++++- setup.h.in | 6 ++++- 11 files changed, 108 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 85afe3853f..bab32b059c 100755 --- a/configure +++ b/configure @@ -1850,6 +1850,7 @@ Optional Features: --enable-ownerdrawn use owner drawn controls (Win32 and OS/2 only) --enable-uxtheme enable support for Windows XP themed look (Win32 only) --enable-wxdib use wxDIB class (Win32 only) + --enable-autoidman use automatic ids management --disable-largefile omit support for large files --disable-gtktest do not try to compile and run a test GTK+ program --disable-gtktest Do not try to compile and run a test GTK program @@ -13656,6 +13657,50 @@ fi echo "${ECHO_T}$result" >&6; } + enablestring= + defaultval=$wxUSE_ALL_FEATURES + if test -z "$defaultval"; then + if test x"$enablestring" = xdisable; then + defaultval=yes + else + defaultval=no + fi + fi + + { echo "$as_me:$LINENO: checking for --${enablestring:-enable}-autoidman" >&5 +echo $ECHO_N "checking for --${enablestring:-enable}-autoidman... $ECHO_C" >&6; } + # Check whether --enable-autoidman was given. +if test "${enable_autoidman+set}" = set; then + enableval=$enable_autoidman; + if test "$enableval" = yes; then + wx_cv_use_autoidman='wxUSE_AUTOID_MANAGEMENT=yes' + else + wx_cv_use_autoidman='wxUSE_AUTOID_MANAGEMENT=no' + fi + +else + + wx_cv_use_autoidman='wxUSE_AUTOID_MANAGEMENT=${'DEFAULT_wxUSE_AUTOID_MANAGEMENT":-$defaultval}" + +fi + + + eval "$wx_cv_use_autoidman" + + if test x"$enablestring" = xdisable; then + if test $wxUSE_AUTOID_MANAGEMENT = yes; then + result=no + else + result=yes + fi + else + result=$wxUSE_AUTOID_MANAGEMENT + fi + + { echo "$as_me:$LINENO: result: $result" >&5 +echo "${ECHO_T}$result" >&6; } + + fi @@ -45855,6 +45900,12 @@ _ACEOF fi +if test "$wxUSE_AUTOID_MANAGEMENT" = "yes"; then + cat >>confdefs.h <<\_ACEOF +#define wxUSE_AUTOID_MANAGEMENT 1 +_ACEOF + +fi if test "$USE_WIN32" = 1 ; then if test "$wxUSE_INICONF" = "yes"; then diff --git a/configure.in b/configure.in index dfe85db175..717eb78c23 100644 --- a/configure.in +++ b/configure.in @@ -917,6 +917,7 @@ WX_ARG_FEATURE(ps-in-msw, [ --enable-ps-in-msw use PS printing in wxMSW WX_ARG_FEATURE(ownerdrawn, [ --enable-ownerdrawn use owner drawn controls (Win32 and OS/2 only)], wxUSE_OWNER_DRAWN) WX_ARG_FEATURE(uxtheme, [ --enable-uxtheme enable support for Windows XP themed look (Win32 only)], wxUSE_UXTHEME) WX_ARG_FEATURE(wxdib, [ --enable-wxdib use wxDIB class (Win32 only)], wxUSE_DIB) +WX_ARG_FEATURE(autoidman, [ --enable-autoidman use automatic ids management], wxUSE_AUTOID_MANAGEMENT) fi dnl for GUI only @@ -6979,7 +6980,11 @@ if test "$wxUSE_MSW" = 1 ; then fi dnl wxUSE_MSW = 1 - + +dnl not quite MSW-only although mostly useful to disable this under MSW +if test "$wxUSE_AUTOID_MANAGEMENT" = "yes"; then + AC_DEFINE(wxUSE_AUTOID_MANAGEMENT) +fi if test "$USE_WIN32" = 1 ; then if test "$wxUSE_INICONF" = "yes"; then diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 4d78cf7ffc..c6aaa1fe39 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -1037,12 +1037,21 @@ public: // conversion to/from text: all conversions from text return the pointer to // the next character following the date specification (i.e. the one where - // the scan had to stop) or NULL on failure. + // the scan had to stop) or NULL on failure; for the versions returning + // iterators, end iterator is returned instead of NULL // ------------------------------------------------------------------------ // parse a string in RFC 822 format (found e.g. in mail headers and // having the form "Wed, 10 Feb 1999 19:07:07 +0100") - const wxChar *ParseRfc822Date(const wxChar* date); + wxString::const_iterator ParseRfc822Date(const wxString& date); + const wchar_t *ParseRfc822Date(const wchar_t* date) + { + } + + const char *ParseRfc822Date(const char* date) + { + } + // parse a date/time in the given format (see strptime(3)), fill in // the missing (in the string) fields with the values of dateDef (by // default, they will not change if they had valid values or will diff --git a/include/wx/mac/setup0.h b/include/wx/mac/setup0.h index 063106af0d..6b0bd34b11 100644 --- a/include/wx/mac/setup0.h +++ b/include/wx/mac/setup0.h @@ -895,7 +895,11 @@ // long-running programs can run into problems with ids reuse without this. On // the other platforms, where the ids have the full int range, this shouldn't // be necessary. -#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__) +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif // ---------------------------------------------------------------------------- // common dialogs diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h index 4c6ad8d0e7..eceb880441 100644 --- a/include/wx/motif/setup0.h +++ b/include/wx/motif/setup0.h @@ -894,7 +894,11 @@ // long-running programs can run into problems with ids reuse without this. On // the other platforms, where the ids have the full int range, this shouldn't // be necessary. -#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__) +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif // ---------------------------------------------------------------------------- // common dialogs diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 17d09e4a58..66131ee64f 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -894,7 +894,11 @@ // long-running programs can run into problems with ids reuse without this. On // the other platforms, where the ids have the full int range, this shouldn't // be necessary. -#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__) +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif // ---------------------------------------------------------------------------- // common dialogs diff --git a/include/wx/msw/wince/setup.h b/include/wx/msw/wince/setup.h index a7e365f3d6..04d2d81649 100644 --- a/include/wx/msw/wince/setup.h +++ b/include/wx/msw/wince/setup.h @@ -894,7 +894,11 @@ // long-running programs can run into problems with ids reuse without this. On // the other platforms, where the ids have the full int range, this shouldn't // be necessary. -#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__) +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif // ---------------------------------------------------------------------------- // common dialogs diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index 2099ba0fa1..c8350fae1d 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -894,7 +894,11 @@ // long-running programs can run into problems with ids reuse without this. On // the other platforms, where the ids have the full int range, this shouldn't // be necessary. -#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__) +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif // ---------------------------------------------------------------------------- // common dialogs diff --git a/include/wx/palmos/setup0.h b/include/wx/palmos/setup0.h index 0988baa18d..1dde2f6d16 100644 --- a/include/wx/palmos/setup0.h +++ b/include/wx/palmos/setup0.h @@ -894,7 +894,11 @@ // long-running programs can run into problems with ids reuse without this. On // the other platforms, where the ids have the full int range, this shouldn't // be necessary. -#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__) +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif // ---------------------------------------------------------------------------- // common dialogs diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index 04f73575c2..500e3b10c0 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -890,7 +890,11 @@ // long-running programs can run into problems with ids reuse without this. On // the other platforms, where the ids have the full int range, this shouldn't // be necessary. -#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__) +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif // ---------------------------------------------------------------------------- // common dialogs diff --git a/setup.h.in b/setup.h.in index e7defed624..0108b6070b 100644 --- a/setup.h.in +++ b/setup.h.in @@ -409,7 +409,11 @@ #define wxUSE_VALIDATORS 0 -#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__) +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 0 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif #define wxUSE_COMMON_DIALOGS 0 -- 2.45.2