executables use new util.h and platform.h

This commit is contained in:
Przemyslaw Skibinski 2016-12-21 09:06:14 +01:00
parent ead350bdc0
commit 16ae6563a2
11 changed files with 12 additions and 45 deletions

View File

@ -18,7 +18,6 @@
#include <stdio.h> /* fprintf, fopen, ftello64 */ #include <stdio.h> /* fprintf, fopen, ftello64 */
#include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */ #include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */
#include "mem.h"
#define ZSTD_STATIC_LINKING_ONLY #define ZSTD_STATIC_LINKING_ONLY
#include "zstd.h" #include "zstd.h"
#include "datagen.h" /* RDG_genBuffer */ #include "datagen.h" /* RDG_genBuffer */

View File

@ -20,22 +20,10 @@
/*-************************************ /*-************************************
* Dependencies * Dependencies
**************************************/ **************************************/
#include "util.h" /* U32 */
#include <stdlib.h> /* malloc, free */ #include <stdlib.h> /* malloc, free */
#include <stdio.h> /* FILE, fwrite, fprintf */ #include <stdio.h> /* FILE, fwrite, fprintf */
#include <string.h> /* memcpy */ #include <string.h> /* memcpy */
#include "mem.h" /* U32 */
/*-************************************
* OS-specific Includes
**************************************/
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
# include <fcntl.h> /* _O_BINARY */
# include <io.h> /* _setmode, _isatty */
# define SET_BINARY_MODE(file) {int unused = _setmode(_fileno(file), _O_BINARY); (void)unused; }
#else
# define SET_BINARY_MODE(file)
#endif
/*-************************************ /*-************************************

View File

@ -20,7 +20,6 @@
#include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */ #include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */
#include <errno.h> /* errno */ #include <errno.h> /* errno */
#include "mem.h" /* read */
#include "error_private.h" #include "error_private.h"
#include "dibio.h" #include "dibio.h"

View File

@ -30,7 +30,6 @@
#include <time.h> /* clock */ #include <time.h> /* clock */
#include <errno.h> /* errno */ #include <errno.h> /* errno */
#include "mem.h"
#include "fileio.h" #include "fileio.h"
#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_magicNumber, ZSTD_frameHeaderSize_max */ #define ZSTD_STATIC_LINKING_ONLY /* ZSTD_magicNumber, ZSTD_frameHeaderSize_max */
#include "zstd.h" #include "zstd.h"
@ -42,19 +41,6 @@
#endif #endif
/*-*************************************
* OS-specific Includes
***************************************/
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
# include <fcntl.h> /* _O_BINARY */
# include <io.h> /* _setmode, _isatty */
# define SET_BINARY_MODE(file) { if (_setmode(_fileno(file), _O_BINARY) == -1) perror("Cannot set _O_BINARY"); }
#else
# include <unistd.h> /* isatty */
# define SET_BINARY_MODE(file)
#endif
/*-************************************* /*-*************************************
* Constants * Constants
***************************************/ ***************************************/

View File

@ -12,9 +12,9 @@
* Dependencies * Dependencies
**************************************/ **************************************/
#include "platform.h" /* Compiler options */ #include "platform.h" /* Compiler options */
#include "util.h" /* U32 */
#include <stdio.h> /* fprintf, stderr */ #include <stdio.h> /* fprintf, stderr */
#include "datagen.h" /* RDG_generate */ #include "datagen.h" /* RDG_generate */
#include "mem.h" /* U32, U64 */
/*-************************************ /*-************************************

View File

@ -12,12 +12,11 @@
* Includes * Includes
**************************************/ **************************************/
#include "platform.h" /* Compiler options */ #include "platform.h" /* Compiler options */
#include "util.h" /* UTIL_GetFileSize */ #include "util.h" /* U32 */
#include <stdlib.h> /* malloc */ #include <stdlib.h> /* malloc */
#include <stdio.h> /* fprintf, fopen, ftello64 */ #include <stdio.h> /* fprintf, fopen, ftello64 */
#include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */ #include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */
#include "mem.h"
#ifndef ZSTD_DLL_IMPORT #ifndef ZSTD_DLL_IMPORT
#include "zstd_internal.h" /* ZSTD_blockHeaderSize, blockType_e, KB, MB */ #include "zstd_internal.h" /* ZSTD_blockHeaderSize, blockType_e, KB, MB */
#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_compressBegin, ZSTD_compressContinue, etc. */ #define ZSTD_STATIC_LINKING_ONLY /* ZSTD_compressBegin, ZSTD_compressContinue, etc. */

View File

@ -12,8 +12,6 @@
* Compiler specific * Compiler specific
**************************************/ **************************************/
#ifdef _MSC_VER /* Visual Studio */ #ifdef _MSC_VER /* Visual Studio */
# define _CRT_SECURE_NO_WARNINGS /* fgets */
# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
# pragma warning(disable : 4204) /* disable: C4204: non-constant aggregate initializer */ # pragma warning(disable : 4204) /* disable: C4204: non-constant aggregate initializer */
#endif #endif
@ -21,6 +19,8 @@
/*-************************************ /*-************************************
* Includes * Includes
**************************************/ **************************************/
#include "platform.h" /* Compiler options */
#include "util.h" /* U32 */
#include <stdlib.h> /* free */ #include <stdlib.h> /* free */
#include <stdio.h> /* fgets, sscanf */ #include <stdio.h> /* fgets, sscanf */
#include <string.h> /* strcmp */ #include <string.h> /* strcmp */
@ -30,7 +30,6 @@
#include "zstd_errors.h" /* ZSTD_getErrorCode */ #include "zstd_errors.h" /* ZSTD_getErrorCode */
#include "zdict.h" /* ZDICT_trainFromBuffer */ #include "zdict.h" /* ZDICT_trainFromBuffer */
#include "datagen.h" /* RDG_genBuffer */ #include "datagen.h" /* RDG_genBuffer */
#include "mem.h"
#define XXH_STATIC_LINKING_ONLY #define XXH_STATIC_LINKING_ONLY
#include "xxhash.h" /* XXH64 */ #include "xxhash.h" /* XXH64 */

