File tree Expand file tree Collapse file tree 2 files changed +38
-9
lines changed Expand file tree Collapse file tree 2 files changed +38
-9
lines changed Original file line number Diff line number Diff line change 40
40
clang-format --version
41
41
cd test && make style_check
42
42
43
- ubuntu :
43
+ build-error-check-on-32bit :
44
44
runs-on : ubuntu-latest
45
45
if : >
46
46
(github.event_name == 'push') ||
@@ -53,10 +53,28 @@ jobs:
53
53
- arch_flags : -m32
54
54
arch_suffix : :i386
55
55
name : (32-bit)
56
- - arch_flags :
57
- arch_suffix :
58
- name : (64-bit)
59
- name : ubuntu ${{ matrix.config.name }}
56
+ steps :
57
+ - name : checkout
58
+ uses : actions/checkout@v4
59
+ - name : install libraries
60
+ run : |
61
+ sudo dpkg --add-architecture i386
62
+ sudo apt-get update
63
+ sudo apt-get install -y libc6-dev${{ matrix.config.arch_suffix }} libstdc++-13-dev${{ matrix.config.arch_suffix }} \
64
+ libssl-dev${{ matrix.config.arch_suffix }} libcurl4-openssl-dev${{ matrix.config.arch_suffix }} \
65
+ zlib1g-dev${{ matrix.config.arch_suffix }} libbrotli-dev${{ matrix.config.arch_suffix }} \
66
+ libzstd-dev${{ matrix.config.arch_suffix }}
67
+ - name : build and run tests (expect failure)
68
+ run : cd test && make test EXTRA_CXXFLAGS="${{ matrix.config.arch_flags }}"
69
+ continue-on-error : true
70
+
71
+ ubuntu :
72
+ runs-on : ubuntu-latest
73
+ if : >
74
+ (github.event_name == 'push') ||
75
+ (github.event_name == 'pull_request' &&
76
+ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) ||
77
+ (github.event_name == 'workflow_dispatch' && github.event.inputs.test_linux == 'true')
60
78
steps :
61
79
- name : checkout
62
80
uses : actions/checkout@v4
Original file line number Diff line number Diff line change 10
10
11
11
#define CPPHTTPLIB_VERSION " 0.22.0"
12
12
13
+ /*
14
+ * Platform compatibility check
15
+ */
16
+
17
+ #if defined(_WIN32) && !defined(_WIN64)
18
+ #error \
19
+ " cpp-httplib doesn't support 32-bit Windows. Please use a 64-bit compiler."
20
+ #elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ < 8
21
+ #error \
22
+ " cpp-httplib doesn't support 32-bit platforms. Please use a 64-bit compiler."
23
+ #elif defined(__SIZEOF_SIZE_T__) && __SIZEOF_SIZE_T__ < 8
24
+ #error \
25
+ " cpp-httplib doesn't support platforms where size_t is less than 64 bits."
26
+ #endif
27
+
13
28
/*
14
29
* Configuration
15
30
*/
177
192
178
193
#pragma comment(lib, "ws2_32.lib")
179
194
180
- #ifdef _WIN64
181
195
using ssize_t = __int64;
182
- #else
183
- using ssize_t = long ;
184
- #endif
185
196
#endif // _MSC_VER
186
197
187
198
#ifndef S_ISREG
You can’t perform that action at this time.
0 commit comments