Remove -ansi and make it compile under TCC

This commit is contained in:
apio 2022-12-25 13:06:02 +01:00
parent 51b09f35ad
commit 41a1e23abf
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 8 additions and 3 deletions

View File

@ -19,7 +19,7 @@ set_target_properties(minitar PROPERTIES C_STANDARD_REQUIRED ON)
if (MSVC)
target_compile_options(minitar PRIVATE /W4 /WX)
else()
target_compile_options(minitar PRIVATE -Wall -Wextra -pedantic -Werror -ansi)
target_compile_options(minitar PRIVATE -Wall -Wextra -pedantic -Werror)
endif()
install(TARGETS minitar DESTINATION lib)

View File

@ -3,10 +3,15 @@
#include "tar.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdnoreturn.h>
#include <string.h>
#ifndef _MSC_VER
#ifndef __TINYC__
#include <stdnoreturn.h>
#else
#define noreturn _Noreturn
#endif
#if !defined(_MSC_VER) && !defined(__TINYC__)
#define WEAK __attribute__((weak))
#else
#define WEAK