Add prototypes for functions called by macros in <stdio.h>.

This avoids lint errors when using the setbuf() and rewind() macros.

This fixes #42 (libco01.c).
This commit is contained in:
Stephen Heumann 2017-10-28 22:58:26 -05:00
parent 9144002b3b
commit dddae89af0

View File

@ -106,6 +106,10 @@ typedef long fpos_t;
#define setbuf(stream,buf) ((buf==NULL) ? (void) __setvbuf(stream,NULL,_IONBF,0l) : (void) __setvbuf(stream,buf,_IOFBF,(size_t) BUFSIZ)) #define setbuf(stream,buf) ((buf==NULL) ? (void) __setvbuf(stream,NULL,_IONBF,0l) : (void) __setvbuf(stream,buf,_IOFBF,(size_t) BUFSIZ))
#define rewind(stream) (__fseek((stream),0L,SEEK_SET)) #define rewind(stream) (__fseek((stream),0L,SEEK_SET))
/* Private functions used in the above macros (not to be used otherwise) */
int __setvbuf(FILE *, char *, int, size_t);
int __fseek(FILE *, long, int);
/* /*
* Function declarations * Function declarations
*/ */