mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Fix compilation with the various omission compile definitions
This commit is contained in:
		| @@ -23,14 +23,21 @@ do | ||||
| 	sed -i "s/#include \"$i.h\"//g" $OUTPUT_PREFIX.c | ||||
| done | ||||
|  | ||||
|  | ||||
| echo "int main() { return 0; }" > main.c | ||||
| echo "Test compile with GCC..." | ||||
| gcc -pedantic -Wall main.c $OUTPUT_PREFIX.c -o test.out | ||||
| echo "Test compile with GCC ANSI..." | ||||
| gcc -ansi -pedantic -Wall main.c $OUTPUT_PREFIX.c -o test.out | ||||
| if command -v clang | ||||
| then | ||||
| 		echo "Test compile with clang..." | ||||
|         clang -Wall -Wpedantic -fsanitize=unsigned-integer-overflow main.c $OUTPUT_PREFIX.c -o test.out | ||||
| fi | ||||
| for def in MINIZ_NO_STDIO MINIZ_NO_TIME MINIZ_NO_ARCHIVE_APIS MINIZ_NO_ARCHIVE_WRITING_APIS MINIZ_NO_ZLIB_APIS MINIZ_NO_ZLIB_COMPATIBLE_NAMES MINIZ_NO_MALLOC | ||||
| do | ||||
| 	echo "Test compile with GCC and define $def..." | ||||
| 	gcc -ansi -pedantic -Wall main.c $OUTPUT_PREFIX.c -o test.out -D${def} | ||||
| done | ||||
| rm test.out | ||||
| rm main.c | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user