diff options
-rw-r--r-- | include/features.h | 11 | ||||
-rw-r--r-- | libc/stdio/stdio.c | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/features.h b/include/features.h index 475d62a85..880cd36ef 100644 --- a/include/features.h +++ b/include/features.h @@ -90,5 +90,16 @@ #include <bits/uClibc_config.h> #undef __need_uClibc_config_h + +#if 1 /* This only works with GNU ld, but that is what we use 'round these parts */ +#define link_warning(symbol, msg) \ +asm (".section " ".gnu.warning." #symbol "\n\t.previous"); \ +static const char __evoke_link_warning_##symbol[] \ +__attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg; +#else +# define link_warning(symbol, msg) +#endif + + #endif diff --git a/libc/stdio/stdio.c b/libc/stdio/stdio.c index 954318d39..a7dd8a3ba 100644 --- a/libc/stdio/stdio.c +++ b/libc/stdio/stdio.c @@ -314,6 +314,7 @@ char *fgets(char *s, int count, FILE *fp) #endif #ifdef L_gets +link_warning (gets, "the `gets' function is dangerous and should not be used.") char *gets(char *str) /* This is an UNSAFE function! */ { /* |