COMMON: Forbid use of some more symbols

This commit is contained in:
Max Horn 2011-05-17 12:58:34 +02:00
parent a03ed0a3f7
commit 9b2ef340dc
2 changed files with 41 additions and 0 deletions

View File

@ -19,6 +19,10 @@
* IN THE SOFTWARE.
*/
// FIXME: Avoid using rand
#define FORBIDDEN_SYMBOL_EXCEPTION_rand
#include <stdlib.h>
#include <string.h>
#include <math.h>

View File

@ -244,6 +244,43 @@
#define setvbuf(a,b,c,d) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_tmpfile
#undef tmpfile
#define tmpfile() FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_tmpnam
#undef tmpnam
#define tmpnam(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_tempnam
#undef tempnam
#define tempnam(a,b) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_rand
#undef rand
#define rand() FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_srand
#undef srand
#define srand(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_random
#undef random
#define random() FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_srandom
#undef srandom
#define srandom(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
/*
* We also would like to disable the following symbols;
* however, these are also frequently used in regular code,