I am working on a C library which sometimes uses
static inline void myfunc(...)
when defining a function.
Now I try to port this to an old C compiler that does not support "static inline". This is bcc - Bruce's C compiler.
Can I use a command in a header file that replaces
static inline void
with
void
in all programs that include this header file?
When you must target a compiler that does not support certain features, it is common to use macros in your code, rather than trying to modify your code with macros.
In this situation you can define
STATIC_INLINE
macro in a compiler-dependent way, and use it like this: