1
0
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:
bel
2016-03-18 21:16:10 +01:00
parent a41e091973
commit 6fb124abdf
2 changed files with 22 additions and 5 deletions

View File

@@ -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);
}

View File

@@ -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