Define file type for fopen/fclose #if defined(__FILE_defined)
This way, the unit tests can build irrespective of the Linux distro.
#include <stdio.h>
+#if defined( __FILE_defined )
+ #define _STDIO_FILE_TYPE __FILE
+#else
+ #define _STDIO_FILE_TYPE _IO_FILE
+#endif
+
/**
* @file stdio_api.h
* @brief This file is used to generate mocks for functions used from <stdio.h>.
*/
/* Open a file and create a new stream for it. */
-extern _IO_FILE * fopen( const char * __filename,
+extern _STDIO_FILE_TYPE * fopen( const char * __filename,
const char * __modes );
/* Close STREAM. */
-extern int fclose( _IO_FILE * __stream );
+extern int fclose( _STDIO_FILE_TYPE * __stream );
#endif /* ifndef STDIO_API_H_ */
