Last active
December 27, 2015 19:46
-
-
Save 0xabad1dea/dc142f4134aeb0ba9f60 to your computer and use it in GitHub Desktop.
banning macros
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* include this file AFTER your standard includes */ | |
/* clang -Weverything -Wno-unused-macros */ | |
/* SIGNED ARITHMETIC IS THE ENEMY. (use "signed" for main, etc.) */ | |
#define int BANNED | |
/* THESE OTHER THINGS ARE ALSO THE ENEMY. */ | |
#ifdef strcpy | |
#undef strcpy | |
#endif | |
#define strcpy BANNED | |
#ifdef strcat | |
#undef strcat | |
#endif | |
#define strcat BANNED | |
#ifdef strncat | |
#undef strncat | |
#endif | |
#define strncat BANNED | |
#ifdef strncpy | |
#undef strncpy | |
#endif | |
#define strncpy BANNED | |
#ifdef sprintf | |
#undef sprintf | |
#endif | |
#define sprintf BANNED |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment