>From b22efdb622840643501fb5f07991555e2a95b240 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Thu, 23 Feb 2012 21:19:10 +0100 Subject: [PATCH 1/2] Add deprecation warnings for deprecated functions and variable types in C code as well --- chicken.h | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/chicken.h b/chicken.h index 58d7533..c0ee2e5 100644 --- a/chicken.h +++ b/chicken.h @@ -245,6 +245,12 @@ void *alloca (); # define C_ccall __cdecl #endif +#if defined(__GNUC__) +# define C_deprecated __attribute__ ((deprecated)) +#else +# define C_deprecated +#endif + #ifndef C_cblock # define C_cblock do{ # define C_cblockend }while(0) @@ -330,7 +336,7 @@ void *alloca (); #define ___scheme_value C_word #define ___scheme_pointer void * /* `___byte_vector' is DEPRECATED */ -#define ___byte_vector unsigned char * +#define ___byte_vector C_deprecated unsigned char * #define ___blob void * #define ___pointer_vector void ** #define ___symbol char * @@ -1620,8 +1626,8 @@ C_fctexport void C_fcall C_trace(C_char *name) C_regparm; C_fctexport C_word C_fcall C_emit_trace_info2(char *raw, C_word x, C_word y, C_word t) C_regparm; C_fctexport C_word C_fcall C_u_i_string_hash(C_word str, C_word rnd) C_regparm; C_fctexport C_word C_fcall C_u_i_string_ci_hash(C_word str, C_word rnd) C_regparm; -C_fctexport C_word C_fcall C_hash_string(C_word str) C_regparm; /* DEPRECATED, INSECURE */ -C_fctexport C_word C_fcall C_hash_string_ci(C_word str) C_regparm; /* DEPRECATED, INSECURE */ +C_fctexport C_deprecated C_word C_fcall C_hash_string(C_word str) C_regparm; /* DEPRECATED, INSECURE */ +C_fctexport C_deprecated C_word C_fcall C_hash_string_ci(C_word str) C_regparm; /* DEPRECATED, INSECURE */ C_fctexport C_word C_halt(C_word msg); C_fctexport C_word C_message(C_word msg); C_fctexport C_word C_fcall C_equalp(C_word x, C_word y) C_regparm; -- 1.7.9.1