Commit Graph

59 Commits

Author SHA1 Message Date
Paul Cornett
d200f19c02 Fix non-unicode build after 82881d6b03
wxChar overload of wxTmemcpy() is not defined. Just use memcpy() directly
as wxStrlcpy() does not use wxChar.
2018-08-22 08:12:11 -07:00
pavel-t
82881d6b03 Use memcpy instead of strncpy in wxStrlcpy
Avoid stringop-overflow warning about strncpy size argument depending on source size.
Checking for null in src is not needed because it is already checked by strlen.
2018-07-12 12:19:07 +03:00
Stefan Csomor
7104ed845d Allow for compilation under iOS 11
The system() API call has been deprecated since iOS 8, so it's better not to use it at all, eventhough compilation only breaks in iOS 11.
2017-06-24 22:01:15 +02:00
Paul Cornett
56701052eb remove const from pass-by-value parameters 2016-01-16 10:55:01 -08:00
Tobias Taschner
8282c1be0f Remove Windows CE support
Windows CE doesn't seem to be supported by Microsoft any longer. Last CE
release was in early 2013 and the PocketPC and Smartphone targets supported by
wxWidgets are long gone.

The build files where already removed in an earlier cleanup this commit
removes all files, every #ifdef and all documentation regarding the Windows CE
support.

Closes https://github.com/wxWidgets/wxWidgets/pull/81
2015-09-23 00:52:30 +02:00
Vadim Zeitlin
15f255cebb Remove support for Digital Mars compiler.
This compilers is not being developed any longer since many years, drop
support for it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 13:01:23 +00:00
Vadim Zeitlin
f4b80e5337 Remove MSVC6 support.
Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.

Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 22:32:17 +00:00
Vadim Zeitlin
70232f52e9 Do define __VISUALC__ when using Intel compiler under Windows.
This undoes r74888, r74913 and r74969 because all of them were still not
enough to make ICC build work correctly. So instead of trying to find all the
places where we need to test for __INTELC__ in addition to __VISUALC__, just
revert to defining __VISUALC__ for ICC under Windows as it uses its CRT anyhow
and in the vast majority of cases we are actually testing for the CRT and not
the compiler anyhow.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:06 +00:00
Vadim Zeitlin
5db33691be Do not define __VISUALC__ for Intel C++ compiler under Windows.
This is confusing and makes it more difficult to test for the "real" MSVC,
test for __INTELC__ explicitly wherever needed instead.

Also document __INTELC__ in our list of compilers.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:49:21 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
8a625e0bb9 Fix compilation with g++ 4.7 (prerelease).
The workaround for a bug in g++ 3.5 breaks compilation with 4.7 which
implements two-phase lookup correctly, so disable this workaround for 4.7 and
later. We could probably even only enable it for 3.x but this doesn't really
matter as previous 4.x releases don't have problems with this anyhow.

