Commit Graph

24 Commits

Author SHA1 Message Date
Bruce Evans
de7067ac25 Fixed missing declaration of ctermid_r(3). 1999-12-23 16:33:12 +00:00
Peter Wemm
a4add9a9b1 $Id$ -> $FreeBSD$ 1999-08-27 23:45:13 +00:00
Dmitrij Tejblum
7307d07db6 Added functions fseeko() and ftello() (from susv2).
Fixed fgetpos() and fsetpos() for offsets > 2GB.

PR:		8637
Submitted by:	 Dan Nelson <dnelson@emsphone.com> (adjusted by me a little)
1999-02-08 21:32:38 +00:00
Dmitrij Tejblum
c1b7af8ac3 Make this protototype of mmap return void *, like two other copies. 1998-12-14 19:23:16 +00:00
Bruce Evans
748993b899 Added macros __printflike() and __scanflike() to <sys/cdefs.h>.
Use them to `make gcc -Wformat' check formats for all printf-like
and scanf-like functions in /usr/src except for the err()/warn()
family.  err() isn't quite printf-like since its format arg can
legitimately be NULL.  syslog() isn't quite printf-like, but gcc
already accepts %m, even for plain printf() when it shouldn't.
1998-07-13 06:45:23 +00:00
Peter Wemm
b5fe8fabda New flag for internal stdio use to enable dynamic string allocation for
asprintf() implementation.

Obtained from: Todd Miller <Todd.Miller@courtesan.com> via OpenBSD
1998-07-08 00:52:40 +00:00
Bruce Evans
ed9c039078 Complete the switch to using gcc-2.4 features to declare fpos_t ,
as threatened in the 4-5 year old comment.  Most of the change is
in <machine/ansi.h>; this commit just removes cruft for the strict
ANSI case.  64-bit types couldn't actually be defined using
__attribute__(()) in gcc-2.4, since attribute names in the
implementation namespace only became available in gcc-2.7.  I've
probably just broken gcc-2.6 support by using the gcc-2.7 names
unconditionally.
1998-06-14 16:04:20 +00:00
John Birrell
351c800a5e I have a long list of issues to address here, mostly related to
namespace and revision levels of ANSI and POSIX. This change only
removes the leading underscrore from the FILE locking functions
that POSIX defines.
1998-05-05 21:59:19 +00:00
John Birrell
297263b079 Format changes in an attempt to address some of Bruce's comments
about spaces and tabs.

The externs in the static inline functions remain 'cause (a) they're
required; and (b) I can't find any gcc -W* cases where they generate
warnings.
1998-04-12 20:29:24 +00:00
John Birrell
7d0026cd9f Add *_unlocked() macros according to POSIX. In the _THREAD_SAFE case,
test for __isthreaded before calling the lock/unlock functions to
try to save some performance. The _THREAD_SAFE case should become the
default, but since it tests for a global variable in libc, people won't
be able to build -current on pre-3.0 systems unless the default leaves
it out. Such is life.
1998-04-11 07:33:46 +00:00
Alexander Langer
de17eb59b4 Added missing caddr_t --> void * conversions for sys/mman.h functions.
Submitted by:	bde
1998-01-01 17:07:46 +00:00
Bruce Evans
15aa51b01c Removed nonstandard #include of <sys/types.h>.
Use _BSD_OFF_T_ instead of off_t so that we're still self-sufficent.

Copied the ftruncate/lseek()/mmap()/truncate() redeclaration hacks
from <sys/types.h> so that things depending on them don't break.
1997-04-13 15:50:07 +00:00
Peter Wemm
161f948dd3 Merge Lite2 changes
(Just version number)
1997-03-11 11:16:27 +00:00
Andrey A. Chernov
3b96d4d951 increase L_cuserid because UT_NAMESIZE increased 1997-03-02 13:41:23 +00:00
Peter Wemm
79403fe300 Revert $FreeBSD$ to $Id$ 1997-02-23 09:21:14 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Wolfram Schneider
8c372bd8a2 improve comments for UT_NAMESIZE 1996-10-27 18:13:35 +00:00
Wolfram Schneider
ad7076c992 remove zopen, zopen is not part of libc. 1996-07-02 23:04:50 +00:00
Peter Wemm
15aa00d597 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
Paul Richards
65bfae763d Fix incorrect parameter types for ftell and fgets. 1996-03-24 15:51:45 +00:00
Mike Pritchard
71d9c7815e Fix a bunch of spelling errors in the comment fields
of a bunch of system include files.
1996-01-30 23:33:04 +00:00
Rodney W. Grimes
4399be3cbd Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
Poul-Henning Kamp
dd8723c2e3 make sys_nerr __const.
Reviewed by:	phk
Submitted by:	ollivier
1995-03-04 20:57:12 +00:00
Rodney W. Grimes
59deaec541 BSD 4.4 Lite Include Sources 1994-05-24 09:57:34 +00:00