Commit 1b7cf555 authored by mru's avatar mru

undef forbidden names before we #define them in case they are macros in libc


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9545 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3be21385
...@@ -234,18 +234,30 @@ if((y)<(x)){\ ...@@ -234,18 +234,30 @@ if((y)<(x)){\
#endif #endif
/* avoid usage of various functions */ /* avoid usage of various functions */
#undef malloc
#define malloc please_use_av_malloc #define malloc please_use_av_malloc
#undef free
#define free please_use_av_free #define free please_use_av_free
#undef realloc
#define realloc please_use_av_realloc #define realloc please_use_av_realloc
#undef time
#define time time_is_forbidden_due_to_security_issues #define time time_is_forbidden_due_to_security_issues
#undef rand
#define rand rand_is_forbidden_due_to_state_trashing_use_av_random #define rand rand_is_forbidden_due_to_state_trashing_use_av_random
#undef srand
#define srand srand_is_forbidden_due_to_state_trashing_use_av_init_random #define srand srand_is_forbidden_due_to_state_trashing_use_av_init_random
#undef random
#define random random_is_forbidden_due_to_state_trashing_use_av_random #define random random_is_forbidden_due_to_state_trashing_use_av_random
#undef sprintf
#define sprintf sprintf_is_forbidden_due_to_security_issues_use_snprintf #define sprintf sprintf_is_forbidden_due_to_security_issues_use_snprintf
#undef strcat
#define strcat strcat_is_forbidden_due_to_security_issues_use_av_strlcat #define strcat strcat_is_forbidden_due_to_security_issues_use_av_strlcat
#undef exit
#define exit exit_is_forbidden #define exit exit_is_forbidden
#if !(defined(LIBAVFORMAT_BUILD) || defined(FRAMEHOOK_H)) #if !(defined(LIBAVFORMAT_BUILD) || defined(FRAMEHOOK_H))
#undef printf
#define printf please_use_av_log #define printf please_use_av_log
#undef fprintf
#define fprintf please_use_av_log #define fprintf please_use_av_log
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment