|
Message-Id: <f69aec145bafa5df1636274b0703778dfb203ef5.1360968989.git.Jens.Gustedt@inria.fr> Date: Sat, 16 Feb 2013 00:24:30 +0100 From: Jens Gustedt <Jens.Gustedt@...ia.fr> To: musl@...ts.openwall.com Subject: [PATCH 4/5] add three macros for empty dummy functions that do nothing these are functions that receive arguments according to three different interfaces, void, void* or int. 31 0 src/internal/libc.h diff --git a/src/internal/libc.h b/src/internal/libc.h index a097a66..1f15f4d 100644 --- a/src/internal/libc.h +++ b/src/internal/libc.h @@ -73,6 +73,37 @@ extern char **__environ; #define weak_alias(old, new) \ extern __typeof(old) new __attribute__((weak, alias(#old))) +/* provide a weak function symbol for a function that receives no + arguments */ +#define WEAK_PROVIDE_VOID \ +_Weak \ +void __weak_dummy_void(void) { \ + /* empty */ \ +} \ +/* syntax sugar */ \ +_Weak void __weak_dummy_void(void) + +/* provide a weak function symbol for a function that receives a void + pointer argument */ +#define WEAK_PROVIDE_VOIDP \ +_Weak \ +void __weak_dummy_voidp(void* _ign) { \ + /* empty */ \ +} \ +/* syntax sugar */ \ +_Weak void __weak_dummy_voidp(void*) + +/* provide a weak function symbol for a function that receives an int + argument */ +#define WEAK_PROVIDE_INT \ +_Weak \ +void __weak_dummy_int(int _ign) { \ + /* empty */ \ +} \ +/* syntax sugar */ \ +_Weak void __weak_dummy_int(int _ign) + + #undef LFS64_2 #define LFS64_2(x, y) weak_alias(x, y) -- 1.7.9.5
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.