Add new IO functions

Related-To: NEO-5718

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2021-04-16 12:59:40 +02:00
committed by Compute-Runtime-Automation
parent 927c097b0e
commit e0b5f2f7f7
4 changed files with 51 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -13,5 +13,9 @@ fopenFuncPtr fopenPtr = &fopen;
vfprintfFuncPtr vfprintfPtr = &vfprintf;
fcloseFuncPtr fclosePtr = &fclose;
getenvFuncPtr getenvPtr = &getenv;
fseekFuncPtr fseekPtr = &fseek;
ftellFuncPtr ftellPtr = &ftell;
rewindFuncPtr rewindPtr = &rewind;
freadFuncPtr freadPtr = &fread;
} // namespace IoFunctions
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -16,11 +16,19 @@ using fopenFuncPtr = FILE *(*)(const char *, const char *);
using vfprintfFuncPtr = int (*)(FILE *, char const *const formatStr, va_list arg);
using fcloseFuncPtr = int (*)(FILE *);
using getenvFuncPtr = decltype(&getenv);
using fseekFuncPtr = decltype(&fseek);
using ftellFuncPtr = decltype(&ftell);
using rewindFuncPtr = decltype(&rewind);
using freadFuncPtr = decltype(&fread);
extern fopenFuncPtr fopenPtr;
extern vfprintfFuncPtr vfprintfPtr;
extern fcloseFuncPtr fclosePtr;
extern getenvFuncPtr getenvPtr;
extern fseekFuncPtr fseekPtr;
extern ftellFuncPtr ftellPtr;
extern rewindFuncPtr rewindPtr;
extern freadFuncPtr freadPtr;
inline int fprintf(FILE *fileDesc, char const *const formatStr, ...) {
va_list args;