Closes #13385.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-08 08:33:19 +00:00
Paul Cornett
d4280c0282 better way to silence unused parameter warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-28 06:18:33 +00:00
Stefan Csomor
db2c04684d clang fixes, fixes #12332
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-27 18:35:01 +00:00
Stefan Csomor
df04f800b8 supporting clang 2.0 under xcode, see #12332
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-27 11:00:26 +00:00
Václav Slavík
8d94819c43 Remove wxUSE_WCHAR_T checks.
wxWidgets requires wchar_t for some time now; wx/chartype.h has a check
to fail complation without it. Simplify code by removing now-dead code
for the !wxUSE_WCHAR_T case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 10:43:18 +00:00
Vadim Zeitlin
9677a8f017 Use a helper wxNEEDS_DECL_BEFORE_TEMPLATE symbol in wxStrcoll() workaround.
The condition for which this workaround is needed has already changed once
(see #11605) and may change again in the future as we test with more compilers
so use a symbolic name for it.

No real changes otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 00:59:56 +00:00
Vadim Zeitlin
a95d18b8a8 Apply workaround for wxStrcoll() template for g++ to 3.4 too.
At least mingw32 version of g++ 3.4.5 needs the same workaround to be able to
compile wx.

Closes #11605.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 00:59:49 +00:00
Vadim Zeitlin
7a0079d5a4 Add wxIsascii() function and use it instead of isascii() in our code.
isascii() is non-ANSI and is not available under all platforms. While we
currently define it ourselves in wx/wxcrtbase.h in this case, it's not a good
idea as this can't be easily done correctly for all platforms so start
transitioning away from using isascii() by adding wxIsascii() and using it in
our own code.

The only remaining occurrences of isascii() are in Scintilla code which we
probably don't want to modify.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-18 00:28:11 +00:00
Paul Cornett
d1750c03ce use const_cast where appropriate
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 17:27:17 +00:00
Vadim Zeitlin
5fc0c309f7 Fix compilation in wxUSE_STL==1 case broken by r62738.
We need to use wxString::c_str() explicitly to convert wxString to const char
* in STL build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-30 00:30:08 +00:00
Vadim Zeitlin
874dbd3a4a Allow calling wxStrchr() with a narrow string and wide character.
Calls to wxStrchr(char-string, wide-char) would previously fail if wide
character couldn't be converted to a single character in the current locale
encoding. Change it to simply return NULL in this case as it's a safe and
useful generalization: a narrow string will never contain a wide character not
representable in the current locale.

Add wxUniChar::GetAsChar() to help with implementing this.

Closes #11487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 14:37:03 +00:00
Vadim Zeitlin
7491aa2e0b another typo correction after last change, correct the return types too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-25 17:18:31 +00:00
Vadim Zeitlin
4c709bdd6a compilation fix after the latest change (typo: used char instead of wchar_t)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-25 15:58:21 +00:00
Vadim Zeitlin
e9b6485645 define wxStrchr(non-const char-or-wchar_t*) as a template to ensure that second parameter of any type that can be used with const version can be used with this one too; this is shorter than listing them all explicitly and without this Borland refuses to compile wxStrchr(char *, wxUniChar) (see #10736)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-25 14:12:32 +00:00
Václav Slavík
de4983f323 split wxCharTypeBuffer<T> into wxScopedCharTypeBuffer<T> and wxCharTypeBuffer<T> -- the former is for transient data with validity limited to parent's lifetime, the latter is for permanent storage of string data (bug #9638)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-27 15:33:55 +00:00
Francesco Montorsi
b7d70f7626 no change: just move a misplaced comment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-18 21:11:13 +00:00
Francesco Montorsi
7c5ac499c8 provide our own implementation of wxStrnlen if it's not available; add tests for it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-13 12:01:30 +00:00
Francesco Montorsi
f1b63efe89 add support for wxStrnlen for those platforms where it's available
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 23:25:39 +00:00
Vadim Zeitlin
e408bf5257 add safe wxStrlcpy() function and replaced all wxStrncpy() calls by it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-29 14:41:02 +00:00
Václav Slavík
7e38638c34 removed no longer needed wxOKlibc() helper
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-16 22:35:25 +00:00
Stefan Neis
a93cf225f7 Added detection of vsscanf and whether or not a prototype exists in headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-02 12:05:27 +00:00
Václav Slavík
b9909c6eb6 compilation fix for wxStrspn and wxStrcspn: WX_STR_FUNC should be used after all, WX_STR_FUNC_NO_INVERT is incomplete
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-24 19:25:24 +00:00
Vadim Zeitlin
9d55bfef2c don't use 8 bit characters in sources, this results in level 1 warning with VC8 (patch 1841741)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-03 22:09:26 +00:00
Vadim Zeitlin
49ec3b67dd wxStr[c]spn_String fixes: use size_t, not int, as return type; use WX_STR_FUNC_NO_INVERT for wrappers declarations as they're not symmetric; also corrected mistaken use of int instead of rettype in WX_STR_FUNC_NO_INVERT itself
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-25 14:34:23 +00:00
Chris Elliott
91a151d3a3 DMC work round
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-29 13:33:12 +00:00
Vadim Zeitlin
de34bb081b make wxTmemchr() return (and take) char* instead of void* in ANSI build too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-04 21:33:42 +00:00
Vadim Zeitlin
d6f2a8911e many compilation fixes for WinCE using VC8 (it now build, although still doesn't work)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-27 16:34:24 +00:00
Václav Slavík
a2c5db764c fixed visibility warning on Fedora
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-22 08:01:51 +00:00
Václav Slavík
e93523680b compilation fix for Borland C++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-17 11:59:25 +00:00
Václav Slavík
7dfe6f2a51 compilation fix for wxStrtod and friends: non-zero int can't be passed as pointer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-16 18:52:53 +00:00
Václav Slavík
57e2b887a0 removed unsecure wxTmpnam() function (patch by Francesco Montorsi)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-08 19:06:03 +00:00
Václav Slavík
30f3757b50 wxStrcoll_String compilation fixes for Dmars and Borland compilers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-03 21:26:35 +00:00
Václav Slavík
bdcb213757 compilation fix if wxLongLong_t is not available
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-25 17:53:30 +00:00
Vadim Zeitlin
80820772ad changed wxIsxxx() to return bool, not int, to avoid int->bool conversion warnings from VC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-16 14:45:01 +00:00
Jouk Jansen
28ffb1f22f Committing in .
Changes to make OpenVMS compile WX

 Modified Files:
 	wxWidgets/include/wx/wxcrt.h wxWidgets/include/wx/wxcrtbase.h
 	wxWidgets/src/common/wxcrt.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-15 12:52:25 +00:00
Vadim Zeitlin
105260e89f overload wxStrpbrk() for more types and add tests for it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-13 15:31:09 +00:00
Václav Slavík
ae51cebbe6 compilation fix for gcc 3.3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-11 19:57:01 +00:00
Václav Slavík
01c0981e75 added wchar_t, wxUniChar overloads for wxStrchr
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-11 12:00:09 +00:00
Václav Slavík
3a3dde0d44 use wx/crt.h as the 'official' header for wxCRT wrappers instead of wxchar.h; add comments explaining that users should include wx/crt.h to implementation headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-11 06:08:13 +00:00
Václav Slavík
52de37c78f 1. made CRT wrappers definitions indepenent of wxUSE_UNICODE: both ANSI and Unicode variants are now defined
2. split wxcrt.h into wxcrtbase.h with lowlevel compiler-specific definitions and wxcrt.h with ANSI- and Unicode-compatible wx wrappers


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-10 17:14:14 +00:00