Merge pull request #1755 from cwoffenden/amalgamate-c99-fixes

C99 and older GCC fixes
This commit is contained in:
Yann Collet 2019-08-29 09:47:28 -07:00 committed by GitHub
commit ccb7c8e903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -9,6 +9,7 @@
*/ */
#include <stddef.h> #include <stddef.h>
#include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -45,8 +45,12 @@
* *
* Note: It's important that none of these affects 'zstd.h' (only the * Note: It's important that none of these affects 'zstd.h' (only the
* implementation files we're amalgamating). * implementation files we're amalgamating).
*
* Note: MEM_MODULE stops xxhash redefining BYTE, U16, etc., which are also
* defined in mem.h (breaking C99 compatibility).
*/ */
#define DEBUGLEVEL 0 #define DEBUGLEVEL 0
#define MEM_MODULE
#define XXH_NAMESPACE ZSTD_ #define XXH_NAMESPACE ZSTD_
#define XXH_PRIVATE_API #define XXH_PRIVATE_API
#define XXH_INLINE_ALL #define XXH_INLINE_ALL