xref: /openbsd-src/lib/libc/hidden/stdio.h (revision 4487cc5a9622d40fb74f2df5cb026438772af5a5)
1*4487cc5aSguenther /*	$OpenBSD: stdio.h,v 1.8 2022/05/14 05:06:32 guenther Exp $	*/
29b9d2a55Sguenther /*
39b9d2a55Sguenther  * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
49b9d2a55Sguenther  *
59b9d2a55Sguenther  * Permission to use, copy, modify, and distribute this software for any
69b9d2a55Sguenther  * purpose with or without fee is hereby granted, provided that the above
79b9d2a55Sguenther  * copyright notice and this permission notice appear in all copies.
89b9d2a55Sguenther  *
99b9d2a55Sguenther  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
109b9d2a55Sguenther  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
119b9d2a55Sguenther  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
129b9d2a55Sguenther  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
139b9d2a55Sguenther  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
149b9d2a55Sguenther  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
159b9d2a55Sguenther  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
169b9d2a55Sguenther  */
179b9d2a55Sguenther 
189b9d2a55Sguenther #ifndef	_LIBC_STDIO_H_
199b9d2a55Sguenther #define	_LIBC_STDIO_H_
209b9d2a55Sguenther 
2102cde890Sguenther /* Rename __swbuf() before it's used in the inline __sputc() */
2202cde890Sguenther struct __sFILE;
2302cde890Sguenther int     __swbuf(int, struct __sFILE *);
2402cde890Sguenther PROTO_NORMAL(__swbuf);
2502cde890Sguenther 
263f5ad7fcSguenther /* we want the const-correct declarations inside libc */
273f5ad7fcSguenther #define __SYS_ERRLIST
283f5ad7fcSguenther 
299b9d2a55Sguenther #include_next <stdio.h>
309b9d2a55Sguenther 
319b9d2a55Sguenther __BEGIN_HIDDEN_DECLS
329b9d2a55Sguenther char	*_mktemp(char *);
339b9d2a55Sguenther __END_HIDDEN_DECLS
349b9d2a55Sguenther 
353f5ad7fcSguenther extern const int sys_nerr;
363f5ad7fcSguenther extern const char *const sys_errlist[];
373f5ad7fcSguenther 
3814437dc7Sguenther #if 0
393f5ad7fcSguenther extern PROTO_NORMAL(sys_nerr);
403f5ad7fcSguenther extern PROTO_NORMAL(sys_errlist);
4114437dc7Sguenther #endif
423f5ad7fcSguenther 
439b9d2a55Sguenther PROTO_NORMAL(__srget);
449b9d2a55Sguenther PROTO_NORMAL(asprintf);
459b9d2a55Sguenther PROTO_NORMAL(clearerr);
469b9d2a55Sguenther PROTO_NORMAL(ctermid);
479b9d2a55Sguenther PROTO_NORMAL(dprintf);
489b9d2a55Sguenther PROTO_NORMAL(fclose);
499b9d2a55Sguenther PROTO_NORMAL(fdopen);
509b9d2a55Sguenther PROTO_NORMAL(feof);
519b9d2a55Sguenther PROTO_NORMAL(ferror);
529b9d2a55Sguenther PROTO_NORMAL(fflush);
539b9d2a55Sguenther PROTO_NORMAL(fgetc);
549b9d2a55Sguenther PROTO_NORMAL(fgetln);
559b9d2a55Sguenther PROTO_NORMAL(fgetpos);
569b9d2a55Sguenther PROTO_NORMAL(fgets);
579b9d2a55Sguenther PROTO_NORMAL(fileno);
58fe38b55cSguenther PROTO_NORMAL(flockfile);
599b9d2a55Sguenther PROTO_NORMAL(fmemopen);
609b9d2a55Sguenther PROTO_NORMAL(fopen);
619b9d2a55Sguenther PROTO_NORMAL(fprintf);
629b9d2a55Sguenther PROTO_NORMAL(fpurge);
639b9d2a55Sguenther PROTO_NORMAL(fputc);
649b9d2a55Sguenther PROTO_NORMAL(fputs);
659b9d2a55Sguenther PROTO_NORMAL(fread);
669b9d2a55Sguenther PROTO_NORMAL(freopen);
679b9d2a55Sguenther PROTO_NORMAL(fscanf);
68*4487cc5aSguenther PROTO_STD_DEPRECATED(fseek);
699b9d2a55Sguenther PROTO_NORMAL(fseeko);
709b9d2a55Sguenther PROTO_NORMAL(fsetpos);
719b9d2a55Sguenther PROTO_NORMAL(ftell);
729b9d2a55Sguenther PROTO_NORMAL(ftello);
73fe38b55cSguenther PROTO_NORMAL(ftrylockfile);
74fe38b55cSguenther PROTO_NORMAL(funlockfile);
759b9d2a55Sguenther PROTO_NORMAL(funopen);
769b9d2a55Sguenther PROTO_NORMAL(fwrite);
779b9d2a55Sguenther PROTO_NORMAL(getc);
789b9d2a55Sguenther PROTO_NORMAL(getc_unlocked);
799b9d2a55Sguenther PROTO_NORMAL(getchar);
809b9d2a55Sguenther PROTO_NORMAL(getchar_unlocked);
819b9d2a55Sguenther PROTO_NORMAL(getdelim);
829b9d2a55Sguenther PROTO_NORMAL(getline);
839b9d2a55Sguenther PROTO_NORMAL(getw);
849b9d2a55Sguenther PROTO_NORMAL(open_memstream);
859b9d2a55Sguenther PROTO_NORMAL(pclose);
869b9d2a55Sguenther PROTO_NORMAL(perror);
879b9d2a55Sguenther PROTO_NORMAL(popen);
889b9d2a55Sguenther PROTO_NORMAL(printf);
899b9d2a55Sguenther PROTO_NORMAL(putc);
909b9d2a55Sguenther PROTO_NORMAL(putc_unlocked);
919b9d2a55Sguenther PROTO_NORMAL(putchar);
929b9d2a55Sguenther PROTO_NORMAL(putchar_unlocked);
939b9d2a55Sguenther PROTO_NORMAL(puts);
949b9d2a55Sguenther PROTO_NORMAL(putw);
959b9d2a55Sguenther PROTO_NORMAL(remove);
9615a0f535Sguenther PROTO_NORMAL(rename);
9715a0f535Sguenther PROTO_NORMAL(renameat);
989b9d2a55Sguenther PROTO_NORMAL(rewind);
999b9d2a55Sguenther PROTO_NORMAL(scanf);
1009b9d2a55Sguenther PROTO_NORMAL(setbuf);
1019b9d2a55Sguenther PROTO_NORMAL(setbuffer);
1029b9d2a55Sguenther PROTO_NORMAL(setlinebuf);
1039b9d2a55Sguenther PROTO_NORMAL(setvbuf);
1049b9d2a55Sguenther PROTO_NORMAL(snprintf);
1059b9d2a55Sguenther PROTO_STD_DEPRECATED(sprintf);
1069b9d2a55Sguenther PROTO_NORMAL(sscanf);
1079b9d2a55Sguenther PROTO_DEPRECATED(tempnam);
1089b9d2a55Sguenther PROTO_NORMAL(tmpfile);
1099b9d2a55Sguenther PROTO_STD_DEPRECATED(tmpnam);
1109b9d2a55Sguenther PROTO_NORMAL(ungetc);
1119b9d2a55Sguenther PROTO_NORMAL(vasprintf);
1129b9d2a55Sguenther PROTO_NORMAL(vdprintf);
1139b9d2a55Sguenther PROTO_NORMAL(vfprintf);
1149b9d2a55Sguenther PROTO_NORMAL(vfscanf);
1159b9d2a55Sguenther PROTO_NORMAL(vprintf);
1169b9d2a55Sguenther PROTO_NORMAL(vscanf);
1179b9d2a55Sguenther PROTO_NORMAL(vsnprintf);
1189b9d2a55Sguenther PROTO_STD_DEPRECATED(vsprintf);
1199b9d2a55Sguenther PROTO_NORMAL(vsscanf);
1209b9d2a55Sguenther 
1219b9d2a55Sguenther #endif /* _LIBC_STDIO_H_ */
122