| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Architecture
MFC After: 3 days
|
|
|
|
|
|
|
|
|
|
|
| |
if not already defined. This allows building libc from outside of
lib/libc using a reach-over makefile.
A typical use-case is to build a standard ILP32 version and a COMPAT32
version in a single iteration by building the COMPAT32 version using a
reach-over makefile.
Obtained from: Juniper Networks, Inc.
|
|
|
|
| |
Obtained From: DragonflyBSD (1ac92c8c857a15dc010924c5f066da404e568640)
|
|
|
|
|
| |
DST affects the day by one hour, but the number of days in the
week stay the same.
|
|
|
|
|
|
|
|
|
|
|
| |
This explanation is supposed to be simpler and better. In particular
"comparing it to the snprintf API provides lots of value, since it raises the
bar on understanding, so that programmers/auditors will a better job calling
all 3 of these functions."
Requested by: deraadt@cvs.openbsd.org
Obtained From: OpenBSD
Reviewed by: cperciva
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ensures strerror() and friends continue to work correctly even if a
(non-PIE) executable linked against an older libc imports sys_errlist (which
causes sys_errlist to refer to the executable's copy with a size fixed when
that executable was linked).
The executable's use of sys_errlist remains broken because it uses the
current value of sys_nerr and may access past the bounds of the array.
Different from the message "Using sys_errlist from executables is not
ABI-stable" on freebsd-arch, this change does not affect the static library.
There seems no reason to prevent overriding the error messages in the static
library.
|
|
|
|
|
| |
NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3,
so follow suit to make comparison easier.
|
|
|
|
|
|
| |
This was forgotten in the initial commit of strchrnul()
Approved by: theraven
|
|
|
|
|
|
|
| |
a pointer to the end of the string, rather than NULL, if the character was
not found.
Approved by: theraven
|
|
|
|
|
| |
Approved by: wblock
MFC after: 3 days
|
| |
|
|
|
|
|
| |
Messages for known signals looked like "Terminated: 15" instead of
"Terminated".
|
|
|
|
|
|
|
| |
Since r142667 strerror has unconditionally returned a pointer to a
static buffer.
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
relevant Makefile.
Reminded by: gavin
Approved by: gabor (mentor)
MFC after: 5 days
|
|
|
|
|
|
|
|
|
|
|
| |
- libc/string/strcoll.3
- libc/string/strstr.3
- libc/string/strxfrm.3
- libc/string/strcasecmp.3
Reviewed by: theraven, gabor
Approved by: gabor (mentor)
MFC after: 5 days
|
|
|
|
|
|
| |
PR: 167734
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days
|
|
|
|
|
|
|
| |
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
| |
PR: kern/140690
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
Approved by: cperciva
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
PR: docs/164940
Submitted by: Niclas Zeising <zeising@daemonic.se>
Approved by: cperciva
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
This allows people to still write statically linked applications that
call strchr() or strrchr() and have a local variable or function called
index.
Discussed with: bde@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As I looked through the C library, I noticed the FreeBSD MIPS port has a
hand-written version of index(). This is nice, if it weren't for the
fact that most applications call strchr() instead.
Also, on the other architectures index() and strchr() are identical,
meaning we have two identical pieces of code in the C library and
statically linked applications.
Solve this by naming the actual file strchr.[cS] and let it use
__strong_reference()/STRONG_ALIAS() to provide the index() routine. Do
the same for rindex()/strrchr().
This seems to make the C libraries and static binaries slightly smaller,
but this reduction in size seems negligible.
|
|
|
|
|
| |
Reviewed by: many
Approved by: des
|
|
|
|
|
|
|
| |
- add a comment explaining why I used '|' instead of '||'
Submitted by: danfe@
Approved by: emaste@
|
|
|
|
|
|
|
|
|
| |
- while here change 's' to 's1' in strcoll
Submitted by: eadler@
Reviewed by: theraven@
Approved by: brooks@
MFC after: 2 weeks
|
|
|
|
|
|
| |
needed.
Approved by: brooks (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
| |
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter. Also
adds support for per-thread locales. This work was funded by the FreeBSD
Foundation.
Please test any code you have that uses the C standard locale functions!
Reviewed by: das (gdtoa changes)
Approved by: dim (mentor)
|
|
|
|
|
|
| |
PR: docs/156796
Submitted by: Jean-Yves Migeon <jeanyves.migeon free.fr>
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Of course, strerror_r() may still fail with ERANGE.
Although the POSIX specification said this could fail with EINVAL and
doing this likely indicates invalid use of errno, most other
implementations permitted it, various POSIX testsuites require it to
work (matching the older sys_errlist array) and apparently some
applications depend on it.
PR: standards/151316
MFC after: 1 week
|
|
|
|
|
|
| |
POSIX.1-2008.
MFC after: 1 week
|
|
|
|
|
|
| |
their implementations aren't in the same files. Introduce LIBC_ARCH
and use that in preference to MACHINE_CPUARCH. Tested by amd64 and
powerpc64 builds (thanks nathanw@)
|
|
|
|
|
| |
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
|
|
|
|
|
|
|
|
|
|
|
| |
bottom of the manpages and order them consistently.
GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.
Found by: mdocml lint run
Reviewed by: ru
|
|
|
|
|
| |
Pointy hat to: delphij
MFC after: 1 month
|
|
|
|
| |
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
blog posting [1].
- Use word-sized test for unaligned pointer before working
the hard way.
Memory page boundary is always integral multiple of a word
alignment boundary. Therefore, if we can access memory
referenced by pointer p, then (p & ~word mask) must be also
accessible.
- Better utilization of multi-issue processor's ability of
concurrency.
The previous implementation utilized a formular that must be
executed sequentially. However, the ~, & and - operations can
actually be caculated at the same time when the operand were
different and unrelated.
The original Hacker's Delight formular also offered consistent
performance regardless whether the input would contain
characters with their highest-bit set, as it catches real
nul characters only.
These two optimizations has shown further improvements over the
previous implementation on microbenchmarks on i386 and amd64 CPU
including Pentium 4, Core Duo 2 and i7.
[1] http://vger.kernel.org/~davem/cgi-bin/blog.cgi/2010/03/08#strlen_1
MFC after: 1 month
|
| |
|
|
|
|
|
| |
This makes the implementation a bit more consistent with strdup(3),
which uses strlen(3).
|
|
|
|
| |
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
| |
PR: 141037
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
appeared in FreeBSD.
PR: 133785
Submitted by: Ulrich Spoerlein <uqs@spoerlein.net>
MFC after: 3 days
|
|
|
|
|
| |
because there is no way to figure that out based on the file mode
itself. Make the manual page match reality.
|
|
|
|
| |
Approved by: rwatson (mentor)
|
|
|
|
|
| |
Submitted by: Florian Smeets <flo kasimir com>
MFC after: 3 days
|
| |
|
|
|
|
| |
I missed this file in my previous commit.
|
|
|
|
|
|
|
|
|
|
|
|
| |
wcscasecmp(), and wcsncasecmp().
- Make some previously non-standard extensions visible
if POSIX_VISIBLE >= 200809.
- Use restrict qualifiers in stpcpy().
- Declare off_t and size_t in stdio.h.
- Bump __FreeBSD_version in case the new symbols (particularly
getline()) cause issues with ports.
Reviewed by: standards@
|
|
|
|
|
| |
The annotation mainly just serves as a hint that they're not intended
for use with overlapping strings.
|
| |
|