Remove -ansi and make it compile under TCC
This commit is contained in:
parent
51b09f35ad
commit
41a1e23abf
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user