Skip to content

Commit ea9298c

Browse files
committed
redpanda-cpp: move to ucrt
1 parent d2ca3fa commit ea9298c

File tree

3 files changed

+5
-50
lines changed

3 files changed

+5
-50
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ jobs:
77
name: Build
88
strategy:
99
matrix:
10-
arch: [32]
10+
arch: [32, 64]
1111
runs-on: windows-2019
1212
defaults:
1313
run:
1414
shell: bash
1515
env:
1616
_QT_VERSION: "5.15.13"
17-
_QT_NAME: mingw114_${{ matrix.arch }}-redpanda
18-
_REDPANDA_MINGW_RELEASE: "11.4.0-r0"
17+
_QT_NAME: mingw132_${{ matrix.arch }}-redpanda
18+
_MINGW_LITE_RELEASE: "13.2.0-r4"
1919

2020
steps:
2121
- uses: actions/checkout@v2
2222

2323
- name: Setup toolchain
2424
run: |
25-
curl -LO https://github.com/redpanda-cpp/toolchain-win32-mingw-xp/releases/download/$_REDPANDA_MINGW_RELEASE/mingw32-$_REDPANDA_MINGW_RELEASE.7z
26-
7z x mingw32-$_REDPANDA_MINGW_RELEASE.7z
25+
curl -LO https://github.com/redpanda-cpp/mingw-lite/releases/download/$_MINGW_LITE_RELEASE/mingw${{ matrix.arch }}-ucrt-$_MINGW_LITE_RELEASE.7z
26+
7z x mingw${{ matrix.arch }}-ucrt-$_MINGW_LITE_RELEASE.7z
2727
2828
- name: Prepare source
2929
run: |

mkspecs/common/g++-win32.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ MAKEFILE_GENERATOR = MINGW
1919
QMAKE_PLATFORM = win32 mingw
2020
CONFIG += debug_and_release debug_and_release_target precompile_header
2121
DEFINES += UNICODE _UNICODE WIN32 MINGW_HAS_SECURE_API=1
22-
DEFINES_RELEASE += NDEBUG
2322
QMAKE_COMPILER_DEFINES += __GNUC__ _WIN32
2423
# can't add 'DEFINES += WIN64' and 'QMAKE_COMPILER_DEFINES += _WIN64' defines for
2524
# x86_64 platform similar to 'msvc-desktop.conf' toolchain, because, unlike for MSVC,

src/corelib/global/qt_windows.h

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -872,46 +872,6 @@ namespace WinXPThunk {
872872
}
873873
} // namespace Kernel32
874874

875-
namespace MSVCRT {
876-
// Windows Vista
877-
inline errno_t _wgetenv_s(
878-
size_t *pReturnValue,
879-
wchar_t *buffer,
880-
size_t numberOfElements,
881-
const wchar_t *varname
882-
) {
883-
using type = decltype(&_wgetenv_s);
884-
static type real = (type)GetProcAddress(GetModuleHandleW(L"msvcrt.dll"), "_wgetenv_s");
885-
if (real)
886-
return real(pReturnValue, buffer, numberOfElements, varname);
887-
888-
if (!pReturnValue || !varname)
889-
return EINVAL;
890-
if (!buffer && numberOfElements > 0)
891-
return EINVAL;
892-
893-
wchar_t *env = _wgetenv(varname);
894-
if (env) {
895-
size_t len = wcslen(env) + 1;
896-
if (len > numberOfElements) {
897-
*pReturnValue = len;
898-
if (buffer)
899-
buffer[0] = L'\0';
900-
return ERANGE;
901-
} else {
902-
*pReturnValue = len;
903-
wcscpy(buffer, env);
904-
return 0;
905-
}
906-
} else {
907-
*pReturnValue = 0;
908-
if (buffer && numberOfElements > 0)
909-
buffer[0] = L'\0';
910-
return 0;
911-
}
912-
}
913-
} // namespace MSVCRT
914-
915875
namespace Shell32 {
916876
namespace Detail {
917877
struct GuidComp {
@@ -1238,10 +1198,6 @@ template<> inline const GUID &__mingw_uuidof<WinXPType::IFileDialogEvents>() {
12381198
#define GetUserPreferredUILanguages WinXPThunk::Kernel32::GetUserPreferredUILanguages
12391199
#define RaiseFailFastException WinXPThunk::Kernel32::RaiseFailFastException
12401200

1241-
#ifndef _UCRT
1242-
# define _wgetenv_s WinXPThunk::MSVCRT::_wgetenv_s
1243-
#endif
1244-
12451201
#define SHCreateItemFromIDList WinXPThunk::Shell32::SHCreateItemFromIDList
12461202
#define SHCreateItemFromParsingName WinXPThunk::Shell32::SHCreateItemFromParsingName
12471203
#define SHGetKnownFolderIDList WinXPThunk::Shell32::SHGetKnownFolderIDList

0 commit comments

Comments
 (0)