diff --git a/include/limits.h b/include/limits.h index f6cf8c9..fbf9271 100644 --- a/include/limits.h +++ b/include/limits.h @@ -67,6 +67,7 @@ #define WINT_MIN INT_MIN #define WINT_MAX INT_MAX +#define CHAR_WIDTH 8 #define WCHAR_WIDTH USHORT_WIDTH #if !defined(WCHAR_MIN) diff --git a/test/crt_functions.c b/test/crt_functions.c index 5a4da8c..e7efa06 100644 --- a/test/crt_functions.c +++ b/test/crt_functions.c @@ -578,8 +578,8 @@ int main(int argc, char **argv) { FILE *file = fopen("test_folder/seek", "wb"); TEST(file != NULL, "Created file is NULL"); TEST(fwrite(numbers, sizeof(int), 10, file) == 10, "fwrite didn't write all 10 objects"); + TEST(fflush(file) == 0, "fflush failed"); TEST(fseek(file, 4*sizeof(int), SEEK_SET) == 0, "fseek couldn't seek to offset 4"); - // TEST(fflush(file) == 0, "fflush failed"); int num; TEST(fread(&num, sizeof(int), 1, file) == 1, "fread didn't read the int"); TEST(num == 4, "Wrong value read at offset 4");