These options enable "strict ANSI" mode in MinGW which omits declarations of
POSIX functions from the standard headers. To allow the library and, possibly
even more importantly, the user code including our headers, to compile with
these options, declare the functions that we need ourselves.
This might appear to go against the spirit of "strict ANSI" mode, but the only
alternative would be to not use such functions at all and silently cripple the
library when -std=c++NN is used, compared to -std=g++NN case, and this doesn't
seem appealing neither.
Closes#16984.
g++ 4.9.2 added support of __has_include() but, unlike clang, refuses to
compile the <type_traits> header that is detected as existing now in C++98
mode, so the build was broken with it when not using configure (i.e. under
MSW).
Fix this by, first, testing for C++11 compilers separately (which seems like a
good idea anyhow as it will allow using these headers with other compilers)
and, second, not trusting g++ __has_include() for C++11 headers in C++98 mode.
This doesn't make much sense for an interface declaration anyhow and produces
a warning from g++ about assigning string literal to (non-const) BSTR pointer.
(this is a backport of eb18bbc8fd from master)
This class doesn't really need a virtual dtor as it's never used
polymorphically, but add it to avoid g++ warnings about it.
(this is a backport of 8ad1e2698f from master)
Interpret internal compiler version value 1900 as VC14. Notice that this
required adjusting the computation of the internal version from the
user-visible one because VC13 was skipped (hopefully no black cats crossed
paths with the manager responsible for this decision).
See #16854.
(this is a backport of f350bab from master)
This MSVC version does add snprintf(), finally, and doesn't allow
pre-#defining it before including its stdio.h, so don't do this.
See #16854.
(this is a backport of 0a41db1 from master)
Starting with Vista, SetThreadLocale() does basically nothing and does
not affect UI language. We need to call SetThreadUILanguage() as well
from wxLocale::Init() to have the locale reflected in e.g. standard
dialogs.
Don't stop converting subsequent chunks just because the length of one of them
was 0: this can happen if the first character of a string is a NUL or if there
are two (or more) NULs in it later.
Simply remove the check for this and continue as usual even in this case.
Also add a unit test verifying that we do translate NULs in input into NULs in
output.
Closes#16620.
(this is a backport of f99ff49 from master)
Visibility support for Clang was disabled in 7198c33 because of linking
errors when building shared libraries, related to non-inline methods in
exported template classes.
The last Clang version to have these problems is version "4.1
(tags/Apple/clang-421.11.66)" as part of Xcode 4.5.2, and the next
release fixes them (version "4.2 (clang-425.0.24)", Xcode 4.6). Check
for the Clang version and only disable visibility support when compiling
with Apple Clang < 4.2.
Note that Apple Clang 4.2 is based on official Clang 3.2 so also check
for that version in case of non-Apple builds. The only official Clang
that has been tested successfully is 3.4 which worked fine with
visibility. Other versions that were tried (3.1 and 3.2) segfault while
compiling wx.
(this is a backport of 7cacde3 from master)
The flicker was only visible under Windows XP or when using a class theme
and was due to mis-positioning the status bar initially in PositionStatusBar().
Fix this by adjusting its position by the toolbar offset before calling its
SetSize().
Closes#16705.
(this is a backport of 8d12e07453 from master)
The expected result in this case is ".", but the filename became empty instead
when wxPATH_NATIVE was used.
Fix this by examining GetFormat(format), which takes care of mapping
wxPATH_NATIVE to its real value, instead of wxPATH_NATIVE itself.
Also add a unit test verifying that this works as expected.
Closes#17010.
To prevent compilation errors (when wxABI_VERSION < 30003) also the body of newly overridden method needs to be guarded by wxABI_VERSION.
(See 7b25b65a2f).
Newly overridden virtual methods must be taken in wxABI_VERSION checks as
otherwise any program using the class deriving from the one containing this
method would reference the method in the vtbl of that class and so become
ABI-incompatible with the earlier shared library versions.
Also add wxABI_VERSION guard around the entire wxSimplebookXmlHandler class
added in 3.0.2.
00cc023 "fix releasing mouse capture before showing modal dialog"
dc555a9 "notify all windows in capture stack about capture lost, and empty the stack"
closes#16647
Use GetRowHeight()/GetColWidth() instead of accessing m_rowHeights/m_colWidths
arrays directly as the functions handle the hidden rows/columns correctly.
This fixes bug with corruption of wxGrid appearance if any rows/columns were
inserted into or deleted from a grid containing some hidden rows/columns.
Closes#16980.
Get rid of the ugly and unnecessary hack of making the control a child
of the GtkTreeView "behind its back", which was a terrible idea and
bound to cause problems.
See #16850
This fixes a regression introduced in 45e216b (see #14279):
wxBitmapComboBox must be higher than a normal wxComboBox if it has big
enough bitmaps. Closes#16690.
This is the backport of 7e869a5 from master.
Under only Windows XP the test FileSystemWatcherTestCase::TestTrees fails
during the RmDir(treedir) call (SHFileOperation strangely returns
ERROR_DIR_NOT_EMPTY). To make the test pass remove the treedir first and
only then the singledir. This is merely a workaround while the actual
problem is still to be investigated.
This is the backport of 2d5ce25373 from
master.
This test keeps failing just because the buildbot machine are too heavily
loaded. This is not really an error, so just avoid running this test there.
This is the backport of f641dfd7 from master.
This function is available on OS X since 10.5, which is the minimum
supported version of wx 3.0.
Fixes Xcode 6.3 warning triggered by checking availability of a symbol
that wasn't marked as weak_import.
This test can't work when the in-memory representation is UTF-16, as we can't
convert surrogates to anything else in this case.
This fixes the unit tests broken since r76622, see #16298.
This is the backport of 0bb7676889 from master.
Give error if changing directory when wxFD_CHANGE_DIR or wxDIRP_CHANGE_DIR
flags are used, this is a good idea generally speaking and it also avoids
warnings about not checking chdir() return value that we got under Ubuntu.
This is the backport of 3f6741a770 from master
with the changes of cb06ecb9eb and
de27f4b08f too.
Explicitly ignore errors if we can't read from the associated FD.
This is mostly done to avoid -Wunused-result warning about not checking read()
return value under Ubuntu.
This is the backport of a74d2faf3a from master.
Relax the check in RestartBug() test too, the time can be slightly smaller
than expected (by ~2ms on disc-xp machine).
This is the backport of 7af8598903 from master.