comparison internal.h @ 359:b951d460bcb4 libavutil

undef forbidden names before we #define them in case they are macros in libc
author mru
date Sun, 08 Jul 2007 15:56:31 +0000
parents 74b190a612c3
children 6661c25d55aa
comparison
equal deleted inserted replaced
358:f13e5473611e 359:b951d460bcb4
232 (c)=(d);\ 232 (c)=(d);\
233 } 233 }
234 #endif 234 #endif
235 235
236 /* avoid usage of various functions */ 236 /* avoid usage of various functions */
237 #undef malloc
237 #define malloc please_use_av_malloc 238 #define malloc please_use_av_malloc
239 #undef free
238 #define free please_use_av_free 240 #define free please_use_av_free
241 #undef realloc
239 #define realloc please_use_av_realloc 242 #define realloc please_use_av_realloc
243 #undef time
240 #define time time_is_forbidden_due_to_security_issues 244 #define time time_is_forbidden_due_to_security_issues
245 #undef rand
241 #define rand rand_is_forbidden_due_to_state_trashing_use_av_random 246 #define rand rand_is_forbidden_due_to_state_trashing_use_av_random
247 #undef srand
242 #define srand srand_is_forbidden_due_to_state_trashing_use_av_init_random 248 #define srand srand_is_forbidden_due_to_state_trashing_use_av_init_random
249 #undef random
243 #define random random_is_forbidden_due_to_state_trashing_use_av_random 250 #define random random_is_forbidden_due_to_state_trashing_use_av_random
251 #undef sprintf
244 #define sprintf sprintf_is_forbidden_due_to_security_issues_use_snprintf 252 #define sprintf sprintf_is_forbidden_due_to_security_issues_use_snprintf
253 #undef strcat
245 #define strcat strcat_is_forbidden_due_to_security_issues_use_av_strlcat 254 #define strcat strcat_is_forbidden_due_to_security_issues_use_av_strlcat
255 #undef exit
246 #define exit exit_is_forbidden 256 #define exit exit_is_forbidden
247 #if !(defined(LIBAVFORMAT_BUILD) || defined(FRAMEHOOK_H)) 257 #if !(defined(LIBAVFORMAT_BUILD) || defined(FRAMEHOOK_H))
258 #undef printf
248 #define printf please_use_av_log 259 #define printf please_use_av_log
260 #undef fprintf
249 #define fprintf please_use_av_log 261 #define fprintf please_use_av_log
250 #endif 262 #endif
251 263
252 #define CHECKED_ALLOCZ(p, size)\ 264 #define CHECKED_ALLOCZ(p, size)\
253 {\ 265 {\