[F] Fix compilation for tcc
This commit is contained in:
		@@ -4,6 +4,10 @@
 | 
			
		||||
 | 
			
		||||
- Fix undefined behavior due to incorrect usage of `isprint` function.
 | 
			
		||||
 | 
			
		||||
### Internal
 | 
			
		||||
 | 
			
		||||
- Fix compilation for compilers other than gcc, clang, msvc.
 | 
			
		||||
 | 
			
		||||
## v0.3.1
 | 
			
		||||
 | 
			
		||||
### Bug fixes
 | 
			
		||||
 
 | 
			
		||||
@@ -436,7 +436,10 @@ extern "C" {
 | 
			
		||||
#define utf8_restrict __restrict
 | 
			
		||||
#define utf8_weak __inline
 | 
			
		||||
#else
 | 
			
		||||
#error Non clang, non gcc, non MSVC compiler found!
 | 
			
		||||
#define utf8_nonnull
 | 
			
		||||
#define utf8_pure
 | 
			
		||||
#define utf8_restrict
 | 
			
		||||
#define utf8_weak
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
@@ -3566,7 +3569,7 @@ char g_col_separator = FORT_DEFAULT_COL_SEPARATOR;
 | 
			
		||||
 *               LIBFORT helpers
 | 
			
		||||
 *****************************************************************************/
 | 
			
		||||
 | 
			
		||||
#ifndef FT_MICROSOFT_COMPILER
 | 
			
		||||
#if defined(FT_GCC_COMPILER) || defined(FT_CLANG_COMPILER)
 | 
			
		||||
void *(*fort_malloc)(size_t size) = &malloc;
 | 
			
		||||
void (*fort_free)(void *ptr) = &free;
 | 
			
		||||
void *(*fort_calloc)(size_t nmemb, size_t size) = &calloc;
 | 
			
		||||
@@ -3637,7 +3640,7 @@ void set_memory_funcs(void *(*f_malloc)(size_t size), void (*f_free)(void *ptr))
 | 
			
		||||
           || (f_malloc != NULL && f_free != NULL) /* Use custom functions */);
 | 
			
		||||
 | 
			
		||||
    if (f_malloc == NULL && f_free == NULL) {
 | 
			
		||||
#ifndef FT_MICROSOFT_COMPILER
 | 
			
		||||
#if defined(FT_GCC_COMPILER) || defined(FT_CLANG_COMPILER)
 | 
			
		||||
        fort_malloc = &malloc;
 | 
			
		||||
        fort_free = &free;
 | 
			
		||||
        fort_calloc = &calloc;
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ char g_col_separator = FORT_DEFAULT_COL_SEPARATOR;
 | 
			
		||||
 *               LIBFORT helpers
 | 
			
		||||
 *****************************************************************************/
 | 
			
		||||
 | 
			
		||||
#ifndef FT_MICROSOFT_COMPILER
 | 
			
		||||
#if defined(FT_GCC_COMPILER) || defined(FT_CLANG_COMPILER)
 | 
			
		||||
void *(*fort_malloc)(size_t size) = &malloc;
 | 
			
		||||
void (*fort_free)(void *ptr) = &free;
 | 
			
		||||
void *(*fort_calloc)(size_t nmemb, size_t size) = &calloc;
 | 
			
		||||
@@ -85,7 +85,7 @@ void set_memory_funcs(void *(*f_malloc)(size_t size), void (*f_free)(void *ptr))
 | 
			
		||||
           || (f_malloc != NULL && f_free != NULL) /* Use custom functions */);
 | 
			
		||||
 | 
			
		||||
    if (f_malloc == NULL && f_free == NULL) {
 | 
			
		||||
#ifndef FT_MICROSOFT_COMPILER
 | 
			
		||||
#if defined(FT_GCC_COMPILER) || defined(FT_CLANG_COMPILER)
 | 
			
		||||
        fort_malloc = &malloc;
 | 
			
		||||
        fort_free = &free;
 | 
			
		||||
        fort_calloc = &calloc;
 | 
			
		||||
 
 | 
			
		||||
@@ -71,7 +71,10 @@ extern "C" {
 | 
			
		||||
#define utf8_restrict __restrict
 | 
			
		||||
#define utf8_weak __inline
 | 
			
		||||
#else
 | 
			
		||||
#error Non clang, non gcc, non MSVC compiler found!
 | 
			
		||||
#define utf8_nonnull
 | 
			
		||||
#define utf8_pure
 | 
			
		||||
#define utf8_restrict
 | 
			
		||||
#define utf8_weak
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user