RSIM Bug Report #11

Version of RSIM1.0
Bug number11
Bug class4
Date10/15/98
Reported byInternal
AffectsInput/output macros
Filesrsim_apps.h

Problem Description

Certain input/output functions such as getc, putc, feof, etc., are defined as macros in the stdio.h file in the standard C library; the gcc libraries used with RSIM support a different format. This may lead to compile-time or run-time errors.

Suggested work-around

All application source files should include the rsim_apps.h file which should have the following lines of code added. #include <stdio.h> #undef feof #undef ferror #undef clearerr #undef fileno #undef getc #undef putc #undef getc_unlocked #undef putc_unlocked #define getc fgetc #define putc fputc