Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets
Commits:
5f8e214d by Vadim Zeitlin at 2026-04-07T20:46:39+02:00
Remove check for standard C headers
This shouldn't be necessary any longer, all systems still in use should
have these headers.
- - - - -
3b2c5716 by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Don't bother checking for va_copy() availability
Assume it is always available, this really should be the case nowadays.
- - - - -
4e828c5c by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Check for wcsrtombs() in CMake builds too
Do it for consistency with configure builds.
- - - - -
0cb94f31 by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Correctly define wxHAS_LOG_CHAIN in CMake build
This is a static definition and shouldn't use #cmakedefine, as this
resulted in it being never defined.
Also replace #cmakedefine for wxHAS_WORKING_GTK_DC_BLIT with #undef even
if this doesn't have any visible effects.
- - - - -
5d9e5998 by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Define HAVE_DL_ITERATE_PHDR in CMake builds
This was forgotten in aec49d9c9d (Use dl_iterate_phdr() in
wxDynamicLibrary::ListLoaded(), 2023-09-06).
- - - - -
86e4196a by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Remove unused HAVE___THREAD_KEYWORD
This doesn't seem to have ever been used and definitely isn't currently.
- - - - -
cfb38560 by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Re-enable wxUSE_DETECT_SM by default in CMake builds
This basically reverts 5bf5581dbe (CMake: Disable finding X11 session
manager by default, 2019-07-16) because the default value for this
option in configure is on, and not off, so that commit actually made
CMake inconsistent with configure instead of vice versa, as claimed.
- - - - -
7999427c by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Make setup.h generated by CMake more consistent with configure
We don't need to #undef neither "const" nor "inline", so don't do it.
- - - - -
a93fa649 by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Remove unused HAVE_FCNTL_H and CMake check for it
This was never used anywhere, we include <fcntl.h> if HAVE_FCNTL is set,
so simply remove the symbol and the CMake check for it (configure never
defined it).
- - - - -
12a3a16e by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Prefer using "timezone" to "__timezone" on POSIX systems
This undoes the changes of 267cf6dda4 (CMake: Search for deprecated
timezone function last, 2025-04-12) for Linux and other POSIX systems as
this introduced a gratuitous difference compared to configure build and
it's preferable to use "timezone" anyhow, as it's part of POSIX.
See #25310.
- - - - -
459b007a by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Don't check for fallback functions if we find the first one
In several places we didn't need to keep looking for older fallback
functions if we found the new/best one, so replace calls to
wx_check_funcs() with multiple functions with multiple calls to it for
each function, after checking that the previous one was not found.
This commit is best viewed ignoring whitespace-only changes.
- - - - -
40a32294 by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Check for a bunch of thread-related functions in CMake too
For some reason we never checked for them and so never defined the
corresponding symbols.
Also fix HAVE_PTHREAD_SETCONCURRENCY spelling in CMake setup.h which had
an extra underscore.
- - - - -
73d66e7a by Vadim Zeitlin at 2026-04-07T23:21:56+02:00
Check for _NL_TIME_FIRST_WEEKDAY in CMake build too
HAVE_NL_TIME_FIRST_WEEKDAY was never defined otherwise.
- - - - -
7ed866c6 by Vadim Zeitlin at 2026-04-07T23:21:57+02:00
Remove tests for non-standard and never used in practice wcstr.h
Stop checking for <wcstr.h>, this header never exists and is not used if
<wchar.h> exists (which it always does nowadays) anyhow.
- - - - -
b2342ec0 by Vadim Zeitlin at 2026-04-07T23:21:57+02:00
Stop checking if wchar_t is a distinct type, just assume it is
We don't support ancient MSVC version which didn't treat wchar_t as a
distinct type, so don't bother catering for such compilers and simplify
the code by removing the checks for wxWCHAR_T_IS_REAL_TYPE.
Also remove the checks for this from configure and CMake.
- - - - -
0e1fc41f by Vadim Zeitlin at 2026-04-07T23:21:57+02:00
Remove inconsistent underscore from HAVE_PTHREAD_SET_CONCURRENCY
The names of HAVE_xxx symbols are formed from upper-case name of the
corresponding function and the function is pthread_setconcurrency(), so
remove the extra underscore from the symbol name for consistency.
- - - - -
96ae1fb9 by Vadim Zeitlin at 2026-04-07T23:21:57+02:00
Remove checks wchar.h existence
This header always exists and we already relied on it anyhow, so stop
checking that it does and remove HAVE_WCHAR_H.
- - - - -
b5703d43 by Vadim Zeitlin at 2026-04-07T23:21:57+02:00
Remove check for <widec.h> from configure and HAVE_WIDEC_H
The check for this pre-C99 Solaris header was added back in a49ffb32e2
(include widec.h if it's available, it contains declarations of
[f]putws() under Solaris, 2006-11-09) and shouldn't be needed any more.
CMake never checked for it, so remove the check from configure too and
then remove the now never defined HAVE_WIDEC_H.
- - - - -
6ad18e66 by Vadim Zeitlin at 2026-04-07T23:21:57+02:00
Only check for ftime() in CMake if gettimeofday() is not found
We use ftime() only as fallback, so don't waste time checking for it if
it's never going to be used.
- - - - -
771c730a by Vadim Zeitlin at 2026-04-07T23:38:23+02:00
Drop support for 3 argument gethostbyname_r()
This seems to have been used by old versions of IRIX and shouldn't be in
use anywhere any more, so simplify the code by not taking this prototype
into account any more.
- - - - -
978599ac by Vadim Zeitlin at 2026-04-07T23:42:43+02:00
Drop support for 4 argument getservbyname_r()
This is similar to the previous commit, this getservbyname_r() prototype
shouldn't be used by any contemporary systems any longer.
- - - - -
a62bcc4a by ali kettab at 2026-04-07T22:55:21+01:00
wxQt: No need to store the layout direction in wxDC
The layout direction is stored/retrieved directly from the QPainter
No real changes, just a cleanup.
- - - - -
4b936606 by Vadim Zeitlin at 2026-04-07T23:59:05+02:00
Don't check for gethostname() in CMake if uname() was found
The existing test was reversed (which indicates that we probably don't
need to test for gethostname() at all and could just assume that uname()
is always available), we only need gethostname() as fallback in case
uname() is not found.
- - - - -
62ac675a by Vadim Zeitlin at 2026-04-08T00:05:49+02:00
Stop checking for get{host,serv}byname()
These functions are always available, as proven by #error directives in
the code never triggering for all the years they were there, so stop
checking for them and just assume they are available.
Also simplify the check for gethostbyname_r() in CMake and just test
directly if we can use the function with the given prototype, reducing
the number of checks to one in the most common case when before we made
3 of them (one extra due to checking if the function existed first and
another one due to a logical but wrong idea that we need to check for 5
before 6).
Finally, also define HAVE_FUNC_GETSERVBYNAME_R_{6,5} in CMake,
previously it never defined them at all and so reentrant functions were
never used.
- - - - -
5d13d7ce by Vadim Zeitlin at 2026-04-08T00:10:00+02:00
Skip checks that always succeed under Linux in CMake
This significantly cuts down the number of checks and running time of
CMake configure stage.
- - - - -
73baab42 by Vadim Zeitlin at 2026-04-08T00:13:32+02:00
Stop checking for putws() in configure and CMake
It doesn't seem to exist anywhere other than under Windows with MSVC
where we already use it when wxHAVE_TCHAR_SUPPORT is true.
- - - - -
bc732795 by ali kettab at 2026-04-07T23:16:17+01:00
wxQt: wxDC::Blit() is not mirrored in RTL
- - - - -
4b7600e9 by Vadim Zeitlin at 2026-04-08T00:57:55+02:00
Fix quoting in wx_check_c_source_compiles_if_not_linux()
- - - - -
f275d6f4 by Vadim Zeitlin at 2026-04-08T01:03:16+02:00
Add detection of SM library to CMake
Enabling wxUSE_DETECT_SM option broke the build for systems where SM
library is not available as there were no actual checks for it.
Add the check now.
- - - - -
e6ccde66 by Vadim Zeitlin at 2026-04-08T03:28:51+02:00
Take multiple symbols in wx_check_symbol_exists_if_not_linux()
No real changes, just rename the helper function slightly to allow
passing it multiple symbols to check for in the same header.
- - - - -
2710f61f by Vadim Zeitlin at 2026-04-08T03:28:51+02:00
Use check_symbol_exists() for pthread functions
Using check_function_exists() seems to be prone to false positives, e.g.
it detects pthread_mutex_timedlock() as being available under iOS when
it's not actually available there and the build fails later.
- - - - -
61caeef0 by Vadim Zeitlin at 2026-04-08T03:28:51+02:00
Check for _timezone first under Windows
It's not clear if __timezone ever exists, but at the very least don't
test for it first as this fails with MSVC when testing for _timezone
succeeds.
This should have been done in 12a3a16e7b (Prefer using "timezone" to
"__timezone" on POSIX systems, 2026-04-07).
See #25310.
- - - - -
94f53184 by Vadim Zeitlin at 2026-04-08T03:28:51+02:00
Skip some CMake checks that always fail under Windows
Don't test for things which have no chances to exist under Windows, this
just wastes time.
- - - - -
91499768 by Vadim Zeitlin at 2026-04-08T03:28:51+02:00
Make checking for symbols more verbose in CMake
For some reason, check_symbol_exists() doesn't give any messages unlike
check_function_exists(), so give them ourselves when using it.
- - - - -
e54db671 by Vadim Zeitlin at 2026-04-08T03:28:51+02:00
Don't check for pthread_mutex_timedlock() under Apple systems
Both check_function_exists() and check_symbol_exists() somehow find it
there, but it's not declared when compiling.
Just skip the check for it.
- - - - -
f1d1678e by Blake-Madden at 2026-04-09T03:00:25+02:00
Fix incorrect substring size when processing bitmaps.
Also, use replace Mid() with substr() and use constexpr and preallocate
string memory.
- - - - -
b13d5f85 by Blake-Madden at 2026-04-09T03:02:10+02:00
Clip rect should use no stroke, not gray
- - - - -
2dece883 by Blake-Madden at 2026-04-09T03:02:23+02:00
Fix swapped clip ID and nesting level variables in SVG DC
m_clipUniqueId and m_clipNestingLevel were used in each other's places;
unique IDs were based on nesting level and vice versa.
- - - - -
be6c51f1 by Vadim Zeitlin at 2026-04-09T03:03:25+02:00
Merge branch 'cmake-reduce-checks'
Reduce number of checks in CMake and cleanup in related areas.
See #26364.
- - - - -
0d558839 by Vadim Zeitlin at 2026-04-09T03:03:58+02:00
Merge branch 'SVGFixes'
Various small fixes to wxSVGFileDC.
Closes #26362.
- - - - -
e508f6bc by Vadim Zeitlin at 2026-04-09T03:04:27+02:00
Merge branch 'qt-rtl-fixes' of github.com:AliKet/wxWidgets
wxQt: some RTL fixes.
See #26363.
- - - - -
27 changed files:
- build/cmake/init.cmake
- build/cmake/lib/expat.cmake
- build/cmake/options.cmake
- build/cmake/setup.cmake
- build/cmake/
setup.h.in
- configure
-
configure.ac
- include/wx/android/config_android.h
- include/wx/chartype.h
- include/wx/defs.h
- include/wx/meta/implicitconversion.h
- include/wx/meta/pod.h
- include/wx/osx/config_xcode.h
- include/wx/qt/dc.h
- include/wx/strvararg.h
- include/wx/txtstrm.h
- include/wx/wxcrtbase.h
-
setup.h.in
- setup.h_vms
- src/common/dcsvg.cpp
- src/common/sckaddr.cpp
- src/common/txtstrm.cpp
- src/qt/dc.cpp
- src/qt/dcmemory.cpp
- src/unix/threadpsx.cpp
- tests/mbconv/mbconvtest.cpp
- tests/strings/unichar.cpp
Changes:
=====================================
build/cmake/init.cmake
=====================================
@@ -810,6 +810,18 @@ if(wxUSE_GUI)
endif()
endif()
+ if(wxUSE_DETECT_SM)
+ if(APPLE OR WIN32)
+ wx_option_force_value(wxUSE_DETECT_SM OFF)
+ else()
+ find_package(PkgConfig)
+ pkg_check_modules(SM sm)
+ if(NOT SM_FOUND)
+ message(WARNING "libSM not found; disabling session management detection")
+ wx_option_force_value(wxUSE_DETECT_SM OFF)
+ endif()
+ endif()
+ endif()
endif(wxUSE_GUI)
# test if precompiled headers are supported using the cotire test project
=====================================
build/cmake/lib/expat.cmake
=====================================
@@ -23,7 +23,20 @@ if(wxUSE_EXPAT STREQUAL "builtin")
#
# Until this is done, at least use Expat's own CMake file to check for the
# features it needs, so that we can produce the appropriate expat_config.h.
- include(${wxEXPAT_DIR}/ConfigureChecks.cmake)
+ #
+ # This only makes sense under Unix, however, as almost all checks there are
+ # Unix-specific and just always fail under Windows.
+ if(WIN32)
+ include(TestBigEndian)
+ test_big_endian(WORDS_BIGENDIAN)
+ if(WORDS_BIGENDIAN)
+ set(BYTEORDER 4321)
+ else(WORDS_BIGENDIAN)
+ set(BYTEORDER 1234)
+ endif(WORDS_BIGENDIAN)
+ else()
+ include(${wxEXPAT_DIR}/ConfigureChecks.cmake)
+ endif()
# Also define some options normally set by Expat's CMakeLists.txt.
set(XML_DTD 1)
=====================================
build/cmake/options.cmake
=====================================
@@ -363,7 +363,7 @@ wx_option(wxUSE_COMMANDLINKBUTTON "use wxCommmandLinkButton class")
wx_option(wxUSE_DATAVIEWCTRL "use wxDataViewCtrl class")
wx_option(wxUSE_NATIVE_DATAVIEWCTRL "use the native wxDataViewCtrl if available")
wx_option(wxUSE_DATEPICKCTRL "use wxDatePickerCtrl class")
-wx_option(wxUSE_DETECT_SM "use code to detect X11 session manager" OFF)
+wx_option(wxUSE_DETECT_SM "use code to detect X11 session manager")
wx_option(wxUSE_DIRPICKERCTRL "use wxDirPickerCtrl class")
wx_option(wxUSE_DISPLAY "use wxDisplay class")
wx_option(wxUSE_EDITABLELISTBOX "use wxEditableListBox class")
=====================================
build/cmake/setup.cmake
=====================================
@@ -52,6 +52,15 @@ if(UNIX AND NOT APPLE)
wx_setup_definition(_GNU_SOURCE)
endif()
+# Optimization: we skip a number of checks that always pass when building under
+# Linux.
+#
+# We probably could also do it when cross-compiling to Linux, but for now be
+# conservative and only skip the checks in the most common case.
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
+ set(wxSKIP_CHECK_IF_LINUX TRUE)
+endif()
+
if(APPLE)
wx_setup_definition(__BSD__)
endif()
@@ -74,8 +83,6 @@ endif()
set(wxINSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
-
if(NOT WIN32 AND wxUSE_VISIBILITY)
check_cxx_compiler_flag(-fvisibility=hidden HAVE_VISIBILITY)
else()
@@ -136,12 +143,60 @@ function(wx_check_funcs)
endforeach()
endfunction()
-if(NOT MSVC)
- check_symbol_exists(va_copy stdarg.h HAVE_VA_COPY)
- if(NOT HAVE_VA_COPY)
- # try to understand how can we copy va_lists
- set(VA_LIST_IS_ARRAY YES)
- endif()
+# Variants of the functions above that check for availability only if not
+# building under Linux, otherwise just defines HAVE_... as we assume that the
+# symbols being checked for are always available under Linux.
+if(wxSKIP_CHECK_IF_LINUX)
+ function(wx_check_funcs_if_not_linux)
+ foreach(func ${ARGN})
+ string(TOUPPER ${func} func_upper)
+ set(HAVE_${func_upper} 1 PARENT_SCOPE)
+ endforeach()
+ endfunction()
+
+ function(wx_check_include_file_if_not_linux include var)
+ set(${var} 1 PARENT_SCOPE)
+ endfunction()
+
+ function(wx_check_symbols_exist_if_not_linux header)
+ foreach(func ${ARGN})
+ string(TOUPPER "HAVE_${func}" var)
+ set(${var} 1 PARENT_SCOPE)
+ endforeach()
+ endfunction()
+
+ function(wx_check_c_source_compiles_if_not_linux code var)
+ set(${var} 1 PARENT_SCOPE)
+ endfunction()
+else()
+ function(wx_check_funcs_if_not_linux)
+ wx_check_funcs(${ARGV})
+ endfunction()
+
+ function(wx_check_include_file_if_not_linux)
+ check_include_file(${ARGV})
+ endfunction()
+
+ # This function takes the header as the first argument and the rest are
+ # symbols to check for in that header. HAVE_XXX is defined for each symbol
+ # if it exists.
+ function(wx_check_symbols_exist_if_not_linux header)
+ foreach(func ${ARGN})
+ string(TOUPPER "HAVE_${func}" var)
+ message(STATUS "Looking for ${func} in ${header}")
+ check_symbol_exists(${func} ${header} ${var})
+ if(${var})
+ message(STATUS "Looking for ${func} in ${header} - found")
+ set(${var} 1 PARENT_SCOPE)
+ else()
+ message(STATUS "Looking for ${func} in ${header} - not found")
+ endif()
+ endforeach()
+ endfunction()
+
+ function(wx_check_c_source_compiles_if_not_linux code)
+ wx_check_c_source_compiles("${code}" ${ARGN})
+ endfunction()
endif()
# Check for availability of GCC's atomic operations builtins.
@@ -155,10 +210,16 @@ wx_check_c_source_compiles("
HAVE_GCC_ATOMIC_BUILTINS
)
+if(wxSKIP_CHECK_IF_LINUX)
+# Linux always uses socklen_t for getsockname and getsockopt, so we can skip
+# the checks.
+macro(wx_get_socket_param_type name code)
+ set(${name} socklen_t)
+endmacro()
+else()
macro(wx_get_socket_param_type name code)
- # This test needs to be done in C++ mode since gsocket.cpp now
- # is C++ code and pointer cast that are possible even without
- # warning in C still fail in C++.
+ # This test needs to be done in C++ mode since socket.cpp is C++ code and
+ # pointer casts that are possible in C can fail in C++.
wx_check_cxx_source_compiles(
"socklen_t len;
${code}"
@@ -191,6 +252,7 @@ macro(wx_get_socket_param_type name code)
endif()
endif()
endmacro()
+endif()
# the following tests are for Unix(like) systems only
if(UNIX)
@@ -204,7 +266,7 @@ if(UNIX)
# check for POSIX signals if we need them
if(wxUSE_ON_FATAL_EXCEPTION)
- wx_check_funcs(sigaction)
+ wx_check_funcs_if_not_linux(sigaction)
if(NOT HAVE_SIGACTION)
message(WARNING "No POSIX signal functions on this system, wxApp::OnFatalException will not be called")
wx_option_force_value(wxUSE_ON_FATAL_EXCEPTION OFF)
@@ -232,28 +294,15 @@ if(UNIX)
endif()
endif()
- wx_check_funcs(mkstemp mktemp)
+ wx_check_funcs_if_not_linux(mkstemp)
+ if(NOT HAVE_MKSTEMP)
+ wx_check_funcs(mktemp)
+ endif()
- # get the library function to use for wxGetDiskSpace(): it is statfs() under
- # Linux and *BSD and statvfs() under Solaris and NetBSD
- wx_check_c_source_compiles("
- return 0; }
- #if defined(__BSD__)
- #include <sys/param.h>
- #include <sys/mount.h>
- #else
- #include <sys/vfs.h>
- #endif
-
- int foo() {
- long l;
- struct statfs fs;
- statfs(\"/\", &fs);
- l = fs.f_bsize;
- l += fs.f_blocks;
- l += fs.f_bavail;"
- HAVE_STATFS)
- wx_check_c_source_compiles("
+ # get the library function to use for wxGetDiskSpace(): prefer POSIX
+ # statvfs() if it exists, but fall back to Linux/BSD-specific statfs() if
+ # necessary.
+ wx_check_c_source_compiles_if_not_linux("
return 0; }
#include <sys/statvfs.h>
@@ -267,9 +316,8 @@ if(UNIX)
HAVE_STATVFS)
if(HAVE_STATVFS)
set(WX_STATFS_T "struct statvfs")
- elseif(HAVE_STATFS)
- set(WX_STATFS_T "struct statfs")
- wx_check_cxx_source_compiles("
+ else()
+ wx_check_c_source_compiles("
return 0; }
#if defined(__BSD__)
#include <sys/param.h>
@@ -279,29 +327,52 @@ if(UNIX)
#endif
int foo() {
+ long l;
struct statfs fs;
- statfs(\"/\", &fs);"
- HAVE_STATFS_DECL)
- endif()
-
- if(NOT HAVE_STATFS AND NOT HAVE_STATVFS)
- message(WARNING "wxGetDiskSpace() function won't work without statfs()")
+ statfs(\"/\", &fs);
+ l = fs.f_bsize;
+ l += fs.f_blocks;
+ l += fs.f_bavail;"
+ HAVE_STATFS)
+ if(HAVE_STATFS)
+ set(WX_STATFS_T "struct statfs")
+ wx_check_cxx_source_compiles("
+ return 0; }
+ #if defined(__BSD__)
+ #include <sys/param.h>
+ #include <sys/mount.h>
+ #else
+ #include <sys/vfs.h>
+ #endif
+
+ int foo() {
+ struct statfs fs;
+ statfs(\"/\", &fs);"
+ HAVE_STATFS_DECL)
+ else()
+ message(WARNING "wxGetDiskSpace() function won't work without statfs()")
+ endif()
endif()
# check for fcntl() or at least flock() needed by Unix implementation of
# wxSingleInstanceChecker
if(wxUSE_SNGLINST_CHECKER)
- wx_check_funcs(fcntl flock)
- if(NOT HAVE_FCNTL AND NOT HAVE_FLOCK)
- message(WARNING "wxSingleInstanceChecker not available")
- wx_option_force_value(wxUSE_SNGLINST_CHECKER OFF)
+ wx_check_funcs_if_not_linux(fcntl)
+ if(NOT HAVE_FCNTL)
+ wx_check_funcs_if_not_linux(flock)
+ if(NOT HAVE_FLOCK)
+ message(WARNING "wxSingleInstanceChecker not available")
+ wx_option_force_value(wxUSE_SNGLINST_CHECKER OFF)
+ endif()
endif()
endif()
# look for a function to modify the environment
- wx_check_funcs(setenv putenv)
+ wx_check_funcs_if_not_linux(setenv)
if(HAVE_SETENV)
- wx_check_funcs(unsetenv)
+ wx_check_funcs_if_not_linux(unsetenv)
+ else()
+ wx_check_funcs_if_not_linux(putenv)
endif()
set(HAVE_SOME_SLEEP_FUNC FALSE)
@@ -314,10 +385,10 @@ if(UNIX)
if(NOT HAVE_SOME_SLEEP_FUNC)
# try nanosleep() in libc and libposix4, if this fails - usleep()
- check_symbol_exists(nanosleep time.h HAVE_NANOSLEEP)
+ wx_check_symbols_exist_if_not_linux(time.h nanosleep)
if(NOT HAVE_NANOSLEEP)
- check_symbol_exists(usleep unistd.h HAVE_USLEEP)
+ wx_check_symbols_exist_if_not_linux(unistd.h usleep)
if(NOT HAVE_USLEEP)
message(WARNING "wxSleep() function will not work")
endif()
@@ -325,33 +396,33 @@ if(UNIX)
endif()
# check for uname (POSIX) and gethostname (BSD)
- check_symbol_exists(uname sys/utsname.h HAVE_UNAME)
- if(HAVE_UNAME)
- wx_check_funcs(gethostname)
+ wx_check_symbols_exist_if_not_linux(sys/utsname.h uname)
+ if(NOT HAVE_UNAME)
+ wx_check_funcs_if_not_linux(gethostname)
endif()
cmake_push_check_state()
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_REENTRANT)
- wx_check_funcs(strtok_r)
+ wx_check_funcs_if_not_linux(strtok_r)
cmake_pop_check_state()
# check for inet_addr and inet_aton (these may live either in libc, or in
# libnsl or libresolv or libsocket)
# TODO
- wx_check_funcs(fdopen)
+ wx_check_funcs_if_not_linux(fdopen)
if(wxBUILD_LARGEFILE_SUPPORT)
- wx_check_funcs(fseeko)
+ wx_check_funcs_if_not_linux(fseeko)
endif()
if(wxUSE_TARSTREAM)
- wx_check_funcs(sysconf)
+ wx_check_funcs_if_not_linux(sysconf)
cmake_push_check_state()
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_REENTRANT)
- check_symbol_exists(getpwuid_r pwd.h HAVE_GETPWUID_R)
- check_symbol_exists(getgrgid_r grp.h HAVE_GETGRGID_R)
+ wx_check_symbols_exist_if_not_linux(pwd.h getpwuid_r)
+ wx_check_symbols_exist_if_not_linux(grp.h getgrgid_r)
cmake_pop_check_state()
endif()
@@ -365,31 +436,37 @@ if(UNIX)
# Do this again for getsockopt as it may be different
wx_get_socket_param_type(SOCKOPTLEN_T "getsockopt(0, 0, 0, 0, &len);")
- check_symbol_exists(gethostbyname netdb.h HAVE_GETHOSTBYNAME)
- check_symbol_exists(gethostbyname_r netdb.h HAVE_GETHOSTBYNAME_R)
- if(HAVE_GETHOSTBYNAME_R)
- check_prototype_definition(gethostbyname_r
- "int gethostbyname_r(const char *name, struct hostent *hp, struct hostent_data *hdata)"
- "0"
- "netdb.h"
- HAVE_FUNC_GETHOSTBYNAME_R_3)
-
- check_prototype_definition(gethostbyname_r
- "struct hostent *gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen, int *herr)"
- "NULL"
- "netdb.h"
- HAVE_FUNC_GETHOSTBYNAME_R_5)
-
- check_prototype_definition(gethostbyname_r
- "int gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen, struct hostent **result, int *herr)"
- "0"
- "netdb.h"
- HAVE_FUNC_GETHOSTBYNAME_R_6)
+ wx_check_c_source_compiles(
+ [[struct hostent ret, *retp;
+ char buf[1024];
+ int buflen = 1024;
+ int e;
+ (void)gethostbyname_r("
www.wxwidgets.org", &ret, buf, buflen, &retp, &e);]]
+ HAVE_FUNC_GETHOSTBYNAME_R_6
+ netdb.h
+ )
+
+ if(HAVE_FUNC_GETHOSTBYNAME_R_6)
+ # Assume that we have getservbyname_r() with consistent signature,
+ # this does seem to be the case in practice.
+ set(HAVE_FUNC_GETSERVBYNAME_R_6 1)
+ else()
+ wx_check_c_source_compiles(
+ [[struct hostent ret;
+ char buf[1024];
+ int buflen = 1024;
+ int e;
+ struct hostent *ret = gethostbyname_r("
www.wxwidgets.org", &ret, buf, buflen, &e);]]
+ HAVE_FUNC_GETHOSTBYNAME_R_5
+ netdb.h
+ )
+ if(HAVE_FUNC_GETHOSTBYNAME_R_5)
+ # See above.
+ set(HAVE_FUNC_GETSERVBYNAME_R_5 1)
+ endif()
endif()
- check_symbol_exists(getservbyname netdb.h HAVE_GETSERVBYNAME)
- check_symbol_exists(inet_aton arpa/inet.h HAVE_INET_ATON)
- check_symbol_exists(inet_addr arpa/inet.h HAVE_INET_ADDR)
+ wx_check_symbols_exist_if_not_linux(arpa/inet.h inet_aton inet_addr)
endif(wxUSE_SOCKETS)
if(wxUSE_JOYSTICK AND WXGTK)
@@ -402,44 +479,81 @@ if(UNIX)
endif(UNIX)
if(CMAKE_USE_PTHREADS_INIT)
- cmake_push_check_state(RESET)
- set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
- wx_check_cxx_source_compiles("
- void *p;
- pthread_cleanup_push(ThreadCleanupFunc, p);
- pthread_cleanup_pop(0);"
- wxHAVE_PTHREAD_CLEANUP
- pthread.h
- DEFINITION
- "void ThreadCleanupFunc(void *p) { }\;"
- )
- wx_check_c_source_compiles(
- "pthread_mutexattr_t attr;
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);"
- HAVE_PTHREAD_MUTEXATTR_T
+ wx_check_symbols_exist_if_not_linux(
pthread.h
- )
- if(HAVE_PTHREAD_MUTEXATTR_T)
- # check if we already have the declaration we need, it is not
- # present in some systems' headers
- wx_check_c_source_compiles(
- "pthread_mutexattr_t attr;
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);"
- HAVE_PTHREAD_MUTEXATTR_SETTYPE_DECL
+ pthread_attr_setstacksize
+ pthread_cancel
+ pthread_setconcurrency
+ sched_yield
+ )
+
+ # Somehow CMake finds this function under macOS and iOS but it's not
+ # actually available there.
+ if(NOT APPLE)
+ wx_check_symbols_exist_if_not_linux(pthread.h pthread_mutex_timedlock)
+ endif()
+
+ wx_check_funcs_if_not_linux(pthread_attr_getschedpolicy)
+ if(HAVE_PTHREAD_ATTR_GETSCHEDPOLICY)
+ wx_check_funcs_if_not_linux(pthread_attr_setschedparam)
+ if(HAVE_PTHREAD_ATTR_SETSCHEDPARAM)
+ wx_check_funcs_if_not_linux(sched_get_priority_max)
+ if(HAVE_SCHED_GET_PRIORITY_MAX)
+ set(HAVE_THREAD_PRIORITY_FUNCTIONS 1)
+ else()
+ message(WARNING "Setting thread priority will not work")
+ endif()
+ endif()
+ endif()
+
+ cmake_push_check_state(RESET)
+
+ if(wxSKIP_CHECK_IF_LINUX)
+ # Linux always has pthread_cleanup_push and pthread_cleanup_pop, so we
+ # can skip the checks.
+ set(wxHAVE_PTHREAD_CLEANUP 1)
+ set(HAVE_PTHREAD_MUTEXATTR_T 1)
+ set(HAVE_PTHREAD_MUTEXATTR_SETTYPE_DECL 1)
+ else()
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+ wx_check_cxx_source_compiles("
+ void *p;
+ pthread_cleanup_push(ThreadCleanupFunc, p);
+ pthread_cleanup_pop(0);"
+ wxHAVE_PTHREAD_CLEANUP
pthread.h
+ DEFINITION
+ "void ThreadCleanupFunc(void *p) { }\;"
)
- else()
- # don't despair, there may be another way to do it
wx_check_c_source_compiles(
- "pthread_mutex_t attr = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;"
- HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+ "pthread_mutexattr_t attr;
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);"
+ HAVE_PTHREAD_MUTEXATTR_T
pthread.h
)
- if(NOT HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
- # this may break code working elsewhere, so at least warn about it
- message(WARNING "wxMutex won't be recursive on this platform")
+ if(HAVE_PTHREAD_MUTEXATTR_T)
+ # check if we already have the declaration we need, it is not
+ # present in some systems' headers
+ wx_check_c_source_compiles(
+ "pthread_mutexattr_t attr;
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);"
+ HAVE_PTHREAD_MUTEXATTR_SETTYPE_DECL
+ pthread.h
+ )
+ else()
+ # don't despair, there may be another way to do it
+ wx_check_c_source_compiles(
+ "pthread_mutex_t attr = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;"
+ HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+ pthread.h
+ )
+ if(NOT HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+ # this may break code working elsewhere, so at least warn about it
+ message(WARNING "wxMutex won't be recursive on this platform")
+ endif()
endif()
endif()
+
wx_check_cxx_source_compiles(
"void foo(abi::__forced_unwind&);"
HAVE_ABI_FORCEDUNWIND
@@ -447,8 +561,9 @@ if(CMAKE_USE_PTHREADS_INIT)
cmake_pop_check_state()
endif() # CMAKE_USE_PTHREADS_INIT
-check_symbol_exists(localtime_r time.h HAVE_LOCALTIME_R)
-check_symbol_exists(gmtime_r time.h HAVE_GMTIME_R)
+if(NOT WIN32)
+ wx_check_symbols_exist_if_not_linux(time.h localtime_r gmtime_r)
+endif()
# ---------------------------------------------------------------------------
# Checks for typedefs
@@ -485,65 +600,80 @@ else()
set(wxSIZE_T_IS_UINT YES)
endif()
-# check if wchar_t is separate type
-wx_check_cxx_source_compiles("return 0; }
-
- struct Foo { void foo(wchar_t);
- void foo(unsigned short);
- void foo(unsigned int);
- void foo(unsigned long); };
-
- int bar() {"
- wxWCHAR_T_IS_REAL_TYPE
- wchar.h)
-
# ---------------------------------------------------------------------------
# Checks for structures
# ---------------------------------------------------------------------------
-check_struct_has_member("struct passwd" pw_gecos pwd.h HAVE_PW_GECOS)
+if(NOT WIN32)
+
+if(wxSKIP_CHECK_IF_LINUX)
+ # struct passwd always has pw_gecos under Linux, so we can skip the check.
+ set(HAVE_PW_GECOS 1)
+else()
+ check_struct_has_member("struct passwd" pw_gecos pwd.h HAVE_PW_GECOS)
+endif()
+
+endif(NOT WIN32)
# ---------------------------------------------------------------------------
# Check for functions
# ---------------------------------------------------------------------------
-# Check various string symbols
-foreach(func
- ftime
+# Check various symbols from wchar.h.
+cmake_push_check_state(RESET)
+set(CMAKE_REQUIRED_INCLUDES "wchar.h")
+
+wx_check_funcs_if_not_linux(
wcsftime wprintf
- putws fputws wprintf vswprintf vswscanf
+ fputws wprintf vswprintf vswscanf
wcsdup wcsnlen wcscasecmp wcsncasecmp
wcsrctombs
wcstoull
wcslen
- )
- string(TOUPPER ${func} func_upper)
- check_symbol_exists(${func} wchar.h HAVE_${func_upper})
-endforeach()
+)
+
+cmake_pop_check_state()
# Check various functions
-wx_check_funcs(fsync
+wx_check_funcs_if_not_linux(
snprintf vsnprintf strnlen strtoull
setpriority
gettimeofday
+ vsscanf
+ wcsrtombs
)
-if(MSVC)
- check_symbol_exists(vsscanf stdio.h HAVE_VSSCANF)
+if(NOT HAVE_GETTIMEOFDAY)
+ wx_check_funcs(ftime)
endif()
# Check includes
-check_include_file(fcntl.h HAVE_FCNTL_H)
-check_include_file(langinfo.h HAVE_LANGINFO_H)
-check_include_file(sched.h HAVE_SCHED_H)
-check_include_file(unistd.h HAVE_UNISTD_H)
-check_include_file(wchar.h HAVE_WCHAR_H)
-check_include_file(wcstr.h HAVE_WCSTR_H)
+if(NOT WIN32)
+ wx_check_funcs_if_not_linux(fsync)
+ wx_check_include_file_if_not_linux(langinfo.h HAVE_LANGINFO_H)
+ wx_check_include_file_if_not_linux(sched.h HAVE_SCHED_H)
+ wx_check_include_file_if_not_linux(unistd.h HAVE_UNISTD_H)
+endif()
if(wxUSE_DATETIME)
- # check for timezone variable
- # doesn't exist under Darwin / Mac OS X which uses tm_gmtoff instead
- foreach(timezone_def _timezone __timezone timezone)
+ # check for timezone variable:
+ # - under POSIX systems we prefer using POSIX timezone and under Linux
+ # we don't even check for it as we know that it's available
+ # - but under Windows, at least with MinGW/clang, it results in
+ # deprecation warnings, so prefer using __timezone instead.
+ # - it doesn't exist at all under Darwin / Mac OS X which uses tm_gmtoff
+ # instead, so don't bother checking for it there at all
+ if(wxSKIP_CHECK_IF_LINUX)
+ set(WX_TIMEZONE timezone)
+ elseif(APPLE)
+ set(timezone_candidates)
+ elseif(WIN32)
+ set(timezone_candidates _timezone;__timezone;timezone)
+ else()
+ set(timezone_candidates timezone;_timezone;__timezone)
+ endif()
+
+ foreach(timezone_def ${timezone_candidates})
wx_check_cxx_source_compiles("
int tz;
tz = ${timezone_def};"
@@ -559,28 +689,40 @@ if(wxUSE_DATETIME)
check_struct_has_member("struct tm" tm_gmtoff time.h WX_GMTOFF_IN_TM)
endif()
+if(NOT WIN32)
+
+wx_check_c_source_compiles_if_not_linux(
+ "nl_langinfo(_NL_TIME_FIRST_WEEKDAY);"
+ HAVE_NL_TIME_FIRST_WEEKDAY
+ langinfo.h
+ )
+
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
-check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
+wx_check_symbols_exist_if_not_linux(dlfcn.h dlopen dladdr)
cmake_pop_check_state()
if(HAVE_DLOPEN)
- check_symbol_exists(dladdr dlfcn.h HAVE_DLADDR)
- check_symbol_exists(dl_iterate_phdr link.h HAVE_DL_ITERATE_PHDR)
+ wx_check_symbols_exist_if_not_linux(link.h dl_iterate_phdr)
endif()
+endif(NOT WIN32)
+
if(APPLE)
set(wxUSE_EPOLL_DISPATCHER OFF)
set(wxUSE_SELECT_DISPATCHER ON)
else()
if(NOT WIN32)
set(wxUSE_SELECT_DISPATCHER ON)
+ wx_check_include_file_if_not_linux(sys/epoll.h wxUSE_EPOLL_DISPATCHER)
endif()
- check_include_file(sys/epoll.h wxUSE_EPOLL_DISPATCHER)
endif()
-check_include_file(sys/select.h HAVE_SYS_SELECT_H)
+
+if(NOT WIN32)
+
+wx_check_include_file_if_not_linux(sys/select.h HAVE_SYS_SELECT_H)
if(wxUSE_FSWATCHER)
- check_include_file(sys/inotify.h wxHAS_INOTIFY)
+ wx_check_include_file_if_not_linux(sys/inotify.h wxHAS_INOTIFY)
if(NOT wxHAS_INOTIFY)
check_include_file(sys/event.h wxHAS_KQUEUE)
endif()
@@ -592,7 +734,7 @@ if(wxUSE_XLOCALE)
if(HAVE_XLOCALE_H)
list(APPEND xlocale_headers xlocale.h)
endif()
- wx_check_c_source_compiles("
+ wx_check_c_source_compiles_if_not_linux("
locale_t t;
strtod_l(NULL, NULL, t);
strtol_l(NULL, NULL, 0, t);
@@ -603,6 +745,8 @@ if(wxUSE_XLOCALE)
)
endif()
+endif(NOT WIN32)
+
# Check sizes of various types
set(SYSTYPES size_t wchar_t int long short)
=====================================
build/cmake/
setup.h.in
=====================================
@@ -17,10 +17,10 @@
#ifndef __cplusplus
/* Define to empty if the keyword does not work. */
-#undef const
+/* #undef const */
/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
+/* #undef inline */
#endif /* __cplusplus */
@@ -31,7 +31,7 @@
#cmakedefine HAVE_SSIZE_T 1
/* Define if you have the ANSI C header files. */
-#cmakedefine STDC_HEADERS 1
+#define STDC_HEADERS 1
/* Define this to get extra features from GNU libc. */
#ifndef _GNU_SOURCE
@@ -712,12 +712,12 @@
/*
* Define if your compiler has C99 va_copy
*/
-#cmakedefine HAVE_VA_COPY 1
+#define HAVE_VA_COPY 1
/*
* Define if va_list type is an array
*/
-#cmakedefine VA_LIST_IS_ARRAY 1
+/* #undef VA_LIST_IS_ARRAY */
/*
* Define if the compiler supports simple visibility declarations.
@@ -768,10 +768,6 @@
* Define if you have pthread_cleanup_push/pop()
*/
#cmakedefine wxHAVE_PTHREAD_CLEANUP 1
-/*
- * Define if compiler has __thread keyword.
- */
-#cmakedefine HAVE___THREAD_KEYWORD 1
/*
* Define if large (64 bit file offsets) files are supported.
*/
@@ -954,12 +950,12 @@
/* Define if size_t on your machine is the same type as unsigned long. */
#cmakedefine wxSIZE_T_IS_ULONG 1
-/* Define if wchar_t is distinct type in your compiler. */
-#cmakedefine wxWCHAR_T_IS_REAL_TYPE 1
-
/* Define if you have the dladdr function. */
#cmakedefine HAVE_DLADDR 1
+/* Define if you have the dl_iterate_phdr function. */
+#cmakedefine HAVE_DL_ITERATE_PHDR 1
+
/* Define if you have Posix fnctl() function. */
#cmakedefine HAVE_FCNTL 1
@@ -975,12 +971,6 @@
/* Define if you have a gethostbyname_r function taking 5 arguments. */
#cmakedefine HAVE_FUNC_GETHOSTBYNAME_R_5 1
-/* Define if you have a gethostbyname_r function taking 3 arguments. */
-#cmakedefine HAVE_FUNC_GETHOSTBYNAME_R_3 1
-
-/* Define if you only have a gethostbyname function */
-#cmakedefine HAVE_GETHOSTBYNAME 1
-
/* Define if you have the gethostname function. */
#cmakedefine HAVE_GETHOSTNAME 1
@@ -990,12 +980,6 @@
/* Define if you have a getservbyname_r function taking 5 arguments. */
#cmakedefine HAVE_FUNC_GETSERVBYNAME_R_5 1
-/* Define if you have a getservbyname_r function taking 4 arguments. */
-#cmakedefine HAVE_FUNC_GETSERVBYNAME_R_4 1
-
-/* Define if you only have a getservbyname function */
-#cmakedefine HAVE_GETSERVBYNAME 1
-
/* Define if you have the gmtime_r function. */
#cmakedefine HAVE_GMTIME_R 1
@@ -1027,7 +1011,7 @@
#cmakedefine HAVE_THR_SETCONCURRENCY 1
/* Define if you have pthread_setconcurrency function */
-#cmakedefine HAVE_PTHREAD_SET_CONCURRENCY 1
+#cmakedefine HAVE_PTHREAD_SETCONCURRENCY 1
/* Define if you have the uname function. */
#cmakedefine HAVE_UNAME 1
@@ -1047,18 +1031,6 @@
/* Define if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
-/* Define if you have the <fcntl.h> header file. */
-#cmakedefine HAVE_FCNTL_H 1
-
-/* Define if you have the <wchar.h> header file. */
-#cmakedefine HAVE_WCHAR_H 1
-
-/* Define if you have the <wcstr.h> header file. */
-#cmakedefine HAVE_WCSTR_H 1
-
-/* Define if you have <widec.h> (Solaris only) */
-#cmakedefine HAVE_WIDEC_H 1
-
/* Define if you have the <iconv.h> header file and iconv() symbol. */
#cmakedefine HAVE_ICONV 1
@@ -1074,9 +1046,6 @@
/* Define if you have wcsrtombs() function */
#cmakedefine HAVE_WCSRTOMBS 1
-/* Define this if you have putws() */
-#cmakedefine HAVE_PUTWS 1
-
/* Define this if you have fputws() */
#cmakedefine HAVE_FPUTWS 1
@@ -1175,10 +1144,10 @@
*/
/* wxLogChain class available */
-#cmakedefine wxHAS_LOG_CHAIN
+#define wxHAS_LOG_CHAIN
/* define this when wxDC::Blit() respects SetDeviceOrigin() in wxGTK */
-#cmakedefine wxHAS_WORKING_GTK_DC_BLIT
+/* #undef wxHAS_WORKING_GTK_DC_BLIT */
#endif /* __WX_SETUP_H__ */
=====================================
configure
=====================================
@@ -23676,22 +23676,6 @@ fi
done
-if test "$ac_cv_header_wchar_h" != "yes"; then
- for ac_header in wcstr.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "wcstr.h" "ac_cv_header_wcstr_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_wcstr_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_WCSTR_H 1
-_ACEOF
-
-fi
-
-done
-
-fi
-
if test "$USE_UNIX" = 1 ; then
for ac_header in sys/select.h
do :
@@ -24149,12 +24133,10 @@ else
#if defined(__DJGPP__) && !( (__GNUC_MINOR__ >= 8 && __GNUC__ == 2 ) || __GNUC__ >= 3 )
# error \"fake wchar_t\"
#endif
- #ifdef HAVE_WCHAR_H
- # ifdef __CYGWIN__
- # include <stddef.h>
- # endif
- # include <wchar.h>
+ #ifdef __CYGWIN__
+ # include <stddef.h>
#endif
+ #include <wchar.h>
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
@@ -32804,51 +32786,6 @@ $as_echo "$wx_cv_size_t_is_ulong" >&6; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if wchar_t is separate type" >&5
-$as_echo_n "checking if wchar_t is separate type... " >&6; }
-if ${wx_cv_wchar_t_is_separate_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-
- return 0; }
-
- struct Foo { void foo(wchar_t);
- void foo(unsigned short);
- void foo(unsigned int);
- void foo(unsigned long); };
-
- int bar() {
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- wx_cv_wchar_t_is_separate_type=yes
-else
- wx_cv_wchar_t_is_separate_type=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_wchar_t_is_separate_type" >&5
-$as_echo "$wx_cv_wchar_t_is_separate_type" >&6; }
-
-if test "$wx_cv_wchar_t_is_separate_type" = "yes"; then
- $as_echo "#define wxWCHAR_T_IS_REAL_TYPE 1" >>confdefs.h
-
-else
- $as_echo "#define wxWCHAR_T_IS_REAL_TYPE 0" >>confdefs.h
-
-fi
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -33276,31 +33213,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-wchar_headers="#include <stdio.h>
-#include <wchar.h>"
-case "${host}" in
- *-*-solaris2* )
- for ac_header in widec.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "widec.h" "ac_cv_header_widec_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_widec_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_WIDEC_H 1
-_ACEOF
-
-fi
-
-done
-
- if test "$ac_cv_header_widec_h" = "yes"; then
- wchar_headers="$wchar_headers
-#include <widec.h>"
- fi
-esac
-
- for wx_func in putws fputws wprintf vswprintf vswscanf
+ for wx_func in fputws wprintf vswprintf vswscanf
do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $wx_func" >&5
$as_echo_n "checking for $wx_func... " >&6; }
@@ -33312,7 +33226,8 @@ else
/* end confdefs.h. */
- $wchar_headers
+ #include <stdio.h>
+ #include <wchar.h>
$ac_includes_default
int
@@ -35148,7 +35063,7 @@ if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_PTHREAD_SETCONCURRENCY 1
_ACEOF
- $as_echo "#define HAVE_PTHREAD_SET_CONCURRENCY 1" >>confdefs.h
+ $as_echo "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
else
@@ -35780,27 +35695,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
- if test "x$ac_cv_func_which_gethostbyname_r" = "xno" -o \
- "x$ac_cv_func_which_gethostbyname_r" = "xunknown" ; then
- ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-if test "x$ac_cv_func_gethostbyname" = xyes; then :
- $as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
-
-else
-
- case "${host}" in
- *-*-haiku* )
- $as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Defining HAVE_GETHOSTBYNAME unconditionally under ${host}." >&5
-$as_echo "$as_me: WARNING: Defining HAVE_GETHOSTBYNAME unconditionally under ${host}." >&2;}
- ;;
- esac
-
-
-fi
-
- fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how many arguments getservbyname_r() takes" >&5
$as_echo_n "checking how many arguments getservbyname_r() takes... " >&6; }
@@ -35917,33 +35811,6 @@ elif test $ac_cv_func_which_getservbyname_r = four; then
fi
- if test "x$ac_cv_func_which_getservbyname_r" = "xno" -o \
- "x$ac_cv_func_which_getservbyname_r" = "xunknown" ; then
- for ac_func in getservbyname
-do :
- ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
-if test "x$ac_cv_func_getservbyname" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETSERVBYNAME 1
-_ACEOF
- $as_echo "#define HAVE_GETSERVBYNAME 1" >>confdefs.h
-
-else
-
- case "${host}" in
- *-*-haiku* )
- $as_echo "#define HAVE_GETSERVBYNAME 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Defining HAVE_GETSERVBYNAME unconditionally under ${host}." >&5
-$as_echo "$as_me: WARNING: Defining HAVE_GETSERVBYNAME unconditionally under ${host}." >&2;}
- ;;
- esac
-
-
-fi
-done
-
- fi
if test "$wxUSE_THREADS" = "yes"; then
$as_echo "#define wxUSE_THREADS 1" >>confdefs.h
=====================================
configure.ac
=====================================
@@ -1573,11 +1573,6 @@ dnl Note: non-empty last parameter makes check compile-only,
dnl skipping worthless preprocessing check
AC_CHECK_HEADERS(langinfo.h wchar.h,,, [AC_INCLUDES_DEFAULT])
-dnl maybe wchar_t is in wcstr.h if we don't have wchar.h?
-if test "$ac_cv_header_wchar_h" != "yes"; then
- AC_CHECK_HEADERS([wcstr.h],,, [AC_INCLUDES_DEFAULT()])
-fi
-
if test "$USE_UNIX" = 1 ; then
dnl POSIX needs this for select(), but old systems don't have it
AC_CHECK_HEADERS([sys/select.h],,, [AC_INCLUDES_DEFAULT()])
@@ -1630,12 +1625,10 @@ AC_CHECK_SIZEOF(wchar_t, 0,
#if defined(__DJGPP__) && !( (__GNUC_MINOR__ >= 8 && __GNUC__ == 2 ) || __GNUC__ >= 3 )
# error "fake wchar_t"
#endif
- #ifdef HAVE_WCHAR_H
- # ifdef __CYGWIN__
- # include <stddef.h>
- # endif
- # include <wchar.h>
+ #ifdef __CYGWIN__
+ # include <stddef.h>
#endif
+ #include <wchar.h>
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
@@ -3866,30 +3859,6 @@ else
fi
fi
-AC_CACHE_CHECK([if wchar_t is separate type],
- wx_cv_wchar_t_is_separate_type,
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <wchar.h>],
- [
- return 0; }
-
- struct Foo { void foo(wchar_t);
- void foo(unsigned short);
- void foo(unsigned int);
- void foo(unsigned long); };
-
- int bar() {
- ])],
- wx_cv_wchar_t_is_separate_type=yes,
- wx_cv_wchar_t_is_separate_type=no
- )
-)
-
-if test "$wx_cv_wchar_t_is_separate_type" = "yes"; then
- AC_DEFINE(wxWCHAR_T_IS_REAL_TYPE, 1)
-else
- AC_DEFINE(wxWCHAR_T_IS_REAL_TYPE, 0)
-fi
-
AC_LANG_POP() dnl C++
dnl ---------------------------------------------------------------------------
@@ -4071,21 +4040,9 @@ if test "$wx_cv_func_vsscanf" = "yes"; then
fi
AC_LANG_POP()
-dnl also look if we have wide char IO functions, notice that [f]putws are
-dnl declared in special widec.h under Solaris
-wchar_headers="#include <stdio.h>
-#include <wchar.h>"
-case "${host}" in
- *-*-solaris2* )
- AC_CHECK_HEADERS(widec.h,,, [AC_INCLUDES_DEFAULT()])
- if test "$ac_cv_header_widec_h" = "yes"; then
- wchar_headers="$wchar_headers
-#include <widec.h>"
- fi
-esac
-
-WX_CHECK_FUNCS(putws fputws wprintf vswprintf vswscanf,,,
- [$wchar_headers])
+WX_CHECK_FUNCS(fputws wprintf vswprintf vswscanf,,,
+ [#include <stdio.h>
+ #include <wchar.h>])
dnl MinGW has a vswprintf with a different prototype, and
dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS
@@ -4653,7 +4610,7 @@ if test "$TOOLKIT" != "MSW"; then
dnl do other tests only if we are using threads
if test "$wxUSE_THREADS" = "yes" ; then
AC_CHECK_FUNCS(pthread_setconcurrency,
- AC_DEFINE(HAVE_PTHREAD_SET_CONCURRENCY),
+ AC_DEFINE(HAVE_PTHREAD_SETCONCURRENCY),
[
AC_CHECK_FUNCS(thr_setconcurrency,
AC_DEFINE(HAVE_THR_SETCONCURRENCY),
@@ -4837,39 +4794,11 @@ dnl AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO), [
dnl related functions (taken from python's
configure.in)
dnl sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments
AX_FUNC_WHICH_GETHOSTBYNAME_R
- if test "x$ac_cv_func_which_gethostbyname_r" = "xno" -o \
- "x$ac_cv_func_which_gethostbyname_r" = "xunknown" ; then
- AC_CHECK_FUNC(gethostbyname, [ AC_DEFINE(HAVE_GETHOSTBYNAME) ],
- [
- dnl Under HaikuOS it is not yet detected
- case "${host}" in
- *-*-haiku* )
- AC_DEFINE(HAVE_GETHOSTBYNAME)
- AC_MSG_WARN([Defining HAVE_GETHOSTBYNAME unconditionally under ${host}.])
- ;;
- esac
- ]
- )
- fi
dnl A similar test for getservbyname_r
dnl I'm tempted to just not do this test which is taking much time and
dnl do something similar as for gethostbyaddr_r, but OTOH the macro
dnl doing the test already exists, so using it is easy enough. - SN
AC_raf_FUNC_WHICH_GETSERVBYNAME_R
- if test "x$ac_cv_func_which_getservbyname_r" = "xno" -o \
- "x$ac_cv_func_which_getservbyname_r" = "xunknown" ; then
- AC_CHECK_FUNCS(getservbyname,[ AC_DEFINE(HAVE_GETSERVBYNAME) ],
- [
- dnl Under HaikuOS it is not yet detected
- case "${host}" in
- *-*-haiku* )
- AC_DEFINE(HAVE_GETSERVBYNAME)
- AC_MSG_WARN([Defining HAVE_GETSERVBYNAME unconditionally under ${host}.])
- ;;
- esac
- ]
- )
- fi
dnl For gethostbyaddr_r, we currently do no separate test, instead, we
dnl silently assume it's available exactly if gethostbyname_r is
dnl available and always requires two more arguments than
=====================================
include/wx/android/config_android.h
=====================================
@@ -24,8 +24,6 @@
#define HAVE_NANOSLEEP
#define HAVE_FCNTL 1
#define HAVE_GCC_ATOMIC_BUILTINS
-#define HAVE_GETHOSTBYNAME 1
-#define HAVE_GETSERVBYNAME 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_GMTIME_R 1
#define HAVE_INET_ADDR 1
@@ -48,7 +46,6 @@
#define wxHAVE_PTHREAD_CLEANUP 1
#define wxNO_WOSTREAM
#define wxSIZE_T_IS_UINT 1
-#define wxWCHAR_T_IS_REAL_TYPE 1
#define wxUSE_SELECT_DISPATCHER 1
=====================================
include/wx/chartype.h
=====================================
@@ -25,64 +25,39 @@
checks for it. It's always 1 and can't be changed. */
#define wxUSE_WCHAR_T 1
-/*
- non Unix compilers which do have wchar.h (but not tchar.h which is included
- below and which includes wchar.h anyhow).
-
- Actually MinGW has tchar.h, but it does not include wchar.h
- */
-#if defined(__MINGW32__)
- #ifndef HAVE_WCHAR_H
- #define HAVE_WCHAR_H
+/* the current (as of Nov 2002) version of cygwin has a bug in its */
+/* wchar.h -- there is no extern "C" around the declarations in it */
+/* and this results in linking errors later; also, at least on some */
+/* Cygwin versions, wchar.h requires sys/types.h */
+#ifdef __CYGWIN__
+ #include <sys/types.h>
+ #ifdef __cplusplus
+ extern "C" {
#endif
-#endif
+#endif /* Cygwin */
+
+#include <wchar.h>
-#ifdef HAVE_WCHAR_H
- /* the current (as of Nov 2002) version of cygwin has a bug in its */
- /* wchar.h -- there is no extern "C" around the declarations in it */
- /* and this results in linking errors later; also, at least on some */
- /* Cygwin versions, wchar.h requires sys/types.h */
- #ifdef __CYGWIN__
- #include <sys/types.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #endif /* Cygwin */
-
- #include <wchar.h>
-
- #if defined(__CYGWIN__) && defined(__cplusplus)
+#if defined(__CYGWIN__) && defined(__cplusplus)
+ }
+#endif /* Cygwin and C++ */
+
+/* the current (as of Mar 2014) version of Android (up to api level 19) */
+/* doesn't include some declarations (wscdup, wcslen, wcscasecmp, etc.) */
+/* (moved out from __CYGWIN__ block) */
+#if defined(__WXQT__) && !defined(wcsdup) && defined(__ANDROID__)
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ extern wchar_t *wcsdup(const wchar_t *);
+ extern size_t wcslen (const wchar_t *);
+ extern size_t wcsnlen (const wchar_t *, size_t );
+ extern int wcscasecmp (const wchar_t *, const wchar_t *);
+ extern int wcsncasecmp (const wchar_t *, const wchar_t *, size_t);
+ #ifdef __cplusplus
}
- #endif /* Cygwin and C++ */
-
- /* the current (as of Mar 2014) version of Android (up to api level 19) */
- /* doesn't include some declarations (wscdup, wcslen, wcscasecmp, etc.) */
- /* (moved out from __CYGWIN__ block) */
- #if defined(__WXQT__) && !defined(wcsdup) && defined(__ANDROID__)
- #ifdef __cplusplus
- extern "C" {
- #endif
- extern wchar_t *wcsdup(const wchar_t *);
- extern size_t wcslen (const wchar_t *);
- extern size_t wcsnlen (const wchar_t *, size_t );
- extern int wcscasecmp (const wchar_t *, const wchar_t *);
- extern int wcsncasecmp (const wchar_t *, const wchar_t *, size_t);
- #ifdef __cplusplus
- }
- #endif
- #endif /* Android */
-
-#elif defined(HAVE_WCSTR_H)
- /* old compilers have relevant declarations here */
- #include <wcstr.h>
-#elif defined(__FreeBSD__) || defined(__DARWIN__)
- /* include stdlib.h for wchar_t */
- #include <stdlib.h>
-#endif /* HAVE_WCHAR_H */
-
-#ifdef HAVE_WIDEC_H
- #include <widec.h>
-#endif
+ #endif
+#endif /* Android */
/* -------------------------------------------------------------------------- */
/* define wxHAVE_TCHAR_SUPPORT for the compilers which support the TCHAR type */
=====================================
include/wx/defs.h
=====================================
@@ -994,31 +994,9 @@ typedef double wxFloat64;
typedef double wxDouble;
-/*
- Some (non standard) compilers typedef wchar_t as an existing type instead
- of treating it as a real fundamental type, set wxWCHAR_T_IS_REAL_TYPE to 0
- for them and to 1 for all the others.
- */
-#ifndef wxWCHAR_T_IS_REAL_TYPE
- /*
- VC++ typedefs wchar_t as unsigned short by default until VC8, that is
- unless /Za or /Zc:wchar_t option is used in which case _WCHAR_T_DEFINED
- is defined.
- */
-# if defined(__VISUALC__) && !defined(_NATIVE_WCHAR_T_DEFINED)
-# define wxWCHAR_T_IS_REAL_TYPE 0
-# else /* compiler having standard-conforming wchar_t */
-# define wxWCHAR_T_IS_REAL_TYPE 1
-# endif
-#endif /* !defined(wxWCHAR_T_IS_REAL_TYPE) */
-
-/* Helper macro for doing something dependent on whether wchar_t is or isn't a
- typedef inside another macro. */
-#if wxWCHAR_T_IS_REAL_TYPE
- #define wxIF_WCHAR_T_TYPE(x) x
-#else /* !wxWCHAR_T_IS_REAL_TYPE */
- #define wxIF_WCHAR_T_TYPE(x)
-#endif /* wxWCHAR_T_IS_REAL_TYPE/!wxWCHAR_T_IS_REAL_TYPE */
+/* Macros not used by wx any more but still defined here for compatibility. */
+#define wxWCHAR_T_IS_REAL_TYPE 1
+#define wxIF_WCHAR_T_TYPE(x) x
/*
Deprecated constant existing only for compatibility, use nullptr directly in
@@ -1040,7 +1018,7 @@ typedef double wxDouble;
m(unsigned long) \
wxIF_LONG_LONG_TYPE( m(wxLongLong_t) ) \
wxIF_LONG_LONG_TYPE( m(wxULongLong_t) ) \
- wxIF_WCHAR_T_TYPE( m(wchar_t) )
+ m(wchar_t)
/*
Same as wxDO_FOR_INT_TYPES() but does include char and unsigned char.
@@ -1070,7 +1048,7 @@ typedef double wxDouble;
m(unsigned long, arg) \
wxIF_LONG_LONG_TYPE( m(wxLongLong_t, arg) ) \
wxIF_LONG_LONG_TYPE( m(wxULongLong_t, arg) ) \
- wxIF_WCHAR_T_TYPE( m(wchar_t, arg) )
+ m(wchar_t, arg)
/*
Combination of wxDO_FOR_CHAR_INT_TYPES() and wxDO_FOR_INT_TYPES_1():
=====================================
include/wx/meta/implicitconversion.h
=====================================
@@ -57,16 +57,14 @@ WX_TYPE_HIERARCHY_LEVEL(11, float);
WX_TYPE_HIERARCHY_LEVEL(12, double);
WX_TYPE_HIERARCHY_LEVEL(13, long double);
-#if wxWCHAR_T_IS_REAL_TYPE
- #if SIZEOF_WCHAR_T == SIZEOF_SHORT
- template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<short> {};
- #elif SIZEOF_WCHAR_T == SIZEOF_INT
- template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<int> {};
- #elif SIZEOF_WCHAR_T == SIZEOF_LONG
- template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<long> {};
- #else
- #error "weird wchar_t size, please update this code"
- #endif
+#if SIZEOF_WCHAR_T == SIZEOF_SHORT
+ template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<short> {};
+#elif SIZEOF_WCHAR_T == SIZEOF_INT
+ template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<int> {};
+#elif SIZEOF_WCHAR_T == SIZEOF_LONG
+ template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<long> {};
+#else
+ #error "weird wchar_t size, please update this code"
#endif
#undef WX_TYPE_HIERARCHY_LEVEL
=====================================
include/wx/meta/pod.h
=====================================
@@ -45,9 +45,7 @@ WX_DECLARE_TYPE_POD(unsigned long int)
WX_DECLARE_TYPE_POD(float)
WX_DECLARE_TYPE_POD(double)
WX_DECLARE_TYPE_POD(long double)
-#if wxWCHAR_T_IS_REAL_TYPE
WX_DECLARE_TYPE_POD(wchar_t)
-#endif
WX_DECLARE_TYPE_POD(wxLongLong_t)
WX_DECLARE_TYPE_POD(wxULongLong_t)
=====================================
include/wx/osx/config_xcode.h
=====================================
@@ -71,10 +71,7 @@
#endif
#define SIZEOF_LONG_LONG 8
#define wxSIZE_T_IS_ULONG 1
-#define wxWCHAR_T_IS_REAL_TYPE 1
#define HAVE_FCNTL 1
-#define HAVE_GETHOSTBYNAME 1
-#define HAVE_GETSERVBYNAME 1
#define HAVE_GMTIME_R 1
#define HAVE_INET_ADDR 1
#define HAVE_INET_ATON 1
@@ -88,7 +85,6 @@
#define HAVE_X11_XKBLIB_H 1
#define HAVE_SCHED_H 1
#define HAVE_UNISTD_H 1
-#define HAVE_WCHAR_H 1
/* better to use the built-in CF conversions, also avoid iconv versioning problems */
/* #undef HAVE_ICONV */
#define ICONV_CONST
=====================================
include/wx/qt/dc.h
=====================================
@@ -140,8 +140,6 @@ protected:
bool m_isClipBoxValid = false;
- wxLayoutDirection m_layoutDir = wxLayout_Default;
-
private:
enum wxQtRasterColourOp
{
=====================================
include/wx/strvararg.h
=====================================
@@ -422,9 +422,7 @@ wxFORMAT_STRING_SPECIFIER(float, wxFormatString::Arg_Double)
wxFORMAT_STRING_SPECIFIER(double, wxFormatString::Arg_Double)
wxFORMAT_STRING_SPECIFIER(long double, wxFormatString::Arg_LongDouble)
-#if wxWCHAR_T_IS_REAL_TYPE
wxFORMAT_STRING_SPECIFIER(wchar_t, wxFormatString::Arg_Char | wxFormatString::Arg_Int)
-#endif
wxFORMAT_STRING_SPECIFIER(wxUniChar, wxFormatString::Arg_Char | wxFormatString::Arg_Int)
wxFORMAT_STRING_SPECIFIER(wxUniCharRef, wxFormatString::Arg_Char | wxFormatString::Arg_Int)
=====================================
include/wx/txtstrm.h
=====================================
@@ -62,9 +62,7 @@ public:
// Operators
wxTextInputStream& operator>>(wxString& word);
wxTextInputStream& operator>>(char& c);
-#if wxWCHAR_T_IS_REAL_TYPE
wxTextInputStream& operator>>(wchar_t& wc);
-#endif
wxTextInputStream& operator>>(wxInt16& i);
wxTextInputStream& operator>>(wxInt32& i);
wxTextInputStream& operator>>(wxInt64& i);
@@ -157,9 +155,7 @@ public:
wxTextOutputStream& operator<<(const wxString& string);
wxTextOutputStream& operator<<(char c);
-#if wxWCHAR_T_IS_REAL_TYPE
wxTextOutputStream& operator<<(wchar_t wc);
-#endif
wxTextOutputStream& operator<<(wxInt16 c);
wxTextOutputStream& operator<<(wxInt32 c);
wxTextOutputStream& operator<<(wxInt64 c);
=====================================
include/wx/wxcrtbase.h
=====================================
@@ -434,9 +434,6 @@ WXDLLIMPEXP_BASE wchar_t *wxCRT_StrtokW(wchar_t *psz, const wchar_t *delim, wcha
#ifdef HAVE_FPUTWS
#define wxCRT_FputsW fputws
#endif
-#ifdef HAVE_PUTWS
- #define wxCRT_PutsW putws
-#endif
#ifdef HAVE_FPUTWC
#define wxCRT_FputcW fputwc
#endif
=====================================
setup.h.in
=====================================
@@ -949,9 +949,6 @@
/* Define if size_t on your machine is the same type as unsigned long. */
#undef wxSIZE_T_IS_ULONG
-/* Define if wchar_t is distinct type in your compiler. */
-#undef wxWCHAR_T_IS_REAL_TYPE
-
/* Define if you have the dladdr function. */
#undef HAVE_DLADDR
@@ -973,12 +970,6 @@
/* Define if you have a gethostbyname_r function taking 5 arguments. */
#undef HAVE_FUNC_GETHOSTBYNAME_R_5
-/* Define if you have a gethostbyname_r function taking 3 arguments. */
-#undef HAVE_FUNC_GETHOSTBYNAME_R_3
-
-/* Define if you only have a gethostbyname function */
-#undef HAVE_GETHOSTBYNAME
-
/* Define if you have the gethostname function. */
#undef HAVE_GETHOSTNAME
@@ -988,12 +979,6 @@
/* Define if you have a getservbyname_r function taking 5 arguments. */
#undef HAVE_FUNC_GETSERVBYNAME_R_5
-/* Define if you have a getservbyname_r function taking 4 arguments. */
-#undef HAVE_FUNC_GETSERVBYNAME_R_4
-
-/* Define if you only have a getservbyname function */
-#undef HAVE_GETSERVBYNAME
-
/* Define if you have the gmtime_r function. */
#undef HAVE_GMTIME_R
@@ -1025,7 +1010,7 @@
#undef HAVE_THR_SETCONCURRENCY
/* Define if you have pthread_setconcurrency function */
-#undef HAVE_PTHREAD_SET_CONCURRENCY
+#undef HAVE_PTHREAD_SETCONCURRENCY
/* Define if you have the uname function. */
#undef HAVE_UNAME
@@ -1045,18 +1030,6 @@
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define if you have the <wchar.h> header file. */
-#undef HAVE_WCHAR_H
-
-/* Define if you have the <wcstr.h> header file. */
-#undef HAVE_WCSTR_H
-
-/* Define if you have <widec.h> (Solaris only) */
-#undef HAVE_WIDEC_H
-
/* Define if you have the <iconv.h> header file and iconv() symbol. */
#undef HAVE_ICONV
@@ -1072,9 +1045,6 @@
/* Define if you have wcsrtombs() function */
#undef HAVE_WCSRTOMBS
-/* Define this if you have putws() */
-#undef HAVE_PUTWS
-
/* Define this if you have fputws() */
#undef HAVE_FPUTWS
=====================================
setup.h_vms
=====================================
@@ -1022,9 +1022,6 @@ typedef pid_t GPid;
/* Define if size_t on your machine is the same type as unsigned long. */
#undef wxSIZE_T_IS_ULONG
-/* Define if wchar_t is distinct type in your compiler. */
-#define wxWCHAR_T_IS_REAL_TYPE 1
-
/* Define if you have the dladdr function. */
#undef HAVE_DLADDR
@@ -1043,12 +1040,6 @@ typedef pid_t GPid;
/* Define if you have a gethostbyname_r function taking 5 arguments. */
#undef HAVE_FUNC_GETHOSTBYNAME_R_5
-/* Define if you have a gethostbyname_r function taking 3 arguments. */
-#undef HAVE_FUNC_GETHOSTBYNAME_R_3
-
-/* Define if you only have a gethostbyname function */
-#define HAVE_GETHOSTBYNAME 1
-
/* Define if you have the gethostname function. */
#define HAVE_GETHOSTNAME 1
@@ -1058,12 +1049,6 @@ typedef pid_t GPid;
/* Define if you have a getservbyname_r function taking 5 arguments. */
#undef HAVE_FUNC_GETSERVBYNAME_R_5
-/* Define if you have a getservbyname_r function taking 4 arguments. */
-#undef HAVE_FUNC_GETSERVBYNAME_R_4
-
-/* Define if you only have a getservbyname function */
-#define HAVE_GETSERVBYNAME 1
-
/* Define if you have the gmtime_r function. */
#if __CRTL_VER >= 70000000 && \
(defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE)
@@ -1103,7 +1088,7 @@ typedef pid_t GPid;
#undef HAVE_THR_SETCONCURRENCY
/* Define if you have pthread_setconcurrency function */
-#define HAVE_PTHREAD_SET_CONCURRENCY 1
+#define HAVE_PTHREAD_SETCONCURRENCY 1
/* Define if you have the uname function. */
#define HAVE_UNAME 1
@@ -1124,15 +1109,6 @@ typedef pid_t GPid;
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
-/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define if you have the <wchar.h> header file. */
-#define HAVE_WCHAR_H 1
-
-/* Define if you have the <wcstr.h> header file. */
-#undef HAVE_WCSTR_H
-
/* Define if you have the <wctype.h> header file. */
#if __CRTL_VER >= 70312000
#define HAVE_WCTYPE_H 1
@@ -1140,9 +1116,6 @@ typedef pid_t GPid;
#undef HAVE_WCTYPE_H
#endif
-/* Define if you have <widec.h> (Solaris only) */
-#undef HAVE_WIDEC_H
-
/* Define if you have the <iconv.h> header file and iconv() symbol. */
#define HAVE_ICONV_H 1
@@ -1161,9 +1134,6 @@ typedef pid_t GPid;
/* Define if you have wcsrtombs() function */
#define HAVE_WCSRTOMBS 1
-/* Define this if you have putws() */
-#undef HAVE_PUTWS
-
/* Define this if you have fputws() */
#define HAVE_FPUTWS 1
=====================================
src/common/dcsvg.cpp
=====================================
@@ -408,6 +408,7 @@ wxSVGBitmapEmbedHandler::ProcessBitmap(const wxBitmap& bmp,
// write image meta information
wxString s;
+ s.reserve(data.size());
s += wxString::Format(" <image x=\"%d\" y=\"%d\" width=\"%dpx\" height=\"%dpx\"",
x, y, bmp.GetWidth(), bmp.GetHeight());
s += wxString::Format(" id=\"image%d\" "
@@ -415,13 +416,13 @@ wxSVGBitmapEmbedHandler::ProcessBitmap(const wxBitmap& bmp,
sub_images++);
// Wrap Base64 encoded data on 76 columns boundary (same as Inkscape).
- const unsigned WRAP = 76;
+ constexpr unsigned WRAP = 76;
for ( size_t i = 0; i < data.size(); i += WRAP )
{
if (i < data.size() - WRAP)
- s += data.Mid(i, WRAP) + "\n";
+ s += data.substr(i, WRAP) + "\n";
else
- s += data.Mid(i, s.size() - i) + "\"\n />\n"; // last line
+ s += data.substr(i) + "\"\n />\n"; // last line
}
// write to the SVG file
@@ -584,7 +585,7 @@ wxString wxSVGFileDCImpl::GetSVGDocument() const
wxString doc(m_svgDocument);
// Close remaining clipping group elements
- for (size_t i = 0; i < m_clipUniqueId; i++)
+ for (size_t i = 0; i < m_clipNestingLevel; i++)
doc += wxS("</g>\n");
doc += wxS("</g>\n</svg>\n");
@@ -1268,16 +1269,16 @@ void wxSVGFileDCImpl::DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, w
// graphics can be subsequently changed inside the clipping region)
svg << "</g>\n"
"<defs>\n"
- " <clipPath id=\"clip" << m_clipNestingLevel << "\">\n"
- " <rect id=\"cliprect" << m_clipNestingLevel << "\" "
+ " <clipPath id=\"clip" << m_clipUniqueId << "\">\n"
+ " <rect id=\"cliprect" << m_clipUniqueId << "\" "
"x=\"" << x << "\" "
"y=\"" << y << "\" "
"width=\"" << width << "\" "
"height=\"" << height << "\" "
- "stroke=\"gray\" fill=\"none\"/>\n"
+ "stroke=\"none\" fill=\"none\"/>\n"
" </clipPath>\n"
"</defs>\n"
- "<g clip-path=\"url(#clip" << m_clipNestingLevel << ")\">\n";
+ "<g clip-path=\"url(#clip" << m_clipUniqueId << ")\">\n";
write(svg);
@@ -1300,7 +1301,7 @@ void wxSVGFileDCImpl::DestroyClippingRegion()
svg << "</g>\n";
// Close clipping group elements
- for (size_t i = 0; i < m_clipUniqueId; i++)
+ for (size_t i = 0; i < m_clipNestingLevel; i++)
{
svg << "</g>\n";
}
@@ -1312,7 +1313,7 @@ void wxSVGFileDCImpl::DestroyClippingRegion()
// elements for the clipped region have been closed).
DoStartNewGraphics();
- m_clipUniqueId = 0;
+ m_clipNestingLevel = 0;
// Also update the base class clipping region information.
wxDCImpl::DestroyClippingRegion();
=====================================
src/common/sckaddr.cpp
=====================================
@@ -76,13 +76,6 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress);
#ifdef __WINDOWS__
#define HAVE_INET_ADDR
- #ifndef HAVE_GETHOSTBYNAME
- #define HAVE_GETHOSTBYNAME
- #endif
- #ifndef HAVE_GETSERVBYNAME
- #define HAVE_GETSERVBYNAME
- #endif
-
// under MSW getxxxbyname() functions are MT-safe (but not reentrant) so
// we don't need to serialize calls to them
#define wxHAS_MT_SAFE_GETBY_FUNCS
@@ -92,61 +85,22 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress);
#endif
#endif // __WINDOWS__
-// we assume that we have gethostbyaddr_r() if and only if we have
-// gethostbyname_r() and that it uses the similar conventions to it (see
-// comment in configure)
-//
-// this used not to be the case under older Android systems, where
-// gethostbyname_r() was available, but gethostbyaddr_r() wasn't, but it's not
-// clear if we still need to support the old NDKs, so for now keep things
-// simple -- and if we really need to account for this case, we'll add the
-// tests for gethostbyaddr_r() to configure later
-#define HAVE_GETHOSTBYADDR HAVE_GETHOSTBYNAME
-
-#ifdef HAVE_FUNC_GETHOSTBYNAME_R_3
- #define HAVE_FUNC_GETHOSTBYADDR_R_3
-#endif
#ifdef HAVE_FUNC_GETHOSTBYNAME_R_5
#define HAVE_FUNC_GETHOSTBYADDR_R_5
+ #define wxHAS_REENTRANT_GETHOSTBY_FUNCS
#endif
#ifdef HAVE_FUNC_GETHOSTBYNAME_R_6
#define HAVE_FUNC_GETHOSTBYADDR_R_6
+ #define wxHAS_REENTRANT_GETHOSTBY_FUNCS
#endif
-// the _r functions need the extra buffer parameter but unfortunately its type
-// differs between different systems and for the systems which use opaque
-// structs for it (at least AIX and OpenBSD) it must be zero-filled before
-// being passed to the system functions
-#ifdef HAVE_FUNC_GETHOSTBYNAME_R_3
- struct wxGethostBuf : hostent_data
- {
- wxGethostBuf()
- {
- memset(this, 0, sizeof(hostent_data));
- }
- };
-#else
- typedef char wxGethostBuf[4096];
-#endif
-
-#ifdef HAVE_FUNC_GETSERVBYNAME_R_4
- struct wxGetservBuf : servent_data
- {
- wxGetservBuf()
- {
- memset(this, 0, sizeof(servent_data));
- }
- };
-#else
- typedef char wxGetservBuf[4096];
-#endif
+typedef char wxGethostBuf[4096];
+typedef char wxGetservBuf[4096];
#if defined(wxHAS_MT_SAFE_GETBY_FUNCS) || !wxUSE_THREADS
#define wxLOCK_GETBY_MUTEX(name)
#else // may need mutexes to protect getxxxbyxxx() calls
- #if defined(HAVE_GETHOSTBYNAME) || \
- defined(HAVE_GETHOSTBYADDR) || \
- defined(HAVE_GETSERVBYNAME)
+ #ifndef wxHAS_REENTRANT_GETHOSTBY_FUNCS
#include "wx/thread.h"
namespace
@@ -164,10 +118,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress);
namespace
{
-#if defined(HAVE_GETHOSTBYNAME) && \
- !defined(HAVE_FUNC_GETHOSTBYNAME_R_6) && \
- !defined(HAVE_FUNC_GETHOSTBYNAME_R_5) && \
- !defined(HAVE_FUNC_GETHOSTBYNAME_R_3)
+#ifndef wxHAS_REENTRANT_GETHOSTBY_FUNCS
hostent *deepCopyHostent(hostent *h,
const hostent *he,
@@ -251,7 +202,7 @@ hostent *deepCopyHostent(hostent *h,
return h;
}
-#endif // HAVE_GETHOSTBYNAME
+#endif // !wxHAS_REENTRANT_GETHOSTBY_FUNCS
hostent *wxGethostbyname_r(const char *hostname,
hostent *h,
@@ -264,11 +215,8 @@ hostent *wxGethostbyname_r(const char *hostname,
gethostbyname_r(hostname, h, buffer, size, &he, err);
#elif defined(HAVE_FUNC_GETHOSTBYNAME_R_5)
he = gethostbyname_r(hostname, h, buffer, size, err);
-#elif defined(HAVE_FUNC_GETHOSTBYNAME_R_3)
- wxUnusedVar(var);
- *err = gethostbyname_r(hostname, h, &buffer);
- he = h;
-#elif defined(HAVE_GETHOSTBYNAME)
+#else
+ // Fall back on gethostbyname() which is assumed to be always available.
wxLOCK_GETBY_MUTEX(name);
he = gethostbyname(hostname);
@@ -276,8 +224,6 @@ hostent *wxGethostbyname_r(const char *hostname,
if ( he )
he = deepCopyHostent(h, he, buffer, size, err);
-#else
- #error "No gethostbyname[_r]()"
#endif
return he;
@@ -296,11 +242,8 @@ hostent *wxGethostbyaddr_r(const char *addr_buf,
gethostbyaddr_r(addr_buf, buf_size, proto, h, buffer, size, &he, err);
#elif defined(HAVE_FUNC_GETHOSTBYADDR_R_5)
he = gethostbyaddr_r(addr_buf, buf_size, proto, h, buffer, size, err);
-#elif defined(HAVE_FUNC_GETHOSTBYADDR_R_3)
- wxUnusedVar(size);
- *err = gethostbyaddr_r(addr_buf, buf_size, proto, h, &buffer);
- he = h;
-#elif defined(HAVE_GETHOSTBYADDR)
+#else
+ // Fall back on gethostbyaddr() which is assumed to be always available.
wxLOCK_GETBY_MUTEX(addr);
he = gethostbyaddr(addr_buf, buf_size, proto);
@@ -308,14 +251,12 @@ hostent *wxGethostbyaddr_r(const char *addr_buf,
if ( he )
he = deepCopyHostent(h, he, buffer, size, err);
-#else
- #error "No gethostbyaddr[_r]()"
#endif
return he;
}
-#if defined(HAVE_GETSERVBYNAME)
+#ifndef wxHAS_REENTRANT_GETHOSTBY_FUNCS
servent *deepCopyServent(servent *s,
servent *se,
char *buffer,
@@ -377,7 +318,7 @@ servent *deepCopyServent(servent *s,
s->s_aliases = s_aliases; /* copy pointer to pointers */
return s;
}
-#endif // HAVE_GETSERVBYNAME
+#endif // !wxHAS_REENTRANT_GETHOSTBY_FUNCS
servent *wxGetservbyname_r(const char *port,
const char *protocol,
@@ -390,18 +331,13 @@ servent *wxGetservbyname_r(const char *port,
getservbyname_r(port, protocol, serv, buffer, size, &se);
#elif defined(HAVE_FUNC_GETSERVBYNAME_R_5)
se = getservbyname_r(port, protocol, serv, buffer, size);
-#elif defined(HAVE_FUNC_GETSERVBYNAME_R_4)
- wxUnusedVar(size);
- if ( getservbyname_r(port, protocol, serv, &buffer) != 0 )
- return nullptr;
-#elif defined(HAVE_GETSERVBYNAME)
+#else
+ // Fall back on getservbyname() which is assumed to be always available.
wxLOCK_GETBY_MUTEX(serv);
se = getservbyname(port, protocol);
if ( se )
se = deepCopyServent(serv, se, buffer, size);
-#else
- #error "No getservbyname[_r]()"
#endif
return se;
}
=====================================
src/common/txtstrm.cpp
=====================================
@@ -348,8 +348,6 @@ wxTextInputStream& wxTextInputStream::operator>>(char& c)
return *this;
}
-#if wxWCHAR_T_IS_REAL_TYPE
-
wxTextInputStream& wxTextInputStream::operator>>(wchar_t& wc)
{
wc = GetChar();
@@ -357,8 +355,6 @@ wxTextInputStream& wxTextInputStream::operator>>(wchar_t& wc)
return *this;
}
-#endif // wxWCHAR_T_IS_REAL_TYPE
-
wxTextInputStream& wxTextInputStream::operator>>(wxInt16& i)
{
i = Read16S();
@@ -613,8 +609,6 @@ wxTextOutputStream& wxTextOutputStream::operator<<(char c)
return *this;
}
-#if wxWCHAR_T_IS_REAL_TYPE
-
wxTextOutputStream& wxTextOutputStream::operator<<(wchar_t wc)
{
PutChar(wc);
@@ -622,8 +616,6 @@ wxTextOutputStream& wxTextOutputStream::operator<<(wchar_t wc)
return *this;
}
-#endif // wxWCHAR_T_IS_REAL_TYPE
-
wxTextOutputStream& wxTextOutputStream::operator<<(wxInt16 c)
{
Write(c);
=====================================
src/qt/dc.cpp
=====================================
@@ -624,18 +624,18 @@ void wxQtDCImpl::DestroyClippingRegion()
wxLayoutDirection wxQtDCImpl::GetLayoutDirection() const
{
- if ( m_layoutDir == wxLayout_Default && m_window )
+ if ( m_qtPainter->isActive() )
{
- return m_window->GetLayoutDirection();
+ return m_qtPainter->layoutDirection() == Qt::RightToLeft
+ ? wxLayout_RightToLeft
+ : wxLayout_LeftToRight;
}
- return m_layoutDir;
+ return m_window ? m_window->GetLayoutDirection() : wxLayout_Default;
}
void wxQtDCImpl::SetLayoutDirection(wxLayoutDirection dir)
{
- m_layoutDir = dir;
-
// QPainter::setLayoutDirection() affects text drawing only.
// i.e.: painter's origin and axes orientations are not affected.
m_qtPainter->setLayoutDirection(dir == wxLayout_RightToLeft ? Qt::RightToLeft
@@ -956,6 +956,14 @@ bool wxQtDCImpl::DoBlit(wxCoord xdest, wxCoord ydest,
if ( !qtSource )
return false;
+ if ( GetLayoutDirection() == wxLayout_RightToLeft )
+ {
+ // blit is not mirrored
+ m_qtPainter->save();
+ m_qtPainter->scale(-1, 1);
+ xdest = -xdest - width;
+ }
+
// Change logical function
wxRasterOperationMode savedMode = GetLogicalFunction();
SetLogicalFunction( rop );
@@ -978,6 +986,11 @@ bool wxQtDCImpl::DoBlit(wxCoord xdest, wxCoord ydest,
SetLogicalFunction( savedMode );
+ if ( GetLayoutDirection() == wxLayout_RightToLeft )
+ {
+ m_qtPainter->restore();
+ }
+
return true;
}
=====================================
src/qt/dcmemory.cpp
=====================================
@@ -114,9 +114,11 @@ wxBitmap& wxMemoryDCImpl::GetSelectedBitmap()
void wxMemoryDCImpl::SetLayoutDirection(wxLayoutDirection dir)
{
- if ( m_layoutDir != dir )
+ const auto layoutDir = GetLayoutDirection();
+
+ if ( layoutDir != dir )
{
- if ( m_layoutDir == wxLayout_RightToLeft || dir == wxLayout_RightToLeft )
+ if ( layoutDir == wxLayout_RightToLeft || dir == wxLayout_RightToLeft )
{
int w;
GetSize(&w, nullptr);
@@ -125,6 +127,6 @@ void wxMemoryDCImpl::SetLayoutDirection(wxLayoutDirection dir)
m_qtPainter->scale(-1, 1);
}
- m_layoutDir = dir;
+ wxQtDCImpl::SetLayoutDirection(dir);
}
}
=====================================
src/unix/threadpsx.cpp
=====================================
@@ -1338,7 +1338,7 @@ wxThreadIdType wxThread::GetCurrentId()
bool wxThread::SetConcurrency(size_t level)
{
-#ifdef HAVE_PTHREAD_SET_CONCURRENCY
+#ifdef HAVE_PTHREAD_SETCONCURRENCY
int rc = pthread_setconcurrency( level );
#elif defined(HAVE_THR_SETCONCURRENCY)
int rc = thr_setconcurrency(level);
=====================================
tests/mbconv/mbconvtest.cpp
=====================================
@@ -24,10 +24,6 @@
#include "wx/private/localeset.h"
-#if defined wxHAVE_TCHAR_SUPPORT && !defined HAVE_WCHAR_H
- #define HAVE_WCHAR_H
-#endif
-
// ----------------------------------------------------------------------------
// Some wide character constants. "\uXXXX" escapes aren't supported by old
// compilers such as VC++ 5 and g++ 2.95.
@@ -81,7 +77,6 @@ private:
CPPUNIT_TEST( BufSize );
CPPUNIT_TEST( FromWCharTests );
CPPUNIT_TEST( NonBMPCharTests );
-#ifdef HAVE_WCHAR_H
CPPUNIT_TEST( UTF8_41 );
CPPUNIT_TEST( UTF8_7f );
CPPUNIT_TEST( UTF8_80 );
@@ -100,7 +95,6 @@ private:
CPPUNIT_TEST( UTF8_f4_8f_bf_bd );
CPPUNIT_TEST( UTF8PUA_f4_80_82_a5 );
CPPUNIT_TEST( UTF8Octal_backslash245 );
-#endif // HAVE_WCHAR_H
CPPUNIT_TEST_SUITE_END();
void WC2CP1250();
@@ -177,7 +171,6 @@ private:
int sizeofNull // the number of bytes occupied by a terminating null in the converter's encoding
);
-#ifdef HAVE_WCHAR_H
// UTF-8 tests. Test the first, last and one in the middle for sequences
// of each length
void UTF8_41() { UTF8("\x41", u41); }
@@ -215,7 +208,6 @@ private:
void UTF8PUA(const char *charSequence, const wchar_t *wideSequence);
void UTF8Octal(const char *charSequence, const wchar_t *wideSequence);
void UTF8(const char *charSequence, const wchar_t *wideSequence, int option);
-#endif // HAVE_WCHAR_H
wxDECLARE_NO_COPY_CLASS(MBConvTestCase);
};
@@ -1319,8 +1311,6 @@ void MBConvTestCase::TestStreamEncoder(
// UTF-8 tests
// ----------------------------------------------------------------------------
-#ifdef HAVE_WCHAR_H
-
// Check that 'charSequence' translates to 'wideSequence' and back.
// Invalid sequences can be tested by giving nullptr for 'wideSequence'. Even
// invalid sequences should roundtrip when an option is given and this is
@@ -1474,8 +1464,6 @@ void MBConvTestCase::UTF8(const char *charSequence,
UTF8ASSERT(strlen(bytesAgain) == resultAgain);
}
-#endif // HAVE_WCHAR_H
-
TEST_CASE("wxMBConv::cWC2MB", "[mbconv][wc2mb]")
{
wxMBConvUTF16 convUTF16;
=====================================
tests/strings/unichar.cpp
=====================================
@@ -42,7 +42,7 @@ private:
CPPUNIT_TEST( UnsignedLongCompare );
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( wxLongLongCompare ); )
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( wxULongLongCompare ); )
- wxIF_WCHAR_T_TYPE( CPPUNIT_TEST( WideCharCompare ); )
+ CPPUNIT_TEST( WideCharCompare );
CPPUNIT_TEST( UniCharAssignmentOperator );
CPPUNIT_TEST( UniCharRefAssignmentOperator );
CPPUNIT_TEST( CharAssignmentOperator );
@@ -55,7 +55,7 @@ private:
CPPUNIT_TEST( UnsignedLongAssignmentOperator );
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( wxLongLongAssignmentOperator ); )
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( wxULongLongAssignmentOperator ); )
- wxIF_WCHAR_T_TYPE( CPPUNIT_TEST( WideCharAssignmentOperator ); )
+ CPPUNIT_TEST( WideCharAssignmentOperator );
CPPUNIT_TEST( CharParenOperator );
CPPUNIT_TEST( UnsignedCharParenOperator );
CPPUNIT_TEST( ShortParenOperator );
@@ -66,7 +66,7 @@ private:
CPPUNIT_TEST( UnsignedLongParenOperator );
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( wxLongLongParenOperator ); )
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( wxULongLongParenOperator ); )
- wxIF_WCHAR_T_TYPE( CPPUNIT_TEST( WideCharParenOperator ); )
+ CPPUNIT_TEST( WideCharParenOperator );
CPPUNIT_TEST(RefUniCharAssignmentOperator);
CPPUNIT_TEST(RefUniCharRefAssignmentOperator);
CPPUNIT_TEST(RefCharAssignmentOperator);
@@ -78,7 +78,7 @@ private:
CPPUNIT_TEST( RefUnsignedLongAssignmentOperator );
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( RefwxLongLongAssignmentOperator ); )
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( RefwxULongLongAssignmentOperator ); )
- wxIF_WCHAR_T_TYPE( CPPUNIT_TEST( RefWideCharAssignmentOperator ); )
+ CPPUNIT_TEST( RefWideCharAssignmentOperator );
CPPUNIT_TEST(RefCharParenOperator);
CPPUNIT_TEST( RefShortParenOperator );
CPPUNIT_TEST( RefUnsignedShortParenOperator );
@@ -88,7 +88,7 @@ private:
CPPUNIT_TEST( RefUnsignedLongParenOperator );
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( RefwxLongLongParenOperator ); )
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( RefwxULongLongParenOperator ); )
- wxIF_WCHAR_T_TYPE( CPPUNIT_TEST( RefWideCharParenOperator ); )
+ CPPUNIT_TEST( RefWideCharParenOperator );
CPPUNIT_TEST( RefShortCompare );
CPPUNIT_TEST( RefUnsignedShortCompare );
CPPUNIT_TEST( RefIntCompare );
@@ -97,7 +97,7 @@ private:
CPPUNIT_TEST( RefUnsignedLongCompare );
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( RefwxLongLongCompare ); )
wxIF_LONG_LONG_TYPE( CPPUNIT_TEST( RefwxULongLongCompare ); )
- wxIF_WCHAR_T_TYPE( CPPUNIT_TEST( RefWideCharCompare ); )
+ CPPUNIT_TEST( RefWideCharCompare );
CPPUNIT_TEST( StringCompareIntl );
CPPUNIT_TEST_SUITE_END();
@@ -113,7 +113,7 @@ private:
void UnsignedLongCompare();
wxIF_LONG_LONG_TYPE( void wxLongLongCompare(); )
wxIF_LONG_LONG_TYPE( void wxULongLongCompare(); )
- wxIF_WCHAR_T_TYPE( void WideCharCompare(); )
+ void WideCharCompare();
void UniCharAssignmentOperator();
void UniCharRefAssignmentOperator();
void CharAssignmentOperator();
@@ -126,7 +126,7 @@ private:
void UnsignedLongAssignmentOperator();
wxIF_LONG_LONG_TYPE( void wxLongLongAssignmentOperator(); )
wxIF_LONG_LONG_TYPE( void wxULongLongAssignmentOperator(); )
- wxIF_WCHAR_T_TYPE( void WideCharAssignmentOperator(); )
+ void WideCharAssignmentOperator();
void CharParenOperator();
void UnsignedCharParenOperator();
void ShortParenOperator();
@@ -137,7 +137,7 @@ private:
void UnsignedLongParenOperator();
wxIF_LONG_LONG_TYPE( void wxLongLongParenOperator(); )
wxIF_LONG_LONG_TYPE( void wxULongLongParenOperator(); )
- wxIF_WCHAR_T_TYPE( void WideCharParenOperator(); )
+ void WideCharParenOperator();
void RefUniCharAssignmentOperator();
void RefUniCharRefAssignmentOperator();
void RefCharAssignmentOperator();
@@ -150,7 +150,7 @@ private:
void RefUnsignedLongAssignmentOperator();
wxIF_LONG_LONG_TYPE( void RefwxLongLongAssignmentOperator(); )
wxIF_LONG_LONG_TYPE( void RefwxULongLongAssignmentOperator(); )
- wxIF_WCHAR_T_TYPE( void RefWideCharAssignmentOperator(); )
+ void RefWideCharAssignmentOperator();
void RefCharParenOperator();
void RefUnsignedCharParenOperator();
void RefShortParenOperator();
@@ -161,7 +161,7 @@ private:
void RefUnsignedLongParenOperator();
wxIF_LONG_LONG_TYPE( void RefwxLongLongParenOperator(); )
wxIF_LONG_LONG_TYPE( void RefwxULongLongParenOperator(); )
- wxIF_WCHAR_T_TYPE( void RefWideCharParenOperator(); )
+ void RefWideCharParenOperator();
void RefShortCompare();
void RefUnsignedShortCompare();
void RefIntCompare();
@@ -170,7 +170,7 @@ private:
void RefUnsignedLongCompare();
wxIF_LONG_LONG_TYPE( void RefwxLongLongCompare(); )
wxIF_LONG_LONG_TYPE( void RefwxULongLongCompare(); )
- wxIF_WCHAR_T_TYPE( void RefWideCharCompare(); )
+ void RefWideCharCompare();
wxDECLARE_NO_COPY_CLASS(UniCharTestCase);
};
@@ -495,8 +495,6 @@ void UniCharTestCase::wxULongLongCompare()
#endif
-#if wxWCHAR_T_IS_REAL_TYPE
-
void UniCharTestCase::WideCharCompare()
{
wchar_t aVal = 2;
@@ -506,8 +504,6 @@ void UniCharTestCase::WideCharCompare()
wxUNICHAR_TEST_INT_COMPARE
}
-#endif
-
#undef wxUNICHAR_TEST_INT_COMPARE
#define wxUNICHAR_TEST_ASSIGNMENT_OPERATOR \
@@ -608,8 +604,6 @@ void UniCharTestCase::wxULongLongAssignmentOperator()
#endif
-#if wxWCHAR_T_IS_REAL_TYPE
-
void UniCharTestCase::WideCharAssignmentOperator()
{
wchar_t bVal = 2;
@@ -617,8 +611,6 @@ void UniCharTestCase::WideCharAssignmentOperator()
wxUNICHAR_TEST_ASSIGNMENT_OPERATOR
}
-#endif
-
#undef wxUNICHAR_TEST_ASSIGNMENT_OPERATOR
void UniCharTestCase::CharParenOperator()
@@ -726,8 +718,6 @@ void UniCharTestCase::wxULongLongParenOperator()
#endif
-#if wxWCHAR_T_IS_REAL_TYPE
-
void UniCharTestCase::WideCharParenOperator()
{
wchar_t aVal;
@@ -738,8 +728,6 @@ void UniCharTestCase::WideCharParenOperator()
CPPUNIT_ASSERT(aVal == bVal);
}
-#endif
-
void UniCharTestCase::RefUniCharAssignmentOperator()
{
wxString dummyStr('0');
@@ -879,8 +867,6 @@ void UniCharTestCase::RefwxULongLongAssignmentOperator()
#endif
-#if wxWCHAR_T_IS_REAL_TYPE
-
void UniCharTestCase::RefWideCharAssignmentOperator()
{
wxString dummyStr('0');
@@ -892,8 +878,6 @@ void UniCharTestCase::RefWideCharAssignmentOperator()
CPPUNIT_ASSERT(bRef == b);
}
-#endif
-
void UniCharTestCase::RefCharParenOperator()
{
char aVal;
@@ -1032,8 +1016,6 @@ void UniCharTestCase::RefwxULongLongParenOperator()
#endif
-#if wxWCHAR_T_IS_REAL_TYPE
-
void UniCharTestCase::RefWideCharParenOperator()
{
wchar_t aVal;
@@ -1048,8 +1030,6 @@ void UniCharTestCase::RefWideCharParenOperator()
CPPUNIT_ASSERT(aVal == bVal);
}
-#endif
-
#define wxUNICHARREF_TEST_INT_COMPARE \
wxUniChar a(aVal); \
wxString dummyStr("0"); \
@@ -1138,8 +1118,6 @@ void UniCharTestCase::RefwxULongLongCompare()
#endif
-#if wxWCHAR_T_IS_REAL_TYPE
-
void UniCharTestCase::RefWideCharCompare()
{
wchar_t aVal = 2;
@@ -1148,5 +1126,3 @@ void UniCharTestCase::RefWideCharCompare()
wxUNICHARREF_TEST_INT_COMPARE
}
-
-#endif
View it on GitLab:
https://gitlab.com/wxwidgets/wxwidgets/-/compare/236e5c2451fa8ddca85f9bdf8778c5c38d0083a2...e508f6bc9dbe599d8f7a38d9b6568f61992d19d1
--
View it on GitLab:
https://gitlab.com/wxwidgets/wxwidgets/-/compare/236e5c2451fa8ddca85f9bdf8778c5c38d0083a2...e508f6bc9dbe599d8f7a38d9b6568f61992d19d1
You're receiving this email because of your account on
gitlab.com. Manage all notifications:
https://gitlab.com/-/profile/notifications | Help:
https://gitlab.com/help