1994-05-27 05:00:24 +00:00
|
|
|
# @(#)Makefile.inc 8.3 (Berkeley) 4/17/94
|
1999-08-28 00:22:10 +00:00
|
|
|
# $FreeBSD$
|
1994-05-27 05:00:24 +00:00
|
|
|
|
|
|
|
# stdio sources
|
1997-05-03 03:50:06 +00:00
|
|
|
.PATH: ${.CURDIR}/../libc/stdio
|
1994-05-27 05:00:24 +00:00
|
|
|
|
1998-04-11 07:40:47 +00:00
|
|
|
SRCS+= _flock_stub.c \
|
|
|
|
asprintf.c clrerr.c fclose.c fdopen.c feof.c ferror.c fflush.c \
|
Add an implementation of the gnu-ish asprintf() and vasprintf(). They are
not based on gpl'ed code, just prototype and usage. I'm not 100% certain
they behave the same while the system is in trouble (eg: malloc() failing)
but in those circumstances all bets would be off anyway.
These routines work like sprintf() and vsprintf(), except that instead of
using a fixed buffer, they allocate memory and return it to the user
and it's the user's responsibility to free() it. They have allocate as
much memory as they need (and can get), so the size of strings it can deal
with is limited only by the amount of memory it can malloc() on your
behalf.
There are a few gpl'ed programs starting to use this interface, and it's
becoming more common with the scares about security risks with sprintf().
I dont like the look of the code that the various programs (including
cvs, gdb, libg++, etc) provide if configure can't find it on the system.
It should be possible to modify the stdio core code to provide this
interface more efficiently, I was more worried about having something
that worked and was secure. :-) (I noticed that there was once intended
to be a smprintf() routine when our stdio was written for 4.4BSD, but it
looks pretty stillborn, and it's intended interface is not clear). Since
Linux and gnu libc have this interface, it seemed silly to bring yet
another one onto the scene.
1996-05-27 10:49:43 +00:00
|
|
|
fgetc.c fgetln.c fgetpos.c fgets.c fileno.c findfp.c flags.c fopen.c \
|
1994-05-27 05:00:24 +00:00
|
|
|
fprintf.c fpurge.c fputc.c fputs.c fread.c freopen.c fscanf.c \
|
|
|
|
fseek.c fsetpos.c ftell.c funopen.c fvwrite.c fwalk.c fwrite.c \
|
|
|
|
getc.c getchar.c gets.c getw.c makebuf.c mktemp.c perror.c \
|
|
|
|
printf.c putc.c putchar.c puts.c putw.c refill.c remove.c rewind.c \
|
|
|
|
rget.c scanf.c setbuf.c setbuffer.c setvbuf.c snprintf.c sprintf.c \
|
Add an implementation of the gnu-ish asprintf() and vasprintf(). They are
not based on gpl'ed code, just prototype and usage. I'm not 100% certain
they behave the same while the system is in trouble (eg: malloc() failing)
but in those circumstances all bets would be off anyway.
These routines work like sprintf() and vsprintf(), except that instead of
using a fixed buffer, they allocate memory and return it to the user
and it's the user's responsibility to free() it. They have allocate as
much memory as they need (and can get), so the size of strings it can deal
with is limited only by the amount of memory it can malloc() on your
behalf.
There are a few gpl'ed programs starting to use this interface, and it's
becoming more common with the scares about security risks with sprintf().
I dont like the look of the code that the various programs (including
cvs, gdb, libg++, etc) provide if configure can't find it on the system.
It should be possible to modify the stdio core code to provide this
interface more efficiently, I was more worried about having something
that worked and was secure. :-) (I noticed that there was once intended
to be a smprintf() routine when our stdio was written for 4.4BSD, but it
looks pretty stillborn, and it's intended interface is not clear). Since
Linux and gnu libc have this interface, it seemed silly to bring yet
another one onto the scene.
1996-05-27 10:49:43 +00:00
|
|
|
sscanf.c stdio.c tempnam.c tmpfile.c tmpnam.c ungetc.c vasprintf.c \
|
1998-05-08 05:17:11 +00:00
|
|
|
vfprintf.c vfscanf.c vprintf.c vscanf.c vsnprintf.c vsprintf.c \
|
Add an implementation of the gnu-ish asprintf() and vasprintf(). They are
not based on gpl'ed code, just prototype and usage. I'm not 100% certain
they behave the same while the system is in trouble (eg: malloc() failing)
but in those circumstances all bets would be off anyway.
These routines work like sprintf() and vsprintf(), except that instead of
using a fixed buffer, they allocate memory and return it to the user
and it's the user's responsibility to free() it. They have allocate as
much memory as they need (and can get), so the size of strings it can deal
with is limited only by the amount of memory it can malloc() on your
behalf.
There are a few gpl'ed programs starting to use this interface, and it's
becoming more common with the scares about security risks with sprintf().
I dont like the look of the code that the various programs (including
cvs, gdb, libg++, etc) provide if configure can't find it on the system.
It should be possible to modify the stdio core code to provide this
interface more efficiently, I was more worried about having something
that worked and was secure. :-) (I noticed that there was once intended
to be a smprintf() routine when our stdio was written for 4.4BSD, but it
looks pretty stillborn, and it's intended interface is not clear). Since
Linux and gnu libc have this interface, it seemed silly to bring yet
another one onto the scene.
1996-05-27 10:49:43 +00:00
|
|
|
vsscanf.c wbuf.c wsetup.c
|
1994-05-27 05:00:24 +00:00
|
|
|
|
1997-05-03 03:50:06 +00:00
|
|
|
.if ${LIB} == "c"
|
1997-10-15 16:16:41 +00:00
|
|
|
MAN3+= fclose.3 ferror.3 fflush.3 fgetln.3 fgets.3 fopen.3 fputs.3 \
|
|
|
|
fread.3 fseek.3 funopen.3 getc.3 mktemp.3 printf.3 putc.3 remove.3 \
|
|
|
|
scanf.3 setbuf.3 stdio.3 tmpnam.3 ungetc.3
|
1994-05-27 05:00:24 +00:00
|
|
|
|
|
|
|
MLINKS+=ferror.3 clearerr.3 ferror.3 feof.3 ferror.3 fileno.3
|
|
|
|
MLINKS+=fflush.3 fpurge.3
|
|
|
|
MLINKS+=fgets.3 gets.3
|
|
|
|
MLINKS+=fopen.3 fdopen.3 fopen.3 freopen.3
|
|
|
|
MLINKS+=fputs.3 puts.3
|
|
|
|
MLINKS+=fread.3 fwrite.3
|
1999-03-05 13:01:22 +00:00
|
|
|
MLINKS+=fseek.3 fgetpos.3 fseek.3 fseeko.3 fseek.3 fsetpos.3 fseek.3 ftell.3 \
|
|
|
|
fseek.3 ftello.3 fseek.3 rewind.3
|
1994-05-27 05:00:24 +00:00
|
|
|
MLINKS+=funopen.3 fropen.3 funopen.3 fwopen.3
|
|
|
|
MLINKS+=getc.3 fgetc.3 getc.3 getchar.3 getc.3 getw.3
|
1999-04-04 21:15:37 +00:00
|
|
|
MLINKS+=mktemp.3 mkdtemp.3 mktemp.3 mkstemp.3 mktemp.3 mkstemps.3
|
1997-10-21 08:41:15 +00:00
|
|
|
MLINKS+=printf.3 asprintf.3 printf.3 fprintf.3 \
|
|
|
|
printf.3 snprintf.3 printf.3 sprintf.3 \
|
|
|
|
printf.3 vasprintf.3 \
|
1994-05-27 05:00:24 +00:00
|
|
|
printf.3 vfprintf.3 printf.3 vprintf.3 printf.3 vsnprintf.3 \
|
1997-10-21 08:41:15 +00:00
|
|
|
printf.3 vsprintf.3
|
1994-05-27 05:00:24 +00:00
|
|
|
MLINKS+=putc.3 fputc.3 putc.3 putchar.3 putc.3 putw.3
|
|
|
|
MLINKS+=scanf.3 fscanf.3 scanf.3 sscanf.3 scanf.3 vfscanf.3 scanf.3 vscanf.3 \
|
|
|
|
scanf.3 vsscanf.3
|
|
|
|
MLINKS+=setbuf.3 setbuffer.3 setbuf.3 setlinebuf.3 setbuf.3 setvbuf.3
|
|
|
|
MLINKS+=tmpnam.3 tempnam.3 tmpnam.3 tmpfile.3
|
1997-05-03 03:50:06 +00:00
|
|
|
.endif
|