mirror of
https://github.com/lammertb/libhttp.git
synced 2026-01-03 16:02:30 +03:00
Print data model with system information
This commit is contained in:
17
src/main.c
17
src/main.c
@@ -969,6 +969,23 @@ start_civetweb(int argc, char *argv[])
|
||||
#else
|
||||
fprintf(stdout, "Other\n");
|
||||
#endif
|
||||
/* Determine 32/64 bit data mode.
|
||||
* see https://en.wikipedia.org/wiki/64-bit_computing */
|
||||
fprintf(stdout,
|
||||
"Data model: i:%u/%u/%u/%u, f:%u/%u/%u, c:%u/%u, "
|
||||
"p:%u, s:%u, t:%u",
|
||||
sizeof(short),
|
||||
sizeof(int),
|
||||
sizeof(long),
|
||||
sizeof(long long),
|
||||
sizeof(float),
|
||||
sizeof(double),
|
||||
sizeof(long double),
|
||||
sizeof(char),
|
||||
sizeof(wchar_t),
|
||||
sizeof(void *),
|
||||
sizeof(size_t),
|
||||
sizeof(time_t));
|
||||
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -1082,17 +1082,17 @@ START_TEST(test_request_handlers)
|
||||
|
||||
(void)expected_cgi_result;
|
||||
(void)cgi_script_content;
|
||||
#else
|
||||
#else
|
||||
i = mg_read(client_conn, buf, sizeof(buf));
|
||||
if ((i >= 0) && (i < (int)sizeof(buf))) {
|
||||
while ((i > 0) && ((buf[i - 1] == '\r') || (buf[i - 1] == '\n'))) {
|
||||
i--;
|
||||
}
|
||||
buf[i] = 0;
|
||||
}
|
||||
/* ck_assert_int_eq(i, (int)strlen(expected_cgi_result)); */
|
||||
ck_assert_str_eq(buf, expected_cgi_result);
|
||||
ck_assert_str_eq(ri->uri, "200");
|
||||
}
|
||||
/* ck_assert_int_eq(i, (int)strlen(expected_cgi_result)); */
|
||||
ck_assert_str_eq(buf, expected_cgi_result);
|
||||
ck_assert_str_eq(ri->uri, "200");
|
||||
mg_close_connection(client_conn);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user