| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
PR: 181785
Submitted by: Kevin P. Neal <kpneal atpobox dot com>
MFC after: 1 week
Notes:
svn path=/head/; revision=364029
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: yuripv, bcr (mentor)
Approved by: bcr (mentror)
Obtained from: OpenBSD
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D24916
Notes:
svn path=/head/; revision=362326
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add STANDARDS and HISTORY sections within the appropriate manpages
- Mention two USENIX papers within kqueue(2) and strlcpy(3)
Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
Obtained from: NetBSD
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D24650
Notes:
svn path=/head/; revision=362171
|
|
|
|
|
|
|
|
|
| |
PR: 240269
Submitted by: Gordon Bergling
Differential Revision: https://reviews.freebsd.org/D24295
Notes:
svn path=/head/; revision=359773
|
|
|
|
|
|
|
|
|
| |
These functions first appeared in the First Edition of Unix (or earlier in the
pdp-7 version). Just claim 1st Edition for all this. The pdp-7 code is too
fragmented at this point to extend history that far back.
Notes:
svn path=/head/; revision=359547
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Among the same justification as the other stdio _unlocked; in addition to an
inline version in <stdio.h>, we must provide a function in libc as well for
the functionality. This fixes the lang/gcc* builds, which want to use the
symbol from libc.
PR: 243810
Reported by: antoine, swills, Michael <michael.adm gmail com>
X-MFC-With: r357284
Notes:
svn path=/head/; revision=357419
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fflush_unlocked is currently desired in ports by sysutils/metalog, and
redefined as the locked fflush.
fputc_unlocked, fputs_unlocked, fread_unlocked, and fwrite_unlocked are
currently desired in ports by devel/elfutils, and redefined as the locked
fputs, fread, and fwrite respectively.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D23336
Notes:
svn path=/head/; revision=357284
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gets is unsafe and shouldn't be used (for many years now). Leave it in
the existing symbol version so anything that previously linked aginst it
still runs, but do not allow new software to link against it.
(The compatability/legacy implementation must not be static so that
the symbol and in particular the compat sym gets@FBSD_1.0 make it
into libc.)
PR: 222796 (exp-run)
Reported by: Paul Vixie
Reviewed by: allanjude, cy, eadler, gnn, jhb, kib, ngie (some earlier)
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D12298
Notes:
svn path=/head/; revision=351659
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a variant of mkostemps() which takes a directory descriptor and
returns a descriptor for a tempfile relative to that directory. Unlike
the other mktemp functions, mkostempsat() can be used in capability
mode.
Reviewed by: cem
Discussed with: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21031
Notes:
svn path=/head/; revision=350420
|
|
|
|
|
|
|
|
|
|
|
|
| |
Back in 1993, the fgetln (then fgetline) interface was changed to not
return a C string. The change was accomplished by ifdefing out the code
that did the termination. Changing the interface would violate our API
stability rules so remove the old implementation.
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=343884
|
|
|
|
|
|
|
|
|
|
| |
gets(3) does. This was missed in r331936.
Reported by: emaste@
MFC after: 3 days
Notes:
svn path=/head/; revision=339656
|
|
|
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=339458
|
|
|
|
|
|
|
|
|
| |
Reviewed by: ed, dim (code only)
Sponsored by: Mellanox Technologies
MFC after: 1 week
Notes:
svn path=/head/; revision=334031
|
|
|
|
|
|
|
|
| |
Prompted by: Recent discussion
MFC after: 3 days
Notes:
svn path=/head/; revision=333895
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
output, from this:
strnlen, strlen, strlen,(3) - find length of string │·······
... to this:
strlen, strnlen(3) - find length of string
PR: 223525
MFC after: 2 weeks
Notes:
svn path=/head/; revision=332642
|
|
|
|
|
|
|
|
|
|
| |
Reported by: kib@
MFC after: 2 weeks
X-MFC with: r331936
Differential Revision: https://reviews.freebsd.org/D12785
Notes:
svn path=/head/; revision=331947
|
|
|
|
|
|
|
|
|
|
| |
Reported by: kib@
MFC after: 2 weeks
X-MFC with: r331936
Differential Revision: https://reviews.freebsd.org/D12785
Notes:
svn path=/head/; revision=331945
|
|
|
|
|
|
|
|
|
|
|
|
| |
While I'm at it correct the update date in the man page.
Reported by: ed@
MFC after: 2 weeks
X-MFC with: r331936
Differential Revision: https://reviews.freebsd.org/D12785
Notes:
svn path=/head/; revision=331942
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements the gets_s(3) function as documented at
http://en.cppreference.com/w/c/io/gets. It facilitates the
optional removal of gets(3).
Reviewed by: ed
MFC after: 2 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12785
Notes:
svn path=/head/; revision=331936
|
|
|
|
|
|
|
|
|
|
|
| |
Variable l is consistently used as an int rather than a char.
Sort names while here.
Obtained from: Apple's Libc-1244.30.3
MFC after: 5 days
Notes:
svn path=/head/; revision=329848
|
|
|
|
|
|
|
|
|
|
| |
In r268924 the behavior of fflush was changed to return success
on read only streams. Document this.
Reported by: zrj@DragonFlyBSD.org
Notes:
svn path=/head/; revision=327181
|
|
|
|
|
|
|
|
|
|
| |
This documentation truncation similar to POSIX and glibc.
PR: 202545
Reported by: intron@intron.ac
Notes:
svn path=/head/; revision=327099
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
matching failure.
According to the Open Group documentation for fwscanf:
"Upon successful completion, these functions shall return the number of
successfully matched and assigned input items; this number can be zero in
the event of an early matching failure."
Without this change, fwscanf would return EOF in the case of an early
matching failure, instead of the proper return value of 0.
This change aligns fwscanf(3) with the implementation in fscanf(3).
PR: 202240
Submitted by: rajendra.sy@gmail.com
Reviewed by: jhb, cem
Approved by: sjg (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D13288
Notes:
svn path=/head/; revision=326635
|
|
|
|
| |
Notes:
svn path=/head/; revision=326246
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Notes:
svn path=/head/; revision=326193
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
Notes:
svn path=/head/; revision=326025
|
|
|
|
|
|
|
|
|
|
|
|
| |
{}'s around the if (c == EOF) block to prevent potential 'trailing else'
issues from being introduced when refactoring. As my gets_s() code
is based on this, it makes sense to fix the same issue here first
here and now, then do an svn copy again to capture this history).
Suggested by: ed@ in D12785
Notes:
svn path=/head/; revision=325357
|
|
|
|
|
|
|
| |
Pointy hat to: cy
Notes:
svn path=/head/; revision=325032
|
|
|
|
|
|
|
|
|
|
| |
sys/cdefs.h include appropriately.
MFC after: 1 week
X-MFC with: r325030
Notes:
svn path=/head/; revision=325031
|
|
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=325030
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__pthread_cleanup_push/pop_imp instead of symbols also exported from
libthr.
This prevents calls into libthr if libthr is not yet initialized. The
situation occurs e.g. when an LD_PRELOADed object is not linked
against libthr, but the main binary is.
Reported and tested by: jbeich
PR: 220381
Discussed with: vangyzen
Sponsored by: The FreeBSD Foundation
MFC after: 13 days
Notes:
svn path=/head/; revision=320509
|
|
|
|
|
|
|
|
|
|
| |
Reported by: Oleg Ginzburg <olevole@olevole.ru>
Reviewed by: vangyzen
Sponsored by: The FreeBSD Foundation
MFC after: 13 days
Notes:
svn path=/head/; revision=320508
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If used with fopen(3)/fdopen(3)-ed FILEs, stdio accurately uses
non-cancellable internal versions of the functions, i.e. it seems to
be fine with regard to cancellation. But if the funopen(3) and
f{r,w}open(3) functions were used to open the FILE, and corresponding
user functions create cancellation points (they typically have no
other choice), then stdio code at least leaks FILE' lock.
The change installs cleanup handler which unlocks FILE. Some minimal
restructuring of the code was required to make it use common return
place to satisfy hand-rolled pthread_cleanup_pop() requirements.
Noted by: eugen
Reviewed by: eugen, vangyzen
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D11246
Notes:
svn path=/head/; revision=320472
|
|
|
|
|
|
|
|
|
|
|
| |
Add obligatory `*` in declarations.
Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=318711
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Break on new lines.
- Use .Dv with NULL.
- Rewrap lines as necessary/when possible.
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=318705
|
|
|
|
|
|
|
|
|
|
|
|
| |
reallocarray(3) is a non portable extension that originated in OpenBSD.
Given that it is already in FreeBSD's libc it is useful for the cases
where reallocation involves a multiplication.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9955
Notes:
svn path=/head/; revision=315162
|
|
|
|
|
|
|
|
| |
Initialize newsize in the code section so we avoids asigning the
value if we exit early.
Notes:
svn path=/head/; revision=315104
|
|
|
|
|
|
|
|
|
|
|
|
| |
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
Notes:
svn path=/head/; revision=314436
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding %b support to vfprintf for parity with kernel space requires
more discussion/review.
In particular, many parties were concerned over introducing a
non-standard format qualifier to *printf(3) which didn't already
exist in other OSes, e.g. Linux, thus making code which used %b
harder to port to other operating systems.
Requested by: many
Notes:
svn path=/head/; revision=310433
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a direct port of the kernel %b format.
I'm unclear on if (more) non-portable printf extensions will be a
problem. I think it's desirable to have userspace formats include all
kernel formats, but there may be competing goals I'm not aware of.
Reviewed by: no one, unfortunately
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8426
Notes:
svn path=/head/; revision=310138
|
|
|
|
|
|
|
|
|
|
|
| |
arguments in the string format.
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D8286
Notes:
svn path=/head/; revision=308145
|
|
|
|
|
|
|
| |
MFC after: 3 days
Notes:
svn path=/head/; revision=305413
|
|
|
|
|
|
|
|
|
|
| |
(we read n - 1 chars with the room for NUL, see fgets()),
and no NULL return.
MFC after: 3 days
Notes:
svn path=/head/; revision=305412
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when the first mb sequence is incomplete and there are not enougn chars in
the read buffer. ws[-1] may lead to memory faults or false results, in
case the memory here contains '\n'.
2) Fix EOF checking I mess in my previos r305406 commit.
MFC after: 3 days
Notes:
svn path=/head/; revision=305409
|
|
|
|
|
|
|
| |
MFC after: 3 days
Notes:
svn path=/head/; revision=305406
|
|
|
|
|
|
|
|
|
|
|
| |
sequence near EOF), so we can't just check for
(wc == WEOF && !__sfeof(fp)) and must relay on __sferror(fp) with
__SERR clearing/restoring.
MFC after: 7 days
Notes:
svn path=/head/; revision=305241
|
|
|
|
|
|
|
|
|
| |
and __srefill().
MFC after: 3 days
Notes:
svn path=/head/; revision=305219
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
i.e. partial line, but set __SERR and errno in the same time, which
is inconsistent.
Now both OpenBSD and NetBSD return failure, i.e. no line and set error
indicators for such case, so make our fgetln() and fgetwln()
(as its wide version) compatible with the rest of *BSD.
PR: 212033
MFC after: 7 days
Notes:
svn path=/head/; revision=304819
|
|
|
|
|
|
|
|
|
| |
One of affected encoding example: US-ASCII
MFC after: 7 days
Notes:
svn path=/head/; revision=304811
|
|
|
|
|
|
|
|
|
|
| |
functions.
__SERR is for user and the rest of stdio code do not check it
for error sensing internally, only set it.
In vf(w)printf.c here it is more easy to save __SERR, clear and restore it.
Notes:
svn path=/head/; revision=304810
|