I am porting some code to an 8051. (header.h)
typedef int (Writer) (int , u_char * , u_char , size_t , u_char * , int *) reentrant;
Writer bob;
. . . int bob(int val1, u_char * dat1, u_char dat2, size_t val2, u_char * dat3, int *pval) reentrant { }
//Comment out Writer bob; int (bob)(int val1, u_char * dat1, u_char dat2, size_t val2, u_char * dat3, int *pval) reentrant;
The .h file provides a "prototype" of a function to be defined elsewhere. That what it should do, for ordinary functions. But the case at hand is different, because
"the proper way of making sure of this is to always include the module's header file into its own .c file." Yep - that's what I always say!