View File

@ -12,14 +12,14 @@
* Dependencies * Dependencies
**************************************/ **************************************/
#include "platform.h" /* Compiler options */ #include "platform.h" /* Compiler options */
#include "util.h" /* UTIL_GetFileSize */ #include "util.h" /* UTIL_getFileSize */
#include <stdlib.h> /* malloc */ #include <stdlib.h> /* malloc */
#include <stdio.h> /* fprintf, fopen, ftello64 */ #include <stdio.h> /* fprintf, fopen, ftello64 */
#include <string.h> /* strcmp */ #include <string.h> /* strcmp */
#include <math.h> /* log */ #include <math.h> /* log */
#include <time.h> /* clock_t */ #include <time.h> /* clock_t */
#include "mem.h" #include "mem.h" /* MEM_32bits() */
#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_parameters, ZSTD_estimateCCtxSize */ #define ZSTD_STATIC_LINKING_ONLY /* ZSTD_parameters, ZSTD_estimateCCtxSize */
#include "zstd.h" #include "zstd.h"
#include "datagen.h" #include "datagen.h"

View File

@ -12,8 +12,6 @@
* Compiler specific * Compiler specific
**************************************/ **************************************/
#ifdef _MSC_VER /* Visual Studio */ #ifdef _MSC_VER /* Visual Studio */
# define _CRT_SECURE_NO_WARNINGS /* fgets */
# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
# pragma warning(disable : 4146) /* disable: C4146: minus unsigned expression */ # pragma warning(disable : 4146) /* disable: C4146: minus unsigned expression */
#endif #endif
@ -21,11 +19,12 @@
/*-************************************ /*-************************************
* Includes * Includes
**************************************/ **************************************/
#include "platform.h" /* Compiler options */
#include <stdlib.h> /* free */ #include <stdlib.h> /* free */
#include <stdio.h> /* fgets, sscanf */ #include <stdio.h> /* fgets, sscanf */
#include <time.h> /* clock_t, clock() */ #include <time.h> /* clock_t, clock() */
#include <string.h> /* strcmp */ #include <string.h> /* strcmp */
#include "mem.h" #include "mem.h" /* MEM_writeLE32 */
#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_maxCLevel */ #define ZSTD_STATIC_LINKING_ONLY /* ZSTD_maxCLevel */
#include "zstd.h" /* ZSTD_compressBound */ #include "zstd.h" /* ZSTD_compressBound */
#define ZBUFF_STATIC_LINKING_ONLY /* ZBUFF_createCCtx_advanced */ #define ZBUFF_STATIC_LINKING_ONLY /* ZBUFF_createCCtx_advanced */

View File

@ -12,8 +12,6 @@
* Compiler specific * Compiler specific
**************************************/ **************************************/
#ifdef _MSC_VER /* Visual Studio */ #ifdef _MSC_VER /* Visual Studio */
# define _CRT_SECURE_NO_WARNINGS /* fgets */
# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
# pragma warning(disable : 4146) /* disable: C4146: minus unsigned expression */ # pragma warning(disable : 4146) /* disable: C4146: minus unsigned expression */
#endif #endif
@ -21,11 +19,12 @@
/*-************************************ /*-************************************
* Includes * Includes
**************************************/ **************************************/
#include "platform.h" /* Compiler options */
#include <stdlib.h> /* free */ #include <stdlib.h> /* free */
#include <stdio.h> /* fgets, sscanf */ #include <stdio.h> /* fgets, sscanf */
#include <time.h> /* clock_t, clock() */ #include <time.h> /* clock_t, clock() */
#include <string.h> /* strcmp */ #include <string.h> /* strcmp */
#include "mem.h" #include "mem.h" /* MEM_writeLE32 */
#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_maxCLevel, ZSTD_customMem */ #define ZSTD_STATIC_LINKING_ONLY /* ZSTD_maxCLevel, ZSTD_customMem */
#include "zstd.h" /* ZSTD_compressBound */ #include "zstd.h" /* ZSTD_compressBound */
#include "zstd_errors.h" /* ZSTD_error_srcSize_wrong */ #include "zstd_errors.h" /* ZSTD_error_srcSize_wrong */

View File

@ -12,14 +12,13 @@
* Includes * Includes
***************************************/ ***************************************/
#include "platform.h" /* Compiler options */ #include "platform.h" /* Compiler options */
#include "util.h" /* UTIL_GetFileSize, UTIL_sleep */ #include "util.h" /* U32, UTIL_GetFileSize, UTIL_sleep */
#include <stdlib.h> /* malloc, free */ #include <stdlib.h> /* malloc, free */
#include <string.h> /* memset */ #include <string.h> /* memset */
#include <stdio.h> /* fprintf, fopen, ftello64 */ #include <stdio.h> /* fprintf, fopen, ftello64 */
#include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */ #include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */
#include <ctype.h> /* toupper */ #include <ctype.h> /* toupper */
#include "mem.h"
#define ZSTD_STATIC_LINKING_ONLY #define ZSTD_STATIC_LINKING_ONLY
#include "zstd.h" #include "zstd.h"
#include "datagen.h" /* RDG_genBuffer */ #include "datagen.h" /* RDG_genBuffer */