5 * This header lists functions that have been banned from our code base,
6 * because they're too easy to misuse (and even if used correctly,
7 * complicate audits). Including this header turns them into compile-time
11 #define BANNED(func) sorry_##func##_is_a_banned_function
14 #define strcpy(x,y) BANNED(strcpy)
16 #define strcat(x,y) BANNED(strcat)
18 #define strncpy(x,y,n) BANNED(strncpy)
20 #define strncat(x,y,n) BANNED(strncat)
22 #define strtok(x,y) BANNED(strtok)
24 #define strtok_r(x,y,z) BANNED(strtok_r)
28 #define sprintf(...) BANNED(sprintf)
29 #define vsprintf(...) BANNED(vsprintf)
32 #define gmtime(t) BANNED(gmtime)
34 #define localtime(t) BANNED(localtime)
36 #define ctime(t) BANNED(ctime)
38 #define ctime_r(t, buf) BANNED(ctime_r)
40 #define asctime(t) BANNED(asctime)
42 #define asctime_r(t, buf) BANNED(asctime_r)