| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
PR: 6868
Submitted by: Josh Gilliam <josh@quick.net>
Notes:
svn path=/head/; revision=36692
|
| |
|
|
| |
Notes:
svn path=/head/; revision=35836
|
| |
|
|
|
|
|
|
| |
va_list is not a pointer on alpha. Instead, use the va_arg() macro
to return the address that is stored in the argtable.
Notes:
svn path=/head/; revision=35835
|
| |
|
|
|
|
|
| |
POSIX defines.
Notes:
svn path=/head/; revision=35757
|
| |
|
|
|
|
|
|
|
|
|
| |
leading XXX's. It could wrap an uppercase character through chars
like: [ \ ] ^ _ ` in between Z and a. The backslash and back tick
might be particularly nasty in a shell script context. Also, since
we've been using upper-case generated values for a while now, go with
the flow and use them in the pathname search rotation.
Notes:
svn path=/head/; revision=35191
|
| |
|
|
|
|
|
|
|
|
|
| |
Change the FILE locking to support kernel threads when linked with
libpthread (which you haven't see yet). This requires that libc become
thread-safe and thread-aware, testing __isthreaded before attempting
to do lock/unlock calls. The impact on non-threaded programs is minor.
This change works with libc_r, so it's the best compromise.
Notes:
svn path=/head/; revision=35129
|
| |
|
|
| |
Notes:
svn path=/head/; revision=34511
|
| |
|
|
| |
Notes:
svn path=/head/; revision=34380
|
| |
|
|
|
|
|
|
|
| |
references to abort() in light of POSIX mandated behaviour. I'm
still not 100% happy with much of the wording, but it's better
than it was.
Notes:
svn path=/head/; revision=34310
|
| |
|
|
|
|
|
|
|
| |
I noticed cvs core dumps and uncleaned cvs temporary files in /tmp.
Fixed ANSIisms.
Notes:
svn path=/head/; revision=34016
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
implement mkdtemp
improve man page for mk*temp
use arc4random to seed extra XXX's randomly
Optionally warn of unsafe mktemp uses
From various commits by theo de raadt and Todd Miller.
Obtained from: OpenBSD
This should go into 2.2 after a testing period.
Notes:
svn path=/head/; revision=33295
|
| |
|
|
|
|
|
|
| |
in arguments length INT_MAX overflow check
Suggested-by: bde
Notes:
svn path=/head/; revision=32253
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
case has very little to do with the output size being larger than
INT_MAX.
2. The new #include of <limits.h> was disordered.
3. The new declaration of `on' was disordered (integer types go together).
4. Testing an unsigned value for > 0 was fishy.
Submitted by: bde
Notes:
svn path=/head/; revision=32168
|
| |
|
|
|
|
|
| |
just return EOF
Notes:
svn path=/head/; revision=31983
|
| |
|
|
| |
Notes:
svn path=/head/; revision=31982
|
| |
|
|
|
|
|
|
| |
2) Optimize string buffer copy to call memcpy() and update pointers
only for count > 0, it makes snprintf(NULL, 0, ...) more efficient
Notes:
svn path=/head/; revision=31981
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
instead of Singe Unix, thanx Bruce for explaining, I am not realize
standards war was there.
But now, fix n == 0 case to not return error and fix check for too
big n.
Things left to do: check for overflow in arguments.
Notes:
svn path=/head/; revision=31980
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Final word is Bruce's quote:
C9x specifies the BSD4.4-Lite behaviour:
[#3] ... Thus, the
null-terminated output has been completely written if and
only if the returned value is less than n.
It means that if we not have any null-terminated output as for n == 0
we can't return value less than n, so we forced to return value
equal to n i.e. 0
The next good thing is glibc compatibility, of course.
2) Do check for too big n in machine-independent way.
3) Minor optimization assuming EOF is < 0
Notes:
svn path=/head/; revision=31979
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main argument is that it is impossible to determine if %n evaluated or not
when snprintf return 0, because it can happens for both n == 0 and n == 1.
Although EOF here is good indication of the end of process, if n is
decreased in the loop...
Since it is already supposed in many places that EOF *is* negative, f.e.
from Single Unix specs for snprintf
"return ... a negative value if an output error was encountered"
this not makes situation worse.
Notes:
svn path=/head/; revision=31969
|
| |
|
|
|
|
|
|
|
| |
to pass not more than buffer size to %n agrument, old variant
always assume infinite buffer.
%n is for actually transmitted characters, not for planned ones.
Notes:
svn path=/head/; revision=31968
|
| |
|
|
|
|
|
|
|
|
|
|
| |
"return the number of bytes needed, rather the number used"
According to Single Unix specs:
Upon successful completion, these functions return the number of bytes
transmitted excluding the terminating null
Notes:
svn path=/head/; revision=31967
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) if buffer size is smaller than arguments size, return buffer
size, not arguments size as before.
2) if buffer size is 0, return 0, not EOF as before.
(now it is compatible with Linux and Apache implementations too).
NOTE: Single Unix specs says:
If the value of n {buffer size} is zero on a call to snprintf(), an
unspecified value less than 1 is returned.
It means we can't return EOF since EOF can take *any* value in general
not especially < 1. Better variant will be return -1 (it is less then
1 and different with n == 1 case) but -1 value is already occuped by
EOF in our implementation, so we can't distinguish true IO error
in that case. So 0 here is only possible case still conforming
to Single Unix specs.
Notes:
svn path=/head/; revision=31966
|
| |
|
|
| |
Notes:
svn path=/head/; revision=31871
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
on systems where long doubles are just doubles. FreeBSD hasn't
been such a system since it started using gcc-2.5 many years ago.
The fix is of low quality. It loses precision.
scanf() of long doubles doesn't seem to be used much, but gdb-4.16
uses %Lg format in its expression parser if it thinks that the
system supports printf'ing of long doubles. The symptom was that
floating point literals were usually interpreted to be 0.0.
Notes:
svn path=/head/; revision=31359
|
| |
|
|
| |
Notes:
svn path=/head/; revision=30624
|
| |
|
|
|
|
|
|
| |
were a workaround for limitations in bsd.man.mk that were fixed about
2 years ago.
Notes:
svn path=/head/; revision=30447
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and forgot what I was trying to do originally and accidently zapped
a feature. :-] The problem is that we are converting a counted buffer in
a malloc pool into a null terminated C-style string. I was calling realloc
originally to shrink the buffer to the desired size. If realloc failed, we
still returned the valid buffer - the only thing wrong was it was a tad
too large. The previous commit disabled this.
This commit now handles the three cases..
1: the buffer is exactly right for the null byte to terminate the
string (we don't call realloc).
2: it's got h.left = 0, so we must expand it to make room. If realloc
fails here, it's fatal.
3: if there's too much room, we realloc to shrink it - a failed realloc
is not fatal, we use the original buffer which is still valid.
Notes:
svn path=/head/; revision=27248
|
| |
|
|
|
|
|
|
| |
PR: 3451
Submitted by: Tim Vanderhoek <ac199@hwcn.org>
Notes:
svn path=/head/; revision=27245
|
| |
|
|
|
|
|
|
| |
PR: 2080
Submitted by: David Dawes <dawes@rf900.physics.usyd.edu.au>
Notes:
svn path=/head/; revision=27151
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
so that all these makefiles can be used to build libc_r too.
Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.
Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.
Notes:
svn path=/head/; revision=25401
|
| |
|
|
| |
Notes:
svn path=/head/; revision=24879
|
| |
|
|
|
|
|
| |
Obtained from: Keith Bostic
Notes:
svn path=/head/; revision=24707
|
| |
|
|
| |
Notes:
svn path=/head/; revision=24631
|
| |
|
|
| |
Notes:
svn path=/head/; revision=24627
|
| |
|
|
|
|
|
| |
Pointed out by: bde
Notes:
svn path=/head/; revision=24322
|
| |
|
|
| |
Notes:
svn path=/head/; revision=24008
|
| |
|
|
| |
Notes:
svn path=/head/; revision=23663
|
| |\
| |
| |
| |
| |
| |
| | |
which included commits to RCS files with non-trunk default branches.
Notes:
svn path=/head/; revision=23659
|
| |
|
|
| |
Notes:
svn path=/vendor/CSRG/dist/; revision=23658
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 0 was returned instead of EOF when an input failure occured while
skipping white-space after 0 assignments. This fixes PR2606. The
diagnosis in PR2606 is wrong.
- EOF was returned instead of 0 when an input failure occurred after
zero assignments and nonzero suppressed assignments.
- EOF was spelled -1.
This should be in 2.2.
Notes:
svn path=/head/; revision=23352
|
| |
|
|
| |
Notes:
svn path=/head/; revision=22993
|
| |
|
|
|
|
|
| |
Nitpicked-by: joerg
Notes:
svn path=/head/; revision=22308
|
| |
|
|
| |
Notes:
svn path=/head/; revision=21907
|
| |
|
|
|
|
|
| |
Should go in 2.2
Notes:
svn path=/head/; revision=21757
|
| |
|
|
|
|
|
|
|
|
|
|
| |
a manner consistent with other implementations. Its done in a way that
adds only a tiny amount of overhead when positional arguments are not used.
I also have a test program to go with this, but don't know where it belongs
in the tree.
Submitted-By: Bill Fenner <fenner@FreeBSD.ORG>
Notes:
svn path=/head/; revision=21674
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=21673
|
| |
|
|
|
|
|
|
|
|
| |
Submitted by: Kent Vander Velden <graphix@iastate.edu>
Reviewed by:
Submitted by:
Obtained from:
Notes:
svn path=/head/; revision=18577
|
| |
|
|
| |
Notes:
svn path=/head/; revision=18533
|
| |
|
|
|
|
|
| |
Obtained from: NetBSD lib/2751 (der Mouse)
Notes:
svn path=/head/; revision=18279
|
| |
|
|
|
|
|
|
|
|
|
| |
in a bunch of man pages.
Use the correct .Bx (BSD UNIX) or .At (AT&T UNIX) macros
instead of explicitly specifying the version in the text
in a bunch of man pages.
Notes:
svn path=/head/; revision=17782
|