Change stdlib includes to linux includes

This commit is contained in:
Nick Terrell 2017-03-30 11:40:05 -07:00
parent b3b41d0f6d
commit be7da5d98b
14 changed files with 14 additions and 21 deletions

View File

@ -11,7 +11,7 @@
#define ZSTD_H_235446
/* ====== Dependency ======*/
#include <stddef.h> /* size_t */
#include <linux/types.h> /* size_t */
/* ===== ZSTDLIB_API : control library symbols visibility ===== */

View File

@ -15,7 +15,7 @@
/* ****************************************
* Dependencies
******************************************/
#include <stddef.h> /* size_t */
#include <linux/types.h> /* size_t */
#include "zstd_errors.h" /* enum list */

View File

@ -38,7 +38,7 @@
/*-*****************************************
* Dependencies
******************************************/
#include <stddef.h> /* size_t, ptrdiff_t */
#include <linux/types.h> /* size_t, ptrdiff_t */
/*-*****************************************

View File

@ -41,9 +41,7 @@
/* **************************************************************
* Includes
****************************************************************/
#include <stdlib.h> /* malloc, free, qsort */
#include <string.h> /* memcpy, memset */
#include <stdio.h> /* printf (debug) */
#include <linux/string.h> /* memcpy, memset */
#include "bitstream.h"
#define FSE_STATIC_LINKING_ONLY
#include "fse.h"

View File

@ -42,8 +42,7 @@
/* **************************************************************
* Includes
****************************************************************/
#include <stdlib.h> /* malloc, free, qsort */
#include <string.h> /* memcpy, memset */
#include <linux/string.h> /* memcpy, memset */
#include "bitstream.h"
#define FSE_STATIC_LINKING_ONLY
#include "fse.h"

View File

@ -36,7 +36,7 @@
/* *** Dependencies *** */
#include <stddef.h> /* size_t */
#include <linux/types.h> /* size_t */
/* *** simple functions *** */

View File

@ -36,8 +36,7 @@
/* **************************************************************
* Includes
****************************************************************/
#include <string.h> /* memcpy, memset */
#include <stdio.h> /* printf (debug) */
#include <linux/string.h> /* memcpy, memset */
#include "bitstream.h"
#define FSE_STATIC_LINKING_ONLY /* FSE_optimalTableLog_internal */
#include "fse.h" /* header compression */

View File

@ -13,8 +13,8 @@
/*-****************************************
* Dependencies
******************************************/
#include <stddef.h> /* size_t, ptrdiff_t */
#include <string.h> /* memcpy */
#include <linux/types.h> /* size_t, ptrdiff_t */
#include <linux/string.h> /* memcpy */
/*-****************************************
@ -30,7 +30,6 @@ MEM_STATIC void MEM_check(void) { MEM_STATIC_ASSERT((sizeof(size_t)==4) || (size
/*-**************************************************************
* Basic Types
*****************************************************************/
#include <stdint.h>
typedef uint8_t BYTE;
typedef uint16_t U16;
typedef int16_t S16;

View File

@ -67,11 +67,10 @@
***************************************/
/* Modify the local functions below should you wish to use some other memory routines */
/* for malloc(), free() */
#include <stdlib.h>
static void* XXH_malloc(size_t s) { return malloc(s); }
static void XXH_free (void* p) { free(p); }
/* for memcpy() */
#include <string.h>
#include <linux/string.h>
static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcpy(dest,src,size); }
#ifndef XXH_STATIC_LINKING_ONLY

View File

@ -71,7 +71,7 @@ XXH32 6.8 GB/s 6.0 GB/s
/* ****************************
* Definitions
******************************/
#include <stddef.h> /* size_t */
#include <linux/types.h> /* size_t */
typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode;

View File

@ -12,7 +12,6 @@
/*-*************************************
* Dependencies
***************************************/
#include <stdlib.h> /* malloc */
#include "error_private.h"
#define ZSTD_STATIC_LINKING_ONLY
#include "zstd.h" /* declaration of ZSTD_isError, ZSTD_getErrorName, ZSTD_getErrorCode, ZSTD_getErrorString, ZSTD_versionNumber */

View File

@ -11,7 +11,7 @@
/*-*************************************
* Dependencies
***************************************/
#include <string.h> /* memset */
#include <linux/string.h> /* memset */
#include "mem.h"
#define FSE_STATIC_LINKING_ONLY /* FSE_encodeSymbol */
#include "fse.h"

View File

@ -24,7 +24,7 @@
/*-*******************************************************
* Dependencies
*********************************************************/
#include <string.h> /* memcpy, memmove, memset */
#include <linux/string.h> /* memcpy, memmove, memset */
#include "mem.h" /* low level memory routines */
#define FSE_STATIC_LINKING_ONLY
#include "fse.h"

View File

@ -11,7 +11,7 @@
#define ZSTD_ERRORS_H_398273423
/*===== dependency =====*/
#include <stddef.h> /* size_t */
#include <linux/types.h> /* size_t */
/* ===== ZSTDERRORLIB_API : control library symbols visibility ===== */