COMMON: Make more symbols forbidden

This commit is contained in:
Max Horn 2011-06-06 17:05:35 +02:00
parent 96aed4d057
commit 0a2fb9a465
4 changed files with 46 additions and 5 deletions

View File

@ -79,6 +79,21 @@
#define FILE FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_stdin
#undef stdin
#define stdin FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_stdout
#undef stdout
#define stdout FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_stderr
#undef stderr
#define stderr FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_fopen
#undef fopen
#define fopen(a,b) FORBIDDEN_SYMBOL_REPLACEMENT
@ -124,22 +139,41 @@
#define fputc(a,b) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_fgets
#undef fgets
#define fgets(a,b,c) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_fputs
#undef fputs
#define fputs(a,b) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_getc
#undef getc
#define getc(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_getchar
#undef getchar
#define getchar() FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_putc
#undef putc
#define putc(a,b) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_gets
#undef gets
#define gets(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_puts
#undef puts
#define puts(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_getchar
#undef getchar
#define getchar() FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_putchar
#undef putchar
#define putchar(a) FORBIDDEN_SYMBOL_REPLACEMENT

View File

@ -24,6 +24,8 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
#define FORBIDDEN_SYMBOL_EXCEPTION_fputs
#define FORBIDDEN_SYMBOL_EXCEPTION_fflush
#define FORBIDDEN_SYMBOL_EXCEPTION_stdout
#define FORBIDDEN_SYMBOL_EXCEPTION_stderr
#include "common/system.h"
#include "common/events.h"

View File

@ -22,6 +22,7 @@
// FIXME: Avoid using fprintf
#define FORBIDDEN_SYMBOL_EXCEPTION_fprintf
#define FORBIDDEN_SYMBOL_EXCEPTION_stderr
#include "common/xmlparser.h"

View File

@ -4,6 +4,10 @@
** See Copyright Notice in lua.h
*/
#define FORBIDDEN_SYMBOL_EXCEPTION_stdin
#define FORBIDDEN_SYMBOL_EXCEPTION_stderr
#define FORBIDDEN_SYMBOL_EXCEPTION_fputs
#define FORBIDDEN_SYMBOL_EXCEPTION_fgets
#include <stdio.h>
#include <stdlib.h>