The compiler warns about content after defined(__has_included), so avoid
the issue by putting these Clang tests inside one big #ifdef
__has_included block.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using the GNU libstdc++ or Clang's libc++ implementations of the
standard library, <cmath> inclusion undefines the isfinite macro,
resulting in compilation errors when wxFinite() is used. <cmath> can be
included unintentionally, e.g. wx/hashmap.h may result in its inclusion
when using STD containers.
Work around this mess by checking if one of these <cmath>
implementations were already included and using std::isfinite() in that
case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Just return NULL or empty string if the input path is too long. This is
probably not ideal but it fixes a buffer overflow and all this code needs to
be rewritten to use wxFileName() anyhow so it's not worth doing anything more
at this moment.
Closes#15302.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add pngprefix.h file generated by libpng configure/make process (which we
don't run during wxWidgets build, so this is something that will need to be
redone manually whenever libpng is upgraded, the procedure for doing this is
documented in docs/tech/tn0025.txt) in order to use "wx_" prefix for all
libpng public symbols. This should avoid at least some problems due to the
conflicts between the built-in libpng and shared libpng loaded into the
process as GTK+ libraries dependency under Unix.
Also rename wx_png_{warning,error} to use upper case PNG for consistency with
wx_PNG_stream_{reader,writer} and to avoid conflict with png_{warning,error}()
which we now rename to have "wx_" prefix.
Closes#14157.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This should have been done together with the changes of r74425, as
autoconf_inc.m4 had changed, configure should have been regenerated too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This reverts r74444 and defines XML_STATIC unconditionally in Expat sources
themselves as we always use the built-in Expat as a static library, so this
solution is simpler and more portable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The new Expat assumes it's built as a DLL by default, define XML_STATIC to
indicate that this is not the case as we always build it as a static library.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously, the prefix directory itself for searched for catalogs, in
addition to prefix/lang/LC_MESSAGES and prefix/lang. This never made
much sense, because only one catalog could be in such place, instead of
multiple catalogs for more languages. It also prevented successful
identification of catalog's language and didn't work with
GetAvailableLanguages().
Remove this misfeature and update the documentation accordingly. Update
OS X-specific code so that it continues to work (it previously depended
on this behavior). As a side effect, *.lproj directories are now
recognized in all search prefixes, not just in Resources.
See #12498, #15253.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Log match directory in GetAvailableTranslations(). Log search paths
with one directory per line, for better readability when debugging.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The documentation incorrectly stated that the current working directory
is searched for translations. This isn't the case (and wouldn't be a
good thing to do).
See #12498.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Merge with the latest version, mostly discarding our changes to 1.95.6 as they
seem to be unnecessary any longer, keep just bakefile-specific addition to
configure.
Also update our own makefile to define HAVE_EXPAT_CONFIG_H which is now needed
by Unix build.
Closes#11677.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is both more reasonable than the current runtime encoding (the
input file is from unknown source) and more robust (it can handle UTF-*
encoded files transparently).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This happens to work under MSW and Unix where there is only one
wxStandardPaths class for both the console and the GUI applications but
doesn't return the correct result under OS X where the Core Foundation
version, returned by wxStandardPaths::Get(), has to be used for the GUI
programs. And historically this confused a lot of people, so just ensure that
they can't accidentally create an object of the wrong type any more.
Closes#13537.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In addition to avoiding (tiny) code duplication, this ensures that both places
use the stream in the same orientation, i.e. either both use the narrow
functions or the wide ones. Thus, it fixes a problem with output simply
disappearing if wxLogStderr and wxMessageOutputStderr were both used: the one
used first disabled any output by the other one.
Closes#14782.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Save the original locale used before we changed it instead of "restoring" the
same locate that this wxLocale object was using.
Add a unit test to verify that this does work as expected.
Closes#14873.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The result was (consistently, so the tests still passed) off by an hour when
the program was ran while DST was in effect. Fix this by avoiding the use of
FileTimeToLocalFileTime() and LocalFileTimeToFileTime() and just directly
converting FILETIME values to wxDateTime. Not only this is more correct but
it's also simpler and more efficient as well.
Also add a unit test for wxFileName::SetTimes() too.
Closes#13098.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
All the other 3rd party libraries were already excluded but not this one, for
some reason -- do exclude it now as upcoming Expat 2.1.0 sources contain some
files with TABs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The library was already present in the makefiles but came before the
monolithic library itself, which broke the linking of the samples when using
GNU ld as the dependent libraries must come after the libraries using them.
Closes#13837.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This should have been part of r74406 but I only rebaked wxWidgets make/project
files themselves and not the samples/utils/demos files in it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
TestOverlappedSyncExecute() doesn't currently pass under Windows and was
supposed to not be executed there but was, in console test, as __WXMSW__ is
not defined in this case, only __WINDOWS__ is (as there is no GUI toolkit in
the console applications).
See #10258.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Record the object propagating the given event upwards in the event object
itself and use it in wxMDIParentFrame to determine whether the event being
handled is already coming from wxMDIChildFrame and avoid sending it back for
processing it there again in this case.
This is ugly and makes wx event processing even more complex but this is the
only way I could find to ensure that
(a) Both the child and the parent frames get the events from the toolbar
(even though the toolbar parent is the parent frame and hence normally
the child wouldn't get notified about them at all and so the forwarding
at wxMDIParentFrame level is required to make this work).
(b) The child gets the event only once, whether it comes from a toolbar (and
hence indirectly via the parent frame) or from the child menu (and hence
directly to the child, at least in wxMSW).
This commit fixes the event propagation unit test case, at least under MSW and
GTK.
See #14314.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775