Is there a difference whether I use the extern "C"
specifier for the entire header, or specify extern
for every function?
As far as I know, there is none, since only functions and variables can be linked externally, so when I use the extern
specifier before every function prototype and extern variable, I have no need to use the global extern "C"
declaration!?
Example A:
#ifdef __cplusplus
extern "C" {
#endif
void whatever(void);
#endif
Example B:
extern void whatever(void);